* lisp/minibuffer.el (completion-table-with-quoting) <completion--unquote>:
[bpt/emacs.git] / src / ChangeLog
CommitLineData
61febcb6
PE
12014-05-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Revert recent libpng changes (Bug#17339).
4 * Makefile.in (PNG_CFLAGS): Remove; all uses removed.
5 * image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
6
d355cad6
PE
72014-05-03 Paul Eggert <eggert@cs.ucla.edu>
8
9 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
10 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
11 because WCONTINUED is always defined now.
12 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
13
74a9022a
EZ
142014-05-03 Eli Zaretskii <eliz@gnu.org>
15
16 * buffer.c (overlay_strings): Fix the wording of the commentary.
17
6f074205
PE
182014-05-02 Paul Eggert <eggert@cs.ucla.edu>
19
20 Consult libpng-config more consistently (Bug#17339).
21 * Makefile.in (PNG_CFLAGS): New var.
22 (ALL_CFLAGS): Use it.
23 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
24 CFLAGS now handles this.
25
d136f184
GM
262014-05-01 Glenn Morris <rgm@gnu.org>
27
28 * floatfns.c (Fisnan):
29 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
30
28c05b69
EZ
312014-05-01 Eli Zaretskii <eliz@gnu.org>
32
33 * term.c (tty_menu_activate): A better initialization for cursor
34 coordinates.
35
23c931aa
SM
362014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
37
38 * intervals.c: Tighten assertions.
39 (create_root_interval): Make sure the interval is not empty.
40 (intervals_equal): Use booleans.
41 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
42 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
43 (balance_possible_root_interval): Simplify and use booleans.
44 (split_interval_right, split_interval_left): Check LENGTH, and remove
45 now redundant assertion.
46 (adjust_intervals_for_insertion): Remove now redundant assertions.
47 (delete_node, interval_deletion_adjustment)
48 (adjust_intervals_for_deletion, merge_interval_right)
49 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
50 (reproduce_interval): Make sure the interval is not empty.
51
bc6cb3ef
PE
522014-04-30 Paul Eggert <eggert@cs.ucla.edu>
53
54 * term.c (tty_menu_activate): Don't assume row and col are initialized.
55 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
56 satisfaction that they would always be initialized.
57
a55ea27f
EZ
582014-04-29 Eli Zaretskii <eliz@gnu.org>
59
60 * term.c (tty_menu_display): Move the cursor to the active menu
61 item.
62 (tty_menu_activate): Return the cursor to the active menu item
63 after displaying the menu and after displaying help-echo. See
64 http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
65 for the details of why this is needed by screen readers and
66 Braille displays.
67
4a25c1cb
GM
682014-04-29 Glenn Morris <rgm@gnu.org>
69
70 * process.c (handle_child_signal):
71 Handle systems without WCONTINUED. (Bug#15110, 17339)
72
80d982d7
EZ
732014-04-23 Eli Zaretskii <eliz@gnu.org>
74
75 * search.c (Fnewline_cache_check): Don't try to count newlines
4a25c1cb 76 outside the buffer's restriction, as find_newline doesn't support that.
80d982d7 77
0fae5004
PE
782014-04-22 Paul Eggert <eggert@cs.ucla.edu>
79
34e856d5
PE
80 Port to GCC 4.9.0 with --enable-gcc-warnings.
81 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
82 All uses removed.
83 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
84 a way that also works with GCC 4.9.0.
85
0fae5004
PE
86 * search.c (Fnewline_cache_check): Remove unused locals.
87
2f999d52
EZ
882014-04-22 Eli Zaretskii <eliz@gnu.org>
89
90 * search.c (find_newline1): New subroutine.
91 (Fnewline_cache_check): New function.
92 (syms_of_search): Defsubr it.
93
6709d4da
JC
942014-04-21 Jarek Czekalski <jarekczek@poczta.onet.pl>
95
96 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
97 * keyboard.c (unblock_input): Add comment.
98 * xgselect.c (xg_select): Prevent Glib main loop recursion.
99
d7b659bb
SM
1002014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
101
102 * intervals.c (rotate_right, rotate_left): Fix up length computation.
103 Also change identifiers to match the comments, and add more assertions
104 (bug#16234).
105
ea0ca0f4
EZ
1062014-04-18 Eli Zaretskii <eliz@gnu.org>
107
108 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
109 glyph is written to TEXT_AREA of the temporary glyph_row.
110 (Bug#17288)
111
31559517
PE
1122014-04-18 Paul Eggert <eggert@cs.ucla.edu>
113
114 * emacs.c (close_output_streams): Don't clear and restore errno.
115
53e46f3a
JD
1162014-04-17 Jan Djärv <jan.h.d@swipnet.se>
117
118 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
119 never becomes visible, i.e. using XMonad (Bug#17237).
120
f76da67d
EZ
1212014-04-17 Eli Zaretskii <eliz@gnu.org>
122
8915b842
EZ
123 * xdisp.c (Fline_pixel_height): Don't assume that the current
124 buffer and the selected window's buffer are one and the same.
125 (Bug#17281)
126
f76da67d
EZ
127 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
128 paragraph-start cache before the newline cache. (Bug#17269)
129
63032a0e
SM
1302014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
131
132 * window.c (save_window_save): Lookup window_point_insertion_type in
133 the right buffer (bug#15457).
134 (Qwindow_point_insertion_type): New var.
135 (syms_of_window): Initialize it.
136
bf6b4923
EZ
1372014-04-16 Eli Zaretskii <eliz@gnu.org>
138
ad62a115 139 Fix the MSDOS build.
bf6b4923
EZ
140 * unexcoff.c [MSDOS]: Include libc/atexit.h.
141 (copy_text_and_data): Zero out the atexit chain pointer before
142 dumping Emacs.
143
144 * termhooks.h (encode_terminal_code): Update prototype.
145
146 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
147 visible for all DOS_NT ports, not just WINDOWSNT.
148 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
149
150 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
151 unless it is defined.
152 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
153
154 * process.c (close_on_exec, accept4, process_socket): Move into
155 the "ifdef subprocesses" part.
156 (catch_child_signal): Condition by "ifdef subprocesses".
157 (syms_of_process) <Qinternal_default_process_sentinel>
158 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
159
160 * msdos.h: Add prototypes for new functions.
161 (EINPROGRESS): Define.
162 (O_CLOEXEC): Define to zero.
163
164 * msdos.c (check_window_system): Remove unnecessary an
165 incompatible duplicate function.
63032a0e
SM
166 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
167 New functions in support of new functionality.
bf6b4923
EZ
168
169 * menu.c (single_menu_item): Add visual indication of submenu
170 also for menus on MSDOS frames.
171 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
172
173 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
174 when async subprocesses aren't supported.
175
176 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
177
178 * emacs.c (close_output_streams): Zero out errno before calling
179 close_stream.
180
181 * dired.c [MSDOS]: Include msdos.h.
182
183 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
184 (DATA_START) [MSDOS]: Define.
185 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
186
187 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
188 Ifdef away for MSDOS.
189 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
190 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
191 for MSDOS.
192 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
193 Use temporary file template that is compatible with mkostemp.
194 Move vfork-related portions under #ifndef MSDOS.
195 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
196
ad0dfd98
EZ
1972014-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
198
199 * buffer.c (Foverlays_at): Add argument `sorted'.
200
2012014-04-14 Eli Zaretskii <eliz@gnu.org>
202
203 * insdel.c (invalidate_buffer_caches): When deleting or replacing
204 text, invalidate the bidi_paragraph_cache upto and including the
205 preceding newline.
206
13a5993b
PE
2072014-04-13 Paul Eggert <eggert@cs.ucla.edu>
208
209 Port to IRIX 6.5 (Bug#9684).
210 * alloc.c (TAGGABLE_NULL): New constant,
211 for porting to hosts with nontrivial DATA_SEG_BITS settings.
212 (next_vector, set_next_vector): Use it.
213 * conf_post.h (INET6) [IRIX6_5]: Define.
214 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
215 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
216 * lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out,
217 for consistency with how TAGGABLE_NULL is computed.
218
ff252be0
EZ
2192014-04-13 Eli Zaretskii <eliz@gnu.org>
220
ced78c5a
EZ
221 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
222 before passing it to system APIs.
223
ff252be0
EZ
224 * puresize.h (BASE_PURESIZE): Bump by 1K. (Bug#17255)
225
285d6d5d
SM
2262014-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
227
228 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
229 make sure stack.byte_string_start is not de-adjusted by pushhandler.
230
a9108bf1
PE
2312014-04-12 Paul Eggert <eggert@cs.ucla.edu>
232
233 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
234
180c8ce0
EZ
2352014-04-12 Eli Zaretskii <eliz@gnu.org>
236
237 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
238 covered by a display string that ends in a newline, and that cases
239 going back by DVPOS lines to hit the search limit, lift the limit
240 and go back until DVPOS is reached. (Bug#17244)
241
242 * indent.c (Fvertical_motion): Handle correctly the case when the
243 display string is preceded by an empty line.
244
95765a6a
EZ
2452014-04-11 Eli Zaretskii <eliz@gnu.org>
246
247 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
248 use S_IWRITE instead.
249
34e083e3
GM
2502014-04-11 Glenn Morris <rgm@gnu.org>
251
252 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
253
0cccc183
KB
2542014-04-09 Ken Brown <kbrown@cornell.edu>
255
256 * Makefile.in (EMACS_MANIFEST): Revert last change.
257
e3b83880
SM
2582014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
259
260 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
261
262 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
263 (symbol_block_pinned): New var.
264 (Fmake_symbol): Initialize `pinned'.
265 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
266 pinned and signal an error for un-purifiable objects.
267 (pure_cons): Use it.
268 (Fpurecopy): Use it, except for objects that can't be purified.
269 (mark_pinned_symbols): New function.
270 (Fgarbage_collect): Use it.
271 (gc_sweep): Remove hack made unnecessary.
272
50ea0f87
GM
2732014-04-05 Glenn Morris <rgm@gnu.org>
274
275 * keyboard.c (Fopen_dribble_file): Doc tweak.
276
11a9c72f
JD
2772014-04-04 Jan Djärv <jan.h.d@swipnet.se>
278
279 Backport from trunk.
280 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
50ea0f87
GM
281 bar is zero height, just return (Bug#16976).
282 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
283 * nsterm.h (EmacsView): Add wait_for_tool_bar.
284 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
11a9c72f 285 is nil. If waiting for toolbar to complete, force a redraw.
50ea0f87 286 (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976).
11a9c72f 287
ebe8e076
KB
2882014-04-03 Ken Brown <kbrown@cornell.edu>
289
290 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
291
ffcd5669
MR
2922014-04-02 Martin Rudalics <rudalics@gmx.at>
293
294 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
295 width from font width (Bug#17163).
296
632e91a6
MR
2972014-03-30 Martin Rudalics <rudalics@gmx.at>
298
299 * frame.c (x_set_frame_parameters): Calculate default values of
300 new frame sizes only after all other frame parameters have been
301 processed (Bug#17142).
302
9c67d3ba
KB
3032014-03-28 Ken Brown <kbrown@cornell.edu>
304
305 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
306 (Bug#17112)
307
08be62f4
YM
3082014-03-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
309
310 * xterm.c (x_draw_image_glyph_string): Adjust image background
311 width accordingly when its x position is adjusted. (Bug#17115)
312
0c4e715c
YM
3132014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
314
315 * w32term.c (x_draw_image_glyph_string): Fix computation of height
316 and width of image background when it is displayed with a 'box'
317 face. (Bug#17115)
318
3fd3e736
PE
3192014-03-26 Paul Eggert <eggert@penguin.cs.ucla.edu>
320
321 More backward-compatible fix to char-equal core dump (Bug#17011).
322 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
323 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
b18d7820 324
05b250c2
PE
325 Fix core dump in char-equal (Bug#17011).
326 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
327 unibyte buffers, as we can't tell whether the characters are
328 actually unibyte.
329
b18d7820
PE
330 * insdel.c (adjust_markers_for_delete): Remove unused local.
331
37ea8275
BR
3322014-03-24 Barry O'Reilly <gundaetiapo@gmail.com>
333
334 Have (MARKER . ADJUSTMENT) undo records always be immediately
335 after their corresponding (TEXT . POS) record in undo list.
336 (Bug#16818)
337 * lisp.h (record-delete): New arg record_markers.
338 (record_marker_adjustment): No longer needed outside undo.c.
339 * insdel.c (adjust_markers_for_delete): Move calculation of marker
340 adjustments to undo.c's record_marker_adjustments. Note that
341 fileio.c's decide_coding_unwind is another caller to
342 adjust_markers_for_delete. Because it has undo list bound to t,
343 it does not rely on adjust_markers_for_delete to record marker
344 adjustments.
345 (del_range_2): Swap call to record_delete and
346 adjust_markers_for_delete so as undo marker adjustments are
347 recorded before current deletion's adjustments, as before.
348 (adjust_after_replace):
349 (replace_range): Pass value for new record_markers arg to
350 delete_record.
63032a0e 351 * undo.c (record_marker_adjustment): Rename to
37ea8275
BR
352 record_marker_adjustments and made static.
353 (record_delete): Check record_markers arg and call
354 record_marker_adjustments.
355 (record_change): Pass value for new record_markers arg to
356 delete_record.
357 (record_point): at_boundary calculation no longer needs to account
358 for marker adjustments.
359
f2999a33
MR
3602014-03-24 Martin Rudalics <rudalics@gmx.at>
361
362 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
363 (Bug#17077).
364
33f0ba7e
GM
3652014-03-23 Glenn Morris <rgm@gnu.org>
366
367 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
368
f6614a47
SM
3692014-03-23 Stefan Monnier <monnier@iro.umontreal.ca>
370
371 * buffer.c (struct sortvec): Add field `spriority'.
372 (compare_overlays): Use it.
373 (sort_overlays): Set it.
374
88c569ef
EZ
3752014-03-23 Eli Zaretskii <eliz@gnu.org>
376
377 * xdisp.c (redisplay_window): If all previous attempts to find the
378 cursor row failed, try a few alternatives before falling back to
9729c262 379 the top-most row of the window. Use row_containing_pos. (Bug#17047)
88c569ef 380
e4e40f72
DC
3812014-03-22 Daniel Colascione <dancol@dancol.org>
382
383 * process.c (conv_sockaddr_to_lisp): When extracting the string
384 names of AF_LOCAL sockets, stop before reading uninitialized
385 memory.
386
e611af50
DC
3872014-03-23 Daniel Colascione <dancol@dancol.org>
388
389 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
390 array. (ASAN caught.)
391
fef27dc1
YM
3922014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
393
394 Fix regression introduced by patch for Bug#10500.
395 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
396 * w32term.c (x_draw_image_relief): Likewise.
397
21e18b30
MR
3982014-03-21 Martin Rudalics <rudalics@gmx.at>
399
400 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
401 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
402 maximize a frame for odd default fonts.
403
1271626a
PE
4042014-03-20 Paul Eggert <eggert@cs.ucla.edu>
405
406 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
407
caecb91c
SM
4082014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
409
049fac7c
SM
410 * doc.c (store_function_docstring): Warn when we don't know where to
411 put a docstring.
412 (Fsubstitute_command_keys): Don't advertise the fact that
413 text-properties are dropped, since we think it's a bug that we'll fix
414 in 24.5.
415
caecb91c
SM
416 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
417 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
418 * frame.c (frame_garbaged): Make "docstring" more precise.
419
7b9cb544
GM
4202014-03-20 Glenn Morris <rgm@gnu.org>
421
422 * charset.c (init_charset): When we cannot find the charsets directory,
423 mention if EMACSDATA is set.
424
37ca9077
PE
4252014-03-19 Paul Eggert <eggert@cs.ucla.edu>
426
d16ae622
PE
427 * fns.c (Frandom): Fix rare bug where the result isn't random.
428
37ca9077
PE
429 Fix porting inconsistency about rounding to even.
430 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
431 This way, the unusual !HAVE_RINT case acts like the usual
432 HAVE_RINT case, and we can fix the documentation accordingly.
433
722493d7
EZ
4342014-03-19 Eli Zaretskii <eliz@gnu.org>
435
436 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
437 (w32_wnd_proc): Initialize the dwHoverTime member of
438 TRACKMOUSEEVENT structure.
439
525d9a3c
TZ
4402014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
441
442 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
443
2a3d9a06
EZ
4442014-03-16 Eli Zaretskii <eliz@gnu.org>
445
446 * search.c (find_newline): Speed up the function when using the
5f0da6ce 447 newline cache, by halving the number of calls to
2a3d9a06
EZ
448 region_cache_forward and region_cache_backward. (Bug#16830)
449
b6d8543c
JB
4502014-03-15 Juanma Barranquero <lekktu@gmail.com>
451
452 * buffer.c (Fset_buffer): Document return value (bug#17015).
453
cfd5e825
MR
4542014-03-14 Martin Rudalics <rudalics@gmx.at>
455
456 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
457 nil, always resize character wise to avoid potential loss of the
458 mode line (Bug#16923 related).
459
8960529e
MR
4602014-03-12 Martin Rudalics <rudalics@gmx.at>
461
462 * frame.c (x_set_frame_parameters): Always calculate new sizes
463 pixelwise to avoid potential loss when rounding.
464
b0b486db
DA
4652014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
466
467 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
468 * xterm.c (x_free_frame_resources): Free all allocated cursors.
469
70db0db7
EZ
4702014-03-10 Eli Zaretskii <eliz@gnu.org>
471
472 * w32.c (fstatat): Don't add an extra slash if the argument ends
473 with a slash: this fails the subsequent call to stat_worker on
474 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
475
7e940b65
MR
4762014-03-09 Martin Rudalics <rudalics@gmx.at>
477
478 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
479
e61a31bf
JD
4802014-03-08 Jan Djärv <jan.h.d@swipnet.se>
481
482 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
483
7e940b65
MR
484 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
485 when frame is only on one screen (Bug#14713).
e61a31bf 486
2c65ad21
EZ
4872014-03-08 Eli Zaretskii <eliz@gnu.org>
488
489 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
490 there's a valid wrap point in the display line, the last glyph
491 cannot "just barely fit" on this row, because display_line doesn't
492 let it. Instead, proceed as if the last glyph didn't fit, so that
493 we eventually back up the iterator to the wrap point. This avoids
494 delusional behavior of move_it_to, whereby it proceeds to the next
495 display line, but sets current_x to zero for all the glyphs that
caecb91c
SM
496 without word-wrap would fit on the previous display line.
497 One result was that visual-order cursor movement behaved erratically
2c65ad21
EZ
498 under word-wrap.
499 (Fmove_point_visually): Add code to find the x coordinate of the
500 last character before wrap point, under word-wrap on a TTY.
501
b646ea12
EZ
5022014-03-07 Eli Zaretskii <eliz@gnu.org>
503
504 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
505 also return value of MOVE_POS_MATCH_OR_ZV from
506 move_it_in_display_line_to, when moving from beginning of line to
507 point's position. (Bug#16961)
508
2c6053e8
MR
5092014-03-07 Martin Rudalics <rudalics@gmx.at>
510
511 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
512 * window.c (Fselect_window): Explain NORECORD and
513 `buffer-list-update-hook' in doc-string.
514
cac0a1d6
MR
5152014-03-06 Martin Rudalics <rudalics@gmx.at>
516
517 * window.c (Fother_window_for_scrolling): Check that
518 Vother_window_scroll_buffer is a buffer.
519
12e852a2
DA
5202014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
521
522 * xterm.c (xim_initialize): Always pass a copy of resource name
523 to XRegisterIMInstantiateCallback and eassert whether return
524 value is True. Passing copy is important because Xlib doesn't
525 make its own copy and resource name argument usually points to
526 SSDATA (Vx_resource_name), which may be changed from Lisp.
527 (xim_close_display): For XUnregisterIMInstantiateCallback,
528 always eassert return value and pass exactly the same values
caecb91c
SM
529 as were used for XRegisterIMInstantiateCallback.
530 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
12e852a2
DA
531 sources to check why if you are interested.
532
e1a2cb1c
MR
5332014-03-05 Martin Rudalics <rudalics@gmx.at>
534
535 * dispnew.c (change_frame_size_1): Add new_lines instead of
536 new_height, the latter may be still zero if passed as such.
537 * window.c (Fwindow_pixel_height): Mention bottom divider in
538 doc-string.
539
d2f720ac
PE
5402014-03-05 Paul Eggert <eggert@cs.ucla.edu>
541
e1a2cb1c
MR
542 Fix "resource temporarily unavailable" with xgselect
543 (Bug#16925).
e6e8a5eb
PE
544 * xgselect.c: Include <stdbool.h>.
545 (xg_select) [!USE_GTK]: Don't lose track of errno.
546
d2f720ac
PE
547 Fix minor --enable-gcc-warnings issues.
548 * widget.c (update_various_frame_slots, EmacsFrameResize):
549 Avoid unused locals. Prefer 'if' to '#if' when either will do.
550
94a089b5
KB
5512014-03-04 Ken Brown <kbrown@cornell.edu>
552
553 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
554 represent the actual adjustment needed for alignment.
555
201572ec
EZ
5562014-03-04 Eli Zaretskii <eliz@gnu.org>
557
558 * gmalloc.c (aligned_alloc): Don't allocate more memory than
559 needed, and don't reallocate if the initial allocation already
560 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
561
a55130ca
YM
5622014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
563
564 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
565 (Bug#16932)
566
5b87d0d9
MN
5672014-03-04 Michal Nazarewicz <mina86@mina86.com>
568
569 * cmds.c (delete-char): Update docstring pointing out that the
570 function ignores `delete-active-region' and `overwrite-mode'.
571
bd650c24
EZ
5722014-03-03 Eli Zaretskii <eliz@gnu.org>
573
757c70af
EZ
574 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
575
bd650c24
EZ
576 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
577 allocated buffer due to alignment.
578 (freehook): If the block to be freed was allocated by
579 'aligned_alloc', find its real pointer before calling 'free'.
580 (Bug#16901)
581 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
582 backtrace.
583
8c1c7611
DA
5842014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
585
586 * font.c (toplevel): Adjust comment about font cache layout.
587 (font_clear_cache): Fix to match real font cache layout.
588 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
589 (Fframe_font_cache) [FONT_DEBUG]: New function.
590 (syms_of_font) [FONT_DEBUG]: Defsubr it.
591
19dae293
DA
592 Avoid crashes when X fonts are erroneously freed on reused X
593 'Display *' connection data (Bug#16069). Note that X font
594 resources still may be leaked, but currently there is no way
595 to completely avoid it.
596 * xterm.h (struct x_display_info): New member x_id. Add comments.
597 * xterm.c (x_display_id): New variable.
598 (x_term_init): Assign identifier to each opened X connection.
599 * xfont.c (struct xfont): New member x_display_id.
600 (xfont_open): Initialize it with frame's display id.
601 (xfont_close): Check whether font's display id matches the one
602 recorded for the given display. Adjust comment.
603 * xftfont.c (struct xftfont_info):
604 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
605
2907acd4
MR
6062014-03-01 Martin Rudalics <rudalics@gmx.at>
607
608 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
609 * window.c (Fother_window_for_scrolling): Don't try to scroll a
610 killed Vother_window_scroll_buffer.
611 (Vother_window_scroll_buffer): Fix doc-string accordingly.
612
cb8b26b4
EZ
6132014-03-01 Eli Zaretskii <eliz@gnu.org>
614
615 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
616 that start with more than 2 slashes as UNCs. (Bug#16751)
617
8268febf
PE
6182014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
619
620 Fix a few crashes and leaks when cloning C strings.
621 * alloc.c, lisp.h (dupstring): New function.
622 * gtkutil.c (xg_get_font):
623 * term.c (tty_default_color_capabilities):
624 * xsettings.c (store_monospaced_changed)
625 (store_font_name_changed, parse_settings)
626 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
627 This avoids some unlikely crashes due to accessing freed storage,
628 and avoids some minor memory leaks in the more-typical case.
629
5c809195
MR
6302014-02-28 Martin Rudalics <rudalics@gmx.at>
631
632 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
633 cursor when modeline can't be dragged (Bug#16647).
634
2241d76e
GM
6352014-02-28 Glenn Morris <rgm@gnu.org>
636
637 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
638 from custom-delayed-init-variables. (Bug#11565)
639
653b6ea3
MR
6402014-02-27 Martin Rudalics <rudalics@gmx.at>
641
642 More fixes for mouse glyph calculations (Bug#16647).
643 * window.c (coordinates_in_window): In intersection of
644 horizontal and vertical window dividers prefer the horizontal
645 one. Add some extra parens to last fix.
646 (window_relative_x_coord): Return x-coordinate for header and
647 mode line too.
648 * xdisp.c (remember_mouse_glyph): In text area don't extend
649 glyph into mode line to show the vertical drag cursor there
650 immediately. Subdivide mouse glyphs in right fringes to show a
651 horizontal drag cursor as soon as we enter the "grabbable width"
652 portion. Handle vertical border case separately. Do not
653 subdivide window divider areas.
654 (note_mouse_highlight): On bottom divider of bottommost windows
655 show vertical drag cursor only when the minibuffer window can be
656 resized.
657
11de63ed
EZ
6582014-02-27 Eli Zaretskii <eliz@gnu.org>
659
660 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
661 reset by the face of the object just displayed. See also bug#76.
662 (get_next_display_element): If the string came from a display
663 property, examine the box face attribute at it->position, not at
664 it->current.pos, since the latter was not updated yet. (Bug#16870)
665 (handle_face_prop): Improve commentary.
666
d8c25f59
MA
6672014-02-27 Michael Albinus <michael.albinus@gmx.de>
668
669 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
670 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
671
aea124c4
MR
6722014-02-26 Martin Rudalics <rudalics@gmx.at>
673
674 Fixes around Bug#16647.
675 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
676 ON_BOTTOM_DIVIDER cases.
677 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
678 only if the window has no right divider.
679 (Fcoordinates_in_window_p): Fix doc-string.
680
0e46275b
JB
6812014-02-25 Juanma Barranquero <lekktu@gmail.com>
682
683 * lread.c (Funintern): Fix doc to match advertised calling convention.
684
7c56ecf5
DC
6852014-02-24 Daniel Colascione <dancol@dancol.org>
686
687 * keyboard.c (read_char): Close race that resulted in lost events.
688
f33095ed
GM
6892014-02-22 Glenn Morris <rgm@gnu.org>
690
ca58fa73
GM
691 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
692 * window.c (window-resize-pixelwise): Doc fixes.
693
f33095ed
GM
694 * process.c (Finternal_default_process_filter)
695 (Finternal_default_process_sentinel): Doc tweaks.
696
458e643b
GM
6972014-02-21 Glenn Morris <rgm@gnu.org>
698
699 * process.c (Fprocess_buffer, Faccept_process_output)
700 (Finternal_default_process_filter, Finternal_default_process_sentinel):
701 Doc fixes.
702
8dd3e94f
MR
7032014-02-21 Martin Rudalics <rudalics@gmx.at>
704
705 * window.c (Fwindow_scroll_bar_width): New function.
706
9901fa1a
PE
7072014-02-21 Paul Eggert <eggert@cs.ucla.edu>
708
709 Pacify GCC when configuring with --enable-gcc-warnings.
710 * xdisp.c (move_it_in_display_line_to) [lint]:
711 Initialize recently-added local.
712
48198420
DC
7132014-02-21 Daniel Colascione <dancol@dancol.org>
714
715 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
716
44a2be2d
EZ
7172014-02-20 Eli Zaretskii <eliz@gnu.org>
718
719 * xdisp.c (init_iterator): Don't dereference a bogus face
720 pointer. (Bug#16819)
dba8296c
EZ
721 (try_cursor_movement): Don't use cursor position if
722 set_cursor_from_row failed to compute it. This avoids assertion
723 violations in MATRIX_ROW.
679f7827
EZ
724 (move_it_in_display_line_to): Save the iterator state in ppos_it
725 only once per call. Reimplement the method used to return to the
726 best candidate position if all the positions found in display line
727 are beyond TO_CHARPOS. This cuts down the number of calls to
728 bidi_shelve_cache, which moves a lot of stuff when lines are long
729 and include bidirectional text. (Bug#15555)
44a2be2d 730
189e7007
GM
7312014-02-20 Glenn Morris <rgm@gnu.org>
732
733 * data.c (Fdefalias): Doc fix.
734
c0213820
EZ
7352014-02-19 Eli Zaretskii <eliz@gnu.org>
736
d34f67da
EZ
737 * xdisp.c (display_line): Fix horizontal scrolling of large images
738 when fringes are turned off. This comes at a price of not
739 displaying the truncation/continuation glyphs in this case.
740 (Bug#16806)
741
c0213820
EZ
742 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
743 CreateDIBSection returns an error indication, zero out *ximg after
744 destroying the image. This avoids crashes in memory allocations
745 due to the fact that some of the callers also call
746 x_destroy_x_image, which will attempt to free an already free'd
747 block of memory.
748
5185f8ed
MR
7492014-02-18 Martin Rudalics <rudalics@gmx.at>
750
751 * widget.c (update_various_frame_slots): Don't set
752 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
753
1825653e
MA
7542014-02-18 Michael Albinus <michael.albinus@gmx.de>
755
756 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
757
3cb98721
PE
7582014-02-17 Paul Eggert <eggert@cs.ucla.edu>
759
760 temacs --daemon fix (Bug#16599).
761 * emacs.c (main): Initialize daemon_pipe[1] here ...
762 (syms_of_emacs): ... instead of here.
763
35e951cd 7642014-02-16 Anders Lindgern <andlind@gmail.com>
62901354
AL
765
766 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
767 is set (Bug#16505).
768
fa8ac13c
DC
7692014-02-16 Daniel Colascione <dancol@dancol.org>
770
771 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
772 (xd_get_connection_address): Use it.
773 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
774 xd_get_connection_address because the latter signals if the bus
775 we're trying to close is already disconnected.
776
e2607667
EZ
7772014-02-13 Eli Zaretskii <eliz@gnu.org>
778
779 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
780 argument to CreateThread. This avoids segfaults on Windows 9X.
781 Reported by oslsachem <oslsachem@gmail.com>.
782
d51c175a
PE
7832014-02-13 Paul Eggert <eggert@cs.ucla.edu>
784
785 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
786 * unexhp9k800.c (unexec_error): New function, to simplify the code.
787 (check_lseek): New function, to report lseek errors.
788 (save_data_space, update_file_ptrs, read_header, write_header)
789 (copy_file, copy_rest, unexec): Use these news functions.
790 (update_file_ptrs): Don't assume wraparound behavior when
791 converting a large size_t value to off_t.
792
28c16c40
DA
7932014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
794
795 * composite.c (fill_gstring_header): Pass positions as C integers
796 and move parameters checking to...
ccd5d23b
DA
797 (Fcomposition_get_gstring): ...this function. Handle case when
798 buffer positions are in reversed order and avoid crash (Bug#16739).
799 Adjust docstring.
28c16c40
DA
800 * buffer.c (validate_region): Mention current buffer in error message.
801
c295fc18 8022014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
a9a61c77
JD
803
804 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
805
81bf5420
LI
8062014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
807
808 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
809
9a84bfd6
GM
8102014-02-11 Glenn Morris <rgm@gnu.org>
811
812 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
813 Replace refs to "OpenStep" in messages.
814
e41fe0d3
PE
8152014-02-10 Paul Eggert <eggert@cs.ucla.edu>
816
817 Avoid "." at end of error diagnostics.
818 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
819 * font.c (Ffont_at):
820 * nsfns.m (ns_display_info_for_name):
821 * nsselect.m (Fx_own_selection_internal):
822 * nsterm.m (performDragOperation:):
823 Remove "." from end of diagnostic.
824
a3a8a7da
LI
8252014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
826
827 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
828 unintuitive (bug#15824).
8cd86d04 829 (Fyes_or_no_p): Doc fix (bug#15456).
a3a8a7da 830
c6795590
DA
8312014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
832
833 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
834 and avoid warning.
575593db
DA
835 * eval.c (call_debugger): When exiting the debugger, do not allow
836 max_specpdl_size less than actual binding depth (Bug#16603).
837 (syms_of_eval): Adjust docstring.
c6795590 838
fe461220
LI
8392014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
840
c838bca9
LI
841 * cmds.c (Fself_insert_command): Output a clearer error message on
842 negative repetitions (bug#9476).
843
fe461220
LI
844 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
845
af3e68a0
LI
8462014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
847
8acaaad7
LI
848 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
849
aa60235a
LI
850 * minibuf.c (Fread_string): Doc clarification (bug#15422).
851
af3e68a0
LI
852 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
853
85ade7ee
JB
8542014-02-08 Juanma Barranquero <lekktu@gmail.com>
855
856 * keyboard.c (Frecursive_edit): Fix typo in docstring.
857
bb01d7bb
LI
8582014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
859
fff711ee
LI
860 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
861
bb01d7bb
LI
862 * keyboard.c (Frecursive_edit): Say more precicely how throwing
863 `exit' works (bug#15865).
864
99f10a5d
MR
8652014-02-07 Martin Rudalics <rudalics@gmx.at>
866
9be95071 867 Constrain window box/body sizes and margin widths (Bug#16649).
99f10a5d
MR
868 * xdisp.c (window_box_width): Don't return less than zero.
869 (window_box_left_offset, window_box_right_offset): Don't return
870 more than the window's pixel width.
dc0e4c48
MR
871 * window.c (window_body_height, window_body_width): Don't return
872 negative value.
9be95071 873 (window_resize_apply): Adjust margin width, if necessary.
99f10a5d 874
a0baf35f
GM
8752014-02-07 Glenn Morris <rgm@gnu.org>
876
877 * nsterm.m (syms_of_nsterm): Doc fix.
878
829f4f22
EZ
8792014-02-06 Eli Zaretskii <eliz@gnu.org>
880
5b87d0d9
MN
881 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
882 New variables: pointers through which to call the respective APIs.
829f4f22 883 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
5b87d0d9
MN
884 (filename_from_ansi, sys_link, check_windows_init_file):
885 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
829f4f22
EZ
886 This is required on Windows 9X, where we dynamically load
887 UNICOWS.DLL which has their non-stub implementations.
888 (maybe_load_unicows_dll): Assign addresses to these 2 function
889 pointers after loading UNICOWS.DLL.
890
891 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
892 MultiByteToWideChar and WideCharToMultiByte through function
893 pointers.
894
5b87d0d9
MN
895 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
896 New declarations.
829f4f22 897
029788c7
JD
8982014-02-06 Jan Djärv <jan.h.d@swipnet.se>
899
900 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
901 for OSX >= 10.9 if separate spaces are used.
902 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
903
314ffdb1
GM
9042014-02-06 Glenn Morris <rgm@gnu.org>
905
906 * buffer.c (cache-long-scans): Doc fix.
907
6d48053b
EZ
9082014-02-05 Eli Zaretskii <eliz@gnu.org>
909
910 * w32fns.c (Fw32_shell_execute): Doc fix.
911
bfdd79d3
BG
9122014-02-05 Bastien Guerry <bzg@gnu.org>
913
914 * syntax.c (Fforward_word): Call Fconstrain_to_field with
915 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
916
fa49abf8
MR
9172014-02-05 Martin Rudalics <rudalics@gmx.at>
918
415e3810
MR
919 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
920 outside the window (Bug#16649).
921
fa49abf8
MR
922 * xdisp.c (note_mouse_highlight): When entering a margin area show
923 a non-text cursor (Bug#16647).
924
8e5917ec
PE
9252014-02-04 Paul Eggert <eggert@cs.ucla.edu>
926
927 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
928 It prompted a compile-time diagnostic on GNU/Linux.
929 Simplify to remove the need for the label.
930
e139a33c
EZ
9312014-02-04 Eli Zaretskii <eliz@gnu.org>
932
933 * w32menu.c (w32_popup_dialog): Don't condition the whole function
934 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
935 to show it; otherwise return 'unsupported--w32-dialog' to signal
5b87d0d9
MN
936 to the caller that emulation with menus is necessary.
937 This resurrects code inadvertently deleted by the 2013-10-08 commit.
e139a33c
EZ
938 (Bug#16636)
939 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
940
941 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
942 by HAVE_DIALOGS.
943
944 * menu.c (Fx_popup_dialog): Don't condition the call to
945 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
946 special symbol 'unsupported--w32-dialog', emulate the dialog with
947 a menu by calling x-popup-menu.
948
949 * menu.h (Qunsupported__w32_dialog): New extern variable.
950
86d2bf49
MA
9512014-02-04 Michael Albinus <michael.albinus@gmx.de>
952
953 * keyboard.c (kbd_buffer_get_event): Read file notification events
954 also in batch mode.
955
956 * xgselect.c (xg_select): Read glib events in any case, even if
957 there are no file descriptors to watch for. (Bug#16519)
958
764ec9e5
MR
9592014-02-03 Martin Rudalics <rudalics@gmx.at>
960
961 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
962 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
963 * w32term.c (w32_draw_window_divider): Handle first and last
964 pixels specially.
965 * w32term.h (w32_fill_area_abs): New function.
966 * xdisp.c (x_draw_right_divider): Don't draw over bottom
967 divider.
968 * xfaces.c (realize_basic_faces): Handle new face ids.
969 * xfns.c (Fx_create_frame): Call x_default_parameter for right
970 and bottom divider width.
971 * xterm.c (x_draw_window_divider): Handle first and last pixels
972 specially.
973
34baf96c
DA
9742014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
975
976 * print.c (Fexternal_debugging_output): Add cast to pacify
977 --enable-gcc-warnings.
9cad4576
DA
978 * eval.c (call_debugger): Grow specpdl if the debugger was
979 entered due to specpdl overflow (Bug#16603) and allow more
980 specpdl space for the debugger itself.
34baf96c 981
b4168649
MR
9822014-02-02 Martin Rudalics <rudalics@gmx.at>
983
984 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
985 (Bug#16619)
986
cb13e9a8
EZ
9872014-02-01 Eli Zaretskii <eliz@gnu.org>
988
28e6cee8
EZ
989 * w32fns.c (Ffile_system_info): Use WINAPI in the function
990 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
991
9ef58a52
EZ
992 * print.c (Fexternal_debugging_output): If the argument character
993 is non-ASCII, encode it with the current locale's encoding before
994 writing the result to the terminal. (Bug#16448)
995
cb13e9a8
EZ
996 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
997 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
998 for it. (Bug#16558)
999
507a173f
AS
10002014-01-30 Andreas Schwab <schwab@linux-m68k.org>
1001
1002 * process.c (create_process): Reset SIGPROF handler in the child.
1003 * callproc.c (call_process): Likewise.
1004
e9abb8a8
PE
10052014-01-29 Paul Eggert <eggert@cs.ucla.edu>
1006
1007 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
1008
198af6df
EZ
10092014-01-29 Eli Zaretskii <eliz@gnu.org>
1010
824a51e6
EZ
1011 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
1012 of zero to print strings, GDB doesn't like it.
1013
198af6df
EZ
1014 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
1015 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
1016 we still use correct addresses. (Bug#16576)
1017
52840a9c
KH
10182014-01-27 K. Handa <handa@gnu.org>
1019
f2726fa2
GM
1020 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
1021 to preserve the code detection behavior of 24.3.
52840a9c 1022 * coding.h (struct coding_system): New member detected_utf8_bytes.
52840a9c
KH
1023 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
1024 (decode_coding_gap): Use short cut for UTF-8 file reading only
1025 when coding->detected_utf8_bytes equals to coding->src_bytes.
52840a9c
KH
1026 * fileio.c (Finsert_file_contents): Cancel the previous change.
1027
5442c6ce
MR
10282014-01-29 Martin Rudalics <rudalics@gmx.at>
1029
1030 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
1031 that are not visible.
1032
61c2b0b3
JD
10332014-01-29 Jan Djärv <jan.h.d@swipnet.se>
1034
1035 * xmenu.c (create_and_show_popup_menu): Handle case when no key
1036 is grabbed (Bug#16565).
1037
1dcb169c
MR
10382014-01-28 Martin Rudalics <rudalics@gmx.at>
1039
1040 * xdisp.c (last_max_ascent): Re-remove after erroneously
1041 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
1042 from 2013-03-29.
1043 (move_it_to): Re-remove reference to last_max_ascent.
1044 (Fwindow_text_pixel_size): Add iterator's max_ascent and
5b87d0d9
MN
1045 max_descent here instead of calling line_bottom_y.
1046 Fix doc-string.
1dcb169c 1047
6affb4a8
DA
10482014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
1049
1050 * terminal.c (initial_free_frame_resources): New function.
1051 (init_initial_terminal): Install new hook to free face cache
1052 on initial frame and avoid memory leak. For details, see
1053 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
2275de87 1054 * xfaces.c (free_frame_faces): Adjust comment.
6affb4a8 1055
12cb2b06
PE
10562014-01-26 Paul Eggert <eggert@cs.ucla.edu>
1057
1058 * data.c (Fstring_to_number): Document results if unparsable
1059 (Bug#16551).
1060
4988180d
JD
10612014-01-26 Jan Djärv <jan.h.d@swipnet.se>
1062
1063 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
1064
4f8c23b1
PE
10652014-01-26 Paul Eggert <eggert@cs.ucla.edu>
1066
e6f29a68
PE
1067 When decoding, prefer ptrdiff_t to int for buffer positions etc.
1068 * coding.c (detect_coding_utf_8, emacs_mule_char)
1069 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
1070 (check_utf_8, decode_coding):
1071 * coding.h (struct coding_system.errors):
1072 Use ptrdiff_t, not int, for integer values derived from buffer and
1073 string positions.
1074
4f8c23b1
PE
1075 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
1076 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
1077 before invoking decode_coding_gap, since there's just one block.
1078
45ccd909
MR
10792014-01-25 Martin Rudalics <rudalics@gmx.at>
1080
1081 Fix handling of face attributes in Fx_create_frame (Bug#16529).
1082 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
1083 too early. Again run change_frame_size before assigning menu-
1084 and tool-bar-lines.
1085
83682f3e
FP
10862014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
1087
1088 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
1089 arrives, call x_check_fullscreen, in case the new display has a
1090 different resolution. (Bug#16517)
1091
e96f7bf1
EZ
10922014-01-25 Eli Zaretskii <eliz@gnu.org>
1093
1094 * term.c (read_menu_input): If the selected frame changes, exit
1095 the menu.
1096 (tty_menu_show): If the selected frame changes while we displayed
1097 a menu, throw to top level. (Bug#16479)
1098
afd4479f
SM
10992014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
1100
1101 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
1102
0fadc0b0
PE
11032014-01-24 Paul Eggert <eggert@cs.ucla.edu>
1104
1105 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
1106 * data.c (count_one_bits_word): Fix bug (negated comparison)
1107 when BITS_PER_ULL < BITS_PER_BITS_WORD.
1108
aac1f8dd
DA
11092014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1110
5b87d0d9
MN
1111 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
1112 Avoid undefined behavior by initializing display property bit of a
aac1f8dd
DA
1113 string processed by the bidirectional iterator. For details, see
1114 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
1115
ed44be70
PE
11162014-01-23 Paul Eggert <eggert@cs.ucla.edu>
1117
1118 Minor cleanup of previous change.
1119 * image.c (imagemagick_error, Fimagemagick_types):
1120 Omit some recently-introduced and unnecessary casts and assignments.
1121
565935c8
DA
11222014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
1123
1124 Fix two memory leaks discovered with Valgrind.
1125 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
1126 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
1127
6cb4da45
MR
11282014-01-22 Martin Rudalics <rudalics@gmx.at>
1129
1130 Fixes in window size functions around Bug#16430 and Bug#16470.
1131 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
1132 (Fwindow_mode_line_height, Fwindow_header_line_height)
1133 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
1134 Minor doc-string adjustments.
1135 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
1136 Rewrite doc-strings.
1137 (window_body_height, window_body_width): Do not count partially
1138 visible lines/columns when PIXELWISE is nil (Bug#16470).
1139 (Qfloor, Qceiling): New symbols.
1140
f7551c6c
EZ
11412014-01-21 Eli Zaretskii <eliz@gnu.org>
1142
1143 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
1144 when the image cache is not yet allocated. (Bug#16509)
1145
5004c3bf
DA
11462014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
1147
1148 * buffer.c (Fkill_buffer): When killing an indirect buffer,
1149 re-attach intervals to its base buffer (Bug#16502).
1150 * intervals.c (set_interval_object): Move from here...
1151 * intervals.h (set_interval_object): ... to here. Fix comments.
1152
f952002e
PE
11532014-01-20 Paul Eggert <eggert@cs.ucla.edu>
1154
009581fa 1155 Avoid undefined behavior by initializing buffer redisplay bit.
3c35702f
PE
1156 Problem reported by Dmitry Antipov in
1157 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
009581fa 1158 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
3c35702f 1159
f952002e
PE
1160 Revert some of the CANNOT_DUMP fix (Bug#16494).
1161 * lread.c (init_lread): Fix typo: NILP, not !NILP.
1162
21f95411
EZ
11632014-01-19 Eli Zaretskii <eliz@gnu.org>
1164
1165 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
1166 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
1167 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
1168 they are replaced by macros that expand into direct calls to the
1169 corresponding functions from GDI32.DLL.
1170 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
1171 variables in the Cygwin build, they are unused.
1172
d25f735b
KH
11732014-01-19 K. Handa <handa@gnu.org>
1174
1175 * composite.c (composition_update_it): Fix previous change.
1176
5197f0c2
EZ
11772014-01-18 Eli Zaretskii <eliz@gnu.org>
1178
1179 Fix file name handling on MS-Windows 9X.
1180 * w32.c (maybe_load_unicows_dll): New function.
1181
1182 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
1183 on, to make sure we can convert file names to and from UTF-8 on
1184 Windows 9X. This fixes a failure to start up because Emacs cannot
1185 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
1186
1187 * w32font.c [WINDOWSNT]: Include w32.h.
1188 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
1189 of implementing the same stuff.
1190 Remove now unused g_b_init_is_windows_9x.
1191
1192 * w32.h (maybe_load_unicows_dll): Add prototype.
1193
20adfbd8
EZ
11942014-01-17 Eli Zaretskii <eliz@gnu.org>
1195
1196 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
1197 switch to single keyboard. Prevents daemon crashes when a new
1198 client connects while we show a TTY menu in an existing client.
1199 (Bug#16479)
1200
d1eaf34b
PE
12012014-01-14 Paul Eggert <eggert@cs.ucla.edu>
1202
1203 Fix MinGW64 porting problem with _setjmp.
1204 Reported by Eli Zaretskii in:
1205 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
1206 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
1207 the old _setjmp and _longjmp. All uses changed.
1208
1b49bd5d
DC
12092014-01-13 Daniel Colascione <dancol@dancol.org>
1210
5b87d0d9
MN
1211 * textprop.c (Fremove_list_of_text_properties):
1212 Correctly handle reaching the end of the interval tree. (Bug#15344)
1b49bd5d 1213
a3f2bf1b
MR
12142014-01-13 Martin Rudalics <rudalics@gmx.at>
1215
1216 * xdisp.c (resize_mini_window): Round height to a multiple of
1217 frame's line height. Fix bug in calculation of window start
1218 position (Bug#16424).
1219
6c21e306
JD
12202014-01-13 Jan Djärv <jan.h.d@swipnet.se>
1221
1222 * macfont.m: Include termchar.h.
1223 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
1224 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
5b87d0d9 1225 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
6c21e306
JD
1226 *_WITH_GC_* to take face and f as parameters.
1227 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
1228 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
1229
7a1b473c
DC
12302014-01-13 Daniel Colascione <dancol@dancol.org>
1231
1232 Fix menu item updating in the presence of the Unity global menu
1233 GTK+ module.
1234
1235 * gtkutil.h (xg_have_tear_offs): Add frame parameter
1236 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
1237 tear-off.
c295fc18 1238 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
7a1b473c 1239 updating menus; explain why.
a787d37a
DC
1240 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
1241 problem it's supposed to solve and it interferes with detecting
1242 the presence of a global menu.
7a1b473c
DC
1243 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
1244 parameter.
1245
67671fb1
KH
12462014-01-11 K. Handa <handa@gnu.org>
1247
1248 * composite.c (composition_update_it): Fix indexing of
1249 LGSTRING_CHAR (Bug#15984).
1250
e05d3a05
FP
12512014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
1252
1253 * unexw32.c (_start) [__MINGW64__]: Define to __start.
1254
02013850
EZ
12552014-01-11 Eli Zaretskii <eliz@gnu.org>
1256
1257 * xdisp.c (try_window_id): Don't use this function's optimizations
1258 if overlays in the buffer displayed by the window have changed
1259 since last redisplay. (Bug#16347)
1260 (message_dolog): Fix indentation.
1261
f96d0a6b
MR
12622014-01-11 Martin Rudalics <rudalics@gmx.at>
1263
1264 * frame.c (frame_resize_pixelwise): Fix doc-string.
1265
7d7ccb88
MR
12662014-01-10 Martin Rudalics <rudalics@gmx.at>
1267
1268 Fix handling of internal borders (Bug#16348).
5b87d0d9
MN
1269 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
1270 Remove internal border width from pixel width of windows.
7d7ccb88
MR
1271 (change_frame_size_1): Don't return early when frame's pixel
1272 size changes - we still have to record the new sizes in the
1273 frame structure.
1274 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
1275 also when toolbar gets larger.
1276 * window.c (check_frame_size): Include internal_border_width in
1277 check.
1278 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
5b87d0d9
MN
1279 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
1280 In non-toolkit/non-GTK version clear internal border.
7d7ccb88
MR
1281 * xterm.c (x_clear_under_internal_border): New function for
1282 non-toolkit/non-GTK version.
1283 (x_after_update_window_line): In non-toolkit/non-GTK version
1284 don't do that.
5b87d0d9
MN
1285 (handle_one_xevent, x_set_window_size):
1286 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
7d7ccb88
MR
1287 * xterm.h (x_clear_under_internal_border): Extern it.
1288
be316ede
PE
12892014-01-07 Paul Eggert <eggert@cs.ucla.edu>
1290
1291 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
1292 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
1293 it again.
1294
9f4e49e9
EZ
12952014-01-06 Eli Zaretskii <eliz@gnu.org>
1296
1297 * xdisp.c (redisplay_window): Don't skip window redisplay if the
1298 last value of point is not equal to buffer's point. (Bug#16129)
1299
81da295e
PE
13002014-01-05 Paul Eggert <eggert@cs.ucla.edu>
1301
da5ecfa9
PE
1302 Spelling fixes.
1303 * nsterm.h (updateCollectionBehavior): Rename from
1304 updateCollectionBehaviour. All uses changed.
1305
81da295e
PE
1306 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
1307 * Makefile.in (SETFATTR): New macro.
1308 (temacs$(EXEEXT)): Use it.
1309
5159d590
MR
13102014-01-04 Martin Rudalics <rudalics@gmx.at>
1311
1312 Fix maximization behavior on Windows (Bug#16300).
1313 * w32fns.c (w32_fullscreen_rect): Don't handle
1314 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
1315 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
1316 of SetWindowPos. Restore last placement also when leaving
1317 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
1318 but the FULLSCREEN_BOTH case.
1319
56a0e352
PE
13202014-01-03 Paul Eggert <eggert@cs.ucla.edu>
1321
1322 Port to C89.
1323 * data.c (arithcompare_driver):
1324 * fileio.c (Fcar_less_than_car):
1325 * fns.c (internal_equal):
1326 * frame.c (delete_frame):
1327 * lisp.h (enum More_Lisp_Bits):
1328 * lread.c (read1):
1329 Avoid C99 constructs that don't work in C89.
1330 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
1331 to port to C89, which doesn't have 'long long'.
1332 (count_trailing_zero_bits): Use them.
1333
0d53f628
CY
13342014-01-03 Chong Yidong <cyd@gnu.org>
1335
1336 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
1337
44c5e192
MR
13382014-01-02 Martin Rudalics <rudalics@gmx.at>
1339
1340 Further adjust frame/window scrollbar width calculations.
5b87d0d9
MN
1341 * window.c (apply_window_adjustment):
1342 Set windows_or_buffers_changed.
44c5e192
MR
1343 (Fwindow_scroll_bars): Return actual scrollbar width.
1344 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
1345 For non-toolkit builds again use 14 as minimum width and set
1346 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
1347 * xterm.c (XTset_vertical_scroll_bar): Take width from
1348 WINDOW_SCROLL_BAR_AREA_WIDTH.
1349 (x_new_font): Rename wid to unit. Base calculation of new
1350 scrollbar width on toolkit used and make it analogous to that of
1351 x_set_scroll_bar_default_width.
1352 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
1353 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
1354 of GetSystemMetrics.
1355 * w32term.c (w32_set_vertical_scroll_bar): Take width from
1356 WINDOW_SCROLL_BAR_AREA_WIDTH.
1357 (x_new_font): Make it correspond to changes in xterm.c.
1358
b00cdd96
PE
13592014-01-01 Paul Eggert <eggert@cs.ucla.edu>
1360
1361 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
1362 This is a cleaner way to fix the MinGW-w64 porting problem.
1363 Check for INTPTR_MAX misconfiguration.
1364
c10e9ece
EZ
13652014-01-01 Eli Zaretskii <eliz@gnu.org>
1366
1367 * search.c (newline_cache_on_off, find_newline): In indirect
1368 buffers, use the newline cache of the base buffer.
1369
1370 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
1371 buffer, invalidate the caches of its base buffer. (Bug#16265)
1372
1373 * indent.c (width_run_cache_on_off, compute_motion): In indirect
1374 buffers, use the width-run cache of the base buffer.
1375
1376 * xdisp.c (redisplay_window): When the window displays an indirect
1377 buffer, and the character widths in the display table have
1378 changed, invalidate the width-run cache of the corresponding base
1379 buffer.
1380
1381 * fileio.c (Finsert_file_contents): When invalidating the newline
1382 cache, consider the case of inserting into indirect buffer.
1383
1384 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
1385 In indirect buffers, use the paragraph cache of the base buffer.
1386
91415fb1
MR
13872013-12-31 Martin Rudalics <rudalics@gmx.at>
1388
1389 * window.c (grow_mini_window): Fix last change.
1390
a2301006
JD
13912013-12-31 Jan Djärv <jan.h.d@swipnet.se>
1392
1393 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
1394
0bbd0e0b
FP
13952013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
1396
bd717ca4
FP
1397 * w32term.c (w32_initialize): Use LCID and LOWORD.
1398
1399 * w32proc.c (create_child): Use pid_t for 5th argument.
1400 (IsValidLocale): Don't provide prototype for MinGW64.
1401 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
1402 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
1403
1404 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
1405 MinGW64 doesn't support.
1406
1407 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
1408
0bbd0e0b
FP
1409 * w32.c (set_named_security_info): New function.
1410 (acl_set_file): Fall back on set_named_security_info if
1411 set_file_security fails.
1412 (g_b_init_set_named_security_info_w)
1413 (g_b_init_set_named_security_info_a): New static variables.
1414 (globals_of_w32): Initialize them to zero.
1415 (set_named_security_info): Set them to non-zero if the
1416 corresponding API is available.
5b87d0d9
MN
1417 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
1418 New function typedefs.
0bbd0e0b 1419
9b3c0a16
MR
14202013-12-31 Martin Rudalics <rudalics@gmx.at>
1421
1422 Some more fixes following pixelwise resize changes including one
1423 for Bug#16306.
1424 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
1425 of frame_resize_pixelwise.
1426 * widget.c (pixel_to_text_size): New function.
1427 (update_wm_hints): Have size hints respect value of
1428 frame_resize_pixelwise.
1429 (EmacsFrameResize): Alway process resize requests pixelwise.
1430 * window.c (grow_mini_window): Make sure mini window is at least
1431 one line tall.
1432 * xdisp.c (display_menu_bar): Make sure menubar extends till
1433 right end of frame.
1434 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
1435 (x_set_tool_bar_lines): Calculate pixelwise.
1436 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
1437 frame_resize_pixelwise.
1438
2db9da01
JB
14392013-12-30 Juanma Barranquero <lekktu@gmail.com>
1440
1441 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
1442 variables not used there.
1443
1b7259fc
EZ
14442013-12-30 Eli Zaretskii <eliz@gnu.org>
1445
1446 * w32.c (sys_umask): New function. (Bug#16299)
1447
564eb533
MR
14482013-12-30 Martin Rudalics <rudalics@gmx.at>
1449
1450 * dispnew.c (change_frame_size_1): Take old width of root window
9b3c0a16 1451 from that window's pixel width. (Bug#16284)
564eb533 1452
a560b856
PE
14532013-12-29 Paul Eggert <eggert@cs.ucla.edu>
1454
1455 Plain copy-file no longer chmods an existing destination (Bug#16133).
1456 * fileio.c (realmask): Now a static var, not a local.
1457 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
1458 Remove arg STATPTR. All uses changed.
1459 (Fcopy_file): Do not alter permissions of existing destinations,
1460 unless PRESERVE-PERMISSIONS (renamed from
1461 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
1462 Avoid race when testing for existing destinations and for
1463 when input and output files are the same.
1464 If changing the group fails, adjust both default and
1465 preserved permissions so that access is not granted to the
1466 wrong group.
1467 (Fset_default_file_modes, init_fileio): Update realmask.
1468 (Fdefault_file_modes): Use realmask instead of calling umask.
1469
411bf4a4
PE
14702013-12-28 Paul Eggert <eggert@cs.ucla.edu>
1471
1472 Fix pipe bug with OS X emacs --daemon (Bug#16262).
1473 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
1474 flags on the daemon pipe ends before execing.
1475
bf7bea5d
EZ
14762013-12-28 Eli Zaretskii <eliz@gnu.org>
1477
1478 * w32fns.c (Fx_create_frame): Error out if called from a TTY
1479 session. (Bug#14739)
1480
fdadeb49
JC
14812013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
1482
1483 * callproc.c (Vexec_path): Document that exec-directory is in it.
1484
765fe182
JD
14852013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
1486
1487 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
1488 default.
1489
0f1d2934
CY
14902013-12-27 Chong Yidong <cyd@gnu.org>
1491
1492 * data.c (Fsymbol_function): Doc fix.
1493
0cbab19e
MR
14942013-12-26 Martin Rudalics <rudalics@gmx.at>
1495
1496 Some more tinkering with Bug#16051.
1497 * window.c (resize_frame_windows): Don't let the size of the
1498 root window drop below the frame's default character size.
1499 Never ever delete any subwindows - let the window manager do the
1500 clipping.
1501
1502 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
1503 of toolbar lines needed when they exceed the height of the root
1504 window.
1505 (unwind_create_frame_1): New function.
1506 (Fx_create_frame): Generally inhibit calling the window
1507 configuration change hook here. Remove extra call to
1508 change_frame_size - it's not needed when we don't run the
1509 configuration change hook.
1510
e76119d7
PE
15112013-12-26 Paul Eggert <eggert@cs.ucla.edu>
1512
1513 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
1514 On my Fedora 19 platform the core dumps were so big that
1515 my desktop became nearly catatonic.
1516 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
1517 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
1518 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
1519 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
1520 a clang-only syntax.
1521 * conf_post.h (__has_feature): New macro, if not already defined.
1522 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
1523 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
1524
9ab3ce4d
EZ
15252013-12-25 Eli Zaretskii <eliz@gnu.org>
1526
1527 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
1528 is a file name. (Bug#16252)
1529
c9352587
CY
15302013-12-25 Chong Yidong <cyd@gnu.org>
1531
35e951cd 1532 * keyboard.c (Voverriding_terminal_local_map)
c9352587
CY
1533 (Voverriding_local_map): Doc fix.
1534
1535 * keymap.c (Vemulation_mode_map_alists): Doc fix.
1536
ec6e26b8
EZ
15372013-12-24 Eli Zaretskii <eliz@gnu.org>
1538
1539 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
1540 file name when it is submitted to ShellExecute. Simplify code.
1541 Don't test DOCUMENT for being a string, as that is enforced by
1542 CHECK_STRING. Doc fix.
1543
0db7548b
EZ
15442013-12-23 Eli Zaretskii <eliz@gnu.org>
1545
1546 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
1547 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
1548 redisplay_tool_bar does. Improve and fix commentary.
1549 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
1550 limits of the glyph matrices. (Bug#16051)
cdcec259
EZ
1551 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
1552 only when the new size is different from the old one, and the new
1553 size can be achieved given the frame height.
0db7548b 1554
30143e3d
JD
15552013-12-23 Jan Djärv <jan.h.d@swipnet.se>
1556
1557 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
1558
aec3bf9f
GM
15592013-12-23 Glenn Morris <rgm@gnu.org>
1560
1561 * lread.c (Fload): Mention load-prefer-newer in doc.
1562
a2b89a51
MR
15632013-12-22 Martin Rudalics <rudalics@gmx.at>
1564
1565 Handle Bug#16207 by being more restrictive when running hooks.
1566 * window.c (unwind_change_frame): New function.
1567 (Fset_window_configuration): Don't run configuration change hook
1568 while the frame configuration is unsafe. Call select_window
1569 twice.
1570
2dc383bc
XF
15712013-12-22 Xue Fuqiao <xfq.free@gmail.com>
1572
1573 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
1574
df8b4c35
JD
15752013-12-21 Jan Djärv <jan.h.d@swipnet.se>
1576
1577 * nsterm.h: Declare EmacsColor category.
1578
1579 * nsterm.m (NSColor): Implement EmacsColor category.
1580 (ns_get_color): Use colorUsingDefaultColorSpace.
1581 (ns_get_color, ns_term_init): Use colorForEmacsRed.
1582
1583 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
1584
7667eeb9
EZ
15852013-12-21 Eli Zaretskii <eliz@gnu.org>
1586
1587 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
1588 having the PNG_NORETURN attribute, to avoid compiler warning in
1589 my_png_error.
1590
5b2b60f0
YM
15912013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1592
1593 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
1594
1595 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
1596 fringe background extension.
1597 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
1598 because they are now always the same as `left' and `width',
1599 respectively. Remove code for the case that `width' and
1600 `sb_width' are different.
1601
c44de18d
MR
16022013-12-20 Martin Rudalics <rudalics@gmx.at>
1603
1604 Remove scroll_bar_actual_width from frames.
1605 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
1606 * frame.c (Fscroll_bar_width): Return scroll bar area width.
1607 (x_figure_window_size):
1608 * nsterm.m (x_set_window_size):
1609 * widget.c (set_frame_size):
1610 * w32term.c (x_set_window_size):
1611 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
1612 scroll_bar_actual_width.
1613
1614 Convert scroll_bar members to integers on Windows.
1615 * w32term.h (struct scroll_bar): Convert top, left, width,
1616 height, start, end and dragging to integers.
1617 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
1618 scroll_bar members.
1619 * w32term.c (w32_set_scroll_bar_thumb)
1620 (w32_scroll_bar_handle_click): Remove XINT conversions for
1621 scroll_bar members. Treat bar->dragging as integer.
1622 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
1623 first element. Remove XINT conversions for scroll_bar members.
1624 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
1625 Remove XINT conversions for scroll_bar members.
1626
1627 Fix assignment for new window total sizes.
1628 * window.c (Fwindow_resize_apply_total): Assign values for
1629 minibuffer window.
1630
f5df4ceb
CY
16312013-12-20 Chong Yidong <cyd@gnu.org>
1632
1633 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
1634 argument to `append'.
1635
79f7284f
EZ
16362013-12-19 Eli Zaretskii <eliz@gnu.org>
1637
5df389f5
EZ
1638 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
1639 current text face, for extending the face of the display margins.
1640 (Bug#16192)
1641
79f7284f
EZ
1642 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
1643 Doc fix. (Bug#16190)
1644
1269a680
JD
16452013-12-19 Jan Djärv <jan.h.d@swipnet.se>
1646
1647 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
1648 Remove.
1649
1650 * nsterm.m (Qfile, Qurl): New.
1651 (EV_MODIFIERS2): New macro.
1652 (EV_MODIFIERS): Use EV_MODIFIERS2.
1653 (ns_term_init): Remove font and color from DND, does not work on
1654 newer OSX, and other ports don't have them.
1655 (performDragOperation:): Handle modifiers used during drag.
1656 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
1657 Remove global Lisp variables used to communicate with ns-win.el.
1658 Remove font and color handling.
1659 (syms_of_nsterm): Defsym Qfile and Qurl.
1660
e9dc713d 16612013-12-19 Anders Lindgren <andlind@gmail.com>
680e6b8c
JD
1662
1663 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
1664 (ns_constrain_all_frames, x_set_offset): Remove assignment to
1665 dont_constrain.
1666 (updateFrameSize:, windowWillResize:toSize:): Add trace.
1667 (constrainFrameRect): Remove special case nr_screens == 1.
1668 Don't constrain size to size of view.
1669
1670 * nsterm.h (ns_output): Remove dont_constrain.
1671
e9dc713d 16722013-12-19 Anders Lindgren <andlind@gmail.com>
570c054a
JD
1673
1674 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
1675
518c40a2
PE
16762013-12-18 Paul Eggert <eggert@cs.ucla.edu>
1677
1678 Minor fixes for recent openp changes.
1679 * lisp.h (GCPRO7): New macro.
1680 * lread.c (openp): Use bool for boolean; all callers changed.
1681 Protect save_string from GC. Don't assume that file descriptors
1682 are nonzero. Redo save_mtime comparison to avoid bogus GCC
1683 warning about uninitialized variable.
1684
39e896c1
EZ
16852013-12-18 Eli Zaretskii <eliz@gnu.org>
1686
1687 * w32fns.c (emacs_abort): Use intptr_t as argument of
1688 INT_BUFSIZE_BOUND, to avoid compiler warnings.
1689
9cdb8d85
GM
16902013-12-18 Glenn Morris <rgm@gnu.org>
1691
1f41ee56
GM
1692 * lread.c (Fload): Pass load_prefer_newer to openp.
1693 Don't bother checking mtime if openp already did it.
1694 (openp): Add `newer' argument, to check all suffixes
1695 and find the newest file.
1696 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
1697 * callproc.c (call_process):
1698 * charset.c (load_charset_map_from_file):
1699 * emacs.c (init_cmdargs):
1700 * image.c (x_create_bitmap_from_file, x_find_image_file):
1701 * lisp.h (openp):
1702 * lread.c (Flocate_file_internal):
1703 * process.c (Fformat_network_address):
1704 * sound.c (Fplay_sound_internal):
1705 * w32.c (check_windows_init_file):
1706 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
1707
9cdb8d85
GM
1708 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
1709
af025ae8
EZ
17102013-12-17 Eli Zaretskii <eliz@gnu.org>
1711
60e62dc5
EZ
1712 * w32.c (getloadavg): Don't index samples[] array with negative
1713 indices. Recover from wall-clock time being set backwards.
1714
af025ae8
EZ
1715 * w32term.c (w32_initialize): Declare the argument of
1716 set_user_model as const.
1717
1718 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
1719 (w32_menu_show): Constify some arguments passed to MessageBox.
1720
1721 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
1722 to initialize Lisp objects.
1723
1724 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
1725 initialize Lisp objects.
1726
1727 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
1728 use variables used only on X under that condition.
1729
1730 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
1731 variables not used there.
1732
8fb8c4f3
PE
17332013-12-16 Paul Eggert <eggert@cs.ucla.edu>
1734
1735 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
1736 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
1737
397e886f
EZ
17382013-12-16 Eli Zaretskii <eliz@gnu.org>
1739
1740 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
1741 code, revealed in presence of R2L characters, character
1742 compositions, and display vectors. A better fix for Bug#16148.
5e6d03b2
EZ
1743 (extend_face_to_end_of_line): Don't reference tool_bar_window in
1744 GTK and NS builds, they don't have this member of struct frame.
397e886f
EZ
1745
1746 * dispextern.h (struct composition_it): Correct a comment for the
1747 'width' member.
1748
32779713
PE
17492013-12-16 Paul Eggert <eggert@cs.ucla.edu>
1750
1751 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
1752 This prevents a compilation error on C compilers that do not
1753 default functions to return 'int' if not declared. Also, add
1754 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
1755 since it now uses inline functions.
1756
d865f6b5
EZ
17572013-12-16 Eli Zaretskii <eliz@gnu.org>
1758
1759 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
1760 display margins on mode line, header line, and in the frame's
1761 tool-bar window. (Bug#16165)
1762
0fa30f33
AS
17632013-12-16 Andreas Schwab <schwab@suse.de>
1764
1765 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
1766
82cf20e4
TZ
17672013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
1768
1769 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
c295fc18 1770 `CHECK_LIST_CONS'.
82cf20e4 1771
d144ef06
MR
17722013-12-16 Martin Rudalics <rudalics@gmx.at>
1773
1774 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
1775
5ae356d9
DA
17762013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
1777
1778 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
1779 intended to find bogus pointers in font objects (Bug#16140).
1780 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
1781 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
1782 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
1783 Disable for MS-Windows due to Bug#15876; apparently this
1784 requires more or less substantial changes in fontset code.
1785 * xfont.c (xfont_close):
1786 * xftfont.c (xftfont_close): Call x_display_info_for_display
1787 to check whether 'Display *' is valid (Bug#16093 and probably
1788 Bug#16069).
1789
e088f894
EZ
17902013-12-15 Eli Zaretskii <eliz@gnu.org>
1791
db50ad5f
EZ
1792 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
1793 Reported by Juanma Barranquero <lekktu@gmail.com>.
1794
1014b1dc
EZ
1795 * process.c (Fprocess_send_eof): Don't crash if someone tries to
1796 open a pty on MS-Windows. (Bug#16152)
1797
e088f894
EZ
1798 * emacs.c (decode_env_path): Fix bogus comparison against
1799 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
1800
119f64db
JB
18012013-12-15 Juanma Barranquero <lekktu@gmail.com>
1802
1803 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
1804 (Fx_file_dialog): Add parentheses around && to silence warning.
1805
1806 * w32term.c (construct_drag_n_drop): Remove unused local variable.
1807
dd1fb8cb
EZ
18082013-12-15 Eli Zaretskii <eliz@gnu.org>
1809
cdeb10ce
EZ
1810 * xdisp.c (extend_face_to_end_of_line): Extend background of
1811 non-default face in margin areas as well. (Bug#16151)
1812 (display_line): Call extend_face_to_end_of_line for continued
1813 lines as well, if the display margins have non-zero width.
1814 (set_glyph_string_background_width): When needed, set the
1815 extends_to_end_of_line_p flag on glyph strings to be drawn in
1816 margin areas, not only in the text area.
1817
dd1fb8cb
EZ
1818 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
1819 startup.
1820
27c1b043
PE
18212013-12-15 Paul Eggert <eggert@cs.ucla.edu>
1822
1823 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
1824 Don't worry about verify_error being t, since it has to be a list.
1825
96c06863
PE
18262013-12-14 Paul Eggert <eggert@cs.ucla.edu>
1827
1828 Use bool for boolean, focusing on headers.
1829 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
1830 No need to include <stdbool.h>, since conf_post.h does it now.
1831 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
1832 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
1833 (SET_PER_BUFFER_VALUE_P):
1834 * ccl.c, ccl.h (setup_ccl_program):
1835 * ccl.h (CHECK_CCL_PROGRAM):
1836 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
1837 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
1838 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
1839 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
1840 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
1841 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
1842 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
1843 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
1844 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
1845 (CHARSET_FAST_MAP_SET):
1846 * coding.c (decode_coding_ccl, encode_coding_ccl):
1847 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
1848 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
1849 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
1850 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
1851 (decode_coding_c_string):
1852 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
1853 * conf_post.h (has_attribute):
35e951cd 1854 * dispextern.h (trace_redisplay_p)
96c06863
PE
1855 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
1856 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
35e951cd 1857 (SET_GLYPH_FROM_CHAR_GLYPH)
96c06863
PE
1858 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
1859 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
1860 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
1861 (cursor_in_mouse_face_p):
1862 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
1863 (blank_row, prepare_desired_row)
1864 (build_frame_matrix_from_leaf_window, make_current)
1865 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
1866 (update_window, scrolling_window, update_frame_line):
1867 * disptab.h (GLYPH_FOLLOW_ALIASES):
1868 * editfns.c (Fformat):
1869 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
1870 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
1871 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
1872 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
1873 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
1874 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
1875 (FONT_DEFERRED_LOG):
35e951cd 1876 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
96c06863
PE
1877 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
1878 (FRAME_MOUSE_UPDATE):
1879 * fringe.c (Fdefine_fringe_bitmap):
1880 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
1881 (x_create_bitmap_from_xpm_data, xpm_load_image):
1882 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
1883 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
1884 (MERGE_INTERVAL_CACHE):
1885 * keymap.h (KEYMAPP):
1886 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
1887 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
1888 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
1889 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
1890 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
1891 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
1892 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
1893 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
1894 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
1895 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
1896 (SETUP_BUFFER_SYNTAX_TABLE):
1897 * systime.h (timespec_valid_p):
1898 * term.c (save_and_enable_current_matrix):
1899 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
1900 * xdisp.c (in_display_vector_p, display_tool_bar_line)
1901 (redisplay_internal, try_window_reusing_current_matrix)
1902 (sync_frame_with_window_matrix_rows, try_window_id)
1903 (display_menu_bar, display_tty_menu_item, display_mode_line)
1904 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
b4dd49e0 1905 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
96c06863
PE
1906 * xmenu.c (xmenu_show):
1907 * xterm.c (use_xim, x_term_init):
1908 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
1909 (struct x_bitmap_record):
1910 Use bool for booleans.
1911 * ccl.c (struct buffer_text):
1912 * ccl.h (struct ccl_program):
1913 * charset.h (struct charset):
1914 * cm.h (struct cm):
1915 * coding.h (struct iso_2022_spec, struct coding_system):
1916 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
1917 (struct glyph_string, struct face, struct face_cache)
1918 (struct bidi_string_data, struct bidi_it)
1919 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
1920 (struct image):
1921 * editfns.c (Fformat):
1922 * frame.h (struct frame):
1923 * fringe.c (struct fringe_bitmap):
1924 * intervals.h (struct interval):
1925 * keyboard.h (struct kboard):
1926 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
1927 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
1928 (struct Lisp_Buffer_Local_Value, union specbinding):
1929 * macfont.m (struct macfont_info):
1930 * process.h (struct Lisp_Process):
1931 * termchar.h (struct tty_display_info):
1932 * window.h (struct window):
1933 * xterm.h (struct x_output):
1934 Use bool_bf for boolean bit-fields.
1935 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
1936 All callers changed.
1937 * ccl.h (struct ccl_program): Remove unused members private_state,
1938 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
1939 eight_bit_control.
1940 (struct ccl_spec): Remove unused members cr_carryover,
1941 eight_bit_carryover.
1942 * conf_post.h: Include <stdbool.h>.
1943 (bool_bf): New type.
1944 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
35e951cd
JB
1945 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
1946 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
1947 'do { ... } while (false)' brackets.
b4dd49e0
PE
1948 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
1949 Args must now be expressions; all callers changed.
96c06863
PE
1950 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
1951 (PRODUCE_GLYPHS): Simplify use of boolean.
1952 * fileio.c (Fcopy_file):
1953 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
1954 * lisp.h (UNGCPRO): Return void, not int.
1955 (FOR_EACH_TAIL): Use void expression, not int expression.
1956 * region-cache.c: Reindent.
1957 * region-cache.h: Copy comments from region-cache.c, to fix
1958 incorrect remarks about booleans.
1959
2897da4d
EZ
19602013-12-14 Eli Zaretskii <eliz@gnu.org>
1961
1962 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
1963 when character at point is displayed from a display vector.
1964 (Bug#16148)
1965
31b4827e
TZ
19662013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
1967
1968 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
1969 now a list of certificate validation checks that will abort a
1970 connection with an error.
1971 (Fgnutls_boot): Document it and use it.
1972
5645852c
MR
19732013-12-14 Martin Rudalics <rudalics@gmx.at>
1974
1975 * w32term.c (w32_enable_frame_resize_hack): New variable.
1976 (x_set_window_size): Use it to hack frame resizing on Windows
1977 (Bug#16028).
1978
ec4440cf
EZ
19792013-12-14 Eli Zaretskii <eliz@gnu.org>
1980
1981 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
1982 Windows-specific code to w32.c. Change error message text to
1983 match that of Posix platforms.
1984
1985 * w32.c (w32_copy_file): New function, most of the code copied and
1986 reworked from Fcopy_file. Improve error handling. Plug memory
1987 leak when errors are thrown. Support file names outside of the
1988 current codepage. (Bug#7100)
1989
dc7909c4
PE
19902013-12-13 Paul Eggert <eggert@cs.ucla.edu>
1991
1992 * lread.c (load_path_default): Prototype.
1993
06a4f110
GM
19942013-12-13 Glenn Morris <rgm@gnu.org>
1995
1996 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
1997 (dump_path): Remove.
1998 (load-path-default): Remove `changed' argument.
1999 Do not set dump_path permanently. Simplify.
2000 (init_lread): Simplify.
2001 (syms_of_lread): Remove dump_path.
2002
5035fbc1
DA
20032013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
2004
2005 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
2006 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
2007 2013-12-12 font-related change to avoid Bug#16128, which
2008 is quite hard to fix without even more substantial changes.
2009
b6c888cc
DA
20102013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
2011
2012 * font.c (font_close_object): Check for live frame (Bug#16128).
2013
11dde529
PE
20142013-12-13 Paul Eggert <eggert@cs.ucla.edu>
2015
2016 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
2017 Return ptrdiff_t, not int, since it's a buffer size.
2018 Reindent/reparen some macros to a more Gnuish style.
2019
4618713a
PE
20202013-12-12 Paul Eggert <eggert@cs.ucla.edu>
2021
2022 Avoid undefined behavior with huge regexp interval counts.
2023 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
e9dc713d 2024 since it's now specialized to interval counts. All uses changed.
4618713a
PE
2025 Do not assume wrapraound on signed integer overflow.
2026 (regex_compile): Simplify based on the above changes.
2027
01633a17
EZ
20282013-12-12 Eli Zaretskii <eliz@gnu.org>
2029
2030 Support file names on MS-Windows that use characters outside of
2031 the current system codepage. (Bug#7100)
2032
2033 * w32.c (get_file_security, set_file_security)
2034 (create_symbolic_link): Separate pointers and boolean flags for
2035 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
2036 non-zero, else the former.
2037 (codepage_for_filenames, filename_to_utf16, )
5b87d0d9
MN
2038 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
2039 New functions.
01633a17
EZ
2040 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
2041 characters.
2042 (normalize_filename): Lose the DBCS code, now works on UTF-8.
2043 Accept only one argument; all callers changed.
2044 (dostounix_filename): Remove the second argument, now works in
2045 UTF-8. All callers changed.
2046 (parse_root): Lose DBCS code.
2047 (get_long_basename, w32_get_short_filename, init_environment)
2048 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
2049 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
2050 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
2051 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
2052 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
2053 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
2054 otherwise.
2055 (ansi_encode_filename): New function.
2056 (get_emacs_configuration, get_emacs_configuration_options):
2057 Functions deleted.
2058 (add_volume_info, GetCachedVolumeInformation): Run the input file
2059 name through unixtodos_filename, to ensure it is stored and
2060 referenced in canonical form.
2061 (get_volume_info): Lose the DBCS code, now works in UTF-8.
2062 (logon_network_drive, sys_link, utime): Improve error handling.
2063 (sys_access): New function.
2064 (hashval, generate_inode_val): Unused functions deleted.
2065 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
2066 (check_windows_init_file): Convert error message from UTF-8 to
2067 ANSI codepage, for display in the message box.
2068 (globals_of_w32): Set w32_unicode_filenames according to the OS
2069 version.
2070
2071 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
2072 w32_unicode_filenames is non-zero, ANSI mode otherwise.
2073 (syms_of_w32term): Declare w32-unicode-filenames.
2074
2075 * w32proc.c (new_child, delete_child): Remove code that handled
2076 unused pending_deletion and input_file members of the child struct.
2077 (create_child, sys_spawnve): Convert all file names to ANSI
2078 codepage. Use ANSI APIs explicitly; forcibly fail if any file
2079 name cannot be encoded in ANSI codepage. Don't use
2080 unixtodos_filename, mirror slashes by hand.
2081 (record_infile, record_pending_deletion): Functions deleted.
2082 (Fw32_short_file_name): Call w32_get_short_filename instead of
2083 GetShortPathName.
2084
2085 * w32notify.c (add_watch): Work in Unicode mode when
2086 w32_unicode_filenames is non-zero, ANSI mode otherwise.
2087 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
2088 instead, do the same with Lisp primitives.
2089
2090 * w32fns.c (file_dialog_callback, Fx_file_dialog)
2091 (Fsystem_move_file_to_trash, Fw32_shell_execute)
2092 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
2093 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
2094 (Fw32_shell_execute): Improve error reporting.
2095 (Fdefault_printer_name): Ifdef away for Cygwin.
2096
2097 * w32.h (struct _child_process): Remove input_file and
2098 pending_deletion members that are no longer used.
2099 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
2100 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
2101 (ansi_encode_filename): New and updated prototypes.
2102
2103 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
2104 APIs explicitly.
2105 (unexec): Don't use dostounix_filename, it expects a file name in
2106 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
2107 ANSI encoding.
2108
2109 * fileio.c (Ffile_name_directory, file_name_as_directory)
2110 (directory_file_name, Fexpand_file_name)
2111 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
2112 arguments of dostounix_filename.
2113 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
2114 use MAX_UTF8_PATH for size of file-name strings.
2115 (emacs_readlinkat): Build an explicitly unibyte string for file
2116 names.
a544fbe1
GM
2117 (syms_of_fileio) <file-name-coding-system>:
2118 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
01633a17
EZ
2119
2120 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
2121 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
2122 directories to UTF-8.
2123 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
2124 environment, and each element of the input PATH, to UTF-8.
2125
2126 * dired.c (file_attributes): Use build_unibyte_string explicitly
2127 to make Lisp strings from user and group names.
2128
2129 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
2130 decode_file.
2131
2132 * coding.c (decode_file_name, encode_file_name): New functions.
2133
2134 * termcap.c (tgetent): Adapt to the change in arguments of
2135 dostounix_filename.
2136
2137 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
2138 names.
2139
2140 * msdos.c (dostounix_filename, init_environment): Adapt to the
2141 change in arguments of dostounix_filename.
2142
2143 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
2144 [WINDOWSNT]: Encode file names passed to the image libraries in
2145 ANSI codepage.
2146
2147 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
2148 [WINDOWSNT]: Convert file names to the current ANSI codepage.
2149
2150 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
2151 arguments of dostounix_filename.
2152
cf86e18b
DA
21532013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
2154
2155 * font.h (struct font_entity) [HAVE_NS]: New field to record
2156 font driver which was used to create this entity.
2157 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
2158 frame where the font was opened.
2159 (font_close_object): Add prototype.
2160 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
2161 (font_close_object): Not static any more. Lost frame arg.
2162 Adjust comment and users.
2163 * alloc.c (cleanup_vector): Call font_close_object to adjust
2164 per-frame font counters correctly. If HAVE_NS, also call
2165 driver-specific cleanup for font-entity objects.
2166 * ftfont.c (ftfont_open):
2167 * nsfont.m (nsfont_open):
2168 * w32font.c (w32font_open_internal):
2169 * xfont.c (xfont_open):
2170 * xftfont.c (xftfont_open): Save frame pointer in font object.
2171 * macfont.m (macfont_open): Likewise.
2172 (macfont_descriptor_entity): Save driver pointer to be able
2173 to call its free_entity routine when font-entity is swept.
2174 * ftxfont.c (ftxfont_open): Add eassert because frame
2175 pointer should be saved by ftfont_driver.open.
2176
96542302
DA
21772013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
2178
2179 * xterm.c (x_make_frame_visible): Restore hack which is needed when
2180 input polling is used. This is still meaningful for Cygwin, see
2181 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
5b87d0d9
MN
2182 * keyboard.c (poll_for_input_1, input_polling_used):
2183 Define unconditionally.
397a32c1
DA
2184 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
2185 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
2186 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
2187 (font_for_char): Prefer ptrdiff_t to int for buffer position.
2188 (face_for_char): Likewise. Rearrange eassert and return ASCII
2189 face for CHAR_BYTE8_P.
2190 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
96542302 2191
1421be84
KB
21922013-12-11 Ken Brown <kbrown@cornell.edu>
2193
2194 * dispextern.h (erase_phys_cursor):
2195 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
2196
5a80236f
DA
21972013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
2198
2199 * nsterm.m (x_free_frame_resources):
2200 * term.c (tty_free_frame_resources):
2201 * xterm.c (x_free_frame_resources): Do not check for non-NULL
2202 face cache because it's implied by free_frame_faces anyway.
2203 * w32term.c (x_free_frame_resources): Likewise. Do not call
2204 free_frame_faces twice.
2205
4ec52e2f
RS
22062013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2207
2208 * editfns.c (Fformat_time_string): Mention %F in the doc.
2209
d94c40c1
MR
22102013-12-11 Martin Rudalics <rudalics@gmx.at>
2211
2212 * window.c (resize_frame_windows): Don't return immediately when
2213 the root window's size doesn't change - the minibuffer window
2214 may still have to be repositioned/resized.
2215 * xfns.c (Fx_create_frame): Always change the frame size after
2216 initializing the frame's faces.
2217 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
2218 change_frame_size should already have done it.
2219 (x_new_font): Assign new tool- and menu-bar heights.
2220 (x_set_window_size_1): Account for tool- and menu-bar heights
e9dc713d 2221 (Bug#16013). Don't set pixel sizes since change_frame_size
d94c40c1
MR
2222 should already have done it.
2223
a8f9bc05
PE
22242013-12-11 Paul Eggert <eggert@cs.ucla.edu>
2225
2226 Remove the option of using libcrypto.
2227 * Makefile.in (LIB_CRYPTO): Remove.
2228 (LIBES): Don't use it.
2229
26ec2ce9
JL
22302013-12-11 Juri Linkov <juri@jurta.org>
2231
2232 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
2233 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
2234
a71cfa02
DA
22352013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
2236
2237 * xdisp.c (display_tool_bar_line): Don't extend on a previously
2238 drawn tool bar items (Bug#16058).
e8374b39 2239 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
a71cfa02 2240
336fe071
KB
22412013-12-09 Ken Brown <kbrown@cornell.edu>
2242
2243 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
2244
2245 * lisp.h (get_frame_param): Adjust conditions for prototype
2246 declaration.
2247
ad8a47b8
DA
22482013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
2249
2250 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
2251 Avoid unused macro warning if configured --without-xft.
2252
5e48429a
JD
22532013-12-09 Jan Djärv <jan.h.d@swipnet.se>
2254
2255 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
2256
40f18bf3
JD
22572013-12-08 Jan Djärv <jan.h.d@swipnet.se>
2258
a6c4680a 2259 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
b3e42b70 2260
a6c4680a 2261 * emacs.c (main): Call fixup_locale a second time for GNUstep.
40f18bf3 2262
acfe4602
MR
22632013-12-08 Martin Rudalics <rudalics@gmx.at>
2264
2265 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
2266
95b3d095
PE
22672013-12-08 Paul Eggert <eggert@cs.ucla.edu>
2268
e9551b12
PE
2269 Use libcrypto's checksum implementations if available, for speed.
2270 * Makefile.in (LIB_CRYPTO): New macro.
2271 (LIBES): Use it.
2272
95b3d095
PE
2273 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
2274 The macro didn't conform to C99 due to type mismatch,
2275 which caused compilation failure with Sun C 5.12,
2276 and it was confusing anyway. Include window.h to declare
2277 redisplay_other_windows.
2278
0d9cba29
SM
22792013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
2280
2281 * window.c (set_window_buffer): Update mode line (bug#16084).
2282
67840e66
PE
22832013-12-07 Paul Eggert <eggert@cs.ucla.edu>
2284
2285 Fix minor problems found by static checking.
2286 * keyboard.c (poll_for_input_1, input_polling_used):
2287 Define only if HAVE_NTGUI.
2288 * xmenu.c (popup_activate_callback): Omit unnecessary
2289 check against USE_X_TOOLKIT, which must be defined here anyway.
2290 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
2291 Now static.
2292
947003b5
MR
22932013-12-07 Martin Rudalics <rudalics@gmx.at>
2294
2295 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
2296
7def8cbd
JD
22972013-12-07 Jan Djärv <jan.h.d@swipnet.se>
2298
c4142a83
JD
2299 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
2300
1bb2debd
JD
2301 * nsterm.m (x_set_window_size): Remove fprintf.
2302 (init): Define always. Set applicationDidFinishLaunchingCalled
a6c4680a 2303 for GNUstep.
0d9cba29
SM
2304 (applicationDidFinishLaunching:):
2305 Set applicationDidFinishLaunchingCalled.
1bb2debd
JD
2306 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
2307 not called.
2308
2309 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
2310
fa6fa1a1 2311 Pixel resize changes for NS (Bug#16049).
7def8cbd
JD
2312 * nsterm.m (x_set_window_size): Change parameters rows/cols to
2313 height/width. row/cols are locals.
2314 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
2315 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
2316 (windowWillResize): Remove gsextra. Calculate extra as in
2317 updateFrameSize.
0d9cba29
SM
2318 (x_new_font): Don't change frame size if fullscreen.
2319 Change size pixelwise.
7def8cbd
JD
2320
2321 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
2322 comment in xfns.c. Change to pixelwise call.
2323
6d6aa291
EZ
23242013-12-06 Eli Zaretskii <eliz@gnu.org>
2325
2326 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
2327 (Bug#16070)
2328
64ed4306
DA
23292013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
2330
2331 * xterm.c (input_signal_count): Remove.
2332 (x_dispatch_event): Define unconditionally.
2333 (x_make_frame_visible): Process X events until the frame
2334 is really visible (Bug#16027).
2335 * xterm.h (x_dispatch_event): Declare unconditionally.
2336
c619527c
JD
23372013-12-05 Jan Djärv <jan.h.d@swipnet.se>
2338
2339 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
2340
2341 * nsterm.m (x_set_window_size): Handle pixelwise.
2342
8bea269d
MR
23432013-12-05 Martin Rudalics <rudalics@gmx.at>
2344
2345 * w32term.c (x_new_font):
2346 * xterm.c (x_new_font): Calculate new frame size from new font
2347 size (Bug#16028).
2348
22800ae9
SM
23492013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
2350
105324ce
SM
2351 * lisp.h (FOR_EACH_TAIL): New macro.
2352 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
2353
22800ae9
SM
2354 * window.c (select_window): Call second wset_redisplay before we change
2355 selected_window (bug#16034).
2356
c521fe29
PE
23572013-12-04 Paul Eggert <eggert@cs.ucla.edu>
2358
2359 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
2360
913250cf
EZ
23612013-12-04 Eli Zaretskii <eliz@gnu.org>
2362
2363 * w32xfns.c: Include window.h, to avoid a compiler warning.
2364
5961ad6c
SM
23652013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
2366
2367 * window.c (window_scroll): Mark window for redisplay (bug#16034).
2368 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
2369 window_scroll takes care of it.
2370 (Fset_window_point, Fdelete_other_windows_internal)
2371 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
2372 (Fsplit_window_internal, Fdelete_window_internal)
2373 (Fresize_mini_window_internal, Fset_window_configuration)
2374 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
2375 cause redisplay instead of forcing a complete redisplay.
2376 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
2377 we're only affecting the selected_window.
2378
ad826124
EZ
23792013-12-04 Eli Zaretskii <eliz@gnu.org>
2380
2381 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
2382 directional control characters. Update type and category
2383 determination according to the UBA from Unicode v6.3.
2384 (bidi_category_t): New category EXPLICIT_FORMATTING.
2385
2386 * dispextern.h (bidi_type_t): Update to include new bidirectional
2387 properties introduced with Unicode v6.3. (Bug#16043)
2388
2db4a1b6
MR
23892013-12-04 Martin Rudalics <rudalics@gmx.at>
2390
2391 * xterm.c (XTflash): Fix coordinate of bottom area to flash
2392 (Bug#16044).
2393
a378aa9d
DA
23942013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
2395
2396 * font.c (font_list_entities): Remove dummy assignment.
2397 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
2398 used on graphic displays only. Remove unused 'font_encoder' member.
a84c9950 2399 (struct font_bitmap): Remove unused 'extra' member.
a378aa9d 2400 * nsfont.m (nsfont_open):
a84c9950
DA
2401 * w32font.c (w32font_open_internal):
2402 * ftfont.c (ftfont_get_bitmap): Adjust users.
a378aa9d 2403
2654ac09
PE
24042013-12-03 Paul Eggert <eggert@cs.ucla.edu>
2405
5df474aa
PE
2406 Use bool for boolean.
2407 * tparam.c (tparam1):
2408 * undo.c (record_point, record_property_change):
2409 Use bool for boolean, for local vars that are always true or false.
2410
2654ac09
PE
2411 Minor integer overflow fixes (Bug#16033).
2412 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
2413 This improves on the previous fix to this function.
2414 (window_resize_check): When summing up pixel counts, don't rely on
2415 undefined behavior if the sum overflows.
2416
7303a0ae
MR
24172013-12-03 Martin Rudalics <rudalics@gmx.at>
2418
2419 * window.c (Fset_window_new_pixel): Don't choke at negative
2420 argument value (Bug#16033).
2421
2422 * xfns.c (Fx_create_frame): Add another call to change_frame_size
2423 to avoid crash in window_box_height.
2424
2425 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
2426 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
2427 calculation.
2428 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
2429
25636e13
PE
24302013-12-03 Paul Eggert <eggert@cs.ucla.edu>
2431
2432 Minor integer overflow fixes.
2433 * window.c (Fset_window_new_pixel, grow_mini_window):
2434 * xdisp.c (Fwindow_text_pixel_size):
2435 Avoid undefined behavior on signed integer overflow.
2436 * xfns.c (x_set_mouse_color):
2437 Check that drag shape fits in 'unsigned', since that's what X wants.
2438
21bf394d
EZ
24392013-12-02 Eli Zaretskii <eliz@gnu.org>
2440
2441 Improve reporting of fatal exception on MS-Windows.
2442 * w32fns.c (my_exception_handler): New function.
2443 (globals_of_w32fns): Set it up as the unhandled exception
2444 handler. Initialize exception code and address to zeros.
2445 (emacs_abort): If the exception code and address are available,
2446 print them at the beginning of the backtrace. Fix the format of
2447 printing addresses (was producing 0x0x12345678 on XP).
2448 (Bug#15994)
2449
f345395c
HE
24502013-12-02 Helmut Eller <eller.helmut@gmail.com>
2451
2452 * eval.c (Fbacktrace__locals): New function.
2453 (syms_of_eval): Defsubr it.
2454
dacc9715
DA
24552013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
2456
2457 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
2458 Define here to unify between...
2459 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
2460 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
2461
e0e0af3b
YM
24622013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2463
2464 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
2465
2466 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
2467 fringe background extension.
2468 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
2469 because they are now always the same as `left' and `width',
2470 respectively. Remove code for the case that `width' and
2471 `sb_width' are different.
2472
75b09539
PE
24732013-12-01 Paul Eggert <eggert@cs.ucla.edu>
2474
2475 Fix minor problems found by static checking.
2476 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
2477 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
2478 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
2479
5f9aee6f
LMI
24802013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2481
2482 * image.c (imagemagick_compute_animated_image): Don't crash if we
2483 have an animation with different-sized images (bug#15313).
2484
90caab3f
MR
24852013-11-30 Martin Rudalics <rudalics@gmx.at>
2486
2487 Remove some unused items introduced during pixelwise change.
2488 * window.c (window_resize_total_check): Remove unused function.
2489 * xdisp.c (remember_mouse_glyph): Remove unused label.
2490 (Ftool_bar_height): Move declaration inside #if.
2491 * xterm.c (x_set_window_size): Don't use r and c.
2492
6ae87264
JB
24932013-11-30 Juanma Barranquero <lekktu@gmail.com>
2494
2495 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
2496 `value' and `endp'.
2497
2498 * window.c (Fset_window_configuration): Comment out unused variables.
2499
2500 * w32term.c (w32_read_socket): Remove unused variable `buf'.
2501
f80e1bb6
JD
25022013-11-30 Jan Djärv <jan.h.d@swipnet.se>
2503
eb6f376d
JD
2504 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
2505
8e2d7ef2
JD
2506 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
2507
2508 * gnutls.c (gnutls_audit_log_function): Only declare and define if
2509 HAVE_GNUTLS3 (Bug#16001).
2510
f80e1bb6
JD
2511 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
2512 if interrupts are deferred (Bug#15801).
2513
10634b40 25142013-11-30 Martin Rudalics <rudalics@gmx.at>
880e6158
MR
2515
2516 Support resizing frames and windows pixelwise.
2517 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
2518 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
2519 (struct glyph_matrix): Replace window_left_col and
2520 window_top_line by window_pixel_left and window_pixel_top.
0d9cba29
SM
2521 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
2522 Minor rewrite.
880e6158
MR
2523 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
2524 (draw_window_divider, move_it_to, x_draw_right_divider)
2525 (x_draw_bottom_divider, change_frame_size): Add or fix
2526 declarations.
2527 * dispnew.c (change_frame_size_1): Change prototype.
2528 (adjust_glyph_matrix, required_matrix_width)
2529 (adjust_frame_glyphs_for_window_redisplay): Use pixel
2530 values instead of lines and columns.
2531 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
2532 WINDOW_TOTAL_FRINGE_WIDTH.
2533 (handle_window_change_signal, do_pending_window_change)
2534 (init_display): Adjusts calls of change_frame_size.
2535 (change_frame_size, change_frame_size_1): Handle pixelwise
2536 changes.
0d9cba29
SM
2537 * frame.c (Qright_divider_width, Qbottom_divider_width):
2538 New Lisp objects.
880e6158
MR
2539 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
2540 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
2541 (x_set_internal_border_width, x_set_vertical_scroll_bars)
2542 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
2543 values.
2544 (set_frame_param): New function.
2545 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
2546 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
2547 (Ffringe_width, Fborder_width, Fright_divider_width)
2548 (Fbottom_divider_width): New functions, defsubr them.
0d9cba29
SM
2549 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
2550 New argument pixelwise.
880e6158
MR
2551 (struct frame_parm_table): New members Qright_divider_width and
2552 Qbottom_divider_width.
2553 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
2554 (x_report_frame_params): Handle Qright_divider_width and
2555 Qbottom_divider_width.
0d9cba29
SM
2556 (x_set_right_divider_width, x_set_bottom_divider_width):
2557 New functions.
880e6158
MR
2558 (frame_resize_pixelwise): New option.
2559 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
2560 new_pixelwise, right_divider_width and bottom_divider_width;
2561 remove total_lines; rename text_lines, text_cols, new_text_lines
2562 and new_text_cols to text_height, text_width, new_height and
2563 new_width respectively.
2564 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
2565 FRAME_TEXT_WIDTH respectively.
2566 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
2567 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
0d9cba29
SM
2568 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
2569 New macros.
880e6158
MR
2570 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
2571 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
2572 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
2573 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
2574 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
2575 (FRAME_TOTAL_COLS_ARG): Remove macro.
2576 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
2577 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
2578 (x_wm_set_size_hint): Handle frame pixel sizes.
0d9cba29
SM
2579 * indent.c (compute_motion, Fcompute_motion):
2580 Call window_body_width instead of window_body_cols.
880e6158
MR
2581 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
2582 (make_lispy_position): Handle right and bottom dividers.
2583 (Fsuspend_emacs): Pixelize call of change_frame_size.
2584 * keyboard.h: Extern Qright_divider, Qbottom_divider.
2585 * lisp.h: Extern set_frame_param.
2586 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
2587 x_set_window_size.
0d9cba29
SM
2588 (Fx_create_frame): Add entry for vertical_drag_cursor.
2589 Pixelize call of change_frame_size.
880e6158
MR
2590 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
2591 * nsterm.m (ns_update_window_end): Optionally draw right
2592 divider.
0d9cba29
SM
2593 (x_set_window_size): Add argument pixelwise.
2594 Call check_frame_size and change_frame_size with pixelwise zero.
880e6158
MR
2595 (ns_draw_window_divider): New function.
2596 (ns_redisplay_interface): Add ns_draw_window_divider.
2597 (updateFrameSize:): Call change_frame_size with pixelwise zero.
2598 (x_new_font): Call x_set_window_size with pixelwise zero.
2599 * print.c (print_object): For a window print its sequence
2600 number again.
2601 * term.c (Fresume_tty): Pixelize call of change_frame_size.
2602 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
2603 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
2604 (w32_createwindow): Use scroll bar area width.
0d9cba29
SM
2605 (w32_wnd_proc): Handle bottom divider width.
2606 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
2607 (Fx_create_frame): Default divider width parameters.
2608 Caclulate sizes pixelwise. Add vertical drag cursor support.
2609 (x_create_tip_frame): Default divider widths to zero.
2610 Pixelize call to change_frame_size.
880e6158
MR
2611 (Fx_show_tip): Add handling of divider widths. Pixelize window
2612 position and sizes.
2613 (Fw32_frame_rect): New function.
2614 (frame_parm_handler w32_frame_parm_handlers): Add divider
2615 widths.
2616 (Vx_window_vertical_drag_shape): Add variable.
2617 * w32inevt.c (resize_event, maybe_generate_resize_event):
2618 Pixelize change_frame_size calls.
2619 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
2620 call.
2621 * w32term.c (w32_draw_window_divider): New function.
2622 (x_update_window_end): Handle right divider.
2623 (w32_draw_fringe_bitmap, x_scroll_run)
2624 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
0d9cba29
SM
2625 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
2626 Calculate new frame sizes pixelwise.
880e6158
MR
2627 (x_new_font): Pixelize call to x_set_window_size.
2628 (x_check_fullscreen): Pixelize call to change_frame_size.
2629 (x_set_window_size_1, x_set_window_size): New argument
2630 pixelwise. Calculate pixelwise.
2631 (x_wm_set_size_hint): Use scroll bar area width.
2632 (w32_redisplay_interface): Add w32_draw_window_divider.
2633 * w32term.h (struct w32_output): Add vertical drag cursor.
2634 * widget.c (set_frame_size, update_wm_hints)
2635 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
2636 change_frame_size.
2637 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
2638 * window.c (sequence_number): Restore.
2639 (Fwindow_pixel_width, Fwindow_pixel_height)
2640 (Fwindow_mode_line_height, Fwindow_header_line_height)
2641 (window_pixel_to_total, Frun_window_scroll_functions)
2642 (Fset_window_new_pixel, window_resize_apply_total)
2643 (Fwindow_resize_apply_total): New functions.
2644 (window_body_height, window_body_width): Rename from
0d9cba29
SM
2645 window_body_lines. New argument PIXELWISE.
2646 Calculate pixelwise.
880e6158
MR
2647 (Fwindow_body_height, Fwindow_body_width): New argument
2648 PIXELWISE.
2649 (coordinates_in_window, window_relative_x_coord): Use window's
2650 pixel width instead of total width.
2651 (replace_window, recombine_windows): Initialize pixel values.
2652 (resize_root_window, resize_frame_windows, grow_mini_window)
0d9cba29
SM
2653 (shrink_mini_window): New argument PIXELWISE.
2654 Calculate pixelwise.
880e6158
MR
2655 (Fdelete_other_windows_internal, adjust_window_margins)
2656 (window_resize_check, window_resize_apply)
2657 (Fdelete_window_internal, Fresize_mini_window_internal)
2658 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
2659 (check_frame_size): Rename arguments. New argument PIXELWISE.
2660 Calculate pixelwise.
2661 (set_window_buffer): Make samebuf bool. Run configuration change
2662 hook only if buffer changed.
2663 (Fset_window_buffer): Rewrite doc-string.
2664 (make_window): Initialize new_pixel slot.
2665 (Fwindow_resize_apply): Check pixel size of root window.
2666 (Fsplit_window_internal): Call 2nd argument pixel_size.
2667 Calculate pixelwise.
2668 (Fscroll_left, Fscroll_right): Call window_body_width instead of
2669 window_body_cols.
2670 (save_window_data): New slots frame_text_width,
2671 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
2672 (saved_window): New slots pixel_left, pixel_top, pixel_height,
2673 pixel_width.
2674 (Fcurrent_window_configuration, Fset_window_configuration)
2675 (save_window_save, compare_window_configurations): Handle new
2676 slots in save_window_data and saved_window.
2677 (Fset_window_scroll_bars): Fix doc-string.
2678 (window_resize_pixelwise): New variable.
0d9cba29
SM
2679 (coordinates_in_window, Fcoordinates_in_window_p):
2680 Handle dividers.
880e6158 2681 (make_parent_window): Adjust sequence_number.
0d9cba29
SM
2682 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
2683 New functions.
880e6158
MR
2684 * window.h (struct window): New members new_pixel, pixel_left,
2685 pixel_top, pixel_width, pixel_height. Restore sequence_number.
2686 (wset_new_pixel): New function.
2687 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
2688 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
2689 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
2690 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
2691 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
2692 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
2693 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
2694 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
2695 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
2696 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
2697 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
2698 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
2699 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
2700 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
2701 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
2702 Rewrite.
2703 (resize_frame_windows, grow_mini_window, shrink_mini_window)
2704 (window_body_width, check_frame_size): Adapt external declarations.
2705 * xdisp.c (last_max_ascent): New integer.
2706 (window_text_bottom_y): Handle bottom divider.
2707 (window_box_width, window_box_height): Calculate pixelwise.
2708 (get_glyph_string_clip_rects): Handle right divider.
2709 (remember_mouse_glyph): When windows are resized pixelwise
2710 proceed with width and height set to 1.
2711 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
2712 WINDOW_TOTAL_WIDTH.
2713 (move_it_to): Calculate and return maximum x position
2714 encountered.
2715 (Fwindow_text_pixel_size): New function.
2716 (resize_mini_window, update_tool_bar): Calculate pixelwise.
0d9cba29
SM
2717 (tool_bar_lines_needed): Rename to tool_bar_height.
2718 Calculate pixelwise.
2719 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
2720 Calculate pixelwise.
880e6158
MR
2721 (redisplay_tool_bar): Calculate pixelwise.
2722 (redisplay_window): Calculate pixelwise. Handle dividers.
2723 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
2724 (x_draw_vertical_border): Handle dividers.
2725 (define_frame_cursor1): Handle vertical drag cursor.
2726 (x_draw_right_divider, x_draw_bottom_divider): New functions.
2727 (expose_window): Calculate pixelwise. Handle dividers.
2728 (init_xdisp): Initialize pixel values.
2729 * xfaces.c (Qwindow_divider): New face.
2730 (realize_basic_faces): Realize it.
2731 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
2732 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
2733 (x_set_scroll_bar_default_width): Default actual width to 16.
2734 (Fx_create_frame): Set sizes pixelwise.
0d9cba29
SM
2735 (x_create_tip_frame): Default divider widths to zero.
2736 Pixelize call of change_frame_size.
880e6158
MR
2737 (Fx_show_tip): Handle divider widths. Initial pixel position
2738 and sizes.
2739 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
2740 (Vx_window_vertical_drag_shape): New option.
2741 * xmenu.c (free_frame_menubar): Pixelize call of
2742 x_set_window_size.
2743 * xterm.c (x_draw_window_divider): New function.
2744 (x_update_window_end): Optionally draw right divider.
2745 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
2746 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
2747 (handle_one_xevent, x_new_font): Calculate pixelwise.
2748 (x_set_window_size_1, x_set_window_size): New argument
2749 pixelwise. Calculate pixelwise.
2750 (x_wm_set_size_hint): Pixelize call of check_frame_size.
2751 (struct x_redisplay_interface): Add x_draw_window_divider.
2752 * xterm.h (struct x_output): Add vertical_drag_cursor.
2753
44ad1cf7
SM
27542013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
2755
2756 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
2757 Set invisible frames's `redisplay' when a full redisplay is requested.
2758 (redisplay_window): Set must_be_updated_p instead (bug#15999).
2759 (redisplay_mode_lines): Don't set must_be_updated_p any more.
2760 (display_mode_lines): Set it here instead.
2761
2762 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
2763
2764 * dispextern.h (set_window_update_flags): Remove.
2765
da048127
SM
27662013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2767
9f4ffeee
SM
2768 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
2769
a8253776
SM
2770 * xdisp.c (REDISPLAY_SOME_P): New macro.
2771 (redisplay_internal): Use it (bug#15999).
2772 (prepare_menu_bars, redisplay_window): Use it as well.
2773
4e36a6a6 2774 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
da048127 2775
579ca67b
TS
27762013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
2777
2778 * w32font.c (g_b_init_get_char_width_32_w): New static var.
2779 (globals_of_w32font): Zero it out.
2780 (GetCharWidth32W_Proc): New function pointer.
2781 (get_char_width_32_w): New function.
2782 (compute_metrics): If get_glyph_outline_w returns an error, try
2783 get_char_width_32_w before declaring a failure. This avoids
2784 punishing raster (a.k.a. "bitmap") fonts by slowing down
2785 redisplay. (Bug#6364).
b7f79a5c 2786
da048127
SM
27872013-11-29 Eli Zaretskii <eliz@gnu.org>
2788
b7f79a5c
EZ
2789 * xdisp.c (clear_mouse_face): Don't invalidate the entire
2790 mouse-highlight info, just signal frame_up_to_date_hook that mouse
2791 highlight needs to be redisplayed. (Bug#15913)
2792
49faeaaf
PE
27932013-11-29 Paul Eggert <eggert@cs.ucla.edu>
2794
2795 Fix minor problems found by static checking.
2796 * buffer.h (struct buffer_text, struct buffer):
2797 * frame.h (struct frame):
2798 * window.h (struct window):
2799 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
2800 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
2801 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
2802 no-longer-valid use of HAVE_MENUS.
2803 * xdisp.c (propagate_buffer_redisplay): Now static.
2804
ef869611
SM
28052013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2806
7cdf484b
SM
2807 * xmenu.c (Fmenu_or_popup_active_p):
2808 * window.c (Fset_window_configuration):
2809 * menu.c (Fx_popup_menu, Fx_popup_dialog):
2810 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
2811 * fns.c (Fyes_or_no_p):
2812 * editfns.c (Fmessage_box, Fmessage_or_box):
2813 * alloc.c (make_save_ptr_ptr):
2814 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
2815
ef869611
SM
2816 * window.c (Fset_window_configuration): Move select_window later.
2817
655ab9a3
SM
28182013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
2819
2820 Refine redisplay optimizations to only redisplay *some* frames/windows
2821 rather than all of them.
2822 * xdisp.c (REDISPLAY_SOME): New constant.
2823 (redisplay_other_windows, wset_redisplay, fset_redisplay)
2824 (bset_redisplay, bset_update_mode_line): New functions.
2825 (message_dolog): Use bset_redisplay.
2826 (clear_garbaged_frames): Use fset_redisplay.
2827 (echo_area_display): Use wset_redisplay.
2828 (buffer_shared_and_changed): Remove.
2829 (prepare_menu_bars): Call Vpre_redisplay_function before updating
2830 frame titles. Compute the actual set of windows redisplayed.
2831 Don't update frame titles and menu bars for frames that don't need to
2832 be redisplayed.
2833 (propagate_buffer_redisplay): New function.
2834 (AINC): New macro.
2835 (redisplay_internal): Use it. Be more selective in the set of windows
2836 we redisplay. Propagate windows_or_buffers_changed to
2837 update_mode_lines a bit later to simplify the code.
2838 (mark_window_display_accurate_1): Reset window and buffer's
2839 `redisplay' flag.
2840 (redisplay_window): Do nothing if neither the window nor the buffer nor
2841 the frame needs redisplay.
2842 * window.h (struct window): Add `redisplay' field.
2843 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
2844 (redisplay_other_windows, window_list): New declarations.
2845 * window.c (select_window, Fset_window_start): Use wset_redisplay.
2846 (window_list): Not static any more.
2847 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
2848 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
2849 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
2850 * frame.c (Fmake_frame_visible): Don't redisplay everything.
2851 * frame.h (struct frame): Add `redisplay' field.
2852 Move `external_menu_bar' bitfield next to other bit-fields.
2853 (SET_FRAME_GARBAGED): Use fset_redisplay.
2854 (SET_FRAME_VISIBLE): Don't garbage the frame;
2855 Use redisplay_other_windows.
2856 * buffer.h (struct buffer): Add `redisplay' field.
2857 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
2858 (modify_overlay): Use bset_redisplay.
2859 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
2860
9c099ca7
EZ
28612013-11-28 Eli Zaretskii <eliz@gnu.org>
2862
2863 Support w32 file notifications in batch mode.
2864 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
2865 invalid (which happens in batch mode). If non-interactive, call
2866 handle_file_notifications to store file notification events in the
2867 input queue. (Bug#15933)
2868
655ab9a3 2869 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
9c099ca7 2870
655ab9a3 2871 * w32inevt.c (handle_file_notifications): Now external, not static.
9c099ca7
EZ
2872
2873 * w32term.h (handle_file_notifications): Provide prototype.
2874
2875 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
2876 init_crit, since init_display, which does that otherwise, is not
2877 called.
2878
7e3bf78c
GM
28792013-11-27 Glenn Morris <rgm@gnu.org>
2880
2881 * Makefile.in ($(lispsource)/international/charprop.el): New.
2882 (emacs$(EXEEXT)): Depend on charprop.el.
2883
fb6a5d68
EZ
28842013-11-27 Eli Zaretskii <eliz@gnu.org>
2885
de1e0d91
EZ
2886 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
2887 deleting portions of the buffer under non-nil REPLACE argument.
2888 (Bug#15973)
2889
fb6a5d68
EZ
2890 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
2891 directory, watch it and not its parent.
2892 (add_watch): Allow empty string in FILE.
2893
72fdd473
MR
28942013-11-27 Martin Rudalics <rudalics@gmx.at>
2895
2896 * window.c (Fset_window_start, window_resize_apply)
2897 (window_scroll): Reset window_end_valid (Bug#15957).
2898
cb6c95a3
GM
28992013-11-27 Glenn Morris <rgm@gnu.org>
2900
2901 * Makefile.in (leimdir): Now in lisp source directory.
2902 ($(leimdir)/leim-list.el): Just use ../leim .
2903 * epaths.in (PATH_DUMPLOADSEARCH):
2904 * lread.c (load_path_default):
2905 * nsterm.m (ns_load_path): No more leim directory.
2906
ed87760c
AS
29072013-11-26 Andreas Schwab <schwab@suse.de>
2908
2909 * .gdbinit (xgettype): Add cast.
2910
624780f0
GM
29112013-11-26 Glenn Morris <rgm@gnu.org>
2912
2913 Preload leim-list.el.
2914 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
2915 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
2916 is a single directory.
2917
4aaf6b61
PE
29182013-11-25 Paul Eggert <eggert@cs.ucla.edu>
2919
3f73284a
PE
2920 bool-vector-subsetp is now the normal direction (Bug#15912).
2921 * data.c (Fbool_vector_subsetp): Test whether the first argument
2922 is a subset of the second one, not the reverse. Add doc string.
2923
4aaf6b61
PE
2924 Fix minor problems found by static checking.
2925 * lread.c (load_path_default): Now static.
2926 * textprop.c (text_property_stickiness): Be consistent about the
2927 test used when deciding whether to consider the previous character.
2928 This simplifies the code a bit.
2929
511fa0d3
SM
29302013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
2931
a5fa8eb4
SM
2932 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
2933
511fa0d3
SM
2934 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
2935 (syms_of_frame): Don't defsubr them.
2936
97bacf8c
GM
29372013-11-25 Glenn Morris <rgm@gnu.org>
2938
310294a3
GM
2939 * lread.c (load_path_default): Change the sense of the argument.
2940 (init_lread): When EMACSLOADPATH is set, do not ignore changes
2941 from dump_path. When it is not, avoid checking dump_path twice.
2942
97bacf8c
GM
2943 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
2944 uninstalled dump_path against installed Vload_path. (Bug#15964)
2945
450533b0
SM
29462013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
2947
740bcff0
SM
2948 Export get_pos_property to Elisp.
2949 * editfns.c (Fget_pos_property): Rename from get_pos_property.
2950 (syms_of_editfns): Export it to Elisp.
2951
450533b0
SM
2952 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
2953
1db72ad3
RF
29542013-11-23 Romain Francoise <romain@orebokech.com>
2955
2956 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
2957 initialization here ...
2958 (syms_of_fileio): ... from here.
2959
2c98e669
SM
29602013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
2961
2962 * lread.c (init_lread): Fix int/Lisp_Object mixup.
2963 Please use --enable-check-lisp-object-type.
2964
50dca5df
GM
29652013-11-23 Glenn Morris <rgm@gnu.org>
2966
2967 * process.c (get_process): Explicit error for dead buffers.
2968
d7aff0d6
GM
29692013-11-23 Andreas Schwab <schwab@linux-m68k.org>
2970
2971 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
2972
17e0445b
GM
29732013-11-23 Glenn Morris <rgm@gnu.org>
2974
2975 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
2976 * lread.c (load_path_check): Take path to check as argument.
2977 (load_path_default): New, split from init_lread.
2978 (init_lread): Move calc of default load-path to load_path_default.
2979 Empty elements in EMACSLOADPATH now stand for the default.
2980 (load-path): Doc fix.
2981 * emacs.c (decode_env_path): Add option to treat empty elements
2982 as nil rather than ".".
2983 * callproc.c (init_callproc_1, init_callproc):
2984 * image.c (Vx_bitmap_file_path):
2985 * lisp.h (decode_env_path):
2986 * lread.c (Vsource_directory):
2987 Update for new argument spec of decode_env_path.
2988
cd88d682
EZ
29892013-11-22 Eli Zaretskii <eliz@gnu.org>
2990
2991 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
2992 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
2993
75360f19
PE
29942013-11-21 Paul Eggert <eggert@cs.ucla.edu>
2995
7e8ed4f7
PE
2996 Fix some dependency problems that cause unnecessary recompiles.
2997 Problem reported by RMS in
2998 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
2999 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
3000 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
3001 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
7e8ed4f7
PE
3002 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
3003 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
3004 (boostrap-clean): No need to remove stamp-oldxmenu.
3005
75360f19
PE
3006 Fix recently introduced bool vector overrun.
3007 This was due to an optimization that went awry.
3008 Reported by Glenn Morris in
3009 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
3010 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
3011 for empty vectors, undoing the 2013-11-18 change.
3012 * data.c (bool_vector_binop_driver): Rely on this.
3013 Fix bug that occasionally overran the destination.
3014 * lisp.h (struct Lisp_Bool_vector): Document this.
3015
f03f7d3d
JD
30162013-11-20 Jan Djärv <jan.h.d@swipnet.se>
3017
e9dc713d 3018 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
cab0d91d
JD
3019 to handle dialogs.
3020
f03f7d3d
JD
3021 * nsterm.m (init, run, stop:): Comment out for now, does not work
3022 with dialogs.
3023
12455b2f
PE
30242013-11-19 Paul Eggert <eggert@cs.ucla.edu>
3025
3026 * charset.c (syms_of_charset): Don't read past end of string.
3027
8d1c3af9
GM
30282013-11-19 Glenn Morris <rgm@gnu.org>
3029
3030 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
3031
8e015705
BJ
30322013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
3033
3034 Add hooks to run on gaining/losing focus. (Bug#15029)
3035 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
3036 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
3037 (syms_of_frame): Add focus-in-hook, focus-out-hook.
3038
87d86601
PE
30392013-11-18 Paul Eggert <eggert@cs.ucla.edu>
3040
23e79746
PE
3041 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
3042 The old names predated the API change that put destination at end.
3043
ec2c4ee6
PE
3044 Improve API of recently-added bool vector functions (Bug#15912).
3045 The old API had (bool-vector-count-matches A B)
3046 and (bool-vector-count-matches-at A B I), which gave the
3047 misleading impression that the two functions were variants, one
3048 with a location I. The new API has (bool-vector-count-population A)
3049 and (bool-vector-count-consecutive A B I) to make the distinction
3050 clearer. The first function no longer has a B argument, since the
3051 caller can easily determine the number of nils if the length and
3052 number of ts is known.
3053 * data.c (Fbool_vector_count_population): Rename from
3054 bool_vector_count_matches, and accept just 1 argument.
3055 (Fbool_vector_count_consecutive): Rename from
3056 Fbool_vector_count_matches_at.
3057
87d86601
PE
3058 Always allocate at least one bits_word per bool vector.
3059 See Daniel Colascione in:
3060 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
3061 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
3062 * data.c (bool_vector_binop_driver): Rely on this. Tune.
3063 * lisp.h (struct Lisp_Bool_vector): Document this.
3064
37c790b3
EZ
30652013-11-18 Eli Zaretskii <eliz@gnu.org>
3066
3067 * insdel.c (invalidate_buffer_caches): New function, consolidated
3068 from part of prepare_to_modify_buffer.
3069 (insert_from_gap, prepare_to_modify_buffer):
655ab9a3
SM
3070 * coding.c (code_convert_region, code_convert_string):
3071 Call invalidate_buffer_caches. (Bug#15841)
37c790b3
EZ
3072
3073 * lisp.h (invalidate_buffer_caches): Add prototype.
3074
96e78d1f
EZ
30752013-11-17 Eli Zaretskii <eliz@gnu.org>
3076
3077 * w32term.c (x_update_window_end): Don't invalidate the entire
3078 mouse-highlight info, just signal frame_up_to_date_hook that mouse
3079 highlight needs to be redisplayed. (Bug#15913)
3080
0f679e86
PE
30812013-11-17 Paul Eggert <eggert@cs.ucla.edu>
3082
3083 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
3084
3d6dec8d
EZ
30852013-11-16 Eli Zaretskii <eliz@gnu.org>
3086
d17f4dba
EZ
3087 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
3088 while we are using Vprin1_to_string_buffer.
3089
3d6dec8d
EZ
3090 * keymap.c (describe_map): Don't crash if PT is 1 both before and
3091 after inserting the description string. (Bug#15907)
3092
2fcc742f
PE
30932013-11-15 Paul Eggert <eggert@cs.ucla.edu>
3094
3095 * data.c: Work around bogus GCC diagnostic about shift count.
3096 Reported by Eli Zaretskii in
3097 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
3098 (pre_value): New function.
3099 (count_trailing_zero_bits): Use it.
3100
73583a99
EZ
31012013-11-15 Eli Zaretskii <eliz@gnu.org>
3102
3103 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
3104 assume C macros are not supported even under -g3 in these old GCC
3105 versions.
3106
a1f03e89
LL
31072013-11-15 Leo Liu <sdl.web@gmail.com>
3108
3109 * minibuf.c (Ftry_completion, Fall_completions)
3110 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
3111
1a191e5c
PE
31122013-11-15 Paul Eggert <eggert@cs.ucla.edu>
3113
3114 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
3115 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
3116 This avoids placing unnecessary constants into the Emacs code.
3117
c9f63070
KI
31182013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
3119
3120 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
3121 for Cygwin w32 build.
3122
3123 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
3124 for Cygwin w32 build. (Bug#15892)
3125
d672ac3c
PE
31262013-11-14 Paul Eggert <eggert@cs.ucla.edu>
3127
2cf00efc
PE
3128 Simplify, port and tune bool vector implementation.
3129 * alloc.c (bool_vector_exact_payload_bytes)
3130 (bool_vector_payload_bytes): Remove.
3131 (bool_vector_fill): Return its argument.
3132 * alloc.c (bool_vector_fill):
3133 * lread.c (read1):
3134 * print.c (print_object):
3135 Simplify by using bool_vector_bytes.
3136 * alloc.c (make_uninit_bool_vector):
3137 New function, broken out from Fmake_bool_vector.
3138 (Fmake_bool_vector): Use it. Use tail call.
3139 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
3140 * data.c (BITS_PER_ULL): New constant.
3141 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
3142 if long long versions don't exist.
3143 (shift_right_ull): New function.
3144 (count_one_bits_word): New function, replacing popcount_bits_word
3145 macro. Don't assume that bits_word is no wider than long long.
3146 (count_one_bits_word, count_trailing_zero_bits):
3147 Don't assume that bits_word is no wider than long long.
3148 * data.c (bool_vector_binop_driver, bool_vector_not):
3149 * fns.c (Fcopy_sequence):
3150 * lread.c (read1):
3151 Create an uninitialized destination, to avoid needless work.
3152 (internal_equal): Simplify.
3153 (Ffillarray): Prefer tail call.
3154 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
3155 contain at least one word.
3156 (bits_word_to_host_endian): Prefer if to #if. Don't assume
3157 chars are narrower than ints.
3158 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
3159 * fns.c (Fcopy_sequence):
3160 Simplify and tune.
3161 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
3162 Don't try to port to hosts where bits_word values have holes; the
3163 code wouldn't work there anyway. Verify this assumption, though.
3164 (bool_vector_bytes): New function.
3165 (make_uninit_bool_vector): New decl.
3166 (bool_vector_fill): Now returns Lisp_Object.
3167
d672ac3c
PE
3168 * xfns.c (xic_create_fontsetname):
3169 * xrdb.c (gethomedir): Prefer tail calls.
3170
bd7cd30a
PE
31712013-11-12 Paul Eggert <eggert@cs.ucla.edu>
3172
b3671617
PE
3173 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
3174 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
e3ac17b6 3175
bd7cd30a
PE
3176 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
3177 that requires a return value.
3178 (Fset_buffer_modified_p): Take advantage of this change to do
3179 a tail call.
3180
ecda65d4
SM
31812013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
3182
3183 * buffer.c (Frestore_buffer_modified_p): Sync it with
3184 Fset_buffer_modified_p.
3185 (Fforce_mode_line_update): New function, moved from subr.el.
3186 (Fset_buffer_modified_p): Use them.
3187 (syms_of_buffer): Defsubr Fforce_mode_line_update.
3188
5389db9e
PE
31892013-11-11 Paul Eggert <eggert@cs.ucla.edu>
3190
3191 * search.c (find_newline): Rewrite to prefer offsets to pointers.
3192 This avoids undefined behavior when subtracting pointers into
3193 different aways. On my platform it also makes the code a tad
3194 smaller and presumably faster.
3195
7818df11
SM
31962013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
3197
3198 * keyboard.c (command_loop_1): Use region-extract-function.
3199 * insdel.c (Qregion_extract_function): Not static any more (can we
3200 stop pretending that these vars can benefit from being marked static?).
3201
85f37d10
EZ
32022013-11-09 Eli Zaretskii <eliz@gnu.org>
3203
3204 * search.c (find_newline): If buffer text is relocated during the
3205 "dumb loop", adjust C pointers into buffer text to follow suit.
3206 (Bug#15841)
3207
0449d6cd 32082013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
b24ac90f
JD
3209
3210 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
3211 for conversion (Bug#15837).
3212
addccbd0
EZ
32132013-11-09 Eli Zaretskii <eliz@gnu.org>
3214
3215 * fileio.c (Finsert_file_contents): Invalidate the newline cache
3216 for the entire range of inserted characters. (Bug#15841)
3217
5b97b4c0
JD
32182013-11-08 Jan Djärv <jan.h.d@swipnet.se>
3219
3220 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
3221 unspecified.
3222 (realize_default_face): Remove assignment to distant-foreground if
3223 unspecified (Bug#15815).
3224
080db47f
EZ
32252013-11-08 Eli Zaretskii <eliz@gnu.org>
3226
3227 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
3228 cache-long-scans disabled, since we don't want to call
3229 prepare_to_modify_buffer (in insert_1_both) for each message we
3230 display.
3231
3232 * buffer.h (bset_cache_long_scans): New INLINE function, moved
3233 from buffer.c. Improve commentary to the buffer field setter
3234 functions.
3235
3236 * buffer.c (bset_cache_long_scans): Static function deleted.
3237 Improve commentary to the buffer field setter functions.
3238 (init_buffer_once): Default for cache-long-scans changed to t.
3239 (Bug#15797)
3240
7f1913b2
PE
32412013-11-08 Paul Eggert <eggert@cs.ucla.edu>
3242
220a304a
PE
3243 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
3244
7f1913b2
PE
3245 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
3246 This bug was introduced in my 2013-06-21 change, and caused
3247 struct Lisp_Sub_Char_Table objects to be given too many slots,
3248 which broke 'make -C admin/unidata'.
3249
5ee29210
JD
32502013-11-07 Jan Djärv <jan.h.d@swipnet.se>
3251
3252 Import changes from mac-port 4.5.
3253 * macfont.m (mac_font_copy_default_descriptors_for_language)
3254 (mac_font_copy_default_name_for_charset_and_languages): Declare.
3255 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
3256 (macfont_language_default_font_names): New.
3257 (macfont_list): Rearrange language/charset code.
3258 (macfont_close): Don't check for macfont_info->cache.
3259 (mac_ctfont_create_preferred_family_for_attributes): New font
3260 selection code, call
3261 mac_font_copy_default_name_for_charset_and_languages.
3262 (mac_font_copy_default_descriptors_for_language)
3263 (mac_font_copy_default_name_for_charset_and_languages): New functions.
3264
3265 * macfont.h (kCTVersionNumber10_9): Define if not defined.
3266
aea07e2c
PE
32672013-11-07 Paul Eggert <eggert@cs.ucla.edu>
3268
3269 Port to C11 aligned_alloc, and fix some integer overflows.
3270 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
3271 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
3272 and use of posix_memalign replaced with aligned_alloc.
3273 (aligned_alloc): New function, defined or declared as needed.
3274 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
3275 Don't undef; configure.ac now does this.
3276 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
3277 (calloc, aligned_alloc): Check for integer overflow.
3278 (aligned_alloc): Rename from memalign. All uses changed.
3279 (memalign): New function, an alias for aligned_alloc.
3280
e2e894cf
SM
32812013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3282
3283 * xdisp.c (redisplay_internal): Fix typo in last change.
3284
a5d376b0
PE
32852013-11-06 Paul Eggert <eggert@cs.ucla.edu>
3286
3287 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
3288
2ec9db5d
SM
32892013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3290
3291 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
3292 redisplay--mode-lines-cause.
3293 (redisplay_internal): Keep them uptodate. Remove redundant check of
3294 buffer_shared_and_changed.
3295 * *.[chm]: Number every assignment to update_mode_lines so we
3296 can track why it is set.
3297
d7ac0815
EZ
32982013-11-06 Eli Zaretskii <eliz@gnu.org>
3299
3300 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
3301
94ae2ad4
SM
33022013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3303
3304 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
3305 can track why it is set.
3306
798aef02
PE
33072013-11-06 Paul Eggert <eggert@cs.ucla.edu>
3308
3309 Integer-related fixes for term.c etc.
3310 * dispextern.h (face_tty_specified_color): New function.
3311 * term.c (turn_on_face): Don't rely on undefined behavior when
94ae2ad4
SM
3312 assigning an out-of-range value to 'long'.
3313 Simplify test for toggling highlight.
798aef02
PE
3314 (tty_capable_p): Omit last two (unused) args. All callers changed.
3315 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
3316 (read_menu_input, tty_menu_activate, tty_menu_show):
3317 * xfaces.c (x_supports_face_attributes_p)
3318 (tty_supports_face_attributes_p):
3319 Use bool for boolean. All callers changed.
3320 (tty_supports_face_attributes_p): Omit defaults for color indices;
3321 no longer needed. Simplify tail call.
3322
9e6e9826
SM
33232013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
3324
3325 * xdisp.c (prepare_menu_bars): Mark static.
3326 * lisp.h (prepare_menu_bars): Don't declare.
3327 * xselect.c (x_handle_selection_clear):
3328 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
3329
7544a9d3
PE
33302013-11-05 Paul Eggert <eggert@cs.ucla.edu>
3331
3332 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
3333 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
3334
2e670b95
SM
33352013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
3336
3337 * keyboard.c (Fcommand_error_default_function): Rename from
3338 Fdefault_error_output.
3339
2ea0d614
JC
33402013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
3341
2e670b95
SM
3342 * keyboard.c (Fdefault_error_output): New function, extracted from
3343 cmd_error_internal.
3344 (syms_of_keyboard): Use it for Vcommand_error_function.
2ea0d614 3345
70de5e86
SM
33462013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
3347
3348 * eval.c (handlerlist_sentinel): New variable (bug#15802).
3349 (init_eval): Use it to ensure handlerlist is non-NULL.
3350 (unwind_to_catch): Make sure we never set handlerlist to NULL.
3351 (Fsignal): Adjust NULLness test of handlerlist.
70de5e86
SM
3352 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
3353
d57f4dde
EZ
33542013-11-05 Eli Zaretskii <eliz@gnu.org>
3355
3356 * callproc.c (call_process): Call prepare_to_modify_buffer before
3357 decoding text read from the sub-process, as the decoded stuff will
3358 be inserted into the buffer. This will invalidate the various
3359 caches maintained for the buffer. (Bug#15148)
3360
29aa2b71
XF
33612013-11-05 Xue Fuqiao <xfq.free@gmail.com>
3362
3363 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
3364 string of glyphless-char-display.
3365
ceb486d4
JD
33662013-11-05 Jan Djärv <jan.h.d@swipnet.se>
3367
3368 * nsfns.m (ns_get_name_from_ioreg): New function.
3369 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
3370 OSX >= 10.9. Use ns_get_name_from_ioreg.
3371
69369809
PE
33722013-11-05 Paul Eggert <eggert@cs.ucla.edu>
3373
df5b4930
PE
3374 Simplify and port recent bool vector changes.
3375 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
3376 only in this file. Use a more-efficient implementation if the
3377 second argument is a power of 2.
3378 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
3379 Remove no-longer-necessary compile-time checks.
3380 (bool_vector_exact_payload_bytes): New function.
3381 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
3382 exact payload changed to call the new function. Do not assume
3383 that the arg or result fits in ptrdiff_t.
3384 (bool_vector_fill): New function.
3385 (Fmake_bool_vector): Use it. Don't assume bit counts fit
3386 in ptrdiff_t.
3387 (vroundup_ct): Don't assume arg fits in size_t.
3388 * category.c (SET_CATEGORY_SET): Remove. All callers now just
3389 invoke set_category_set.
3390 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
3391 All callers changed. Use bool_vector_set.
3392 * category.h (XCATEGORY_SET): Remove; no longer needed.
3393 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
3394 bool_vector_bitref.
3395 * data.c (Faref): Use bool_vector_ref.
3396 (Faset): Use bool_vector_set.
3397 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
3398 (Fbool_vector_not, Fbool_vector_count_matches)
3399 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
3400 * fns.c (concat): Use bool_vector_ref.
3401 (Ffillarray): Use bool_vector_fill.
3402 (mapcar1): Use bool_vector_ref.
3403 (sxhash_bool_vector): Hash words, not bytes.
3404 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
3405 a constant, since it's now used in #if.
3406 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
3407 unsigned char on unusual architectures, so that we no longer
3408 assume that the number of bits per bits_word is a power of two or
3409 is a multiple of 8 or of CHAR_BIT.
3410 (Qt): Add forward decl.
3411 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
3412 at least as strictly as bits_word.
3413 (bool_vector_data, bool_vector_uchar_data): New accessors.
3414 All data structure accesses changed to use them.
3415 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
3416 (bool_vector_set): New functions.
3417 (bool_vector_fill): New decl.
3418 (ROUNDUP): Move to alloc.c as described above.
3419
69369809
PE
3420 Fix recent gnutls changes.
3421 * gnutls.c (Fgnutls_boot): Don't assume C99.
3422 * process.c (wait_reading_process_output): Fix typo in recent change.
3423
194b4d9f
TZ
34242013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
3425
3426 * process.c (wait_reading_process_output, read_process_output)
3427 (send_process): Check gnutls_state is not NULL.
3428
3429 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
3430 (Fgnutls_boot): Set process gnutls_p later, after initialization.
3431
c8b09927
JD
34322013-11-04 Jan Djärv <jan.h.d@swipnet.se>
3433
3434 * nsterm.m (init, run, stop:): New methods in EmacsApp for
3435 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
3436
3437 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
3438 OSX >= 10.9.
3439
3440 * nsfns.m (Fx_create_frame): Fix memory leak.
3441
3442 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
3443 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
3444 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
3445
d0065ff1
EZ
34462013-11-04 Eli Zaretskii <eliz@gnu.org>
3447
3448 * xdisp.c (message3_nolog, message_with_string): Encode the string
3449 before writing it to the terminal in a non-interactive session.
3450
3451 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
3452 sure we concatenate them into a unibyte string.
3453
3454 * fileio.c (make_temp_name): Encode PREFIX, and decode the
3455 resulting temporary name before returning it to the caller.
3456 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
3457 is a unibyte string, convert NAME to a unibyte string to ensure
3458 that the result is also a unibyte string.
3459
3460 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
3461 create unibyte strings from default paths and directory/file
3462 names.
3463
3464 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
3465 string.
3466
3467 * callproc.c (init_callproc): Use build_unibyte_string to make
3468 sure we create unibyte strings from default paths and
3469 directory/file names.
3470
3471 * buffer.c (init_buffer): Don't store default-directory of
be80645a 3472 *scratch* in multibyte form. The original problem which led to
d0065ff1
EZ
3473 that is described in
3474 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
3475 but it was solved long ago. (Bug#15260)
3476
91f2d272
PE
34772013-11-04 Paul Eggert <eggert@cs.ucla.edu>
3478
3479 Port to stricter C99 platforms.
3480 Especially, C99 prohibits nesting a struct X inside struct Y if
3481 struct X has a flexible array member.
3482 * alloc.c (struct sdata): New type.
3483 (sdata): Implement in terms of struct sdata.
3484 Remove u member; all uses replaced by next_vector, set_next_vector.
3485 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
3486 (SDATA_DATA_OFFSET): Now a constant, not a macro.
3487 (struct sblock): Rename first_data member to data, which is now
3488 a flexible array member. All uses changed.
3489 (next_vector, set_next_vector, large_vector_vec): New functions.
3490 (vector_alignment): New constant.
3491 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
3492 (struct large-vector): Now merely a NEXT member, since the old approach
3493 ran afoul of stricter C99. All uses changed to use
3494 large_vector_vec or large_vector_offset.
3495 (large_vector_offset): New constant.
3496 * dispnew.c: Include tparam.h, for tgetent.
3497 Do not include term.h; no longer needed.
3498 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
3499 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
3500 (struct Lisp_Vector): Use a flexible array member for contents,
3501 instead of a union with a member that is an array of size 1.
3502 All uses changed.
3503 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
3504 fact that the struct no longer contains a union.
3505 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
3506 (struct Lisp_Save_Value, struct Lisp_Free):
3507 Use unsigned, not int, for spacers, to avoid c99 warning.
3508 (union specbinding): Use unsigned, not bool, for bitfield, as
3509 bool is not portable to pre-C99 hosts.
3510
6dc6d301
GM
35112013-11-04 Glenn Morris <rgm@gnu.org>
3512
3513 * emacs.c (usage_message): Mention that `-L :...' appends.
3514
b0b9e592
GM
35152013-11-02 Glenn Morris <rgm@gnu.org>
3516
fca2fccb
GM
3517 * Makefile.in (abs_builddir): Remove.
3518 (bootstrap_exe): Use relative filename.
3519
c617f3d0
GM
3520 Use relative filenames in TAGS files.
3521 * Makefile.in (abs_srcdir): Remove it again.
3522 (.PHONY): Remove frc.
3523 (maintainer-clean): No more TAGS-LISP file.
3524 (TAGS): Pass relative file names to etags.
3525 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
3526
b0b9e592 3527 * Makefile.in (abs_srcdir): New, set by configure.
739f57cd 3528 (lispdir): Remove.
b0b9e592
GM
3529 (maintainer-clean): Remove pointless echo. That should be in the
3530 top-level Makefile, if anywhere. Delete TAGS-LISP.
3531 (extraclean): No s/ and m/ directories for some time.
739f57cd
GM
3532 (TAGS): Also depend on ctagsfiles3.
3533 Remove no-longer-defined S_FILE.
b0b9e592 3534 Pass absolute filenames to etags once more.
739f57cd 3535 (TAGS-LISP): Replace lispdir with its expansion.
b0b9e592
GM
3536 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
3537 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
3538
0c21fa44
JD
35392013-11-02 Jan Djärv <jan.h.d@swipnet.se>
3540
94ae2ad4
SM
3541 * xfaces.c (check_lface_attrs, realize_default_face):
3542 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
39dd7bb2 3543 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
0c21fa44 3544
a90e5a33
PE
35452013-11-02 Paul Eggert <eggert@cs.ucla.edu>
3546
3547 * emacs.c (original_pwd): Remove global var by making it local.
3548 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
3549
3c334c14
JD
35502013-11-01 Jan Djärv <jan.h.d@swipnet.se>
3551
3552 * xfaces.c: Declare color_distance.
3553 (QCdistant_foreground): New variable.
3554 (NEAR_SAME_COLOR_THRESHOLD): New define.
3555 (load_color2): New function.
3556 (load_color): Call load_color2.
3557 (load_face_colors): Call load_color2 and if distant-color is specified
3558 calculate distant and use distant-color if colors are near.
3559 (LFACE_DISTANT_FOREGROUND): New define.
3560 (merge_face_ref, Finternal_set_lisp_face_attribute)
3561 (Finternal_get_lisp_face_attribute)
3562 (x_supports_face_attributes_p): Handle distant-foreground similar to
3563 foreground.
3564 (syms_of_xfaces): DEFSYM QCdistant_foreground.
3565
94ae2ad4
SM
3566 * dispextern.h (lface_attribute_index):
3567 Add LFACE_DISTANT_FOREGROUND_INDEX.
3c334c14 3568
d14c81ee
CB
35692013-11-01 Claudio Bley <claudio.bley@googlemail.com>
3570
94ae2ad4
SM
3571 * image.c (pbm_next_char): New function.
3572 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
0e7690de
CB
3573 (pbm_scan_number): Use it.
3574 (Qlibjpeg_version): New variable.
d14c81ee
CB
3575 (syms_of_image): DEFSYM and initialize it.
3576
26ca8870
JD
35772013-10-31 Jan Djärv <jan.h.d@swipnet.se>
3578
3579 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
3580
8fd07417
GM
35812013-10-31 Glenn Morris <rgm@gnu.org>
3582
3583 * emacs.c (original_pwd): New char.
3584 (main): If using --chdir, store original_pwd.
3585 (init_cmdargs): When setting Vinvocation_directory based on a
3586 relative argv[0], use original_pwd if set. (Bug#15768)
3587
4c9797cb
SM
35882013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3589
3590 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
3591
dcd163ac
PE
35922013-10-29 Paul Eggert <eggert@cs.ucla.edu>
3593
3594 * insdel.c: Fix minor problems found by static checking.
3595 (Qregion_extract_function): Now static.
3596 (prepare_to_modify_buffer_1): Remove unused locals.
3597
3472b6c6
SM
35982013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3599
3600 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
3601 (syms_of_xdisp): Declare pre-redisplay-function.
3602 (markpos_of_region): Remove function.
3603 (init_iterator, compute_stop_pos, handle_face_prop)
3604 (face_before_or_after_it_pos, reseat_to_string)
3605 (get_next_display_element, window_buffer_changed)
3606 (redisplay_internal, try_cursor_movement, redisplay_window)
3607 (try_window_reusing_current_matrix, try_window_id, display_line)
3608 (note_mode_line_or_margin_highlight, note_mouse_highlight)
3609 (display_string, mouse_face_from_buffer_pos): Remove region handling.
3610 * window.h (struct window): Remove field `region_showing'.
3611 * dispextern.h (struct it): Remove region_beg/end_charpos.
3612 (face_at_buffer_position, face_for_overlay_string)
3613 (face_at_string_position): Update prototypes.
3614 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
3615 (face_at_string_position): Remove `region_beg' and `region_end' args.
3616 * fontset.c (Finternal_char_font):
3617 * font.c (font_at, font_range): Adjust calls accordingly.
3618 * insdel.c (Qregion_extract_function): New var.
3619 (syms_of_insdel): Initialize it.
3620 (prepare_to_modify_buffer_1): Use it.
3621
2d9783e0
DA
36222013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
3623
3624 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
3625 * ftxfont.c (ftxfont_get_gcs):
3626 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
3627 * xfaces.c (x_free_colors, x_free_dpy_colors)
3628 (x_create_gc, unload_color):
3629 * xselect.c (x_property_data_to_lisp):
3630 * xsettings.c (parse_settings):
3631 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
3632 (get_bits_and_offset): Adjust definition.
3633 * frame.c (XParseGeometry): Adjust locals.
3634 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
3635 * regex.h (toplevel): Likewise for reg_syntax_t.
3636
dee4ba59
SM
36372013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3638
3639 * eval.c (run_hook_with_args): Use FUNCTIONP.
3640
0085b9be
DA
36412013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
3642
3643 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
3644 fields, drop 'allocated_p' member and use -1 for uninitialized value.
3645 * w32term.h (struct w32_output): Similarly but do not use -1 because...
3646 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
3647 on MS-Windows anyway.
3648 (free_face_colors): Define only if HAVE_X_WINDOWS and...
3649 (free_realized_face): ...adjust user.
3650 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
3651 white relief pixels to -1.
3652 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
3653 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
3654 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
3655
b7e0ef72
PE
36562013-10-28 Paul Eggert <eggert@cs.ucla.edu>
3657
3658 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
3659 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
3660 in practice now. All callers changed.
3661
5d3311e5
DA
36622013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
3663
3664 * dispextern.h (struct face): Use bitfields for 'underline_type'
3665 and 'box' members. Remove set-but-unused members 'pixmap_w' and
3666 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
3667 'stipple' member. Move 'lface' member up to help...
3668 * xfaces.c (make_realized_face): ...this function to find and
3669 clear just the members that need clearing.
3670 (load_face_colors, realize_x_face):
3671 * xdisp.c (extend_face_to_end_of_line): Adjust user.
3672
0f771d26
DA
36732013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
3674
3675 * xftfont.c (struct xftfont_info): Remove set-but-unused
3676 'screen' member.
3677 (xftfont_open): Adjust user.
3678 (xftfont_get_colors): Remove useless prototype.
3679
c556b44b
EZ
36802013-10-26 Eli Zaretskii <eliz@gnu.org>
3681
3682 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
3683 before passing them to 'unexec'. (Bug#15260)
3684
2a03e2bc
XF
36852013-10-26 Xue Fuqiao <xfq.free@gmail.com>
3686
3687 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
3688
6702c559
EZ
36892013-10-25 Eli Zaretskii <eliz@gnu.org>
3690
f67599d5
EZ
3691 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
3692 the changed signature of the font driver's 'close' method.
3693
6702c559
EZ
3694 * w32font.h (w32font_close): Adjust the prototype to the change in
3695 function definition.
3696
3697 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
3698
3699 * w32uniscribe.c (uniscribe_close): Adapt the call to
3700 w32font_close to its new prototype.
3701
78e0b35c
DA
37022013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
3703
3704 Omit unused frame argument of font API's close function.
3705 * font.h (struct font): Drop frame argument. Adjust comment.
3706 * font.c (font_clear_cache, font_close_object): Adjust users.
3707 * ftfont.c (ftfont_close):
3708 * ftxfont.c (ftxfont_close):
3709 * macfont.m (macfont_close):
3710 * nsfont.m (nsfont_close):
3711 * w32font.c (w32font_close):
3712 * xfont.c (xfont_close):
86bd985e
DA
3713 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
3714 tweak comments and make functions safe if called more than once for
3715 the same font object.
3716
3717 Perform font-specific cleanup when font object is swept by GC. See
3718 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
3719 * alloc.c (cleanup_vector): New function.
3720 (sweep_vector): Call it for each reclaimed vector object.
3721 * font.h (struct font): Adjust comment.
78e0b35c 3722
eb9a3661
GM
37232013-10-24 Glenn Morris <rgm@gnu.org>
3724
3725 * Makefile.in (abs_top_srcdir): New, set by configure.
3726
df24a230
DA
37272013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
3728
66b238df 3729 Adjust recent font-related changes to fix bug#15686.
df24a230 3730 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
66b238df 3731 is a live window system frame, mark its default font too.
df24a230 3732
b8e3b0a9
GM
37332013-10-23 Glenn Morris <rgm@gnu.org>
3734
3735 * Makefile.in (RUN_TEMACS): Make relative (again).
3736 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
3737 (bootstrap-emacs$(EXEEXT)):
3738 Quote entities that might contain whitespace.
3739
e4ea223d
PE
37402013-10-23 Paul Eggert <eggert@cs.ucla.edu>
3741
3742 Port to Solaris 10 and its bundled GCC.
3743 Problem reported by Timothy C. Burt.
3744 * floatfns.c (isfinite, isnan): Redefine unconditionally.
3745
fc54bdd5
DA
37462013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
3747
3748 Do not allow font caches to grow too large.
3749 * alloc.c (compact_font_cache_entry, compact_font_caches):
3750 New functions or stub if not HAVE_WINDOW_SYSTEM.
3751 (compact_undo_list): Factor out from Fgarbage_collect.
3752 Add comment.
3753 (mark_face_cache): Mark face font. Move down to avoid
3754 extra prototypes.
3755 (mark_terminals): Do not mark font cache here.
3756 (Fgarbage_collect): Call compaction functions described
3757 above. Adjust comment.
3758
aca5fcdc
JD
37592013-10-20 Jan Djärv <jan.h.d@swipnet.se>
3760
a9f8deec
JD
3761 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
3762 chdir to HOME (bug#15607).
3763
aca5fcdc
JD
3764 * nsterm.m (Qcocoa, Qgnustep): New variables.
3765 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
a6c4680a 3766 (ns_get_color): Make selection color work for GNUstep also.
aca5fcdc 3767
c4e3099f
EZ
37682013-10-18 Eli Zaretskii <eliz@gnu.org>
3769
3770 * keyboard.c (make_lispy_event): Remove GPM-specific code that
3771 handles mouse clicks. Instead, let GPM use the same code as all
3772 the other mice use. See the discussion starting at
3773 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
3774 for the details of the problem with the menu bar this fixes.
3775
d141d701
DA
37762013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
3777
3778 Remove port-specific display name lists to avoid extra
3779 complexity and data duplication with display info lists.
3780 * xterm.h (x_display_name_list): Remove declaration.
3781 * xterm.c (x_display_name_list): Remove.
3782 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
3783 * xfns.c (x_display_info_for_name, Fx_display_list):
3784 Likewise. Use x_display_list where appropriate.
3785 * w32term.h (w32_display_name_list): Remove declaration.
3786 * w32term.c (w32_display_name_list): Remove.
3787 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
3788 Adjust users.
3789 * w32fns.c (x_display_info_for_name, Fx_display_list):
3790 Likewise. Use x_display_list where appropriate.
3791 * nsterm.h (ns_display_name_list): Remove declaration.
3792 * nsterm.m (ns_display_name_list): Remove.
3793 (ns_term_init, syms_of_nsterm): Adjust users.
3794 * nsfns.m (ns_display_info_for_name, Fx_display_list):
3795 Likewise. Use x_display_list where appropriate.
3796 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
3797 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
3798 (mark_terminals): Mark per-terminal font cache.
3799
ef566920
BR
38002013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
3801
3802 Don't run timers in input-pending-p. Its new check-timers param
e9dc713d 3803 provides the prior behavior. (Bug#15045).
39c87140 3804 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
ef566920 3805
f2752e01
PE
38062013-10-17 Paul Eggert <eggert@cs.ucla.edu>
3807
3d798ba7
PE
3808 Make some functions static in non-Microsoft builds.
3809 On my platform (Fedora 19 x86-64), this shrinks the
3810 Emacs executable (text+data) by 0.25%.
3811 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
3812 (load_color) [!MSDOS]:
3813 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
3814 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
3815 * lisp.h (check_existing):
3816 * process.h (conv_sockaddr_to_lisp, network_interface_list)
3817 (network_interface_info) [!WINDOWSNT]:
3818 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
3819 Remove extern decls.
3820 * fileio.c (check_existing):
3821 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
3822 * process.c (conv_sockaddr_to_lisp, network_interface_list)
3823 (network_interface_info) [!WINDOWSNT]:
3824 * term.c (encode_terminal_code) [!WINDOWSNT]:
3825 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
3826 * xfaces.c (load_color) [!MSDOS]:
3827 Now static.
3828 * fileio.c (check_existing, check_executable, check_writable):
3829 * process.c (network_interface_list, network_interface_info):
3830 Move earlier, so that we don't need forward decls.
3831 * gnutls.c (fn_gnutls_transport_set_errno)
3832 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
3833 Remove; unused.
3834 * w32.c (init_environment): Use faccessat rather than
3835 check_existing, partly for consistency with the rest of the code
3836 in this file, partly so that check_existing can be static.
3837
bb9937df
PE
3838 Make VALMASK visible to GDB even if clang is used (Bug#15574).
3839 * emacs.c (MAIN_PROGRAM): New macro.
3840 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
3841 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
3842
f2752e01
PE
3843 bool vector int width fixes
3844 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
3845 (Fbool_vector_count_matches_at):
3846 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
3847 can exceed PTRDIFF_MAX, at least in theory.
3848 (Fbool_vector_count_matches_at):
3849 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
3850
0a2b8e3c
PE
38512013-10-16 Paul Eggert <eggert@cs.ucla.edu>
3852
3853 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
3854 (struct sockaddr): Add forward decl, for platforms that lack it.
3855
2318fcca
JD
38562013-10-16 Jan Djärv <jan.h.d@swipnet.se>
3857
3858 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
3859 Qnil (Bug#15628).
3860
b911a94d
EZ
38612013-10-16 Eli Zaretskii <eliz@gnu.org>
3862
3dffe395
EZ
3863 * w32.c (network_interface_get_info, network_interface_list)
3864 (network_interface_info): New functions. (Bug#15610)
3865 (GetAdaptersInfo_Proc): New typedef.
3866 (get_adapters_info): New wrapper function.
3867 (globals_of_w32): Initialize g_b_init_get_adapters_info.
3868
dee4ba59
SM
3869 * process.h (network_interface_list, network_interface_info):
3870 New prototypes.
3dffe395
EZ
3871
3872 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
3873 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
3874 all systems. Return non-nil for systems that HAVE_NET_IF_H and
3875 for WINDOWSNT. Doc fix.
3876 (syms_of_process): Defsubr Snetwork_interface_list and
3877 Snetwork_interface_info unconditionally.
3878
b911a94d
EZ
3879 * menu.c (have_boxes): Fix redundant simulation of radio buttons
3880 in NS GUI sessions. (Bug#15629)
3881
04d47595
DA
38822013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
3883
3884 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
3885
5e15c624
PE
38862013-10-15 Paul Eggert <eggert@cs.ucla.edu>
3887
3888 * print.c (print_object): Print " ..." when truncating bool vectors.
3889
5d64d770
EZ
38902013-10-15 Eli Zaretskii <eliz@gnu.org>
3891
3892 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
3893 standard mouse buttons.
3894
3895 * termhooks.h (struct input_event): Remove incorrect commentary.
3896
c911772e
PE
38972013-10-15 Paul Eggert <eggert@cs.ucla.edu>
3898
454e2fb9
PE
3899 Disallow bool vector operations on mixed-length operands.
3900 The old behavior left garbage in the result vector sometimes,
3901 and didn't seem to be useful.
3902 * data.c (Qwrong_length_argument): New static var.
3903 (wrong_length_argument): New function.
3904 (bool_vector_binop_driver): Check that args agree in length.
3905
c911772e
PE
3906 * keyboard.c, keyboard.h (all_kboards): Now static.
3907
57f623e2
XF
39082013-10-15 Xue Fuqiao <xfq.free@gmail.com>
3909
3910 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
3911 note from the lispref.
3912
47c4d1e9
DA
39132013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
3914
3915 * nsterm.h (struct ns_display_info): Remove set-but-unused
3916 member image_cache (image caches are per-terminal anyway).
3917 (FRAME_X_IMAGE_CACHE): Remove.
3918 * nsterm.m (ns_initialize_display_info): Adjust user.
3919
ccd4a783
EZ
39202013-10-14 Eli Zaretskii <eliz@gnu.org>
3921
279066b2
EZ
3922 * w32proc.c: Include mingw_time.h.
3923
3924 * w32.c: Include mingw_time.h.
3925
ccd4a783
EZ
3926 Implement scrolling of TTY menus when the screen is too short.
3927
3928 * term.c (tty_menu_display): Accept an additional argument, the
3929 menu item from which to start displaying the menu. Account for
3930 the value of Y when limiting the menu to the number of available
3931 screen lines.
3932 (mi_result): New enumeration.
3933 (read_menu_input): Return enumerated value. When the y coordinate
3934 hits min_y or max_y, return scroll indication instead of wrapping
3935 around the menu.
3936 (tty_menu_activate): Handle the scrolling indications from
3937 read_menu_input. Compute the first menu item to display and pass
3938 it to tty_menu_display.
3939
77e3b1b7
DA
39402013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
3941
3942 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
3943 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
3944 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
3945 Adjust to match the change described below.
3946 (struct terminal): Move must_write_spaces, line_ins_del_ok,
3947 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
3948 memory_below_frame members to...
3949 * termchar.h (struct tty_display_info): ...here because they're
3950 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
3951 * term.c (init_tty):
3952 * nsterm.m (ns_create_terminal):
3953 * w32term.c (w32_create_terminal):
3954 * xterm.c (x_create_terminal): Adjust users.
3955 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
3956 to filter out non-TTY frames. Adjust comment.
3957 (scrolling): Adjust user. Prefer eassert for debugging check.
3958
e558436b
DA
39592013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
3960
3961 * xfaces.c (PT_PER_INCH): Remove unused macro.
3962 * termhooks.h (struct terminal): Remove set-but-unused
3963 member fast_clear_end_of_line.
3964 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
3965 * nsterm.m (ns_create_terminal):
3966 * term.c (init_tty):
3967 * w32term.c (w32_create_terminal):
3968 * xterm.c (x_create_terminal): Adjust users.
3969
1c0a7493
PE
39702013-10-14 Paul Eggert <eggert@cs.ucla.edu>
3971
3972 * lisp.h (bool_vector_size): New function.
3973 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
3974 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
3975 (Fbool_vector_not, Fbool_vector_count_matches_at):
3976 Remove uses of 'eassume' that should no longer be needed,
3977 because they are subsumed by the 'eassume' in bool_vector_size.
3978
567f95ec
EZ
39792013-10-12 Eli Zaretskii <eliz@gnu.org>
3980
3981 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
3982 after inclusion of gif_lib.h, thus fixing compiler warnings caused
3983 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
3984
abe02020
EZ
39852013-10-11 Eli Zaretskii <eliz@gnu.org>
3986
3987 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
3988 have different dimensions. (Bug#15575)
3989
3990 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
3991 visibility.
3992
3993 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
3994
9428abbf
DA
39952013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
3996
3997 * term.c (tty_menu_show): Never return with unbalanced
3998 specpdl. Use eassert for debugging check. Adjust style.
3999
052bac0b
EZ
40002013-10-11 Eli Zaretskii <eliz@gnu.org>
4001
4002 * term.c (read_menu_input): Make selection of menu items
4003 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
4004 (tty_menu_activate): Fix off-by-one error when computing max_y.
4005
e1f9f9e3
TZ
40062013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
4007
4008 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
4009 audit logging (only used with GnuTLS 3.x) and enable it.
4010
7d563e36
DA
40112013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4012
4013 * dispnew.c (redraw_frame): Remove useless #ifdef because
4014 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
4015 Also, move TTY fflush to...
4016 * term.c (tty_update_end): ...this function.
4017
48621e69
EZ
40182013-10-11 Eli Zaretskii <eliz@gnu.org>
4019
4020 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
4021 the end of the frame's glyph matrix. (Bug#15575)
4022
4023 * term.c (tty_menu_display): Don't move cursor while overwriting
4024 frame's glyphs with menu items. Limit the number of items
4025 displayed to what can be shown on the available screen lines,
4026 excluding the echo area.
4027 (tty_menu_activate): Limit the Y coordinate allowed by
4028 read_menu_input to the last screen line used for menu display.
4029
b9ff995e
PE
40302013-10-11 Paul Eggert <eggert@cs.ucla.edu>
4031
4032 * lisp.h (eassume): New macro.
4033 Also, include <verify.h>, for 'assume'.
4034 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
4035 (vroundup, vector_nbytes):
4036 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
4037 (Fbool_vector_not, Fbool_vector_count_matches)
4038 (Fbool_vector_count_matches_at):
4039 Use eassume, not eassert.
4040 * casetab.c (set_identity, shuffle):
4041 * composite.c (composition_gstring_put_cache):
4042 * dispnew.c (update_frame_1):
4043 * ftfont.c (ftfont_shape_by_flt):
4044 * image.c (gif_load):
4045 * intervals.c (offset_intervals):
4046 * macfont.m (macfont_shape):
4047 Remove calls to 'assume' that are no longer needed, because
4048 --enable-gcc-warnings no longer generates bogus warnings
4049 when these calls are removed.
4050
33ac0265
DA
40512013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4052
4053 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
4054
ee041f2d
SM
40552013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
4056
4057 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
4058 (Qsubstitute_env_in_file_name): New var.
4059 (syms_of_fileio): Define it.
4060
00036e1d
EZ
40612013-10-10 Eli Zaretskii <eliz@gnu.org>
4062
4063 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
4064 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
4065 (Bug#15575)
4066
4067 * term.c (save_and_enable_current_matrix): Don't allocate and
4068 don't save margin areas.
4069 (restore_desired_matrix): Don't restore margin areas.
4070 (free_saved_screen): Don't free margin areas.
4071
99149625
PE
40722013-10-10 Paul Eggert <eggert@cs.ucla.edu>
4073
4074 * image.c: Pacify --enable-gcc-warnings.
4075 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
4076 #define only if used.
4077
a5dab159
EZ
40782013-10-10 Eli Zaretskii <eliz@gnu.org>
4079
4080 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
4081 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
4082 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
4083 (gif_load): For giflib v5.x and later, display the error message
4084 produced by giflib when its functions fail.
4085 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
4086 (Bug#15531)
4087
6bbe6da8
DA
40882013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4089
4090 * keyboard.c (last_event_timestamp): Remove. For X selection and
4091 GTK popup menus, it may be obtained from per-frame X display info.
4092 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
4093 (process_special_events): Adjust users.
4094 * keyboard.h (last_event_timestamp): Remove declaration.
4095 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
4096 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
4097 * menu.h (xmenu_show): Adjust prototype.
4098 * menu.c (Fx_popup_menu): Adjust user.
4099 * xselect.c (x_own_selection, x_get_foreign_selection)
4100 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
4101
1afcba63
DA
41022013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4103
4104 * keyboard.c (init_kboard): Now static. Add arg
4105 to denote window system. Adjust comment.
4106 (init_keyboard): Adjust user.
4107 (allocate_kboard): New function.
4108 (syms_of_keyboard):
4109 * nsterm.m (ns_term_init):
4110 * term.c (init_tty):
4111 * w32term.c (w32_create_terminal):
4112 * xterm.c (x_term_init): Use it.
4113 * keyboard.h (init_kboard): Remove prototype.
4114 (allocate_kboard): Add prototype.
4115
f3606ef7
BF
41162013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
4117
4118 * image.c (GIFLIB_MAJOR): Ensure it's defined.
4119 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
4120
e20bb249
PE
41212013-10-09 Paul Eggert <eggert@cs.ucla.edu>
4122
4123 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
4124
9f6a18d2
EZ
41252013-10-09 Eli Zaretskii <eliz@gnu.org>
4126
4127 * term.c (tty_menu_activate): Flush the output stream after
4128 showing the cursor, and don't mark the frame garbaged at exit from
4129 the function. Fixes redisplay glitches when moving from one menu
4130 to another.
4131
0486beac
JD
41322013-10-09 Jan Djärv <jan.h.d@swipnet.se>
4133
4134 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
4135 or throw error (Bug#15570).
4136
0d5d3029
PE
41372013-10-09 Paul Eggert <eggert@cs.ucla.edu>
4138
ab7ce978
PE
4139 * intervals.c (temp_set_point_both): Move test into 'eassert',
4140 for speed.
4141
0d5d3029
PE
4142 * lisp.h (eassert): Don't use 'assume'.
4143 Sometimes 'assume' wins in performance, and sometimes it loses,
4144 so it shouldn't be used all the time. Perhaps we need two
4145 flavors of 'eassert', one for where 'assume' is far more likely
4146 to help or to hurt; but that can be done later.
1afcba63 4147 Problem reported by Dmitry Antipov in
0d5d3029
PE
4148 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
4149 Also, don't include <verify.h>; no longer needed.
4150
fa022909
GM
41512013-10-09 Glenn Morris <rgm@gnu.org>
4152
4153 * eval.c (Fcond): Doc tweak.
4154
051277bf
EZ
41552013-10-09 Eli Zaretskii <eliz@gnu.org>
4156
4157 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
4158 expressions with side effects to eassert. (Bug#15565)
4159
79804536
SM
41602013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
4161
4162 * fns.c (hashfn_user_defined): Allow hash functions to return any
4163 Lisp_Object.
4164
3b158d11
PE
41652013-10-08 Paul Eggert <eggert@cs.ucla.edu>
4166
4167 Fix minor problems found by static checking.
4168 * dispnew.c (save_current_matrix): Omit unnecessary casts.
4169 * dispnew.c (update_frame_with_menu): Mark debug local as used.
4170 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
4171 * keyboard.c (read_menu_command): Remove unused local.
4172 * lisp.h (read_menu_command): New decl.
4173 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
4174 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
4175 Return ptrdiff_t, not int.
4176 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
4177 not int, for benefit of xpalloc.
4178 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
4179 and xpalloc.
4180 (have_menus_p): Remove; unused.
4181 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
4182 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
4183 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
4184 Now static.
4185 (save_and_enable_current_matrix): Omit unnecessary casts.
4186 (read_menu_input): Omit local extern decl (now in lisp.h).
4187 Don't access uninitialized storage if mouse_get_xy fails.
4188 (tty_menu_activate): Mark local as initialized, for lint.
4189 (tty_menu_activate, tty_meny_show): Remove unused locals.
4190
4ed77415
EZ
41912013-10-08 Eli Zaretskii <eliz@gnu.org>
4192
4193 Support menus on text-mode terminals.
4194 * xterm.h (xw_popup_dialog): Add prototype.
4195
4196 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
4197 (xmenu_show): Block input here, instead in Fx_popup_menu.
4198 (xw_popup_dialog): New function, with X-specific bits of popup
4199 dialogs.
4200
dee4ba59
SM
4201 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
4202 New functions.
4ed77415
EZ
4203
4204 * window.c (Fset_window_configuration): Use run-time tests of the
4205 frame type instead of compile-time conditionals, when menu-bar
4206 lines are considered.
4207
4208 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
4209 (w32_popup_dialog): New prototypes.
4210
4211 * w32menu.c (Fx_popup_dialog): Function deleted.
4212 (w32_popup_dialog): New function, with w32 specific bits of popup
4213 dialogs. Block input here.
4214
4215 * w32inevt.c (w32_console_read_socket): Minor change to add
4216 debugging TTY events.
4217
4218 * w32fns.c (show_hourglass): If returning early because the frame
4219 is not a GUI frame, unblock input.
4220
4221 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
4222 (cursorY): New functions.
4223
4224 * termhooks.h (cursorX, cursorY): Prototypes of functions on
4225 WINDOWSNT, macros that call curX and curY elsewhere.
4226
4227 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
4228
4229 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
4230 specific function to hide and show cursor on a text-mode terminal.
4231 (tty_menu_struct, struct tty_menu_state): New structures.
4232 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
4233 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
4234 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
4235 (tty_menu_locate, save_and_enable_current_matrix)
4236 (restore_desired_matrix, screen_update, read_menu_input)
4237 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
4238 (tty_pop_down_menu, tty_menu_last_menubar_item)
4239 (tty_menu_new_item_coords, tty_menu_show): New functions.
4240 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
4241
4242 * nsterm.h (ns_popup_dialog): Adjust prototype.
4243
4244 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
4245 of in x-popup-menu.
4246 (ns_popup_dialog): Adapt order of arguments to the other
4247 *_menu_show implementations.
4248 (Fx_popup_dialog): Function deleted.
4249
4250 * msdos.c (x_set_menu_bar_lines): Delete unused function.
4251
c295fc18 4252 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
4ed77415
EZ
4253
4254 * menu.c (have_boxes): New function.
4255 (single_keymap_panes): Use it instead of a compile-time
4256 conditional.
4257 (single_menu_item): Use run-time tests of the frame type instead
4258 of compile-time conditionals.
4259 (encode_menu_string): New function.
4260 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
4261 the macro, since different types of frame need different encoding
4262 of menu items.
4263 (digest_single_submenu): Use run-time tests of frame type instead
4264 of, or in addition to, compile-time conditionals.
4265 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
4266 (Fx_popup_menu): Detect when the function is called from keyboard
dee4ba59
SM
4267 on a TTY. Don't barf when invoked on a text-mode frame.
4268 Check frame type at run time, instead of compile-time conditionals for
4269 invoking terminal-specific menu-show functions.
4270 Call tty_menu_show on text-mode frames.
4271 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
4ed77415
EZ
4272 run time to determine which alternative to invoke; support dialogs
4273 on TTYs.
4274
4275 * keyboard.h <Qmouse_movement>: Declare.
4276
4277 * keyboard.c <Qmouse_movement>: Now extern.
4278 <Qecho_keystrokes>: New static variable.
4279 (read_key_sequence): Accept an additional argument, a flag to
4280 prevent redisplay during reading of the key sequence. All callers
4281 changed.
4282 (read_menu_command): New function.
4283 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
4284 autosave.
4285 (toolkit_menubar_in_use): New function.
4286 (make_lispy_event): Use it instead of a compile-time test.
4287
4288 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
4289 window-system being available.
4290
4291 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
4292 to x-popup-dialog on the frame type, they all now support popup
4293 dialogs.
4294
4295 * dispnew.c (save_current_matrix): Save the margin areas.
4296 (restore_current_matrix): Restore margin areas.
4297 (update_frame_with_menu): New function.
4298
4299 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
4300 Add prototypes.
4301
4302 * alloc.c (make_save_ptr): Now compiled unconditionally.
4303
ecab13d4
DA
43042013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
4305
4306 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
4307 (redraw_frame, update_frame): Adjust users.
4308 * dispextern.h (set_window_update_flags): Adjust prototype.
4309 * xdisp.c (redisplay_internal): When updating all frames with zero
4310 windows_or_buffers_changed, assume that only the windows that shows
4311 current buffer should be really updated.
4312
f8498081
DA
43132013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
4314
4315 Do not allocate huge temporary memory areas and objects while encoding
4316 for file I/O, thus reducing an enormous memory usage for large buffers.
4317 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
4318 * coding.h (struct coding_system): New member raw_destination.
4319 * coding.c (setup_coding_system): Initialize it to zero.
4320 (encode_coding_object): If raw_destination is set, do not create
4321 dst_object. Add comment.
4322 * fileio.c (toplevel): New constant E_WRITE_MAX.
4323 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
4324 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
4325
d180bde8
JD
43262013-10-08 Jan Djärv <jan.h.d@swipnet.se>
4327
35e951cd 4328 * nsterm.m (windowDidExitFullScreen:)
d180bde8
JD
4329 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
4330
87c4314d
PE
43312013-10-08 Paul Eggert <eggert@cs.ucla.edu>
4332
18978362
PE
4333 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
4334 * keyboard.c (unblock_input_to): Don't process pending signals
4335 if a fatal error is in progress.
4336
87c4314d
PE
4337 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
4338 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
4339 they're talking about words in Lisp bool vectors.
4340 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
1142cc2a
PE
4341 * data.c (popcount_bits_word): Rename from popcount_size_t.
4342 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
4343 All uses changed.
87c4314d 4344
595e113b
PE
43452013-10-07 Paul Eggert <eggert@cs.ucla.edu>
4346
4347 Improve support for popcount and counting trailing zeros (Bug#15550).
4348 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
4349 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
4350 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
4351 (popcount_size_t_msc, popcount_size_t_gcc):
4352 Remove; now done by Gnulib.
4353 (popcount_size_t): Now a macro that defers to Gnulib.
4354 (count_trailing_zero_bits): Return int, for consistency with
4355 Gnulib and because Emacs prefers signed to unsigned int.
4356 Don't assume that size_t is either unsigned int or unsigned long
4357 or unsigned long long.
4358 (size_t_to_host_endian): Do not assume that size_t is either
4359 exactly 32 or exactly 64 bits wide.
4360 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
4361 etc., so that it's now an enum constant, not a macro.
4362 No need to assume that it's either 32 or 64.
4363
ddb317ba
JD
43642013-10-07 Jan Djärv <jan.h.d@swipnet.se>
4365
4366 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
4367 on >= 10.7.
4368
bd74250f
DA
43692013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
4370
4371 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
764636db 4372 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
bd74250f 4373
223752d7
PE
43742013-10-07 Paul Eggert <eggert@cs.ucla.edu>
4375
4376 emacs_read and emacs_write now use void *, not char *.
4377 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
4378 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
4379 Buffer arg is now void *, not char *. This matches plain
4380 'read' and 'write' better, and avoids a constraint violation
4381 on Solaris 9 with Oracle Studio.
4382
3c439e0a
DA
43832013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
4384
4385 * alloc.c (Fmake_string): For ASCII char initializer, prefer
4386 memset to explicit loop. Otherwise copy largest possible chunk
4387 from initialized to uninitialized part, thus allowing the longer
4388 memcpy runs and reducing the number of loop iterations.
4389
28c76099
JD
43902013-10-06 Jan Djärv <jan.h.d@swipnet.se>
4391
4392 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
4393 hide toolbar (Bug#15388).
4394 (windowDidEnterFullScreen:): If presentation options are zero,
4395 set them here (Bug#15388).
a3e9050c
JD
4396 (ns_update_auto_hide_menu_bar): Remove runtime check.
4397 Don't auto hide dock unless menubar is also auto hidden.
28c76099 4398
544a2a80
XF
43992013-10-05 Xue Fuqiao <xfq.free@gmail.com>
4400
4401 * editfns.c (message): Mention batch mode in doc string.
4402
a27fd309
JD
44032013-10-05 Jan Djärv <jan.h.d@swipnet.se>
4404
4405 * nsterm.m (check_native_fs): Remove erroneous comment.
4406
942f6f82
DA
44072013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
4408
4409 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
4410 uses find_newline instead of scan_newline and so doesn't move point.
4411
157fec2e
PE
44122013-10-04 Paul Eggert <eggert@cs.ucla.edu>
4413
4eed3157
PE
4414 Use hardware support for byteswapping on glibc x86 etc.
4415 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
4416 whereas the old swap64 needed 30.
4417 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
4418 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
4419 Use byteswap.h's macros to swap bytes.
4420 * lisp.h (swap16, swap32, swap64): Remove.
4421 All uses replaced by bswap_16, bswap_32, bswap_64.
4422
157fec2e
PE
4423 * bytecode.c (exec_byte_code): Use some more volatile variables
4424 to work around local variables getting clobbered by longjmp.
4425 Port to pre-C99, which doesn't allow decls after stmts.
4426
b52f569d
PE
44272013-10-03 Paul Eggert <eggert@cs.ucla.edu>
4428
75273afb
PE
4429 * lisp.h (eassert): Assume that COND is true when optimizing.
4430 In other words, take on the behavior of eassert_and_assume.
4431 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
4432 (eassert_and_assume): Remove. All uses replaced by eassert.
4433
ead45345
PE
4434 * xdisp.c (Qglyphless_char): Now static.
4435
0a858ebf
PE
4436 Adjust to merge from gnulib.
4437 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
4438 * lisp.h: Include <verify.h>, for 'assume'.
4439
b52f569d
PE
4440 * eval.c (clobbered_eassert): New macro.
4441 (internal_catch, internal_condition_case)
4442 (internal_condition_case_1, internal_condition_case_2)
4443 (internal_condition_case_n): Use it instead of eassert
4444 when the argument contains locals clobbered by longjmp.
4445 Don't use clobbered locals outside of clobbered_eassert.
4446 (internal_lisp_condition_case): Use a volatile variable
4447 to work around a local variable's getting clobbered.
4448
adf2aa61
SM
44492013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
4450
4451 * lisp.h (struct handler): Merge struct handler and struct catchtag.
4452 (PUSH_HANDLER): New macro.
4453 (catchlist): Remove.
4454 (handlerlist): Always declare.
4455
4456 * eval.c (catchlist): Remove (merge with handlerlist).
4457 (handlerlist, lisp_eval_depth): Not static any more.
4458 (internal_catch, internal_condition_case, internal_condition_case_1)
4459 (internal_condition_case_2, internal_condition_case_n):
4460 Use PUSH_HANDLER.
4461 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
4462 handlerlist/catchlist.
4463 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
4464 handlerlist which can only handle a single condition-case handler at
4465 a time.
4466 (find_handler_clause): Simplify since we only a single branch here
4467 any more.
4468
4469 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
4470 and Bpophandler.
4471 (bcall0): New function.
4472 (exec_byte_code): Add corresponding cases. Improve error message when
4473 encountering an invalid byte-code. Let Bunwind_protect accept
4474 a function (rather than a list of expressions) as argument.
4475
4476 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
4477 and make them unconditional now that they're heap-allocated.
4478
328a8179
SM
44792013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
4480
4481 * charset.c (Fdecode_char, Fencode_char): Remove description of
4482 `restriction' arg. now that it's hidden by advertised-calling-convention.
4483
c348360a
JD
44842013-10-02 Jan Djärv <jan.h.d@swipnet.se>
4485
328a8179
SM
4486 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
4487 Remove unused variable (from mac-port).
c348360a
JD
4488 (macfont_draw): Use s->ybase for correct y position.
4489
1a23cd48
DA
44902013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4491
4492 * frame.h (struct frame): Drop has_minibuffer member because...
4493 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
4494 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
4495
29bf4de4
DA
44962013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4497
4498 * window.h (struct window): Prefer enum text_cursor_kinds to int
4499 for phys_cursor_type member. Move the latter, phys_cursor_width,
4500 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
4501 * window.c (replace_window, make_window): Adjust users.
4502
a30ddace
DA
45032013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4504
4505 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
4506 this module is never compiled otherwise.
4507
45435f08
AA
45082013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
4509
4510 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
4511 (Bug#15500).
4512
92e5298b
EZ
45132013-09-29 Eli Zaretskii <eliz@gnu.org>
4514
4515 * xdisp.c (get_next_display_element): Don't call face_for_font in
4516 a build configured --without-x. (Bug#15484)
4517
caa50be2
JD
45182013-09-29 Jan Djärv <jan.h.d@swipnet.se>
4519
66d13b20
JD
4520 * window.c (calc_absolute_offset): #elif should be #elif defined.
4521
caa50be2
JD
4522 * frame.c (delete_frame): Block/unblock input to overcome race
4523 condition (Bug#15475).
4524
062e286b 45252013-09-29 Andreas Politz <politza@hochschule-trier.de>
d3e2acb6
AP
4526
4527 * frame.c (delete_frame): Record selected frame only after
4528 calling Qdelete_frame_functions (Bug#15477).
4529
1610938f
JD
45302013-09-28 Jan Djärv <jan.h.d@swipnet.se>
4531
4532 * nsterm.m (ns_selection_color): Remove.
4533 (ns_get_color): Check for ns_selection_(fg|bg)_color using
4534 NSColor selectedText(Background)Color. Only for COCOA.
4535 (ns_term_init): Remove assignment of ns_selection_color, logic
4536 moved to ns_get_color.
4537
328a8179 4538 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
1610938f
JD
4539 NS_SELECTION_COLOR_DEFAULT.
4540 (NS_SELECTION_FG_COLOR_DEFAULT): New.
4541
0d2647e6
EZ
45422013-09-28 Eli Zaretskii <eliz@gnu.org>
4543
4544 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
4545 frame' does not have the tool_bar_window member.
4546
ba355de0
BR
45472013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
4548
4549 Signal error when reading an empty byte-code object (Bug#15405)
c295fc18
JB
4550 * lread.c (read1): Signal error.
4551 * alloc.c (make_byte_code): eassert header size.
4552 (sweep_vectors): Change an int to size_t.
ba355de0 4553
4710d6f4
PE
45542013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4555
cf647d93
PE
4556 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
4557 instead of ints, as it's the usual style for offsetof constants. See:
4558 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
4559
4710d6f4
PE
4560 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
4561 This is ugly, but it should fix the performance problem for older
4562 GCC versions in the short run. I'll look into integrating the
4563 Gnulib module for popcount, as a better fix.
4564 See the thread starting in:
4565 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
4566 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
4567 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
4568 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
4569 (popcount_size_t): Use it.
4570
10ebac9d
DC
45712013-09-24 Daniel Colascione <dancol@dancol.org>
4572
4573 * process.c (Fnetwork_interface_info): Fix build break due to
4574 vector changes.
4575
9da0f50e
PE
45762013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4577
4578 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
4579 Prefer signed to unsigned integers where either will do.
4580 No need for 'const' on locals that do not escape.
4581 Omit easserts with unnecessary and unportable assumptions about
4582 alignment. Avoid unnecessary casts to char *.
4583
d6d9cbc1
DA
45842013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
4585
4586 Use union for the payload of struct Lisp_Vector.
4587 This helps to avoid a few glitches dictated by C's aliasing rules.
4588 * lisp.h (struct Lisp_Vector): Use union for next and
4589 contents member. Adjust comment. Change related users.
4590 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
4591 Related users changed.
4592 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
4593 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
4594 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
4595 * xfaces.c, xfont.c, xmenu.c: Related users changed.
4596
ec7bc82f
DA
45972013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
4598
4599 Optimize glyph row clearing and copying routines.
4600 * dispextern.h (struct glyph_row): Change layout of struct
4601 glyph_row to help copy_row_except_pointers. Adjust comment.
4602 * dispnew.c (null_row): Remove.
4603 (clear_glyph_row): Use offsetof and memset to find and clear
4604 just the members that need clearing. Adjust comment.
4605 (copy_row_except_pointers): Likewise for copying.
4606
d160dd0c
PE
46072013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4608
7be68de5
PE
4609 Some minor cleanups of recently-added bool vector code.
4610 * conf_post.h (assume): Always return void. Use lint version
4611 only if GCC and MSC versions don't apply.
4612 * conf_post.h (assume):
4613 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
4614 Depend on _MSC_VER, not __MSC_VER, for consistency with
4615 the rest of Emacs.
4616 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
4617 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
4618 (bool_vector_binop_driver, count_trailing_zero_bits)
4619 (size_t_to_host_endian): Now static, not static inline;
4620 the latter isn't needed with modern compilers and doesn't
4621 work with older compilers anyway.
4622
d160dd0c
PE
4623 * alloc.c (valgrind_p): Use bool for boolean.
4624
e08813d0
DA
46252013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
4626
4627 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
4628 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
4629 (display_last_displayed_message_p, message_buf_print)
4630 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
4631 Use bool for boolean.
3a6a78fd
DA
4632 * dispextern.h (cancel_line, init_desired_glyphs):
4633 Remove ancient leftover.
4634 (help_echo_showing_p, hourglass_shown_p):
e08813d0
DA
4635 * lisp.h (noninteractive_need_newline): Adjust declaration.
4636
5492865b
DA
46372013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
4638
4639 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
4640 Move to...
4641 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
4642 ...this file and convert the latter to static. Adjust comment.
4643 (make_initial_frame):
4644 * window.c (init_window_once): Adjust user.
4645 * frame.h (last_nonminibuf_frame): Remove declaration.
4646 * lisp.h (selected_frame): Likewise.
4647 * msdos.c (the_only_display_info): Adjust comment.
4648
cd548fa4
EZ
46492013-09-23 Eli Zaretskii <eliz@gnu.org>
4650
f03eddbf
EZ
4651 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
4652 computing the end column of mouse-highlight that comes from
4653 display or overlay strings. (Bug#15437)
b519df23
EZ
4654 (note_mouse_highlight): Adapt calculation of last argument to
4655 mouse_face_from_string_pos to the above change.
f03eddbf 4656
cd548fa4
EZ
4657 * conf_post.h (__has_builtin): Define to zero, if undefined, on
4658 all platforms, not just for clang.
4659
8762e524
JD
46602013-09-23 Jan Djärv <jan.h.d@swipnet.se>
4661
4662 * filelock.c (lock_file_1): Rearrange to remove compiler warning
4663 about excess arguments to snprintf.
4664
4665 * conf_post.h(assume): Use __builtin_unreachable for clang.
4666
d4a9284f
JB
46672013-09-23 Juanma Barranquero <lekktu@gmail.com>
4668
4669 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
4670 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
4671
a84683fd
DC
46722013-09-23 Daniel Colascione <dancol@dancol.org>
4673
4674 * alloc.c (USE_VALGRIND): New macro; on by default
4675 when ENABLE_CHECKING.
ffb3f67a 4676 (mark_maybe_object, mark_maybe_pointer)
a84683fd
DC
4677 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
4678 valgrind purposes.
4679 (valgrind_p) [USE_VALGRIND]: New variable.
4680 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
4681
8fef36c6
JD
46822013-09-22 Jan Djärv <jan.h.d@swipnet.se>
4683
fb83ea63
JD
4684 * process.c (wait_reading_process_output): Change int pnamelen to
4685 socklen_t.
4686
35e951cd 4687 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
fb83ea63
JD
4688 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
4689 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
4690 argument to unsigned long to avoid warning.
4691 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
4692
8fef36c6
JD
4693 * conf_post.h (assume): Fix compiler error: x shall be cond.
4694
cd9356f2
DC
46952013-09-22 Daniel Colascione <dancol@dancol.org>
4696
4697 * xfns.c (x_get_monitor_attributes): Suppress unused variable
4698 warning when compiling without a window system.
4699
3e0b94e7
DC
47002013-09-22 Daniel Colascione <dancol@dancol.org>
4701
4702 * data.c (Qbool_vector_p): New symbol.
ffb3f67a
PE
4703 (bool_vector_spare_mask, popcount_size_t_generic)
4704 (popcount_size_t_msc, popcount_size_t_gcc)
3e0b94e7
DC
4705 (popcount_size_t)
4706 (bool_vector_binop_driver)
ffb3f67a 4707 (count_trailing_zero_bits, size_t_to_host_endian)
3e0b94e7
DC
4708 (Fbool_vector_exclusive_or)
4709 (Fbool_vector_union)
ffb3f67a
PE
4710 (Fbool_vector_intersection, Fbool_vector_set_difference)
4711 (Fbool_vector_subsetp, Fbool_vector_not)
3e0b94e7
DC
4712 (Fbool_vector_count_matches)
4713 (Fbool_vector_count_matches_at): New functions.
4714 (syms_of_data): Intern new symbol, functions.
4715 * alloc.c (bool_vector_payload_bytes): New function.
4716 (Fmake_bool_vector): Instead of calling Fmake_vector,
4717 which performs redundant initialization and argument checking,
4718 just call allocate_vector ourselves. Make sure we clear any
4719 terminating padding to zero.
ffb3f67a 4720 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
3e0b94e7
DC
4721 instead of open-coding the size calculation.
4722 (vroundup_ct): New macro.
4723 (vroundup): Assume argument >= 0; invoke vroundup_ct.
ffb3f67a 4724 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
328a8179
SM
4725 * composite.c (composition_gstring_put_cache):
4726 Change lint_assume to assume.
3e0b94e7
DC
4727 * conf_post.h (assume): New macro.
4728 (lint_assume): Remove.
4729 * dispnew.c (update_frame_1): Change lint_assume to assume.
4730 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
4731 to assume.
4732 * image.c (gif_load): Change lint_assume to assume.
4733 * lisp.h (eassert_and_assume): New macro.
4734 (Qbool_vector_p): Declare.
ffb3f67a
PE
4735 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
4736 (swap16, swap32, swap64): New inline functions.
a12bf61e 4737 * macfont.m (macfont_shape): Change lint_assume to assume.
3e0b94e7
DC
4738 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
4739 * xsettings.c (parse_settings): Use new swap16 and
4740 swap32 from lisp.h instead of file-specific macros.
4741
76880d88
EZ
47422013-09-22 Eli Zaretskii <eliz@gnu.org>
4743
4744 * xdisp.c (try_window_id): Don't abort if cursor row could not be
4745 found (which can legitimately happen when the glyph row at the
4746 window start is disabled in the current_matrix. (Bug#15365)
4747
c6cfd910
PE
47482013-09-22 Paul Eggert <eggert@cs.ucla.edu>
4749
4750 Fix syntax.h bug introduced by recent INLINE change.
4751 syntax.h defined an extern inline function SYNTAX_ENTRY that was
4752 conditionally compiled one way in some modules, and a different
4753 way in others. This doesn't work with extern inline functions,
4754 which must have the same definition in all modules, because the
4755 defining code might be shared across modules, depending on the
4756 implementation. Symptoms reported by Martin Rudalics in:
4757 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
4758 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
4759 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
4760 overriding the corresponding functions in syntax.h.
4761 * syntax.h (syntax_property_entry, syntax_property_with_flags)
4762 (syntax_property): New inline functions.
4763 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
4764 Rewrite in terms of these new functions.
4765
b3f1d119
EZ
47662013-09-21 Eli Zaretskii <eliz@gnu.org>
4767
4768 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
4769 not chars_in_text, whose result depends on the multibyteness of
4770 the current buffer. (Bug#15426)
4771
00382e8b
PE
47722013-09-20 Paul Eggert <eggert@cs.ucla.edu>
4773
e3b29769
PE
4774 Port recent change to hosts where pointers aren't 'long'.
4775 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
4776 Don't assume that pointers are the same width as 'long'.
4777 Add a compile-time check that a pointer fits into two X slots.
4778
00382e8b
PE
4779 A simpler, centralized INLINE.
4780 * conf_post.h (INLINE): Define only if not already defined.
4781 This allows us to use a single INLINE, defined by one file
4782 per executable.
4783 * emacs.c (INLINE): Define it.
4784 Also, include category.h, charset.h, composite.h, dispextern.h,
4785 syntax.h, systime.h, so that their INLINE definitions are expanded
4786 properly for Emacs.
4787 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
4788 * buffer.h, buffer.c (BUFFER_INLINE):
4789 * category.h, category.c (CATEGORY_INLINE):
4790 * character.h, character.c (CHARACTER_INLINE):
4791 * charset.h, charset.c (CHARSET_INLINE):
4792 * composite.h, composite.c (COMPOSITE_INLINE):
4793 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
4794 * frame.h, frame.c (FRAME_INLINE):
4795 * intervals.h, intervals.c (INTERVALS_INLINE):
4796 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
4797 * lisp.h, alloc.c (LISP_INLINE):
4798 * process.h, process.c (PROCESS_INLINE):
4799 * syntax.h, syntax.c (SYNTAX_INLINE):
4800 * systime.h, sysdep.c (SYSTIME_INLINE):
a12bf61e 4801 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
00382e8b
PE
4802 * window.h, window.c (WINDOW_INLINE):
4803 Remove. All uses replaced with INLINE.
4804
2b943ba6
DA
48052013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
4806
4807 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
4808 to avoid Bug#15398.
4809
13d9698a
EZ
48102013-09-19 Eli Zaretskii <eliz@gnu.org>
4811
4812 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
4813 'const char *' to avoid compiler warnings due to similar change in
4814 the prototype of x_get_string_resource.
4815
ced135eb
DA
48162013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
4817
4818 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
4819 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
4820 going to replace static variables below. Adjust comments.
4821 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
4822 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
4823 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
4824 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
4825 Related users changed.
4826 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
4827 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
4828 last_mouse_movement_time, going to replace static variables below.
4829 Adjust comments.
4830 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
4831 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
4832 Remove.
4833 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
4834 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
4835 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
4836 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
4837 static variables below.
4838 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
4839 (last_mouse_scroll_bar): Remove.
4840 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
4841 (mouseExited): Related users changed.
4842
091f1e1f
DA
48432013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
4844
4845 Do not use external array to process X scroll bar messages.
4846 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
4847 (x_send_scroll_bar_event): Pack window pointer into two slots
4848 of XClientMessageEvent if we're 64-bit. Adjust comment.
4849 (x_scroll_bar_to_input_event): Unpack accordingly.
4850
582ed56c
DA
48512013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4852
4853 Ifdef away recent changes which aren't relevant to NS port.
4854 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
4855 [!HAVE_NS]: Declare as such.
4856 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
4857 [!HAVE_NS]: Define as such.
4858
18da0d8a
DA
48592013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4860
4861 * frame.c (x_redo_mouse_highlight): New function
4862 to factor out common code used in W32 and X ports.
4863 * dispextern.h (x_redo_mouse_highlight): Add prototype.
4864 * xterm.h (struct x_display_info):
4865 * w32term.h (struct w32_display_info):
4866 * nsterm.h (struct ns_display_info): New members
4867 last_mouse_motion_frame, last_mouse_motion_x and
4868 last_mouse_motion_y, going to replace static variables below.
4869 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
4870 (redo_mouse_highlight): Remove.
4871 (note_mouse_movement, syms_of_xterm): Adjust user.
4872 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
4873 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
4874 (redo_mouse_highlight): Remove.
4875 (note_mouse_movement, syms_of_w32term): Adjust user.
4876 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
4877 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
4878 Remove.
4879 (note_mouse_movement, mouseMoved, syms_of_nsterm):
4880 * nsfns.m (compute_tip_xy): Adjust user.
4881
7a0c745a
DA
48822013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4883
4884 * frame.c (x_mouse_grabbed): New function.
4885 * dispextern.h (x_mouse_grabbed): Add prototype.
4886 (last_mouse_frame): Remove declaration.
4887 * xterm.h (struct x_display_info):
4888 * w32term.h (struct w32_display_info):
4889 * nsterm.h (struct ns_display_info): New member
4890 last_mouse_frame, going to replace...
4891 * xdisp.c (last_mouse_frame): ...global variable.
4892 (note_tool_bar_highlight):
4893 * w32term.c (w32_mouse_position, w32_read_socket):
4894 * xterm.c (XTmouse_position, handle_one_xevent):
4895 Use x_mouse_grabbed.
4896 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
4897
0791d107
DA
48982013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4899
4900 * w32term.c (w32_read_socket): Avoid temporary
4901 variables in a call to x_real_positions.
4902 * xterm.c (handle_one_xevent): Likewise.
4903
2cd98812
DA
49042013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4905
4906 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
4907 (x_icon_type): Remove prototype.
4908 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
4909 * frame.c (x_icon_type): Remove.
4910 * w32term.c (x_make_frame_visible, x_iconify_frame):
4911 * xterm.c (x_make_frame_visible, x_iconify_frame):
4912 Use x_set_bitmap_icon to factor out common code.
4913
a6c2ee1b
DA
49142013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4915
4916 * dispextern.h (check_x_display_info, x_get_string_resource):
4917 Declare here just once and unify the latter.
4918 * frame.c (check_x_display_info, x_get_string_resource):
4919 * nsterm.h (check_x_display_info):
4920 * xrdb.c (x_get_string_resource):
4921 * xterm.h (check_x_display_info): Remove prototypes.
4922 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
4923 * w32reg.c (x_get_string_resource): Likewise.
4924 (w32_get_rdb_resource): Adjust user.
4925
baed3603
DA
49262013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4927
4928 * xterm.h (struct x_display_info): New member
4929 x_pending_autoraise_frame, going to replace...
4930 * xterm.c (pending_autoraise_frame): ...static variable.
4931 (x_new_focus_frame, XTread_socket): Adjust users.
4932 * w32term.h (struct w32_display_info): New member
4933 w32_pending_autoraise_frame, going to replace...
4934 * w32term.c (pending_autoraise_frame): ...global variable.
4935 (x_new_focus_frame, w32_read_socket): Adjust users.
4936
90582f05
GM
49372013-09-17 Glenn Morris <rgm@gnu.org>
4938
4939 * xdisp.c (message_dolog): If we create *Messages*,
4940 switch it to messages-buffer-mode.
4941
b7ad2f74
PE
49422013-09-17 Paul Eggert <eggert@cs.ucla.edu>
4943
4944 Don't overuse 'const' in types of locals.
4945 * bidi.c (bidi_count_bytes):
4946 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
4947 (xg_event_is_for_scrollbar):
4948 * xselect.c (x_handle_property_notify)
4949 (x_handle_selection_notify, x_handle_dnd_message):
4950 * xsettings.c, xsettings.h (xft_settings_event):
4951 * xterm.c (x_handle_net_wm_state, handle_one_event)
4952 (x_menubar_window_to_frame, x_detect_focus_change)
4953 (construct_mouse_click, note_mouse_movement)
4954 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
4955 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
4956 (handle_one_xevent, x_handle_net_wm_state):
4957 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
4958 (x_handle_dnd_message):
4959 Avoid unnecessary 'const', typically the second 'const' in
4960 'const foo * const arg', a 'const' that does not affect the API
4961 and doesn't significantly help the human reader.
4962
19452b86
DA
49632013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4964
4965 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
4966 only if Glib < 2.36.0.
4967 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
4968 * xsettings.c (init_gconf, init_gsettings): Do not check
4969 for g_type_init.
1893694e
DA
4970 * xterm.c (handle_one_xevent): Do not call to x_clear_area
4971 if GTK >= 2.7.0.
33b83dd7 4972 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
19452b86 4973
6434e343
JD
49742013-09-16 Jan Djärv <jan.h.d@swipnet.se>
4975
3f386383
JD
4976 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
4977 before calling g_type_init.
4978
6434e343
JD
4979 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
4980
4981 * nsterm.m (syms_of_nsterm): ... to here.
4982
83a119f8
DA
49832013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
4984
4985 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
4986 (ignore_next_mouse_click_timeout): Use Time as X does.
4987 (handle_one_xevent): Avoid cast and use unsigned comparison.
4988
61582e6a
DA
49892013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
4990
4991 Do not copy X event in handle_one_xevent except KeyPress case.
4992 Wnen XEvent is processed, it is unlikely to be changed except
4993 KeyPress case, so we can avoid copying and use const pointer to
4994 const data to make sure that an event is not changed elsewhere.
4995 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
4996 const' and do not create local copy except for the KeyPress event.
4997 Use casts to avoid a few glitches. Adjust formatting. Add comments.
4998 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
4999 (x_handle_net_wm_state, x_menubar_window_to_frame)
5000 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
5001 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
5002 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
5003 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
5004 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
5005 (x_handle_dnd_message):
5006 * xsettings.c (xft_settings_event):
5007 Use 'const XEvent * const' where appropriate.
a12bf61e 5008 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
61582e6a 5009
f8eb1572
DA
50102013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
5011
5012 Fix X event waiting to handle multiple frames.
5013 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
5014 * xterm.c (pending_event_wait): Remove. Adjust users.
5015 (x_detect_focus_change): Pass frame arg.
5016 (handle_one_xevent): Find related frame early and clear per-frame
5017 wait_event_type only if this is an event for the relevant frame.
5018 (x_wait_for_event): Use per-frame wait_event_type.
5019
3fa2054e
JD
50202013-09-15 Jan Djärv <jan.h.d@swipnet.se>
5021
745d3809 5022 * nsfns.m (Fx_create_frame): Fix font driver registration for
a6c4680a 5023 GNUstep.
745d3809
JD
5024
5025 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
5026 for syms_of_macfont.
5027
3fa2054e
JD
5028 * nsterm.m: Include macfont.h.
5029 (ns_tmp_flags, ns_tmp_font): Remove.
5030 (ns_compute_glyph_string_overhangs): Check for driver Qns.
5031 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
5032 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
5033 (changeFont:): Fix code style. Check for font driver type when
5034 getiing font.
5035
5036 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
5037 (f)->descent.
5038
5039 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
5040 (nsfont_open): Set font driver type.
5041 Set font->ascent and font->descent. Figure out font instead of
5042 ns_tmp_font, and flags instead of ns_tmp_flags.
e9dc713d 5043 Fix indentation. Remove call to ns_draw_text_decoration,
3fa2054e
JD
5044 moved to nsterm.
5045
5046 * nsfns.m: Include macfont.h.
5047 (Fx_create_frame): Register macfont driver, make a better default font.
5048 (Fns_popup_font_panel): Get font from macfont driver, if used.
5049
a12bf61e 5050 * macfont.m, macfont.h, macuvs.h: New files.
3fa2054e
JD
5051
5052 * font.h: Declare syms_of_macfont.
5053
5054 * font.c (syms_of_font): Call syms_of_macfont.
5055
5056 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
5057
0eed0355
DA
50582013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
5059
5060 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
5061 and it is always zero for others, so I assume that this is an ancient
5062 leftover which nobody will want to change any more.
5063 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
5064 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
5065 * frame.c (x_set_scroll_bar_width):
5066 * w32fns.c (w32_createscrollbar):
5067 * w32term.c (w32_set_vertical_scroll_bar):
5068 * xfns.c (x_set_scroll_bar_default_width):
5069 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
5070 (x_scroll_bar_expose): Related users changed.
5071
07013c68
DA
50722013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
5073
5074 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
5075 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
901049a6
DA
5076 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
5077 Define as such.
c7cc32f7
DA
5078 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
5079 Define once here...
5080 * nsterm.h, w32term.h, xterm.h: ...and not here.
901049a6
DA
5081 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
5082 Remove unused Xisms.
7f09455e
DA
5083 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
5084 these modules are never compiled otherwise.
07013c68 5085
0df00f59
EZ
50862013-09-14 Eli Zaretskii <eliz@gnu.org>
5087
08a209bf 5088 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
0df00f59
EZ
5089 Doc fix. (Bug#15375)
5090
fcd42c11
DA
50912013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5092
5093 Unify Fx_focus_frame between all ports.
5094 * frame.h (x_focus_frame): New prototype.
5095 * xfns.c (Fx_focus_frame): Remove.
5096 (syms_of_xfns): Do not defsubr it.
5097 (x_focus_frame): X implementation.
5098 * nsfns.m (Fx_focus_frame): Remove.
5099 (syms_of_nsfns): Do not defsubr it.
5100 (x_focus_frame): NS implementation.
5101 * w32term.c (Fx_focus_frame): Remove.
5102 (x_focus_on_frame): Rename to...
5103 (x_focus_frame): W32 implementation.
5104 * w32term.h (x_focus_on_frame): Remove prototype.
5105 * w32fns.c (Fx_focus_frame): Remove.
5106 (syms_of_w32fns): Do not defsubr it.
5107 * frame.c (Fx_focus_frame): Define here.
5108 (syms_of_frame): Defsubr here.
5109 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
5110
aad3612f
DA
51112013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5112
5113 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
5114 All of them are replaced with FRAME_DISPLAY_INFO, defined in
5115 each port to reference the port-specific window system data.
5116 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
5117 (FRAME_DISPLAY_INFO): Define.
5118 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
5119 (FRAME_DISPLAY_INFO): Define. Adjust users.
5120 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
5121 (FRAME_DISPLAY_INFO): Define. Adjust users.
5122 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
5123 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
5124 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
5125 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
5126 * xselect.c, xterm.c: All related users changed.
5127
9a650e62
DA
51282013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5129
5130 * xterm.h (x_window_to_frame, x_any_window_to_frame)
5131 (x_menubar_window_to_frame): Remove prototypes.
5132 * xfns.c (x_window_to_frame, x_any_window_to_frame)
5133 (x_menubar_window_to_frame, x_top_window_to_frame):
5134 Move from here...
5135 * xterm.c (x_window_to_frame, x_any_window_to_frame)
5136 (x_menubar_window_to_frame, x_top_window_to_frame):
5137 ...to here and convert all but the last to static.
5138
347ae3e1
EZ
51392013-09-12 Eli Zaretskii <eliz@gnu.org>
5140
5141 * lisp.mk (lisp): Add w32-common-fns.elc.
5142
15c6d837
XF
51432013-09-12 Xue Fuqiao <xfq.free@gmail.com>
5144
5145 * charset.c (char_charset): Document an exception for char-charset.
5146
27e90f77
DA
51472013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
5148
5149 * xterm.h (x_display_info): New field last_user_time...
5150 * xterm.c (toplevel): ...to replace static last_user_time.
5151 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
5152
8ffbc36b
DA
51532013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
5154
5155 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
5156 scroll bar values to prevent thumb from disappear and update comment.
5157
5ec0337a
GM
51582013-09-11 Glenn Morris <rgm@gnu.org>
5159
5160 * emacs.c (usage_message): Possessive apostrophe tweak.
5161
fb55b9d1
DA
51622013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5163
8d2db8be
DA
5164 * nsterm.m (syms_of_nsterm): Use Qns.
5165 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
5166 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
5167 * xfns.c (x_display_info_for_name, Fx_open_connection):
5168 Remove old '#if 0' code.
5169 (syms_of_xfns): Use Qx.
fb55b9d1
DA
5170 * termhooks.h (fullscreen_hook): Remove the leftover.
5171 (struct terminal): Fix typo in comment.
5172
927eec55
DA
51732013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5174
5175 Cleaning up a few X scroll bar bits.
5176 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
5177 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
5178 New member last_seen_part, going to replace...
5179 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
5180 (xt_action_hook) [USE_LUCID]: Adjust user.
5181 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
5182 Lucid-specific scroll bar support.
5183 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
5184 to int and adjust to use last_seen_part member.
5185 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
5186 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
5187 Initialize last_seen_part.
5188
71b28baa
SM
51892013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
5190
5191 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
5192 insert-buffer-substring an empty string.
5193
f5dacaae
PE
51942013-09-11 Paul Eggert <eggert@cs.ucla.edu>
5195
5196 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
5197 avoiding a GCC warning.
5198
742516e0
DA
51992013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5200
5201 Ifdef away frame tool bar code when it is not really used.
5202 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
5203 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
5204 and minimize_tool_bar_window_p under the above.
5205 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
5206 (fset_tool_bar_window): Likewise.
5207 * dispnew.c (clear_current_matrices, clear_desired_matrices)
5208 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
5209 (change_frame_size_1):
5210 * window.c (window_from_coordinates, Frecenter): Adjust users.
5211 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
5212 code is not really used.
5213 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
5214 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
5215 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
5216 [!USE_GTK && !HAVE_NS]: Define as such.
5217 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
5218 (note_mouse_highlight, expose_frame):
5219 * xfns.c (x_set_tool_bar_lines):
5220 * xterm.c (handle_one_xevent): Adjust users.
5221
73f82c7e
PE
52222013-09-11 Paul Eggert <eggert@cs.ucla.edu>
5223
5224 Fix corruption with multiple emacsclient -t instances (Bug#15222).
5225 This bug was introduced by my 2013-08-26 patch, which incorrectly
5226 assumed that the terminfo implementation doesn't use termcap buffers.
5227 * term.c (init_tty) [TERMINFO]: Remove optimization, as
5228 these buffers apparently are used after all.
5229 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
5230 (struct tty_display_info): Define members termcap_term_buffer and
5231 termcap_strings_buffer even if TERMINFO.
5232
53482f41
DA
52332013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5234
5235 Fix last change.
5236 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
5237 'usage' docstring entry to pacify make-docfile.
5238
52392013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
5240
5241 Change comparison functions =, <, >, <=, >= to take many arguments.
5242 * data.c: Change comparison functions' interface and implementation.
5243 * lisp.h: Make arithcompare available for efficient two arg
5244 comparisons.
5245 * bytecode.c: Use arithcompare.
5246 * fileio.c: Use new interface.
5247
533f258f
SM
52482013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
5249
5250 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
5251
8c27f5ff
SM
52522013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
5253
5254 * eval.c (Feval): Document the new use of `lexical'.
5255
0750a308
DA
52562013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5257
5258 Review and drop old frame resize hack.
5259 * frame.h (struct frame): Remove force_flush_display_p.
5260 * dispnew.c (update_frame): Adjust user and don't call
5261 flush_frame here. The comment has said that there was an issues
5262 with redisplaying fringes, but I don't see any differences with
5263 and without this hack. Hopefully we can continue without it.
5264 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
5265 current frame matrices twice if resized_p is set.
5266
83fc0554
DA
52672013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5268
5269 Do not populate pure Xism x_sync to other ports.
5270 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
5271 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
5272 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
5273 * w32term.h (x_sync): Remove prototype.
5274
fd462129
DA
52752013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5276
5277 Cleanup frame flushing.
8c27f5ff
SM
5278 * dispextern.h (struct redisplay_interface):
5279 Drop flush_display_optional because flush_display is enough
fd462129
DA
5280 for X and flushing via RIF is just a no-op for others.
5281 * frame.h (flush_frame): New function.
5282 * dispnew.c (update_frame):
5283 * minibuf.c (read_minibuf):
5284 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
5285 Use it.
5286 * keyboard.c (detect_input_pending_run_timers): Do not flush
5287 all frames but selected one in redisplay_preserve_echo_area.
5288 * nsterm.m (ns_flush): Remove no-op.
5289 (ns_redisplay_interface): Adjust user.
5290 * w32term.h (x_flush): Remove no-op.
5291 (w32_redisplay_interface): Adjust user.
5292 * xterm.c (x_flush): Simplify because we do not flush all
5293 frames at once any more. Adjust comment.
5294 (x_redisplay_interface): Adjust user.
5295
4b73fc73
PE
52962013-09-07 Paul Eggert <eggert@cs.ucla.edu>
5297
5298 Port --without-x --enable-gcc-warnings to Fedora 19.
5299 * gfilenotify.c (globals_of_gfilenotify):
5300 Call g_type_init only if using an older glib version that needs it.
5301
77394d40
DA
53022013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5303
5304 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
5305 (last_glyphless_glyph_merged_face_id): Remove declarations.
5306 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
5307 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
5308 (last_glyphless_glyph_merged_face_id): Now static.
5309 (merge_escape_glyph_face): New function, refactored from...
5310 (get_next_display_element): ...here.
5311 (merge_glyphless_glyph_face): New function, refactored from...
5312 (produce_glyphless_glyph): ...here...
5313 * term.c (produce_glyphless_glyph): ...and here.
5314
306d67bd
SM
53152013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
5316
5317 * eval.c (eval_sub): Only call Ffunction if necessary.
5318
7f6c6450
DA
53192013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5320
5321 Attempt to make redisplay more selective when changing cursor type.
5322 * frame.h (struct frame): New bitfield cursor_type_changed.
5323 * xdisp.c (cursor_type_changed): Remove.
5324 (try_cursor_movement, redisplay_window, try_window_id)
5325 (set_frame_cursor_types, try_window_reusing_current_matrix):
5326 Adjust to use per-frame bitfield.
5327 (redisplay_internal): Look for cursor type change on each visible
5328 frame and consider all frames if cursor type has been changed on
5329 the frame other than selected. If cursor type has been changed on
5330 selected frame only, do not use fast update.
5331
bd0443bb
DA
53322013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5333
5334 Attempt to make redisplay more selective when changing fonts.
5335 * frame.h (struct frame): New bitfield fonts_changed.
5336 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
5337 (adjust_frame_glyphs): Add prototype.
5338 * dispnew.c (fonts_changed_p): Remove.
8bda01d3 5339 (adjust_glyphs): Remove because we do not
bd0443bb
DA
5340 adjust matrices on all frames at once any more.
5341 (adjust_frame_glyphs): Block and unblock input here.
5342 (adjust_glyph_matrix): Use fonts_changed.
5343 (change_frame_size_1): Use adjust_frame_glyphs.
5344 * font.c (font_open_entity): Use fonts_changed.
5345 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
5346 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
5347 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
5348 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
5349 (shrink_mini_window, Fresize_mini_window_internal)
5350 (window_scroll_pixel_based, Fset_window_configuration)
5351 (apply_window_adjustment, Fset_window_vscroll):
5352 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
5353 Use adjust_frame_glyphs.
5354 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
5355 (try_window_reusing_current_matrix, try_window_id, display_line)
5356 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
5357 (redisplay_internal): Consider fonts_changed and adjust frame
5358 matrices for each frame only if the frame is visible. If font
5359 has been changed on some frame during full redisplay, retry
5360 only visible frames where the font has been actually changed.
5361
b9695828
DA
53622013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5363
5364 Cache current header and mode line height for each window.
5365 * window.h (struct window): New fields mode_line_height
5366 and header_line_height.
5367 * window.c (make_window): Initialize them.
5368 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
5369 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
5370 (current_mode_line_height, current_header_line_height):
5371 Remove declaration.
5372 * xdisp.c (current_mode_line_height, current_header_line_height):
5373 Remove.
5374 (pos_visible_p, init_xdisp): Adjust user.
5375 (redisplay_window): Invalidate mode_line_height and
5376 header_line_height if current and desired matrices do not agree.
5377
66738305
DA
53782013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5379
5380 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
5381 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
5382
257b3b03
DA
53832013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5384
5385 Make --without-x compatible with --enable-gcc-warnings.
5386 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
5387 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
5388 members under HAVE_WINDOW_SYSTEM.
5389 * keyboard.c (make_lispy_focus_out): Likewise.
5390 (record_menu_key): Move under HAVE_MENUS.
5391 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
5392 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
5393 (syms_of_xdisp): Adjust user.
5394 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
5395 (start_hourglass, cancel_hourglass):
5396 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
5397 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
5398 and CLEAR_FONT_TABLE_NFONTS.
5399 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
5400 Declare only if HAVE_WINDOW_SYSTEM.
5401 (lface_same_font_attributes_p, clear_face_gcs): Define only
5402 if HAVE_WINDOW_SYSTEM.
5403
98b7f4bd
DA
54042013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5405
5406 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
5407 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
5408 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
5409
a7e43722
SM
54102013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
5411
5412 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
5413
0c90b9ee
PE
54142013-09-04 Paul Eggert <eggert@cs.ucla.edu>
5415
5416 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
5417 This fixes a type error on hosts where ptrdiff_t is wider than int.
5418
d99760fa
SM
54192013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
5420
6629638e
SM
5421 * keyboard.c (read_key_sequence_vs): New function.
5422 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
5423 common code.
5424
d99760fa
SM
5425 * callint.c (Fcall_interactively): Always return a vector for 'K'.
5426
224e313d
PE
54272013-09-04 Paul Eggert <eggert@cs.ucla.edu>
5428
5429 Makefile improvements.
5430 * Makefile.in (config.status): Don't use double-colon rules, as
5431 they are not portable according to POSIX. Fix shell typo with `;
5432 I guess this rule has never been tested?
5433 (VCSWITNESS): New macro, to override any environment var.
5434
6d6ed1af
DA
54352013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
5436
5437 * xterm.h (struct x_display_info): Do not track X connection
5438 fd separately because it is always available from Display.
5439 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
5440 Adjust users.
5441
bc923770
DA
54422013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5443
5444 * buffer.c (drop_overlay):
5445 * fileio.c (restore_point_unwind): Prefer unchain_marker to
5446 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
5447
b1cf96de
DA
54482013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5449
5450 * buffer.c (Fmake_overlay, Fmove_overlay):
5451 * intervals.c (set_point_from_marker):
5452 * print.c (PRINTPREPARE): Prefer signal_error
5453 to plain error and report unsuitable marker too.
5454
d1fc6c21
DA
54552013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5456
5457 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
5458 for 'dragging' member.
d1ae6a0b
DA
5459 (struct x_output): Remove set-but-unused leftovers
5460 'left_before_move' and 'top_before_move'.
d1fc6c21
DA
5461 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
5462 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
5463 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
5464 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
5465 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
5466 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
d1ae6a0b 5467 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
ec5e7504 5468 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
d1fc6c21 5469
0ce9f6de
JD
54702013-09-03 Jan Djärv <jan.h.d@swipnet.se>
5471
5472 * nsfont.m (INVALID_GLYPH): New define.
5473 (nsfont_encode_char): Use INVALID_GLYPH.
5474 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
5475
b594a96c
DA
54762013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5477
5478 * xterm.c (x_last_mouse_movement_time): Revert last change.
5479 This code should use XDisplayMotionBufferSize to check display's
5480 motion history first, and there are few other issues as well.
5481 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
5482 (handle_one_xevent): Adjust user.
5483
8b098236
MR
54842013-09-02 Martin Rudalics <rudalics@gmx.at>
5485
9718b207
MR
5486 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
5487 * frame.c (Flast_nonminibuf_frame): ... to here.
5488 (check_minibuf_window): Don't abort if no window was found
5489 (Bug#15247).
8b098236 5490
84e70bba
DA
54912013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5492
5493 Use XGetMotionEvents to ask the last mouse motion time from X server.
5494 * xterm.c (X_MOTION_HISTORY): Default to 1.
5495 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
5496 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
5497 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
5498 Ifdef away legacy code.
5499 (XTmouse_position, x_scroll_bar_report_motion):
5500 Use x_last_mouse_movement_time.
fc85e20b
DA
5501 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
5502 UnmapNotify event.
84e70bba 5503
1fccc530
DA
55042013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5505
5506 * msdos.c (last_mouse_window): Move to...
5507 (dos_rawgetc): ...this function and adjust comment.
5508 * nsterm.m (last_window): Rename to last_mouse_window, move to...
5509 (mouseMoved): ...this function and adjust comment.
5510 * w32term.c (last_window): Likewise with...
5511 (w32_read_socket): ...this function.
5512 * xterm.c (last_window): Likewise with...
5513 (handle_one_xevent): ...this function.
5514
0ab10992
DA
55152013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5516
b7da754d 5517 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
0ab10992
DA
5518 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
5519 (handle_one_xevent): ...to here.
5520 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
5521 otherwise.
5522
0c7f856e
DA
55232013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5524
5525 * msdos.c (IT_set_terminal_window): Remove no-op.
5526 (initialize_msdos_display): Adjust terminal setup.
5527 * w32console.c (w32con_set_terminal_window): Remove no-op.
5528 (initialize_w32_display): Adjust terminal setup.
5529 * w32term.c (w32_set_terminal_window): Remove no-op.
5530 (w32_create_terminal): Adjust terminal setup.
5531 * xterm.c (XTset_terminal_window): Remove no-op.
5532 (x_create_terminal): Adjust terminal setup.
5533
a892a94c
DA
55342013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
5535
5536 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
5537 Remove no-ops.
5538 (ns_create_terminal): Adjust terminal setup.
5539 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
5540 Remove no-ops.
5541 (w32_create_terminal): Adjust terminal setup.
5542 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
5543 Remove no-ops.
5544 (x_create_terminal): Adjust terminal setup.
5545
cf91889a
DA
55462013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
5547
5548 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
5549 (CLIP_TEXT_POS_FROM_MARKER): New macro.
5550 * dispnew.c (buffer_posn_from_coords):
5551 * window.c (Fwindow_end, displayed_window_lines):
5552 * xdisp.c (redisplay_mode_lines): Use it.
5553
5b0891df
JD
55542013-09-01 Jan Djärv <jan.h.d@swipnet.se>
5555
5556 * fontset.c (face_for_char): Check char in the current face font first
5557 if HAVE_NS (Bug#15138).
5558
0a357e98
MR
55592013-08-31 Martin Rudalics <rudalics@gmx.at>
5560
5561 * window.c (temp_output_buffer_show): Make sure window returned
5562 by display_buffer is live (Bug#15213).
5563
9d7693d7
DA
55642013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
5565
5566 Minor cleanup to avoid forward declarations.
5567 * coding.h (struct ccl_spec): Remove forward declaration.
5568 * composite.h (toplevel): Include font.h.
5569 (struct composition_it, struct face, struct font_metrics):
5570 Remove forward declaration.
5571 * dispextern.h (struct image, struct atimer): Likewise.
5572 * emacsgtkfixed.h (struct frame): Likewise.
5573 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
5574 * font.h (struct font_driver, struct font, struct glyph_string)
5575 (struct face): Remove forward declaration.
5576 * fontset.h (struct face, struct font): Likewise.
5577 * frame.h (toplevel): Style cleanup.
5578 (enum output_method): Move to...
5579 * termhooks.h (enum output_method): ...here.
5580 (struct glyph, struct frame, struct ns_display_info)
5581 (struct x_display_info, struct w32_display_info):
5582 Remove forward declaration.
5583 * xterm.h (toplevel): Include termhooks.h.
5584 (struct font, struct window, struct glyph_matrix, struct frame)
5585 (struct input_event, struct face, struct image): Remove forward
5586 declaration.
5587 * gtkutil.h (struct _widget_value): Likewise.
5588 * keyboard.h (toplevel): Include termhooks.h.
5589 (struct input_event): Remove forward declaration.
5590
032f7451
DA
55912013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5592
5593 * intervals.c (set_point_from_marker): New function.
5594 * editfns.c (Fgoto_char):
5595 * process.c (Finternal_default_process_filter):
5596 * window.c (select_window_1): Use it.
5597 * buffer.h (set_point_from_marker): Add prototype.
5598
3f940c5a
EZ
55992013-08-29 Eli Zaretskii <eliz@gnu.org>
5600
5601 * w32.c (term_winsock): Call release_listen_threads before calling
5602 WSACleanup.
5603 (_sys_wait_accept): Wait for accept event in a loop with a finite
5604 timeout, instead of waiting indefinitely. Will hopefully avoid
5605 hanging during exit because WSACleanup deadlocks waiting for the
5606 event object to be released. (Bug#14333)
5607
5608 * w32proc.c (release_listen_threads): New function, signals all
5609 the reader threads that listen for connections to stop waiting.
5610
5611 * w32.h (release_listen_threads): Add prototype.
5612
101ed2bb
DA
56132013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5614
5615 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
5616 field of new marker (for sanity and safety).
20de2834
DA
5617 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
5618 anyway because XMISCTYPE is a function and can't be an lvalue).
101ed2bb 5619
1f5cf200
DA
56202013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5621
5622 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
35e951cd
JB
5623 (x_after_update_window_line, x_scroll_bar_create)
5624 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
1f5cf200
DA
5625 (handle_one_xevent, x_clear_frame_area):
5626 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
5627 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
5628 * xterm.h (x_clear_area): Adjust prototype.
5629
d2b36813
DA
56302013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5631
5632 Hook scanning and indentation functions to find_newline. This helps
5633 to avoid duplicated code and renders more respect to newline cache.
5634 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
5635 * cmds.c (Fforward_line):
5636 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
5637 Use find_newline and avoid unnecessary point movements.
5638 * search.c (scan_newline): Implement on top of find_newline.
5639
3ec7babc
SM
56402013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
5641
5642 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
5643 scoped code (bug#11258).
5644
5ab473cd
JD
56452013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
5646
5647 * nsterm.m (last_window): New variable.
5648 (EV_TRAILER2): New macro.
5649 (EV_TRAILER): Call EV_TRAILER2.
e9dc713d 5650 (mouseMoved:): Add support for mouse-autoselect-window
5ab473cd
JD
5651 on nextstep (Bug#6888).
5652
78779650
AS
56532013-08-28 Andreas Schwab <schwab@suse.de>
5654
5655 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
5656 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
5657 Remove unused macro definitions.
5658 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
3ec7babc
SM
5659 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
5660 Only define if emacs.
78779650 5661
c3c4768d
DA
56622013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5663
5664 Prefer enum glyph_row_area to int where appropriate.
5665 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
5666 Fix comment.
5667 (window_box, window_box_width, window_box_left, window_box_left_offset)
5668 (window_box_right, window_box_right_offset): Adjust prototypes.
5669 * xdisp.c (window_box, window_box_width, window_box_left)
5670 (window_box_left_offset, window_box_right, window_box_right_offset):
5671 Use enum glyph_row_area. Adjust users and tweak comment where needed.
5672 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
5673 * nsterm.m (ns_clip_to_row):
5674 * w32term.c (w32_clip_to_row):
5675 * xterm.c (x_clip_to_row): Likewise.
5676
6bdcbfe1
DA
56772013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5678
5679 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
5680 (Fprevious_overlay_change): Fast path for buffer with no overlays.
5681
50b13cde
PE
56822013-08-28 Paul Eggert <eggert@cs.ucla.edu>
5683
5684 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
5685 for portability to hosts where /bin/sh has problems.
5686
f60e429a
DA
56872013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5688
5689 Redesign redisplay interface to drop global output_cursor.
5690 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
5691 (toplevel): Remove declaration of output_cursor.
5692 (set_output_cursor, x_cursor_to): Remove prototype.
5693 * window.h (struct window): New member output_cursor.
5694 (output_cursor_to): New function to replace RIF member.
5695 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
5696 (update_text_area, set_window_cursor_after_update): Use it.
5697 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
5698 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5699 * nsterm.m (ns_update_window_begin, ns_update_window_end):
5700 * w32term.c (x_update_window_begin, x_update_window_end):
5701 * xterm.c (x_update_window_begin, x_update_window_end):
5702 Adjust to use per-window output cursor.
5703
43aac990
PE
57042013-08-27 Paul Eggert <eggert@cs.ucla.edu>
5705
d486344e
PE
5706 Simplify SELECT_TYPE-related code.
5707 Like EMACS_TIME, this portability layer is no longer needed, since
5708 Emacs has been using fd_set as a portability layer for some time.
5709 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
5710 (SELECT_TYPE): Remove. All uses changed to fd_set.
5711 (fd_set) [!FD_SET]: New typedef.
5712
43aac990
PE
5713 Simplify EMACS_TIME-related code.
5714 This portability layer is no longer needed, since Emacs has been
5715 using struct timespec as a portability layer for some time.
5716 * atimer.h, buffer.h, dispextern.h, xgselect.h:
5717 Include <time.h> rather than "systime.h"; that's all that's needed now.
5718 * dispnew.c: Include <timespec.h> rather than "systime.h";
5719 that's all that's needed now.
5720 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
5721 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
5722 TIMESPEC_RESOLUTION.
5723 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
5724 LOG10_TIMESPEC_RESOLUTION.
5725 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
5726 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
5727 (make_emacs_time): Remove. All used changed to make_timespec.
5728 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
5729 (current_timespec): Rename from current_emacs_time. All uses changed.
5730 (add_emacs_time): Remove. All uses changed to timespec_add.
5731 (sub_emacs_time): Remove. All uses change dot timespec_sub.
5732 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
5733 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
5734 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
5735 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
5736 (current_timespec): Rename from current_emacs_time. All uses changed.
5737 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
5738 changed to timespec_cmp.
5739 * xgselect.c: Include <timespec.h>, since our .h files don't.
5740
d350e350
DA
57412013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5742
5743 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
5744 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
5745 Remove the leftovers.
5746 * gtkutil.c (toplevel): Do not declare Qxft but include
5747 font.h to do so.
5748 * image.c (toplevel): Do not declare Vlibrary_cache because
5749 it's already done in lisp.h.
5750
9fed9729
DA
57512013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5752
5753 * lisp.h (Mouse_HLInfo): Move from here...
5754 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
5755 (reset_mouse_highlight): New function.
5756 * msdos.c (dos_set_window_size, IT_update_begin)
5757 (internal_terminal_init):
5758 * nsterm.m (ns_update_window_end, x_free_frame_resources)
5759 (ns_initialize_display_info):
5760 * w32console.c (initialize_w32_display):
5761 * w32term.c (x_update_window_end, x_free_frame_resources)
5762 (w32_initialize_display_info):
5763 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
5764 * window.c (Fdelete_other_windows_internal):
5765 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
5766 * termchar.h (toplevel):
5767 * xterm.h (toplevel): Include dispextern.h.
5768
f462f075
PE
57692013-08-26 Paul Eggert <eggert@cs.ucla.edu>
5770
5771 Fix minor problems found by static checking.
5772 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
5773 (expect): Avoid nested-if warning.
5774 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
5775 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
5776 * nsterm.h, nsterm.m (ns_select):
5777 * xgselect.c, xgselect.h (xg_select):
5778 Adjust signature to better match pselect's.
5779 * nsterm.m (ns_select):
5780 Don't set *TIMEOUT, since pselect doesn't.
5781 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
5782 diagnostic about assigning const char * to it.
5783 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
5784
068f9124
SM
57852013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
5786
5787 * lread.c (substitute_object_recurse): Handle hash-tables as well
5788 (bug#15190).
5789
f5adc984
PE
57902013-08-26 Paul Eggert <eggert@cs.ucla.edu>
5791
1fc8eb33
PE
5792 Fix unlikely core dump in init_tty, and simplify terminfo case.
5793 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
5794 The old version incorrectly dumped core if malloc returned a
5795 buffer containing only non-NUL bytes.
5796 (init_tty): Do not allocate or free termcap buffers; the
5797 struct does that for us now.
5798 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
5799 (struct tty_display_info): Define members termcap_term_buffer and
5800 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
5801 use them. Allocate them directly in struct rather than indirectly
5802 via a pointer, to simplify init_tty.
5803
f5adc984
PE
5804 * frame.c (check_minibuf_window): Initialize 'window' properly,
5805 so that Emacs reliably aborts later if 'window' is not initialized.
5806
efec3894
JD
58072013-08-26 Jan Djärv <jan.h.d@swipnet.se>
5808
5809 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
5810 of VoidSymbol (Bug#15154).
5811
e1d0341e
DA
58122013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5813
5814 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
5815 mouse_face_beg_y and mouse_face_end_y.
5816 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
5817 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
5818 Adjust users and update comment where appropriate.
5819
bfff6445
MR
58202013-08-26 Martin Rudalics <rudalics@gmx.at>
5821
5822 * frame.c (check_minibuf_window): New function.
068f9124
SM
5823 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
5824 Call check_minibuf_window (Bug#15183).
bfff6445 5825
c80016b3
DA
58262013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5827
5828 * window.h (struct window): Replace last_cursor with last_cursor_vpos
5829 because this is the only last cursor data we need to keep and consult.
5830 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
5831 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
5832 Adjust users.
5833
de396731
DA
58342013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5835
068f9124
SM
5836 Fix recovering from possible decompression error.
5837 Since insert_from_gap doesn't always move point, we can't use PT as
de396731 5838 the position where the partially decompressed data ends, and
447218dd 5839 should count how many bytes was produced so far.
de396731
DA
5840 * decompress.c (struct decompress_unwind_data): Add nbytes member.
5841 (unwind_decompress): Really delete partially uncompressed data.
5842 (Fzlib_decompress_region): Take decompressed data size into account.
5843
c76826d9
DA
58442013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5845
5846 * syntax.c (init_syntax_once): Adjust comment and do an early
5847 initialization of Qchar_table_extra_slots just once...
5848 * casetab.c (init_casetab_once):
5849 * category.c (init_category_once):
5850 * character.c (syms_of_character):
5851 * coding.c (syms_of_coding):
5852 * xdisp.c (syms_of_xdisp): ...and omit it here.
5853
b34454d0
EZ
58542013-08-24 Eli Zaretskii <eliz@gnu.org>
5855
11f20add
EZ
5856 * xdisp.c (get_next_display_element): Don't apply to characters
5857 from a display vector the logic of setting it->end_of_box_run_p
5858 suitable for characters from a buffer. (Bug#15175)
5859
b34454d0
EZ
5860 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
5861 to handle directories, rather than '_utime' which doesn't.
5862 (Bug#15176)
5863
6e1b469e
JD
58642013-08-24 Jan Djärv <jan.h.d@swipnet.se>
5865
5866 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
5867 or fullscreen (Bug#14627).
5868
9c05bccf
PE
58692013-08-24 Paul Eggert <eggert@cs.ucla.edu>
5870
5871 System-dependent integer overflow fixes.
5872 * process.c (Fset_process_window_size): Signal an error if
5873 the window size is outside the range supported by the lower level.
5874 * sysdep.c (set_window_size): Return negative on error,
5875 nonnegative on success, rather than -1, 0, 1 on not in system,
5876 failure, success. This is simpler. Caller changed.
5877 (serial_configure): Remove unnecessary initialization of local.
5878 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
5879 size fits in unsigned long; this isn't true on some 32-bit hosts.
5880 Avoid buffer overrun if some future version of /proc/meminfo has a
5881 variable name longer than 20 bytes.
5882 (system_process_attributes) [__FreeBSD__]:
5883 Don't assume hw.availpages fits in 'int'.
5884
c365c355
PE
58852013-08-23 Paul Eggert <eggert@cs.ucla.edu>
5886
5887 Don't let very long directory names overrun the stack.
5888 Fix some related minor problems involving "//", vfork.
5889 * callproc.c (encode_current_directory): New function.
5890 (call_process): Don't append "/"; not needed.
5891 * fileio.c (file_name_as_directory_slop): New constant.
5892 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
5893 this can save the caller having to alloca.
5894 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
5895 Use SAFE_ALLOCA, not alloca.
5896 (directory_file_name, Fexpand_file_name): Leave leading "//"
5897 alone, since it can be special even on POSIX platforms.
5898 * callproc.c (call_process):
5899 * process.c (Fformat_network_address):
5900 * sysdep.c (sys_subshell):
5901 Use encode_current_directory rather than rolling our own.
5902 (create_process): No need to encode directory; caller does that now.
5903 * process.h (encode_current_directory): New decl.
5904 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
5905 Rework to avoid 'goto xyzzy;'.
5906
6c6014d4
EZ
59072013-08-23 Eli Zaretskii <eliz@gnu.org>
5908
5909 * xdisp.c (handle_face_prop): If the default face was remapped use
5910 the remapped face for strings from prefix properties. (Bug#15155)
5911
9997ec56
DA
59122013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
5913
5914 Minor cleanup for redisplay interface and few related functions.
5915 * frame.h (enum text_cursor_kinds): Move from here...
5916 * dispextern.h (enum text_cursor_kinds): ...to here.
5917 (toplevel): Drop unnecessary declarations.
5918 (struct redisplay_interface): Use bool and enum text_cursor_kinds
5919 in update_window_end_hook and draw_window_cursor functions.
5920 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
5921 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
ffb3f67a 5922 * w32term.c (x_update_window_end, w32_draw_window_cursor):
9997ec56
DA
5923 * xterm.c (x_update_window_end, x_draw_window_cursor):
5924 * xdisp.c (display_and_set_cursor, update_window_cursor)
5925 (update_cursor_in_window_tree, x_update_cursor): Use bool and
5926 enum text_cursor_kinds where appropriate.
5927
7f780da6
DA
59282013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
5929
5930 Redesign redisplay interface to drop updated_row and updated_area.
5931 * dispextern.h (updated_row, updated_area): Remove declaration.
5932 (struct redisplay_interface): Pass glyph row and row area parameters
5933 to write_glyphs, insert_glyphs and clear_end_of_line functions.
5934 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5935 Adjust prototypes.
5936 * dispnew.c (updated_row, updated_area): Remove.
5937 (redraw_overlapped_rows, update_window_line): Adjust user.
5938 (update_marginal_area, update_text_area): Likewise. Pass updated row
5939 as a parameter. Prefer enum glyph_row_area to int where appropriate.
5940 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5941 Adjust users.
5942
26495794
PE
59432013-08-22 Paul Eggert <eggert@cs.ucla.edu>
5944
5945 * process.c (flush_pending_output): Remove stub.
5946 All uses removed.
5947
4a88129a
PE
59482013-08-21 Paul Eggert <eggert@cs.ucla.edu>
5949
5950 * callproc.c: Fix race that killed background processes (Bug#15144).
5951 (call_process): New arg TEMPFILE_INDEX. Callers changed.
5952 Record deleted process-id in critical section, not afterwards.
5953 Don't mistakenly kill process created by a call-process invocation
5954 that discards output and does not wait.
5955
0c5307b0
DA
59562013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
5957
5958 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
5959 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
5960 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
5961 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
5962 to shut up compiler in mark_object.
5963 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
5964
0d7c1e66
PE
59652013-08-21 Paul Eggert <eggert@cs.ucla.edu>
5966
5967 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
5968 We can't portably rely on PTY_OPEN doing that, even if
5969 it calls posix_openpt with O_CLOEXEC.
5970
3f246b65
KH
59712013-08-20 Kenichi Handa <handa@gnu.org>
5972
5973 * character.c (string_char): Improve commentary.
5974
8c2f38aa
PE
59752013-08-20 Paul Eggert <eggert@cs.ucla.edu>
5976
5977 * image.c (SIGNATURE_DIGESTSIZE): Remove.
5978 (struct animation_cache): Make signature a flexible array member.
5979 All uses changed. This is a tad slower but may insulate us better
5980 from future changes to ImageMagick.
5981
bb566cea
PE
59822013-08-19 Paul Eggert <eggert@cs.ucla.edu>
5983
5984 * image.c: Shrink memory needed for animation cache.
5985 (SIGNATURE_DIGESTSIZE): New constant.
5986 (struct animation_cache): Make 'signature' a fixed size array of bytes.
5987 (imagemagick_create_cache): Copy the signature. This saves
5988 several KB of memory that ImageMagick wastes per signature.
5989 Don't bother updating the update_time, as the caller does that now.
5990 (imagemagick_prune_animation_cache): Don't destroy the signature, as
5991 it's a fixed size struct member now.
5992 (imagemagick_get_animation_cache): Always destroy the signature,
5993 as it's now imagemagick_create_cache's responsibility to copy it.
5994 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
5995 and use memcmp rather than strcmp.
5996 eassert that ImageMagick returns a signature of the specified length.
5997
6da26928
LMI
59982013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
5999
6000 * image.c (imagemagick_get_animation_cache): Don't segfault on
6001 each invocation.
453f4022
LMI
6002 (imagemagick_get_animation_cache): Revert to previous definition
6003 so that it actually works. But keep the memory leak fix.
6004 (imagemagick_get_animation_cache): Fix memory leak.
6da26928 6005
22490125
PE
60062013-08-19 Paul Eggert <eggert@cs.ucla.edu>
6007
d0139df5
PE
6008 * image.c: Fix animation cache signature memory leak.
6009 Fix some other minor performance problems while we're at it.
6010 (imagemagick_create_cache): Clear just the members that
6011 need clearing. Don't set update_time, as caller does that now.
6012 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
6013 Simplify by using pointer-to-pointer instead of a prev pointer.
6014 (imagemagick_prune_animation_cache): Use make_emacs_time rather
6015 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
6016 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
6017 it's already a copy. Free the signature probe unless it's cached.
6018
22490125
PE
6019 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
6020 This was introduced by my 2013-08-12 fix for Bug#15035.
6021
deb31e75
DA
60222013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
6023
6024 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
6025 (imagemagick_prune_animation_cache): Now static.
6026
319a4d03
LMI
60272013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
6028
6029 * image.c (imagemagick_get_animation_cache): Don't segfault when
6030 pruning all entries.
6031
f747d82e
KB
60322013-08-18 Ken Brown <kbrown@cornell.edu>
6033
6034 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
6035 static heap if ENABLE_CHECKING is defined.
6036 (max_bss_sbrk_ptr): New variable.
6037 (bss_sbrk): Use it.
6038 (report_sheap_usage): Report maximum static heap usage instead of
6039 ending static heap usage.
6040
d2c28fab
EZ
60412013-08-17 Eli Zaretskii <eliz@gnu.org>
6042
6043 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
6044 of zlib_initialized according to the results of calling
6045 init_zlib_functions.
6046
274ff63f
LMI
60472013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
6048
6049 * image.c: Implement an ImageMagick per-image cache.
8a6f875f 6050 (imagemagick_get_animation_cache): Fix a double-free error.
49ceb676
LMI
6051 (imagemagick_load_image): Remove the ping_wand code, which only
6052 apparently saved time on invalid animated images, and slowed down
6053 everything else. Optimise for the common case.
274ff63f 6054
2bede2ed
XF
60552013-08-16 Xue Fuqiao <xfq.free@gmail.com>
6056
70ff8240
XF
6057 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
6058
de179a3e
XF
6059 * editfns.c (insert_before_markers): Mention overlay in the doc string.
6060
2bede2ed
XF
6061 * marker.c (set_marker): Remove documentation of undefined behavior.
6062
703dbeba
LMI
60632013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6064
6065 * image.c (imagemagick_compute_animated_image): Animate correctly
6066 when sub-images are smaller than the main image.
1d18b1e6
LMI
6067 (imagemagick_compute_animated_image): Setting the iterator row to
6068 zero is apparently not allowed.
79670014
LMI
6069 (imagemagick_compute_animated_image): Allow images that say they
6070 have sub-images that are bigger than the main image, but just crop
6071 them.
703dbeba 6072
63216c5e
JD
60732013-08-15 Jan Djärv <jan.h.d@swipnet.se>
6074
6075 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
6076
a5b5f73f
LMI
60772013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6078
6079 * image.c (imagemagick_compute_animated_image): Respect the GIF
6080 disposal methods.
6081
0fe73012
KB
60822013-08-15 Ken Brown <kbrown@cornell.edu>
6083
6084 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
6085 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
6086 needed.
6087
691a357f
PE
60882013-08-15 Paul Eggert <eggert@cs.ucla.edu>
6089
6090 Fix minor problems found by static checking.
6091 * frame.c (delete_frame):
6092 * xdisp.c (next_element_from_display_vector):
6093 Avoid uninitialized local.
6094 * image.c (imagemagick_compute_animated_image): Port to C89.
6095 Prefer usual GNU indentation style for loops.
6096 Be more careful about bizarrely large sizes, by using ptrdiff_t
6097 instead of int.
6098
42fe2e88
DA
60992013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6100
6101 Fix infinite frame selection loop (Bug#15025).
6102 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
6103
d39a3da6
EZ
61042013-08-15 Eli Zaretskii <eliz@gnu.org>
6105
068f9124
SM
6106 * xdisp.c (compute_window_start_on_continuation_line):
6107 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
d39a3da6
EZ
6108 to make sure we end up setting the window start at the leftmost
6109 visible character of the display line. This avoids funky
6110 horizontal shifting because the window start is not kept on the
6111 same position. (Bug#15090)
05426239
EZ
6112 (next_element_from_display_vector): Support 'box' face attribute
6113 in the face definitions of a display vector. (Bug#15099)
d39a3da6 6114
6e856b69
LMI
61152013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6116
6117 * image.c (imagemagick_compute_animated_image): Implement animated
6118 images (bug#14700).
995be755
LMI
6119 (imagemagick_compute_animated_image): Fix some compilation
6120 warnings. Implement a very simple cache to make the animation
6121 usable at all, but it should be replaced with a per-image cache.
6e856b69 6122
d5a1acfa
DA
61232013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6124
6125 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
6126 to do `for' loops over alist values.
6127 * buffer.h (FOR_EACH_BUFFER):
6128 * process.c (FOR_EACH_PROCESS): Use it.
6129 (handle_child_signal, status_notify, Fget_buffer_process)
6130 (kill_buffer_processes): Use FOR_EACH_PROCESS.
6131
9c253307
DA
61322013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6133
6134 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
6135 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
6136 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
6137 to xzalloc and so avoid redundant call to memset.
6138 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
6139 members because it is allocated with xzalloc and so already zeroed.
6140
05e64f9f
KB
61412013-08-14 Ken Brown <kbrown@cornell.edu>
6142
6143 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
6144 (Bug#15094).
6145
5b71542d
DA
61462013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6147
6148 Utility function and macro to copy Lisp string to C string.
6149 * lisp.h (xlispstrdupa): New macro.
6150 (xlispstrdup): New prototype.
6151 * alloc.c (xlispstrdup): New function.
6152 * callint.c (Fcall_interactively):
6153 * fileio.c (Ffile_name_directory, Fexpand_file_name)
6154 (Fsubstitute_in_file_name):
6155 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
6156 * image.c (x_create_bitmap_from_file):
6157 * w32term.c (w32_term_init):
6158 * xterm.c (x_term_init): Use xlispstrdup.
6159
71530c97
LMI
61602013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
6161
4ce82fb8
LMI
6162 * image.c (imagemagick_load_image): Make animated pictures work.
6163 There's still some problems with background color settings, though
6164 (bug#14700).
6165
71530c97
LMI
6166 * decompress.c (unwind_decompress): Always restore point.
6167
7510a061
XF
61682013-08-14 Xue Fuqiao <xfq.free@gmail.com>
6169
6170 * marker.c (set_marker): Reformat documentation.
6171
01c3051f
PE
61722013-08-14 Paul Eggert <eggert@cs.ucla.edu>
6173
aab1fcdf
PE
6174 * xdisp.c (cursor_type_changed): Now static.
6175
01c3051f
PE
6176 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
6177 Use changed. This avoids the need to call xmalloc and for the
6178 caller to call xfree, and avoids memory leaks in some situations.
6179
2084152a
DA
61802013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6181
6182 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
6183 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
94a4e898
DA
6184 (redisplay_window): If window_end_valid is cleared due to non-zero
6185 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
6186 so do not call to try_cursor_movement for that window.
2084152a 6187
02455cb6
DA
61882013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6189
6190 * window.h (struct window): Convert window_end_pos and
6191 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
6192 (wset_window_end_pos, wset_window_end_vpos): Remove.
6193 * dispnew.c (adjust_glyph_matrix):
6194 * window.c (Fwindow_end, replace_window, set_window_buffer)
6195 (make_window):
6196 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
6197 (set_vertical_scroll_bar, redisplay_window, try_window)
6198 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
6199 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
6200 (note_mouse_highlight): Adjust users.
6201 (try_cursor_movement): Likewise. Convert old precondition to eassert.
6202 Add comment.
6203
da5707e8
DA
62042013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6205
6206 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
6207 * image.c (imagemagick_filename_hint): Use `const char *' and
6208 prefer SSDATA to SDATA to avoid warnings.
6209
25554267
DA
62102013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6211
6212 Cleanup window fringes, margins and scroll bars adjustments.
6213 * window.c (set_window_fringes, set_window_margins)
6214 (set_window_scroll_bars, apply_window_adjustment): New functions.
6215 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
6216 (Fset_window_scroll_bars): Use them.
6217
38a2c910
DA
62182013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6219
6220 * window.h (struct window): Convert scroll_bar_width
6221 from Lisp_Object to integer. Adjust comment.
6222 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
6223 Adjust users.
6224 * window.c (wset_scroll_bar_width): Remove.
6225 (make_window): Initialize scroll_bar_width.
6226 (Fsplit_window_internal): Use direct assignment.
6227 (Fset_window_configuration, save_window_save):
6228 Convert Lisp_Object to integer and back where appropriate.
6229 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
6230 bar was actually changed, and mention this in docstring.
6231
2d065031
PE
62322013-08-13 Paul Eggert <eggert@cs.ucla.edu>
6233
6234 * decompress.c: Minor simplifications.
6235 (Fzlib_decompress_region): Don't bother verifying
6236 that avail_out <= UINT_MAX, as that was confusing.
6237 Mention the restriction in a comment instead.
6238 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
6239
a5bd5abb
JD
62402013-08-13 Jan Djärv <jan.h.d@swipnet.se>
6241
6242 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
6243 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
6244
66e7901a
LMI
62452013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
6246
6247 * image.c (imagemagick_filename_hint): Check for errors in the
6248 alist structure.
6249
2fa611b7
EZ
62502013-08-13 Eli Zaretskii <eliz@gnu.org>
6251
6252 * window.c (Fwindow_margins): Return nil when there's no marginal
6253 area, as per the documented API.
6254
6255 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
6256 Fmake_vector, as scroll bar's struct members are not all Lisp
6257 objects now. This avoids crashes in GC.
6258
6259 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
6260 bool, so its address could be taken.
6261
8259030d
LMI
62622013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
6263
6264 * image.c (imagemagick_filename_hint): New function to possibly
6265 apply `image-content-type-suffixes'.
6266 (imagemagick_load_image): Use it.
6267
866c710e
EZ
62682013-08-13 Eli Zaretskii <eliz@gnu.org>
6269
6270 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
6271 if loading zlib failed.
6272
f10490f0
JD
62732013-08-13 Jan Djärv <jan.h.d@swipnet.se>
6274
96311be7
JD
6275 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
6276 2013-08-13 checkin below. Change bool to BOOL, rule is:
6277 All Obj-C code uses BOOL, except for interfaces callable from C.
6278
f10490f0
JD
6279 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
6280
c8ae93b0
DA
62812013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6282
6283 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
6284 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
6285 bool instead of BOOL.
6286 * w32term.h (struct scroll_bar): Convert fringe_extended_p
6287 from Lisp_Object to bitfield. Adjust comment.
6288 * w32term.c (x_scroll_bar_create): Adjust user.
6289 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
6290 * xterm.c (XTset_vertical_scroll_bar): Likewise.
6291 Use bool for boolean.
6292 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
6293 to `unsigned int' when defining a bitfield.
6294
53b64418
PE
62952013-08-13 Paul Eggert <eggert@cs.ucla.edu>
6296
6297 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
6298
eeaf9bf3
DA
62992013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6300
6301 * window.h (struct window): Convert left_margin_cols and
6302 right_margin_cols from Lisp_Objects to integers. Adjust comment.
6303 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
6304 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
6305 Adjust users.
6306 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
6307 Adjust comment.
6308 (showing_window_margins_p, update_window_line, update_frame_1):
6309 * fringe.c (draw_fringe_bitmap_1):
6310 * xdisp.c (window_box_width): Adjust users.
6311 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
6312 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
6313 Use direct assignment.
6314 (Fset_window_configuration, save_window_save, Fwindow_margins):
6315 Convert Lisp_Object to integer and back where appropriate.
6316 (Fset_window_margins): Adjust user. Return t if any margin
6317 was actually changed, and mention this in docstring.
6318
956720af
XF
63192013-08-13 Xue Fuqiao <xfq.free@gmail.com>
6320
f73f4ce6 6321 * syntax.c (forward_word):
956720af
XF
6322 * cmds.c (forward_char, backward_char): Mention the optional argument.
6323
9e37ee3b
DA
63242013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6325
6326 * window.h (struct window): Convert left_fringe_width
6327 and right_fringe_width from Lisp_Objects to integers.
6328 Adjust comment.
6329 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
6330 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
6331 * window.c (wset_left_fringe_width, wset_right_fringe_width):
6332 Remove.
6333 (make_window): Initialize new integer fields to -1.
6334 (Fsplit_window_internal): Use direct assignment.
068f9124
SM
6335 (Fset_window_configuration, save_window_save):
6336 Convert Lisp_Object to integer and back where appropriate.
9e37ee3b
DA
6337 (Fset_window_fringes): Adjust user. Return t if any fringe
6338 was actually changed, and mention this in docstring.
6339
e4375ca7
DA
63402013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6341
6342 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
9cda66e4
DA
6343 * nsfns.m (x_set_cursor_type):
6344 * w32fns.c (x_set_cursor_type):
e903c210 6345 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
9cda66e4 6346 * xdisp.c (set_frame_cursor_types): ...but in common code.
e4375ca7 6347
a45543bc
DA
63482013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6349
6350 * font.c (clear_font_cache): New function, stripped from...
6351 (Fclear_font_cache): ...here, which now uses the function
6352 above. Adjust comment.
6353 * font.h (clear_font_cache): Add prototype.
6354 * xfaces.c (clear_face_cache): Use clear_font_cache.
6355
ae966a86
DA
63562013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6357
6358 * window.c (Fset_window_start): Compare `w', not `window' because
6359 `w' might not be equal to `window' after call to decode_live_window.
6360
297a545b
PE
63612013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6362
6363 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
6364 This fixes a problem introduced by the Bug#15035 patch
6365 when using GPG. Reported by Herbert J. Skuhra.
6366
aa942e2b
EZ
63672013-08-12 Eli Zaretskii <eliz@gnu.org>
6368
6369 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
6370 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
6371 not yet initialized.
6372
7699d09e
LMI
63732013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
6374
6375 * decompress.c (Fzlib_decompress_region): Support zlib
6376 decompression, too, and rename.
6377
1d238bc7
PE
63782013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6379
6380 Minor zlib configuration tweaks.
6381 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
6382 Don't assume presence of fn_inflateInit2_ zlib internal function.
6383
8a44a184
LMI
63842013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
6385
6386 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
6387 include the zlib prefix.
6388
594a4307
EZ
63892013-08-12 Eli Zaretskii <eliz@gnu.org>
6390
6391 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
6392 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
6393 define static variables that are pointers to zlib functions to be
6394 dynamically loaded.
6395 (init_zlib_functions) [WINDOWSNT]: New function.
6396 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
6397 New macros.
6398 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
6399 macros instead of invoking the zlib functions directly.
068f9124
SM
6400 (syms_of_decompress): DEFSYM Qzlib_dll.
6401 Staticpro Szlib_available_p.
594a4307 6402
d2e113bc
DA
64032013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
6404
6405 Avoid looping over all frame windows to freeze and unfreeze.
6406 * window.h (struct window): Drop frozen_window_start_p.
6407 (freeze_window_starts): Drop prototype.
6408 * frame.h (struct frame): New frozen_window_starts flag.
6409 (FRAME_WINDOWS_FROZEN): New macro.
6410 * window.c (freeze_window_start, freeze_window_starts):
6411 Remove.
6412 (select_window, replace_window): Adjust users.
6413 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
6414 (window_frozen_p): New function.
6415 (redisplay_window): Use it.
6416
94fcd171
PE
64172013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6418
6419 Fix some fd issues when running subprocesses (Bug#15035).
6420 Fix bugs that can leak files or file descriptors on errors.
6421 Don't unlink open temp files, as that's hard for users to diagnose
6422 when things go awry (e.g., temp disk exhausted).
6423 Don't bother to lock temp files. Check for invalid recursion.
6424 * callproc.c (synch_process_fd): Remove. All uses removed.
6425 (synch_process_tempfile): New var or macro.
6426 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
6427 New constants.
6428 (record_kill_process): New arg, the temp name. All callers changed.
6429 (delete_temp_file): Now just a simple wrapper around unlink.
6430 (call_process_kill): New arg, the call_process_fd array.
6431 Close them all. Clear synch_process_pid. Remove the temp file,
6432 or arrange for it to be removed.
6433 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
6434 that's been moved to synch_process_tempfile. Caller changed.
6435 Do not remove the tempfile; that's now call_process_kill's
6436 responsibility.
6437 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
6438 call_process_kill; the caller now does that.
6439 (call_process_cleanup): Do not close the process fd; that's now
6440 call_process_kill's responsibility.
6441 (Fcall_process): Implement via new function call_process, which
6442 has most of the old body of Fcall_process, but with a different API.
6443 (call_process): New function that does not open or close filefd if
6444 it is nonnegative. Record which fds need to be closed, and let
6445 call_process_kill close (and remove the tempfile, on MSDOS) on error.
6446 Signal an error if invoked recursively (could be done via a hook).
6447 Simplify creation of the tempfile in the MSDOS case.
6448 Don't create the output file until after checking for the executable.
6449 Report any failure to open /dev/null.
6450 Don't open /dev/null for writing twice; once is enough.
6451 Don't create pipe if all output is being discarded or sent to file.
6452 Don't worry about setting up the coding system or reading from the
6453 pipe if all output is being discarded.
6454 Hoist fd_error local into top level, to lessen block nesting.
6455 Don't record deleted pid here; now done by Fcall_process_region.
6456 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
6457 and note its success in synch_process_tempfile.
6458 Do not leak resources when child_setup fails.
6459 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
6460 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
6461 (create_temp_file): Now returns open fd, with an additional
6462 Lisp_Object * argument to return the name. All callers changed.
6463 Do not close the file; rewind it instead, and leave it open for
6464 the caller. Do not lock the temp file. Unwind-protect the file
6465 and the file-descriptor.
6466 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
6467 If an asynchrounous process, record it here, not in call_process.
6468 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
6469 * eval.c (set_unwind_protect): New function.
6470 * fileio.c (write_region): New function, generalized from the
6471 old Fwrite_region. Do not lock temp files.
6472 (Fwrite_region): Use it.
6473 * lisp.h (set_unwind_protect, write_region): New decls.
6474 * process.c: Include <verify.h>.
6475 (make_process): Mark fds as initially closed.
6476 (deleted_pid_list): Now a list of pid-filename pairs.
6477 All uses changed.
6478 (close_process_fd): New function.
6479 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
6480 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
6481 New constants. Verify that their number matches PROCESS_OPEN_FDS.
6482 (create_process, create_pty, Fmake_serial_process)
6483 (server_accept_connection): Record which fds need to be closed,
6484 and let deactivate_process close them.
6485 (Fmake_network_process): Do not discard the unwind-protect
6486 until it's safe to do so.
6487 (deactivate_process): Close the fds opened by create_process etc.
6488 (Fprocess_send_eof): Adjust to new way of recording open fds.
6489 Report an error if /dev/null can't be opened, instead of aborting.
6490 * process.h (PROCESS_OPEN_FDS): New constant.
6491 (struct Lisp_Process): New member open_fds.
6492 (record_kill_process, record_deleted_pid): Adjust signatures.
6493 (record_deleted_pid): Move decl here ...
6494 * syswait.h (record_deleted_pid): ... from here.
6495
d0e615c3
PE
64962013-08-11 Paul Eggert <eggert@cs.ucla.edu>
6497
6498 * decompress.c: Fix bugs with large buffers and weird inputs.
6499 Tune a bit. Reindent as per usual Emacs style.
6500 (BUFFER_SIZE): Remove.
6501 (Fdecompress_gzipped_region): Do not mishandle input buffers with
6502 more than UINT_MAX bytes. Decompress into the gap instead of into
6503 an auto buffer, as this should avoid copying. Return nil if
6504 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
6505 set immediate_quit; we shouldn't trust zlib code that much.
6506
313546eb
LMI
65072013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
6508
99a32242
LMI
6509 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
6510 errors, and really move the gap to where we want it.
6511
313546eb
LMI
6512 * lisp.h: Include decompress.c support.
6513
6514 * emacs.c (main): Include decompress.c support.
6515
6516 * Makefile.in: Include -lz if present.
6517
d2d699ac
JD
65182013-08-11 Jan Djärv <jan.h.d@swipnet.se>
6519
f90e3ebd
JD
6520 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
6521 (initWithTitle:): Initialize frame to 0.
6522 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
068f9124 6523 (fillWithWidgetValue:frame:): Rename from
f90e3ebd
JD
6524 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
6525
6526 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
6527 fillWithWidgetValue:frame:
6528
423d3b3f
JD
6529 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
6530 remove memory leak warnings.
6531
d2d699ac
JD
6532 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
6533 (ns_check_menu_open): Handle menu == nil. Remove assignment to
6534 menu_pending_title.
6535
6536 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
6537 (x_activate_menubar): Update the whole menu.
6538 (trackingNotification:): Call ns_check_menu_open if tracking ends.
6539 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
6540 current event is not NSSystemDefined (Bug#15001).
6541 Call ns_check_menu_open only if trackingMenu is 2.
6542 (menuDidClose:): New method, decrease trackingMenu.
6543 (fillWithWidgetValue:setDelegate:): New method.
6544 (fillWithWidgetValue:): Call the above.
6545
6546 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
6547
7d652d97
PE
65482013-08-11 Paul Eggert <eggert@cs.ucla.edu>
6549
6550 Omit some unnecessary casts.
6551 Many of these go back to the old pre-C89 days, when they may have
6552 been needed, but we've been assuming C89 or later for a while now.
6553 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
6554 (live_float_p, live_misc_p, live_vector_p):
6555 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
6556 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
6557 (defvar_per_buffer):
6558 * callint.c (Fcall_interactively):
6559 * doc.c (Fsubstitute_command_keys):
6560 * filelock.c (get_boot_time):
6561 * frame.c (xrdb_get_resource):
6562 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
6563 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
6564 (xg_get_file_name_from_selector, menuitem_destroy_callback)
6565 (menuitem_highlight_callback, menu_destroy_callback)
6566 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
6567 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
6568 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
6569 (xg_tool_bar_help_callback, tb_size_cb):
6570 * image.c (xpm_alloc_color, png_read_from_memory)
6571 (png_read_from_file, png_load_body, our_memory_skip_input_data)
6572 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
6573 (syms_of_image):
6574 * keymap.c (describe_map):
6575 * nsfns.m (Fns_display_monitor_attributes_list):
6576 * nsmenu.m (process_dialog:):
6577 * nsterm.m (hold_event):
6578 * process.c (wait_reading_process_output):
6579 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
6580 * scroll.c (do_direct_scrolling, scrolling_1):
6581 * termcap.c (tgetent):
6582 * window.c (check_window_containing, add_window_to_list)
6583 (freeze_window_starts):
6584 * xdisp.c (compare_overlay_entries, vmessage):
6585 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
6586 (x_get_monitor_attributes_xrandr)
6587 (Fx_display_monitor_attributes_list, x_display_info_for_name)
6588 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
6589 * xfont.c (xfont_match, xfont_open):
6590 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
6591 (menubar_selection_callback, menu_position_func)
6592 (popup_selection_callback, create_and_show_popup_menu)
6593 (dialog_selection_callback, create_and_show_dialog):
35e951cd 6594 * xrdb.c (x_get_string_resource)
7d652d97
PE
6595 (main) [TESTRM]:
6596 * xsmfns.c (x_session_check_input):
6597 * xterm.c (x_draw_glyphless_glyph_string_foreground)
6598 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
6599 (xaw_jump_callback, xaw_scroll_callback):
6600 Omit unnecessary casts.
6601
9acc1074
PE
66022013-08-10 Paul Eggert <eggert@cs.ucla.edu>
6603
6604 Minor string-length refactoring.
6605 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
6606 * frame.c (make_monitor_attribute_list):
6607 Prefer build_string to strlen + make_string.
6608
361c0eb8
JD
66092013-08-10 Jan Djärv <jan.h.d@swipnet.se>
6610
6611 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
6612 don't check minor_code (Bug#14417).
6613
14ba0822
EZ
66142013-08-09 Eli Zaretskii <eliz@gnu.org>
6615
6616 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
6617 vertical positions instead. This avoids calling MATRIX_ROW with
6618 row numbers that are possibly beyond valid limits. (Bug#15064)
6619
309f24d1
DA
66202013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
6621
6622 Use xstrdup and build_unibyte_string where applicable.
6623 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
6624 * xfns.c (x_window):
6625 * xrdb.c (x_get_customization_string):
6626 * xterm.c (xim_initialize):
6627 * w32fns.c (w32_window): Use xstrdup.
6628 (w32_display_monitor_attributes_list):
6629 * emacs.c (init_cmdargs):
6630 * keyboard.c (PUSH_C_STR):
6631 * nsfont.m (nsfont_open):
6632 * sysdep.c (system_process_attributes):
6633 * w32.c (system_process_attributes):
6634 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
6635
55902276
EZ
66362013-08-09 Eli Zaretskii <eliz@gnu.org>
6637
6638 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
6639 variables of these types so that GDB would know about them, as aid
6640 for debugging fatal exceptions. (Bug#15024) See also
6641 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
6642 discussions.
6643
10bf7f5a
JD
66442013-08-08 Jan Djärv <jan.h.d@swipnet.se>
6645
6646 * nsterm.m (ns_update_begin): Don't change clip path if it would be
6647 larger than the NSWindow (Bug#14934).
6648
65620264
DA
66492013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6650
6651 Redesign redisplay interface to drop global variable updated_window.
6652 Always pass currently updated window as a parameter to update routines.
6653 * dispextern.h (updated_window): Remove declaration.
6654 (struct redisplay_interface): Pass window parameter to
6655 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
6656 and after_update_window_hook.
6657 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
6658 Adjust prototypes.
6659 * dispnew.c (updated_window): Remove.
6660 (redraw_overlapped_rows, update_marginal_area, update_text_area)
6661 (update_window_line): Adjust to match redisplay interface changes.
6662 * nsterm.m (ns_update_window_begin, ns_update_window_end)
6663 (ns_scroll_run, ns_after_update_window_line):
6664 * w32term.c (x_update_window_begin, x_update_window_end)
6665 (x_after_update_window_line, x_scroll_run):
6666 * xterm.c (x_update_window_begin, x_update_window_end)
6667 (x_after_update_window_line, x_scroll_run):
6668 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
6669 Likewise. Adjust comments where appropriate.
6670 (x_cursor_to): Simplify because this is always called during window
6671 update (but install debugging check anyway).
6672 (expose_window): Check must_be_updated_p flag to see whether this
6673 function is called during window update.
6674
628fdc56
DA
66752013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6676
6677 Do not reset window modification event counters excessively.
6678 These leftovers and poor man's tricky methods to catch extra
6679 redisplay's attention are no longer needed.
6680 * frame.c (set_menu_bar_lines_1):
6681 * minibuf.c (read_minibuf_unwind):
6682 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
6683 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
6684 (window_scroll_line_based, Fset_window_configuration):
6685 * xdisp.c (redisplay_window): Do not reset last_modified and
6686 last_overlay_modified counters.
6687
8fd9c92e
JD
66882013-08-07 Jan Djärv <jan.h.d@swipnet.se>
6689
6690 * xselect.c (x_send_client_event): Set send_event and serial, memset
6691 data.l as it might be bigger than data.b. Use 24 bit mask to
6692 XSendEvent (Bug#15034).
6693
0ee18172
EZ
66942013-08-07 Eli Zaretskii <eliz@gnu.org>
6695
6696 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
6697 for TTY frames that are not the top frame on their console.
6698 (Bug#14616)
6699
16ddd1a6
MR
67002013-08-07 Martin Rudalics <rudalics@gmx.at>
6701
6702 * w32term.c (w32fullscreen_hook): Really maximize frame when
6703 asked for (Bug#14841).
6704
d2a95ffb
DA
67052013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6706
6707 Prefer selected_window to Fselected_window, likewise for frames.
6708 * buffer.c (Fbuffer_swap_text):
6709 * data.c (Fvariable_binding_locus):
6710 * window.c (run_window_configuration_change_hook): Adjust users.
6711 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
6712 Use decode_live_frame.
6713
170da1ec
DA
67142013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6715
6716 Be more careful if selected window shows the buffer other than current,
6717 use window_outdated only if this is not so. This change should also
6718 address some weird issues discussed in Bug#13012.
6719 * window.h (window_outdated): New prototype.
6720 * window.c (window_outdated): Now here. Convert from static and
6721 always assume window's buffer.
6722 (Fwindow_end, Fwindow_line_height): Use it.
6723 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
6724 and always assume window's buffer.
6725 (redisplay_window): Adjust user.
e5eefe9b 6726 (redisplay_internal): Call to reconsider_clip_changes once and
170da1ec
DA
6727 check whether mode line should be updated only if selected window
6728 shows current buffer.
6729 (run_window_scroll_functions): Use eassert for debugging check.
6730 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
6731
56b5d5b1
DA
67322013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6733
6734 * window.c (window_scroll, window_scroll_pixel_based)
6735 (window_scroll_line_based): Use bool for booleans.
6736
2878ba7e
PE
67372013-08-06 Paul Eggert <eggert@cs.ucla.edu>
6738
6739 * process.c: Fix minor off-by-one issues in descriptor counts.
6740 This shouldn't fix any real bugs, but it cleans up the code a bit.
6741 (max_process_desc, max_input_desc): -1, not 0, means none.
6742 All uses changed.
6743 (delete_input_desc): New function.
6744 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
6745 (deactivate_process): Scan backwards when recomuting max_process_desc;
6746 that should be faster.
6747 (init_process_emacs): Initialize max_input_desc.
6748
e30b79c1
DA
67492013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6750
6751 Use region cache to speedup bidi_find_paragraph_start.
6752 * buffer.h (struct buffer): New member bidi_paragraph_cache.
6753 Rename cache_long_line_scans to cache_long_scans.
6754 * buffer.c (bset_cache_long_line_scans): Rename to
6755 bset_cache_long_scans.
6756 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
6757 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
6758 into account.
6759 (syms_of_buffer): Rename cache-long-line-scans to
6760 cache-long-scans. Adjust docstring.
6761 * search.c (newline_cache_on_off):
6762 * indent.c (width_run_cache_on_off): Adjust users.
6763 * bidi.c (bidi_paragraph_cache_on_off): New function.
6764 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
068f9124
SM
6765 * insdel.c (prepare_to_modify_buffer):
6766 Invalidate bidi_paragraph_cache if enabled.
e30b79c1 6767
00012b86
DA
67682013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6769
6770 Invalidate region caches only if buffer text is going to be changed.
6771 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
6772 (modify_text): ...new prototype.
6773 (prepare_to_modify_buffer_1): New prototype.
6774 * textprop.c (modify_region): Rename to...
6775 (modify_text_properties): ...new function.
6776 (add_text_properties_1, set_text_properties, Fremove_text_properties)
6777 (Fremove_list_of_text_properties): Adjust users.
6778 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
6779 (modify_text): ...new function.
6780 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
6781 (prepare_to_modify_buffer_1): ...new function.
6782 * casefiddle.c (casify_region):
6783 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
6784 (Ftranspose_regions): Use modify_text.
6785
dc6c0eda
SM
67862013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
6787
6788 * lisp.mk (lisp): Add nadvice.elc.
6789
8f3a2c26
DA
67902013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
6791
6792 New macro to iterate over live buffers similar to frames.
6793 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
6794 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
6795 Declare buffer-related variables here to offload lisp.h.
6796 * buffer.c (Vbuffer_alist): Adjust comment.
6797 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
6798 (other_buffer_safely):
6799 * data.c (store_symval_forwarding):
6800 * dispnew.c (Fframe_or_buffer_changed_p):
6801 * fileio.c (Fdo_auto_save):
6802 * filelock.c (unlock_all_files):
6803 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
6804
e0fdb694
PE
68052013-08-04 Paul Eggert <eggert@cs.ucla.edu>
6806
6807 Fix some minor races in hosts lacking mkostemp (Bug#15015).
6808 * callproc.c (create_temp_file):
6809 * filelock.c (create_lock_file):
6810 Assume mkostemp, since it's now provided by Gnulib.
6811
63f5c6c2
EZ
68122013-08-04 Eli Zaretskii <eliz@gnu.org>
6813
6814 * w32.c (mkostemp): New function.
6815 (mktemp): Remove, no longer used. Most of the code reused in
6816 mkostemp. (Bug#15015)
484ab239 6817 (mktemp): Don't undef.
63f5c6c2 6818
f0b79313
DA
68192013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
6820
6821 * dispnew.c (glyph_matrix_count, glyph_pool_count):
6822 Move under GLYPH_DEBUG and ENABLE_CHECKING.
6823 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
6824 (free_glyph_pool, check_glyph_memory): Likewise for
6825 all users. Adjust comments where appropriate.
6826
98f638d6
PE
68272013-08-03 Paul Eggert <eggert@cs.ucla.edu>
6828
6829 * composite.h: Minor fixups.
6830 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
6831 to fix a misspelling, and change it to an inline function while
6832 we're at it (it need not be a macro). All uses changed.
6833 (composition_method, composition_valid_p):
6834 Rewrite to avoid assignments in if-conditions.
6835
75c59fb3
DA
68362013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
6837
6838 Do not use global Lisp_Object in composition macros.
6839 * composite.h (composition_temp): Remove declaration.
6840 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
6841 (composition_method, composition_valid_p): ...inline functions.
416a3e01 6842 (compose_region): Remove the leftover.
75c59fb3
DA
6843 * composite.c (composition_temp): Remove.
6844 (run_composition_function, update_compositions)
6845 (composition_compute_stop_pos, composition_adjust_point)
6846 (Ffind_composition_internal):
6847 * coding.c (handle_composition_annotation):
6848 * xdisp.c (handle_composition_prop, check_point_in_composition):
6849 Related users changed.
6850
a10c8269
DA
68512013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
6852
6853 Drop FRAME_PTR typedef.
6854 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
6855 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
6856 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
6857 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
6858 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
6859 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
6860 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
6861 All related users changed.
6862
a104f656
SM
68632013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
6864
6865 * eval.c (default_toplevel_binding): New function.
6866 (Fdefvar): Use it.
6867 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
6868 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
6869 (syms_of_eval): Export them.
6870 * data.c (Fdefault_value): Micro cleanup.
6871 * term.c (init_tty): Use "false".
6872
4b5c9326
DA
68732013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6874
6875 Fix X GC leak in GTK and raw (no toolkit) X ports.
6876 * xterm.c (x_free_frame_resources): If white and black relief
6877 GCs are allocated, always free them here.
6878 * xfns.c (x_make_gc): Omit redundant initialization.
6879 * widget.c (create_frame_gcs): Remove the leftover.
6880 (EmacsFrameDestroy): Do nothing because all GCs are now freed
6881 in x_free_frame_resources.
6882
b19aa636
JD
68832013-08-02 Jan Djärv <jan.h.d@swipnet.se>
6884
6885 * nsterm.m (windowWillResize:toSize:): Only change title if
6886 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
6887 modifying it.
6888 (viewDidEndLiveResize): New method.
6889
6890 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
6891 inside NS_IMPL_COCOA.
6892
af1f7e06
DA
68932013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6894
6895 * insdel.c (adjust_after_replace, replace_range, del_range_2):
6896 Do not check whether undo is enabled because record_insert and
6897 record_delete does that themselves.
6898
65b02bb9
DA
68992013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6900
6901 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
6902 member which is not really used any more.
6903 (FRAME_XIC_BASE_FONTNAME): Remove.
6904 * xfns.c (xic_free_fontset): Adjust user.
6905 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
6906 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
6907 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
6908 (xdialog_show): Use eassert for debugging check.
7ee0f047 6909 * w32term.c (x_unfocus_frame): Remove unused dummy function.
65b02bb9 6910
6318cde0
PE
69112013-08-01 Paul Eggert <eggert@cs.ucla.edu>
6912
6913 * fileio.c, fns.c (merge): Move extern decl from here ...
6914 * lisp.h (merge): ... to here.
6915
6c1a09ba
DA
69162013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6917
6918 Fix last font-related change.
6919 * w32font.h (w32font_list_internal, w32font_match_internal):
6920 Fix prototype.
35e951cd 6921 * w32uniscribe.c (uniscribe_list, uniscribe_match)
6c1a09ba
DA
6922 (uniscribe_list_family): Adjust to match font API change.
6923 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
6924 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
6925
f8c20208
DA
69262013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6927
6928 * frame.h (FRAME_MOUSE_UPDATE):
6929 * nsterm.m (ns_frame_up_to_date): Omit redundant check
6930 whether hlinfo->mouse_face_mouse_frame is non-NULL.
6931
fdb396e2
DA
69322013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6933
6934 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
6935 * font.h (struct font_driver): Change list, match, and list_family
6936 functions to accept struct frame * as first arg.
068f9124
SM
6937 * font.c (font_score, font_compare, font_sort_entities):
6938 Remove prototypes.
35e951cd 6939 (font_sort_entities, font_list_entities, font_select_entity)
fdb396e2
DA
6940 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
6941 match font API change.
6942 * xfont.c (xfont_list, xfont_match, xfont_list_family):
6943 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
6944 * ftxfont.c (ftxfont_list, ftxfont_match):
6945 * xftfont.c (xftfont_list, xftfont_match):
6946 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
35e951cd 6947 * w32font.c (w32font_list, w32font_match, w32font_list)
fdb396e2
DA
6948 (w32font_list_internal, w32_font_match_internal): Likewise.
6949 * xfaces.c (Fx_family_fonts): Adjust user.
6950
52b8a085
DA
69512013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6952
6953 Do not use pure Xism x_wm_set_icon_position in non-X ports.
6954 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
6955 only if HAVE_X_WINDOWS is in use.
6956 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
6957 * nsterm.m (x_wm_set_icon_position): Remove no-op.
6958 * w32term.c (x_wm_set_icon_position): Likewise.
6959 * w32fns.c (x_icon): Adjust user.
6960
c791c18e
DA
69612013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6962
6963 * xterm.c (last_mouse_press_frame): Remove the
6964 leftover which is not really used any more.
6965 (handle_one_xevent, syms_of_xterm): Adjust users.
1ca6cc28
DA
6966 (x_flush): Call XFlush once per each X display, not frame.
6967 This is better because this code always unconditionally skips
e9dc713d 6968 non-X frames in Vframe_list and issues the only XFlush if we
1ca6cc28 6969 have more than one X frame on the same X display.
2f935d86
DA
6970 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
6971 Use bool for booleans.
35e951cd 6972 (x_draw_glyph_string_background, cvt_string_to_pixel)
2f935d86
DA
6973 (cvt_pixel_dtor): Drop unnecessary prototypes.
6974 * xterm.h (x_display_ok): Adjust prototype.
c791c18e 6975
f435830e
DA
69762013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6977
6978 Drop unnecessary functions that deals with frame pixel size.
6979 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
6980 (x_pixel_height): Drop prototypes.
6981 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
6982 (x_pixel_height): Drop implementations.
6983 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
6984 which should be always valid for window frame.
6985 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
6986 * w32menu.c (Fx_popup_dialog):
6987 * xmenu.c (Fx_popup_dialog): Likewise for both.
6988
84231434
DA
69892013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6990
6991 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
6992 frame parameters and call to Fmodify_frame_parameters just once.
4c131798
DA
6993 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
6994 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
6995 and mention nil frame in docstring.
84231434 6996
959067a1
DA
69972013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6998
6999 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
7000 (x_figure_window_size): Likewise. Adjust to return long.
7001 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
7002 (toplevel): Move Qterminal_live_p to...
7003 * terminal.c (toplevel): ...here, make it static, and...
7004 (syms_of_terminal): ...DEFSYM here.
7005 * frame.h (Qterminal_live_p): Remove declaration.
7006 (make_frame, x_figure_window_size): Adjust prototype.
7007 * nsfns.m (Fx_create_frame): Use long for window flags.
7008
f4b169ce
PE
70092013-07-30 Paul Eggert <eggert@cs.ucla.edu>
7010
7011 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
7012 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
7013 Do not assume that emacs_close (INT_MAX) is a no-op.
7014
bee6a2c7
DA
70152013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7016
7017 * xfaces.c (make_face_cache): For struct face_cache, prefer
7018 xmalloc to xzalloc and so avoid redundant call to memset.
7019 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
7020
d7e6881a
DA
70212013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7022
7023 * fringe.c (draw_window_fringes, update_window_fringes)
7024 (compute_fringe_widths):
7025 * w32term.c (x_draw_glyph_string):
7026 * window.c (candidate_window_p, Frecenter):
7027 * xfaces.c (realize_basic_faces, realize_default_face)
7028 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
7029 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
7030 * xfns.c (x_set_cursor_color, xic_free_xfontset):
7031 * xmenu.c (Fx_menu_bar_open_internal):
7032 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
7033 * xsettings.c (xft_settings_event):
7034 * xterm.c (x_draw_glyph_string, x_had_errors_p):
7035 Use bool for booleans. Adjust style and comments where
7036 appropriate.
7037 * dispextern.h (draw_window_fringes, update_window_fringes)
7038 (compute_fringe_widths):
7039 * xterm.h (x_had_errors_p): Adjust prototype.
7040
ec3058af
DA
70412013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7042
7043 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
7044 CHECK_LIST. Rewrite the loop to avoid useless local variable.
7045
218e0637
DA
70462013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
7047
7048 * fns.c (toplevel): Remove comment before Fsafe_length because
7049 it checks for QUIT.
7050
e560aba9
PE
70512013-07-28 Paul Eggert <eggert@cs.ucla.edu>
7052
7053 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
7054
2e5ce5de
EZ
70552013-07-28 Eli Zaretskii <eliz@gnu.org>
7056
7057 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
7058 frame which got the message is still alive, before dereferencing
7059 its pointer. (Bug#14970)
7060
7061 * frame.c (delete_frame): Test "this" frame's minibuffer window to
7062 be a live window, before using it as such. (Bug#14970)
7063
e95da6d3
EZ
70642013-07-27 Eli Zaretskii <eliz@gnu.org>
7065
7066 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
7067 w32_detect_focus_change instead of doing part of its job by hand.
7068 This fixes the problem whereby FOCUS_OUT events were not sent to
7069 the event queue.
7070
a8f93651
EZ
70712013-07-26 Eli Zaretskii <eliz@gnu.org>
7072
fec92060
EZ
7073 * process.c (Fprocess_list): Doc fix.
7074
a8f93651
EZ
7075 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
7076 being re-exposed only if it didn't ask to become visible.
7077 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
7078 was previously iconified. (Bug#14841)
7079 (x_iconify_frame): Mark the frame iconified.
7080
d5a7a9d9
PE
70812013-07-26 Paul Eggert <eggert@cs.ucla.edu>
7082
7083 Fix minor problems found by static checking.
7084 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
7085 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
7086
56ea7291
SM
70872013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
7088
7089 * eval.c (set_specpdl_old_value): New function.
7090 (unbind_to): Minor simplification.
7091 (get_backtrace_frame): New function.
7092 (Fbacktrace_frame): Use it. Add `base' argument.
7093 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
7094 (syms_of_eval): Export backtrace-eval.
7095 * xterm.c (x_focus_changed): Simplify.
7096
9d611ffe
PE
70972013-07-25 Paul Eggert <eggert@cs.ucla.edu>
7098
7099 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
7100
999c74e3
EZ
71012013-07-24 Eli Zaretskii <eliz@gnu.org>
7102
7103 * xdisp.c (redisplay_window): Instead of moving point out of
7104 scroll margin, reject the force_start method, and try scrolling
7105 instead. (Bug#14780)
7106
198fa217
KB
71072013-07-24 Ken Brown <kbrown@cornell.edu>
7108
7109 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
7110 (Bug#14944).
7111
53840e55
PE
71122013-07-24 Paul Eggert <eggert@cs.ucla.edu>
7113
7114 * eval.c (Fprogn): Do not check that BODY is a proper list.
7115 This undoes the previous change. The check slows down the
7116 interpreter, and is not needed to prevent a crash. See
7117 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
7118
60967f56
GM
71192013-07-23 Glenn Morris <rgm@gnu.org>
7120
7121 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
7122
9ca960e2
PE
71232013-07-23 Paul Eggert <eggert@cs.ucla.edu>
7124
a29c3e6d
PE
7125 Port to GNU/Linux systems with tinfo but not ncurses.
7126 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
7127 to decide whether ncurses is being used. Without this change,
7128 GCC complains about tgetent not being declared, on a system
7129 that has tinfo installed but ncurses not installed.
7130
f274311c
PE
7131 * eval.c (Fprogn): Check that BODY is a proper list.
7132
16b0520a
PE
7133 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
7134 * data.c (Fsetq_default):
7135 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
7136 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
7137 (Fcondition_case):
7138 Tune by taking advantage of the fact that ARGS is always a list
7139 when a function is declared to have UNEVALLED args.
7140
9ca960e2
PE
7141 * emacsgtkfixed.c: Port to GCC 4.6.
7142 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
7143
afacaa1b
JB
71442013-07-23 Juanma Barranquero <lekktu@gmail.com>
7145
7146 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
7147 here to silence compiler warnings.
7148
368a85a4
PE
71492013-07-22 Paul Eggert <eggert@cs.ucla.edu>
7150
7151 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
7152 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
7153 from messing up Emacs's 'struct frame' (Bug#14923).
7154
f4e891b5
PE
71552013-07-21 Paul Eggert <eggert@cs.ucla.edu>
7156
7157 * alloc.c (make_save_ptr_ptr): Define this function.
7158 It was inadvertently omitted. It's needed only if
7159 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
7160
96c8b65e
JD
71612013-07-21 Jan Djärv <jan.h.d@swipnet.se>
7162
7163 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
7164 frame have focus (Bug#14895).
7165
ee010797
PE
71662013-07-21 Paul Eggert <eggert@cs.ucla.edu>
7167
7168 Avoid vfork-related deadlock more cleanly.
7169 * callproc.c (child_setup): When the child's exec fails, output
7170 the program name, as that's more useful. Use O_NONBLOCK to avoid
7171 deadlock.
7172 * process.c (create_process_1): Remove; no longer needed.
7173 (create_process): Remove timer hack; no longer needed, now that
7174 the child avoids deadlock.
7175
f0398ec1 71762013-07-20 Glenn Morris <rgm@gnu.org>
8bfcc21a
GM
7177
7178 * image.c (Fimage_flush): Fix doc typo.
7179
b2a069c2
PE
71802013-07-20 Paul Eggert <eggert@cs.ucla.edu>
7181
6496aec9
PE
7182 Fix array bounds violation when pty allocation fails.
7183 * process.c (PTY_NAME_SIZE): New constant.
7184 (pty_name): Remove static variable; it's now auto.
7185 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
7186 Take pty_name as an arg rather than using a static variable.
7187 All callers changed.
7188 (create_process): Recover pty_flag from process, not from volatile local.
7189 (create_pty): Stay inside array even when pty allocation fails.
7190 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
7191
b2a069c2
PE
7192 * lread.c (Fload): Avoid initialization only when lint checking.
7193 Mention that it's needed only for older GCCs.
7194
99107004
KH
71952013-07-20 Kenichi Handa <handa@gnu.org>
7196
7197 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
7198 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
7199
6b1b199d
AS
72002013-07-20 Andreas Schwab <schwab@linux-m68k.org>
7201
7202 * lread.c (Fload): Avoid uninitialized warning.
7203
4195afc3
PE
72042013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7205
3f5bef16
PE
7206 Fix some minor file descriptor leaks and related glitches.
7207 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
7208 (create_lock_file): Use write, not emacs_write.
7209 * image.c (slurp_file, png_load_body):
7210 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
7211 (server_accept_connection):
7212 Don't leak an fd on memory allocation failure.
7213 * image.c (slurp_file): Add a cheap heuristic for growing files.
7214 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
7215 as that's what the other routines do. Maybe input need not be
7216 blocked at all, but it's better to be consistent.
7217 Avoid undefined behavior when strlen is zero.
7218
4195afc3
PE
7219 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
7220 (NSTATICS): Now a constant; doesn't need to be a macro.
7221
a1aeeffe
RS
72222013-07-19 Richard Stallman <rms@gnu.org>
7223
7224 * coding.c (decode_coding_utf_8): Add simple loop for fast
7225 processing of ASCII characters.
7226
63b34baa
PE
72272013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7228
7229 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
7230
621dd9ac
EZ
72312013-07-19 Eli Zaretskii <eliz@gnu.org>
7232
7233 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
7234 unportable 'struct x_display_info'.
7235 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
7236 is a portable type.
7237
1396ac86
PE
72382013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7239
ab9980cd
PE
7240 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
7241 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
7242 or fscanf fails.
7243 (system_process_attributes): Prefer plain char to unsigned char
7244 when either will do. Clean up properly if interrupted or if
068f9124
SM
7245 memory allocations fail. Don't assume sscanf succeeds.
7246 Remove no-longer-needed workaround to stop GCC from whining.
7247 Read command-line once, instead of multiple times. Check read status a
ab9980cd
PE
7248 bit more carefully.
7249
1396ac86
PE
7250 Fix obscure porting bug with varargs functions.
7251 The code assumed that int is treated like ptrdiff_t in a vararg
7252 function, which is not a portable assumption. There was a similar
7253 -- though these days less likely -- porting problem with various
7254 assumptions that pointers of different types all smell the same as
7255 far as vararg functions is conserved. To make this problem less
7256 likely in the future, redo the API to use varargs functions.
7257 * alloc.c (make_save_value): Remove this vararg function.
7258 All uses changed to ...
7259 (make_save_int_int_int, make_save_obj_obj_obj_obj)
7260 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
7261 New functions.
7262 (make_save_ptr): Rename from make_save_pointer, for consistency with
7263 the above. Define only on platforms that need it. All uses changed.
7264
4d19d194
PE
72652013-07-18 Paul Eggert <eggert@cs.ucla.edu>
7266
7267 * keyboard.c: Try to fix typos in previous change.
7268 (DISPLAY_LIST_INFO): New macro.
7269 (kbd_buffer_get_event): Do not access members that are not present
c7064f05 7270 in X11. Revert inadvertent change of "!=" to "=".
4d19d194 7271
945c5bb1
JB
72722013-07-18 Juanma Barranquero <lekktu@gmail.com>
7273
7274 * keyboard.c (kbd_buffer_get_event):
7275 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
7276 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
7277
f4b1eb36
PE
72782013-07-18 Paul Eggert <eggert@cs.ucla.edu>
7279
5e679a2c
PE
7280 * filelock.c: Fix unlikely file descriptor leaks.
7281 (get_boot_time_1): Rework to avoid using emacs_open.
7282 This doesn't actually fix a leak, but is better anyway.
7283 (read_lock_data): Use read, not emacs_read.
7284
a8cd4836
PE
7285 * doc.c: Fix minor memory and file descriptor leaks.
7286 * doc.c (get_doc_string): Fix memory leak when doc file absent.
7287 (get_doc_string, Fsnarf_documentation):
7288 Fix file descriptor leak on error.
7289
ef30e638
PE
7290 * term.c: Fix minor fdopen-related file descriptor leaks.
7291 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
7292 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
7293
f4b1eb36
PE
7294 * charset.c: Fix file descriptor leaks and errno issues.
7295 Include <errno.h>.
7296 (load_charset_map_from_file): Don't leak file descriptor on error.
7297 Use plain record_xmalloc since the allocation is larger than
7298 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
7299 of entries.
7300 * eval.c (record_unwind_protect_nothing):
7301 * fileio.c (fclose_unwind):
7302 New functions.
7303 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
7304 The replacement doesn't block input, but that no longer seems
7305 necessary.
7306
b648c163
PE
73072013-07-17 Paul Eggert <eggert@cs.ucla.edu>
7308
a0931322
PE
7309 * lread.c: Fix file descriptor leaks and errno issues.
7310 (Fload): Close some races that leaked fds or streams when 'load'
7311 was interrupted.
7312 (Fload, openp): Report error number of last nontrivial failure to open.
7313 ENOENT counts as trivial.
7314 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
7315 New functions.
7316 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
7317 now that the function is always called with a nonnegative arg.
7318 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
7319 All uses replaced with ...
7320 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
7321
b648c163
PE
7322 A few more minor file errno-reporting bugs.
7323 * callproc.c (Fcall_process):
7324 * doc.c (Fsnarf_documentation):
7325 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
7326 * process.c (set_socket_option):
7327 Don't let a constructor trash errno.
7328 * doc.c: Include <errno.h>.
7329
b1dc4084
JB
73302013-07-16 Juanma Barranquero <lekktu@gmail.com>
7331
7332 * w32fns.c (unwind_create_tip_frame): Fix declaration.
7333
c43843aa
PE
73342013-07-16 Paul Eggert <eggert@cs.ucla.edu>
7335
50a30cce
PE
7336 Fix w32 bug with call-process-region (Bug#14885).
7337 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
7338 to Fcall_process when the input is empty. This simplifies the
7339 code a bit. It makes no difference on POSIXish platforms but
7340 apparently it fixes a bug on w32.
7341
44e18199 7342 Fix bug where insert-file-contents closes a file twice (Bug#14839).
41d48a42
PE
7343 * fileio.c (close_file_unwind): Don't close if FD is negative;
7344 this can happen when unwinding a zapped file descriptor.
7345 (Finsert_file_contents): Unwind-protect the fd before the point marker,
7346 in case Emacs runs out of memory between the two unwind-protects.
7347 Don't trash errno when closing FD.
7348 Zap the FD in the specpdl when closing it, instead of deferring
7349 the removal of the unwind-protect; this fixes a bug where a child
7350 function unwinds the stack past us.
7351
27e498e6
PE
7352 New unwind-protect flavors to better type-check C callbacks.
7353 This also lessens the need to write wrappers for callbacks,
7354 and the need for make_save_pointer.
a12bf61e 7355 * alloc.c (free_save_value):
27e498e6
PE
7356 * atimer.c (run_all_atimers):
7357 Now extern.
7358 * alloc.c (safe_alloca_unwind):
7359 * atimer.c (unwind_stop_other_atimers):
7360 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
7361 * menu.c (cleanup_popup_menu) [HAVE_NS]:
7362 * minibuf.c (choose_minibuf_frame_1):
7363 * process.c (make_serial_process_unwind):
a12bf61e 7364 * xdisp.c (pop_message_unwind):
27e498e6
PE
7365 * xselect.c (queue_selection_requests_unwind):
7366 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
a12bf61e 7367 * alloc.c (record_xmalloc):
27e498e6
PE
7368 Prefer record_unwind_protect_ptr to record_unwind_protect with
7369 make_save_pointer.
a12bf61e 7370 * alloc.c (Fgarbage_collect):
27e498e6
PE
7371 Prefer record_unwind_protect_void to passing a dummy.
7372 * buffer.c (restore_buffer):
7373 * window.c (restore_window_configuration):
7374 * xfns.c, w32fns.c (do_unwind_create_frame)
7375 New wrapper. All record-unwind uses of wrappee changed.
7376 * buffer.c (set_buffer_if_live):
7377 * callproc.c (call_process_cleanup, delete_temp_file):
7378 * coding.c (code_conversion_restore):
7379 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
7380 * editfns.c (save_excursion_restore)
7381 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
7382 (save_restriction_restore):
7383 * eval.c (restore_stack_limits, un_autoload):
7384 * fns.c (require_unwind):
7385 * keyboard.c (recursive_edit_unwind, tracking_off):
7386 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
7387 * macros.c (pop_kbd_macro, restore_menu_items):
7388 * nsfns.m (unwind_create_frame):
7389 * print.c (print_unwind):
7390 * process.c (start_process_unwind):
7391 * search.c (unwind_set_match_data):
7392 * window.c (select_window_norecord, select_frame_norecord):
7393 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
7394 (fast_set_selected_frame):
7395 * xfns.c, w32fns.c (unwind_create_tip_frame):
7396 Return void, not a dummy Lisp_Object. All uses changed.
7397 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
7398 * callproc.c (call_process_kill):
7399 * fileio.c (restore_point_unwind, decide_coding_unwind)
7400 (build_annotations_unwind):
7401 * insdel.c (Fcombine_after_change_execute_1):
7402 * keyboard.c (read_char_help_form_unwind):
7403 * menu.c (unuse_menu_items):
7404 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
7405 * sound.c (sound_cleanup):
7406 * xdisp.c (unwind_redisplay):
7407 * xfns.c (clean_up_dialog):
7408 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
7409 Accept no args and return void, instead of accepting and returning
7410 a dummy Lisp_Object. All uses changed.
7411 * cygw32.c (fchdir_unwind):
7412 * fileio.c (close_file_unwind):
7413 * keyboard.c (restore_kboard_configuration):
7414 * lread.c (readevalllop_1):
7415 * process.c (wait_reading_process_output_unwind):
7416 Accept int and return void, rather than accepting an Emacs integer
7417 and returning a dummy object. In some cases this fixes an
7418 unlikely bug when the corresponding int is outside Emacs integer
7419 range. All uses changed.
7420 * dired.c (directory_files_internal_unwind):
7421 * fileio.c (do_auto_save_unwind):
7422 * gtkutil.c (pop_down_dialog):
7423 * insdel.c (reset_var_on_error):
7424 * lread.c (load_unwind):
7425 * xfns.c (clean_up_file_dialog):
7426 * xmenu.c, nsmenu.m (pop_down_menu):
7427 * xmenu.c (cleanup_widget_value_tree):
7428 * xselect.c (wait_for_property_change_unwind):
7429 Accept pointer and return void, rather than accepting an Emacs
7430 save value encapsulating the pointer and returning a dummy object.
7431 All uses changed.
7432 * editfns.c (Fformat): Update the saved pointer directly via
7433 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
7434 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
7435 (unwind_body): New function.
7436 (record_unwind_protect): First arg is now a function returning void,
7437 not a dummy Lisp_Object.
7438 (record_unwind_protect_ptr, record_unwind_protect_int)
7439 (record_unwind_protect_void): New functions.
7440 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
7441 * fileio.c (struct auto_save_unwind): New type.
7442 (do_auto_save_unwind): Use it.
7443 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
7444 * insdel.c (struct rvoe_arg): New type.
7445 (reset_var_on_error): Use it.
7446 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
7447 New constants.
7448 (specbinding_func): Remove; there are now several such functions.
7449 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
7450 (set_unwind_protect_ptr): New function.
7451 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
7452
4e604a5d
PE
7453 Be simpler and more consistent about reporting I/O errors.
7454 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
7455 Say "Read error" and "Write error", rather than "I/O error", or
7456 "IO error reading", or "IO error writing", when a read or write
7457 error occurs.
7458 * process.c (Fmake_network_process, wait_reading_process_output)
7459 (send_process, Fprocess_send_eof, wait_reading_process_output):
7460 Capitalize diagnostics consistently. Put "failed foo" at the
7461 start of the diagnostic, so that we don't capitalize the
7462 function name "foo". Consistently say "failed" for such
7463 diagnostics.
7464 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
7465 All callers changed. This is so it can use report_file_error.
7466 * sysdep.c (serial_open, serial_configure): Capitalize I/O
7467 diagnostics consistently as above.
7468
a9757f6a
PE
7469 * fileio.c (report_file_errno): Fix errno reporting bug.
7470 If the file name is neither null nor a pair, package it up as a
7471 singleton list. All callers changed, both to this function and to
7472 report_file_error. This fixes a bug where the memory allocator
7473 invoked by list1 set errno so that the immediately following
7474 report_file_error reported the wrong errno value.
7475
c43843aa
PE
7476 Fix minor problems found by --enable-gcc-warnings.
7477 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
7478 * keyboard.c (kbd_buffer_get_event): Remove unused local.
7479
18c26d81
JD
74802013-07-16 Jan Djärv <jan.h.d@swipnet.se>
7481
7482 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
7483 Set event->arg to Qt if switch-event shall be generated.
7484 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
7485
7486 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
7487
7488 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
7489 FOCUS_OUT_EVENT.
7490
7491 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
7492 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
7493 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
7494 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
44e18199 7495 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
18c26d81
JD
7496 and there is a focused frame.
7497 (head_table): Add focus-in and focus-out.
7498 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
7499 bind to handle-focus-in/out.
7500
7501 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
7502 (Fhandle_switch_frame): Call Fhandle_focus_in.
7503 (syms_of_frame): defsubr handle-focus-in/out.
7504
6c6f1994
PE
75052013-07-16 Paul Eggert <eggert@cs.ucla.edu>
7506
c7ddc792
PE
7507 Fix porting bug to older POSIXish platforms (Bug#14862).
7508 * sysdep.c (emacs_pipe): New function, that implements
7509 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
7510 This should port better to CentOS 5 and to Mac OS X 10.6.
7511 All calls to pipe2 changed.
7512
6c6f1994
PE
7513 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
7514 This makes the code easier to read and the executable a bit smaller.
7515 Do not replace all calls to Fcons that happen to create lists,
7516 just calls that are intended to create lists. For example, when
7517 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
7518 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
7519 Similarly for list2 through list5.
7520 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
7521 * bytecode.c (exec_byte_code):
7522 * callint.c (quotify_arg, Fcall_interactively):
7523 * callproc.c (Fcall_process, create_temp_file):
7524 * charset.c (load_charset_map_from_file)
7525 (Fdefine_charset_internal, init_charset):
7526 * coding.c (get_translation_table, detect_coding_system)
7527 (Fcheck_coding_systems_region)
7528 (Fset_terminal_coding_system_internal)
7529 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
7530 * composite.c (update_compositions, Ffind_composition_internal):
7531 * dired.c (directory_files_internal, file_name_completion)
7532 (Fsystem_users):
7533 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
7534 * doc.c (Fsnarf_documentation):
7535 * editfns.c (Fmessage_box):
7536 * emacs.c (main):
7537 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
7538 (Feval, eval_sub, Ffuncall, apply_lambda):
7539 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
7540 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
7541 (Fset_file_times, Finsert_file_contents)
7542 (Fchoose_write_coding_system, Fwrite_region):
7543 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
7544 * font.c (font_registry_charsets, font_parse_fcname)
7545 (font_prepare_cache, font_update_drivers, Flist_fonts):
7546 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
7547 * frame.c (make_frame, Fmake_terminal_frame)
7548 (x_set_frame_parameters, x_report_frame_params)
7549 (x_default_parameter, Fx_parse_geometry):
7550 * ftfont.c (syms_of_ftfont):
7551 * image.c (gif_load):
7552 * keyboard.c (command_loop_1):
7553 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
7554 (Fcopy_keymap, append_key, Fcurrent_active_maps)
7555 (Fminor_mode_key_binding, accessible_keymaps_1)
7556 (Faccessible_keymaps, Fwhere_is_internal):
7557 * lread.c (read_emacs_mule_char):
7558 * menu.c (find_and_return_menu_selection):
7559 * minibuf.c (get_minibuffer):
7560 * nsfns.m (Fns_perform_service):
7561 * nsfont.m (ns_script_to_charset):
7562 * nsmenu.m (ns_popup_dialog):
7563 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
7564 (Fx_own_selection_internal):
7565 * nsterm.m (append2):
7566 * print.c (Fredirect_debugging_output)
7567 (print_prune_string_charset):
7568 * process.c (Fdelete_process, Fprocess_contact)
7569 (Fformat_network_address, set_socket_option)
7570 (read_and_dispose_of_process_output, write_queue_push)
7571 (send_process, exec_sentinel):
7572 * sound.c (Fplay_sound_internal):
7573 * textprop.c (validate_plist, add_properties)
7574 (Fput_text_property, Fadd_face_text_property)
7575 (copy_text_properties, text_property_list, syms_of_textprop):
7576 * unexaix.c (report_error):
7577 * unexcoff.c (report_error):
7578 * unexsol.c (unexec):
7579 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
7580 (Fformat_mode_line, syms_of_xdisp):
7581 * xfaces.c (set_font_frame_param)
7582 (Finternal_lisp_face_attribute_values)
7583 (Finternal_merge_in_global_face, syms_of_xfaces):
7584 * xfns.c (x_default_scroll_bar_color_parameter)
7585 (x_default_font_parameter, x_create_tip_frame):
7586 * xfont.c (xfont_supported_scripts):
7587 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
7588 (menu_help_callback, xmenu_show):
7589 * xml.c (make_dom):
7590 * xterm.c (set_wm_state):
7591 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
7592 and similarly for list2 through list5.
7593
bafe80ce
PE
75942013-07-15 Paul Eggert <eggert@cs.ucla.edu>
7595
7596 * callproc.c (Fcall_process_region): Fix minor race and tune.
7597 (create_temp_file): New function, with the temp-file-creation part
7598 of the old Fcall_process_region. Use Fcopy_sequence to create the
7599 temp file name, rather than alloca + build_string, for simplicity.
7600 Don't bother to block input around the temp file creation;
068f9124
SM
7601 shouldn't be needed. Simplify use of mktemp.
7602 Use record_unwind_protect immediately after creating the temp file;
bafe80ce
PE
7603 this closes an unlikely race where the temp file was not removed.
7604 Use memcpy rather than an open-coded loop.
7605 (Fcall_process_region): Use the new function. If the input is
7606 empty, redirect from /dev/null rather than from a newly created
7607 empty temp file; this avoids unnecessary file system traffic.
7608
4700b5a5
PE
76092013-07-14 Paul Eggert <eggert@cs.ucla.edu>
7610
5c97beae
PE
7611 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
7612 Simplify by making this case like the other two. This is a bit
7613 slower on obsolete hosts, but the extra complexity isn't worth it.
7614
4700b5a5
PE
7615 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
7616 * process.c (create_process) [!DOS_NT]:
7617 Remove now-unnecessary calls to emacs_close.
7618
f9a74c4c
EZ
76192013-07-13 Eli Zaretskii <eliz@gnu.org>
7620
922ae7ee
EZ
7621 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
7622 returning early. (Bug#14850)
7623
f9a74c4c
EZ
7624 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
7625 and inhibit-iso-escape-detection attributes of 'undecided'.
7626 (Bug#14822)
7627
5e301d76
PE
76282013-07-13 Paul Eggert <eggert@cs.ucla.edu>
7629
69e0e5ee
PE
7630 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
7631 Reported by Herbert J. Skuhra in
7632 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
7633
5e301d76
PE
7634 Don't lose top specpdl entry when memory is exhausted.
7635 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
7636 specpdl overflow here, to simplify callers; all callers changed.
7637 Always reserve an unused entry at the stack top; this avoids
7638 losing the top entry's information when memory is exhausted.
7639
7e649856
PE
76402013-07-12 Paul Eggert <eggert@cs.ucla.edu>
7641
a773ed9a
PE
7642 Clean up errno reporting and fix some errno-reporting bugs.
7643 * callproc.c (Fcall_process):
7644 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
7645 * process.c (create_process, Fmake_network_process):
7646 * unexaix.c (report_error):
7647 * unexcoff.c (report_error):
7648 Be more careful about reporting the errno of failed operations.
7649 The code previously reported the wrong errno sometimes.
7650 Also, prefer report_file_errno to setting errno + report_file_error.
7651 (Fcall_process): Look at openp return value rather than at path,
7652 as that's a bit faster and clearer when there's a numeric predicate.
7653 * fileio.c (report_file_errno): New function, with most of the
7654 old contents of report_file_error.
7655 (report_file_error): Use it.
7656 (Ffile_exists_p, Ffile_accessible_directory_p):
7657 Set errno to 0 when it is junk.
7658 * fileio.c (Faccess_file):
7659 * image.c (x_create_bitmap_from_file):
7660 Use faccessat rather than opening the file, to avoid the hassle of
7661 having a file descriptor open.
7662 * lisp.h (report_file_errno): New decl.
7663 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
7664
7e649856
PE
7665 Minor EBADF fixes.
7666 * process.c (create_process, wait_reading_process_output) [AIX]:
7667 Remove obsolete SIGHUP-related code, as Emacs no longer disables
7668 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
7669 a multithreaded environment anyway).
7670 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
7671
f6774c1a
AS
76722013-07-12 Andreas Schwab <schwab@linux-m68k.org>
7673
7674 * image.c (x_find_image_file): Don't close a remote file handle.
7675
bacba3c2
PE
76762013-07-12 Paul Eggert <eggert@cs.ucla.edu>
7677
7678 Fix races with threads and file descriptors.
7679 * callproc.c (Fcall_process_region):
7680 * dired.c (open_directory):
7681 * emacs.c (main, Fdaemon_initialized):
7682 * image.c (x_find_image_file):
7683 * inotify.c (Finotify_rm_watch):
7684 * lread.c (Flocate_file_internal):
7685 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
7686 * term.c (term_mouse_moveto, init_tty):
7687 * termcap.c (tgetent):
7688 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
7689 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
7690 * unexhp9k800.c, unexmacosx.c (unexec):
7691 * callproc.c (Fcall_process_region):
7692 Use emacs_close, not close.
7693 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
7694 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
7695 and posix_close function on current platforms (which all lack them).
7696 (emacs_close): Use it. This should fix the races on GNU/Linux and
7697 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
7698 and it should avoid closing random victim file descriptors on
7699 other platforms.
7700
653d4f43
PE
77012013-07-11 Paul Eggert <eggert@cs.ucla.edu>
7702
c8536ec4
PE
7703 * inotify.c (uninitialized): Remove. All uses replaced by -1.
7704 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
7705 Touch up doc a bit.
7706
9c203066
PE
7707 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
7708 This is for .gdbinit xbacktrace.
7709
653d4f43
PE
7710 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
7711 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
7712 (emacs_set_tty): Now static.
7713 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
7714 * term.c (tty_capable_p, tty_default_color_capabilities)
7715 (get_tty_terminal, term_mouse_movement)
7716 (handle_one_term_event, init_tty, maybe_fatal):
7717 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
7718 (tgetent, scan_file, name_match, compare_contin):
7719 * terminal.c (get_terminal):
7720 Use bool for boolean.
7721 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
7722 Prefer char to unsigned char if either will do.
7723 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
7724 (tty_write_glyphs): Prefer int to unsigned.
7725 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
7726 All callers changed.
7727 * termcap.c (tprint, main) [TEST]: Remove non-working test.
7728
45b683a1
PE
77292013-07-10 Paul Eggert <eggert@cs.ucla.edu>
7730
29abe551
PE
7731 Port to C89.
7732 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
7733 (B__dummy__): New dummy symbol, to pacify C89.
7734 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
7735 they can't grok varargs macros.
7736 * dispnew.c (add_window_display_history)
7737 (add_frame_display_history):
7738 * print.c (print_object):
7739 * xdisp.c (debug_method_add):
7740 Use %p printf format only for void pointers.
7741 * emacs.c (usage_message): New constant, replacing ...
7742 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
7743 (main): Adjust to usage reorg.
7744 * fns.c (syms_of_fns):
7745 * profiler.c (syms_of_profiler):
7746 Don't use non-constant struct initializers.
7747 * gnutls.h (gnutls_initstage_t):
7748 * lisp.h (enum Lisp_Fwd_Type):
7749 * lread.c (lisp_file_lexically_bound_p):
7750 * xsettings.c (anonymous enum):
7751 Remove trailing comma.
7752 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
7753 * lisp.h (ENUM_BF): Use unsigned if pedantic.
7754 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
7755 (DEFUN): Use it.
7756 * regex.c (const_re_char): New type, to pacify strict C89.
7757 All uses of 'const re_char' replaced to use it.
7758 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
7759 with glibc when strict C89. This change is imported from gnulib.
7760 All uses changed.
7761 (_Restrict_arr_): Rename from __restrict_arr, similarly.
7762 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
7763 Omit GNU_LINUX implementation, since it requires long long.
7764 * xterm.c (x_draw_underwave):
7765 Do not assume the traditional order of struct's members.
7766 (x_term_init): Rewrite to avoid the need for non-constant structure
7767 initializers.
7768
45b683a1 7769 Syntax cleanup, mostly replacing macros with functions.
763a086d 7770 This removes the need for the syntax_temp hack.
45b683a1
PE
7771 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
7772 * syntax.c (SYNTAX_INLINE): New macro.
7773 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
7774 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
7775 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
7776 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
7777 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
7778 (SYNTAX_COMEND_FIRST): Now functions, not macros.
7779 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
7780 Now constants, not macros.
7781 (syntax_temp) [!__GNUC__]: Remove.
7782 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
7783 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
7784 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
7785 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
7786 Move here from syntax.h; now functions, not macros. Except for the
7787 last function, these are static since only syntax.c uses them.
7788 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
7789 All uses changed. Now a function, not a macro; use this fact
7790 to simplify the code.
7791 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
7792 compiler bugs; no longer relevant.
7793 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7794 (SYNTAX_INLINE): New macro.
7795 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
7796 for the new functions. Use bool for boolean member.
7797 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
7798 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
7799 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
7800 (SETUP_BUFFER_SYNTAX_TABLE):
7801 Now extern inline functions, not macros.
7802 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
7803 Remove; all uses replaced by implementation.
7804 (syntax_temp) [!__GNUC__]: Remove decl.
7805 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
7806
29be4a50
JD
78072013-07-10 Jan Djärv <jan.h.d@swipnet.se>
7808
7809 * emacs.c (main): Fix syntax error.
7810
954b166e
PE
78112013-07-10 Paul Eggert <eggert@cs.ucla.edu>
7812
7813 Timestamp fixes for undo (Bug#14824).
7814 * atimer.c (schedule_atimer):
7815 * fileio.c (Ffile_newer_than_file_p):
7816 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
7817 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
7818 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
7819 (syms_of_fileio): Remove Sclear_visited_file_name.
7820 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
7821 file doesn't exist; this avoids an ambiguity with negative timestamps.
7822 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
7823 * systime.h (make_emacs_time, invalid_emacs_time):
7824 Don't assume struct timespec layout; POSIX doesn't guarantee it.
7825 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
7826 * undo.c (record_first_change): Push (visited-file-modtime) onto
7827 undo list rather than reimplementing it by hand, incorrectly.
7828
d74647c3
KB
78292013-07-09 Ken Brown <kbrown@cornell.edu>
7830
7831 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
7832
3c51b96b
JB
78332013-07-09 Juanma Barranquero <lekktu@gmail.com>
7834
7835 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
7836
4ebbdd67
PE
78372013-07-09 Paul Eggert <eggert@cs.ucla.edu>
7838
7839 Handle errno and exit status a bit more carefully.
7840 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
7841 number into an exit status. Instead, use EXIT_CANCELED.
7842 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
7843 * callproc.c (relocate_fd):
7844 * emacs.c (close_output_streams, main):
7845 * process.c (create_process):
7846 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
7847 Use emacs_perror for simplicity.
7848 * callproc.c (relocate_fd, main):
7849 * sysdep.c (sys_subshell):
7850 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
7851 (shut_down_emacs): Use emacs_write, not write.
7852 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
7853 * fileio.c (Fcopy_file, e_write):
7854 * nsterm.m (ns_select):
7855 * process.c (send_process):
7856 * sound.c (vox_write):
7857 Use emacs_write_sig, not emacs_write.
7858 * lisp.h (emacs_write_sig, emacs_perror): New decls.
7859 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
7860 New constants.
7861 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
7862 of write.
7863 (emacs_full_write): New function.
7864 (emacs_write): Rewrite to use it.
7865 (emacswrite_sig, emacs_perror): New functions.
7866 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
7867
44e18199 78682013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
e4b1e5af
JD
7869
7870 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
7871 on NS even if it is present. Pixmap on NS is a void*.
7872
9caab067
PE
78732013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7874
7875 Port to Ubuntu 10 (Bug#14803).
7876 Problem reported by T.V. Raman.
7877 * process.c (close_on_exec, accept4, process_socket):
7878 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
7879
1d442672
EZ
78802013-07-07 Eli Zaretskii <eliz@gnu.org>
7881
7882 * w32.c (sys_dup): Declare prototype.
7883
7884 * filelock.c:
7885 * emacs.c:
7886 * callproc.c [WINDOWSNT]: Include sys/socket.h.
7887
067428c1
PE
78882013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7889
7890 Make file descriptors close-on-exec when possible (Bug#14803).
7891 This simplifies Emacs a bit, since it no longer needs to worry
7892 about closing file descriptors by hand in some cases.
7893 It also fixes some unlikely races. Not all such races, as
7894 libraries often open files internally without setting
7895 close-on-exec, but it's an improvement.
7896 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
7897 * callproc.c (Fcall_process) [!MSDOS]:
7898 * emacs.c (main) [!DOS_NT]:
7899 * nsterm.m (ns_term_init):
7900 * process.c (create_process):
7901 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
7902 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
7903 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
7904 Prefer mkostemp with O_CLOEXEC to mkstemp.
7905 * callproc.c (relocate_fd) [!WINDOWSNT]:
7906 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
7907 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
7908 now using pipe2.
7909 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
7910 Make the resulting file descriptor close-on-exec.
7911 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
7912 * lread.c (load_descriptor_list, load_descriptor_unwind):
7913 Remove; no longer needed. All uses removed.
7914 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
7915 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
7916 New functions.
7917 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
35e951cd 7918 (Fmake_network_process, Fnetwork_interface_list)
067428c1
PE
7919 (Fnetwork_interface_info, server_accept_connection):
7920 Make newly-created socket close-on-exec.
7921 * sysdep.c (emacs_open, emacs_fopen):
7922 Make new-created descriptor close-on-exec.
7923 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
7924 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
7925
0da857dd
JD
79262013-07-07 Jan Djärv <jan.h.d@swipnet.se>
7927
7928 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
7929 for NS_IMPL_GNUSTEP.
7930
5f86adcd
PE
79312013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7932
7933 Fix openp errno handling.
7934 * callproc.c (Fcall_process): Preserve openp errno around close.
7935 * lread.c (openp): Set errno when returning -1, as some callers
7936 expect this.
7937
1afb1d07
JD
79382013-07-06 Jan Djärv <jan.h.d@swipnet.se>
7939
7940 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
7941
7942 * nsterm.h (NSSavePanel): Update comment.
7943 (NSAPP_DATA2_RUNFILEDIALOG): Define.
7944 (ns_run_file_dialog): Declare.
7945
7946 * nsfns.m: Remove panelOK.
7947 (ns_fd_data): New.
7948 (ns_run_file_dialog): New function.
7949 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
7950 event loop, so file dialog is popped up by ns_run_file_dialog, called
7951 by sendEvent (Bug#14578).
7952 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
7953
3323c263
EZ
79542013-07-06 Eli Zaretskii <eliz@gnu.org>
7955
fdda0220
EZ
7956 * xdisp.c (default_line_pixel_height): New function.
7957 (pos_visible_p, move_it_vertically_backward, try_scrolling)
7958 (try_cursor_movement, redisplay_window, try_window)
7959 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
7960
068f9124
SM
7961 * window.c (window_scroll_pixel_based):
7962 use default_line_pixel_height.
fdda0220
EZ
7963
7964 * dispextern.h (default_line_pixel_height): Add prototype.
7965
7966 * frame.c (x_set_line_spacing): Accept a float value for
7967 line-spacing parameter, per the documentation.
7968
3323c263
EZ
7969 * data.c (Fmultibyte_string_p): Doc fix.
7970
47ba6d43
PE
79712013-07-05 Paul Eggert <eggert@cs.ucla.edu>
7972
406af475
PE
7973 Use emacs_open more consistently when opening files.
7974 This handles EINTR more consistently now, and makes it easier
7975 to introduce other uniform changes to file descriptor handling.
a12bf61e
GM
7976 * sysstdio.h: New file.
7977 * buffer.c (mmap_init):
406af475
PE
7978 * cygw32.c (chdir_to_default_directory):
7979 * dispnew.c (Fopen_termscript):
7980 * emacs.c (Fdaemon_initialized):
7981 * fileio.c (Fdo_auto_save):
7982 * image.c (slurp_file, png_load_body, jpeg_load_body):
7983 * keyboard.c (Fopen_dribble_file):
7984 * lread.c (Fload):
7985 * print.c (Fredirect_debugging_output):
7986 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
7987 * termcap.c (tgetent):
7988 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
7989 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
7990 * w32term.c (w32_initialize) [CYGWIN]:
7991 * xfaces.c (Fx_load_color_file):
7992 Use emacs_open instead of plain open, and emacs_fopen instead of
7993 plain fopen.
7994 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
7995 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
7996 * callproc.c (default_output_mode): New constant.
7997 (Fcall_process): Use it to call emacs_open instead of plain creat.
7998 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
7999 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
8000 (emacs_fopen): New function.
8001 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
8002 Include <lisp.h>, for emacs_open.
8003 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
8004
47ba6d43
PE
8005 Remove duplicate #include directives.
8006 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
8007 * xfaces.c:
8008 Don't include stdio.h twice.
8009 * buffer.c [USE_MMAP_FOR_BUFFERS]:
8010 Don't include sys/types.h or stdio.h twice.
8011 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
8012 * lread.c: Don't include coding.h twice.
8013 * nsfont.m: Don't include frame.h twice.
8014 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
8015 * ralloc.c: Don't include <unistd.h> twice.
8016 * xdisp.c: Don't include font.h twice.
8017 * xterm.c: Don't include fontset.h twice.
8018 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
8019
b9ed53d5
PE
80202013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8021
8022 Scale ImageMagick images more carefully.
8023 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
8024 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
8025 Be more careful about avoiding undefined behavior after
8026 integer overflow and division by zero.
8027
cf13177e
YM
80282013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8029
8030 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
8031 (syms_of_w32fns): DEFSYM them.
8032 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
8033 (CCHDEVICENAME): Define macros if not defined.
8034 (struct MONITOR_INFO_EX): New struct.
8035 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
8036 (enum_display_monitors_fn): New variable.
8037 (globals_of_w32fns): Initialize it.
8038 (Fx_display_pixel_width, Fx_display_pixel_height)
8039 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
8040 multi-monitor setups in docstrings.
8041 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
8042 screen size by primary monitor's millimeter per pixel.
8043 (w32_monitor_enum, w32_display_monitor_attributes_list)
8044 (w32_display_monitor_attributes_list_fallback)
8045 (Fw32_display_monitor_attributes_list): New functions.
8046 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
8047
8048 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
8049 if not defined.
8050 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
8051
86dfb7a8
MA
80522013-07-04 Michael Albinus <michael.albinus@gmx.de>
8053
8054 * fileio.c (Qfile_notify_error): New error symbol.
8055
8056 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
8057 * inotify.c (inotify_callback, symbol_to_inotifymask)
8058 (Finotify_add_watch, Finotify_rm_watch): Use it.
8059 (inotifyevent_to_event): Exchange order of cookie and file name.
8060 (Finotify_add_watch): Adapt docstring.
8061
8062 * lisp.h (Qfile_notify_error): Declare.
8063
2c1c974b
PE
80642013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8065
8066 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
8067 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8068 Do not clear _malloc_thread_enabled_p, undoing the previous change,
8069 which did not work (see <http://bugs.gnu.org/14569#307>).
8070 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
8071 && (!noninteractive || initialized)). This attempts to thread
8072 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
8073
7a35b20f
JB
80742013-07-04 Juanma Barranquero <lekktu@gmail.com>
8075
8076 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
8077 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
8078
1ce5cd04
PE
80792013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8080
8081 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
8082 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8083 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
8084 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
8085
57f8c490
PE
80862013-07-02 Paul Eggert <eggert@cs.ucla.edu>
8087
8088 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
8089 Define to __sys_siglist.
8090
bcffb5ca
EZ
80912013-07-02 Eli Zaretskii <eliz@gnu.org>
8092
8093 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
8094 word-wrap, so that overflow-newline-into-fringe would work in
8095 visual-line-mode. (Bug#2749)
8096 (move_it_in_display_line_to): When the last scanned display
8097 element fits exactly on the display line, and
8098 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
8099 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
8100 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
8101 finding buffer position that corresponds to pixel coordinates,
8102 e.g. in buffer_posn_from_coords.
8103
2c41e781
JD
81042013-07-02 Jan Djärv <jan.h.d@swipnet.se>
8105
8106 * process.c (handle_child_signal): Call catch_child_signal if
8107 NS_IMPL_GNUSTEP.
8108
c2418359
PE
81092013-07-02 Paul Eggert <eggert@cs.ucla.edu>
8110
52a9bcae
PE
8111 Don't convert function pointers to void * and back.
8112 It isn't portable C, and it's easy enough to avoid.
8113 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
8114 (make_save_value): Add support for SAVE_FUNCPOINTER.
8115 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
8116 * print.c (print_object):
8117 Distinguish function from object pointers.
8118 * lisp.h (SAVE_FUNCPOINTER): New constant.
8119 (SAVE_SLOT_BITS): Adjust to it.
8120 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
8121 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
8122 (voidfuncptr): New typedef.
8123 (struct Lisp_Save_Value): New member data[0].funcpointer.
8124 (XSAVE_FUNCPOINTER): New function.
8125
c2418359
PE
8126 Simplify buildobj processing.
8127 * Makefile.in (buildobj.h): Make it a sequence of strings each
8128 followed by comma, rather than a single string. Put it into a
8129 .tmp file in case there's an error while generating it.
8130 (gl-stamp): Use .tmp for temp files.
8131 (mostlyclean): Clean .tmp files.
8132 * doc.c (buildobj): Move to just the routine that needs it.
8133 It's now an array of strings, so processing is simpler.
8134
8f43ce49
PE
81352013-07-01 Paul Eggert <eggert@cs.ucla.edu>
8136
8137 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
8138 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
8139 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8140 Invoke malloc_enable_thread even when not interactive.
8141 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
8142 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
8143 in this case, since the underlying bug has now been fixed.
8144
24827db9
JB
81452013-07-01 Juanma Barranquero <lekktu@gmail.com>
8146
8147 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
8148 unlinking it (bug#14691).
8149
ef099a94
MN
81502013-06-30 Michal Nazarewicz <mina86@mina86.com>
8151
8152 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
8153 before checking whether buffer is modified. This lets
8154 `kill-buffer-query-functions' cancel killing of the buffer or save
8155 its content before `kill-buffer' asks user the "Buffer %s
8156 modified; kill anyway?" question.
8157
9d3f2fc2
JD
81582013-06-30 Jan Djärv <jan.h.d@swipnet.se>
8159
8160 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
8161 Let the super performKeyEquivalent deal with them (Bug#14747).
8162
e6c6c8c7
PE
81632013-06-30 Paul Eggert <eggert@cs.ucla.edu>
8164
1d71c1d9
PE
8165 * widget.c (resize_cb): Remove unused local.
8166
8f5f35cc
PE
8167 Do not use GTK 3 if it exists but cannot be compiled.
8168 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
8169 * xterm.c (x_error_handler) [!USE_GTK]:
8170 Do not use GTK 3.
8171
e6c6c8c7
PE
8172 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
8173
0ba54312
EZ
81742013-06-30 Eli Zaretskii <eliz@gnu.org>
8175
5d1c3286
EZ
8176 * intervals.c (get_local_map): Instead of aborting, clip POSITION
8177 to the valid range of values. (Bug#14753)
8178
0ba54312
EZ
8179 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
8180 when moving point by using the current glyph matrix. This avoids
8181 the need to force redisplay when this function is called in a
8182 loop.
8183
9c90cc06
PE
81842013-06-29 Paul Eggert <eggert@cs.ucla.edu>
8185
8186 Fix minor problems found by static checking.
8187 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
8188 Redo the latter's body to sidestep GCC parenthesization warnings.
8189 (setup_coding_system, detect_coding, detect_coding_system): Use them.
8190 * coding.c (detect_coding, detect_coding_system):
8191 * coding.h (struct undecided_spec):
8192 Use bool for boolean.
8193 * image.c (QCmax_width, QCmax_height): Now static.
8194 * xdisp.c (Fmove_point_visually): Remove unused local.
8195
4c672a0f
EZ
81962013-06-29 Eli Zaretskii <eliz@gnu.org>
8197
8198 * xdisp.c (Fmove_point_visually): New function.
8199
c1ea3abf
JB
82002013-06-28 Kenichi Handa <handa@gnu.org>
8201
8202 * coding.h (define_coding_undecided_arg_index): New enum.
8203 (coding_attr_index): New members
8204 coding_attr_undecided_inhibit_null_byte_detection,
8205 coding_attr_undecided_inhibit_iso_escape_detection,
8206 coding_attr_undecided_prefer_utf_8.
8207 (undecided_spec): New struct.
8208 (struct coding_system): New member `undecided' of the member
8209 `spec'.
8210
8211 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
8212 (detect_coding): Likewise.
8213 (detect_coding_system): Likewise.
8214 (Fdefine_coding_system_internal): New coding system properties
8215 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
8216 :prefer-utf-8.
8217 (syms_of_coding): Adjust for coding_arg_undecided_max.
8218
ba3de9e6
PE
82192013-06-28 Paul Eggert <eggert@cs.ucla.edu>
8220
8221 * image.c (x_from_xcolors): Remove unused local.
8222
547c9269
YM
82232013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8224
8225 Defer image data transfer between X client and server until actual
8226 display happens.
8227
8228 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
8229 and `mask_img'.
8230
8231 * image.c (Destroy_Image): Remove.
8232 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
8233 `mask_p', and `colors_p'. All uses changed.
8234 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
ef099a94
MN
8235 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
8236 New macros for `flags' arg to x_clear_image_1.
547c9269
YM
8237 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
8238 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
04b66ce7 8239 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
547c9269
YM
8240 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
8241 (image_get_x_image, image_unget_x_image): New functions or macros.
8242 (image_background, image_background_transparent, x_to_xcolors)
8243 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
8244 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
8245 instead of Destroy_Image.
8246 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
8247 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
8248 (png_load_body, jpeg_load_body, tiff_load, gif_load)
8249 (imagemagick_load_image, svg_load_image): Use them instead of
8250 x_create_x_image_and_pixmap, and x_put_x_image followed by
8251 x_destroy_x_image, respectively.
8252 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
8253 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
8254 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
8255 background_transparent fields.
8256 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
8257 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
8258
dae2f5ef
PE
82592013-06-27 Paul Eggert <eggert@cs.ucla.edu>
8260
8261 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
8262 This mostly consists of undoing recent changes.
8263 * callproc.c (Fcall_process):
8264 * process.c (create_process):
8265 Do not worry about catching SIGCHLD here, undoing previous change.
8266 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
8267 * process.c, process.h (catch_child_signal):
8268 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
8269 * process.c (catch_child_handler): Don't worry about being called
8270 lazily and do not assume caller has blocked SIGCHLD, undoing
8271 previous change. Move first-time stuff back to
8272 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
8273 tickle glib, as that causes Cygwin bootstrap to fail. Do not
8274 set lib_child_handler if it's already initialized, which may
a6c4680a 8275 help avoid problems on GNUstep.
dae2f5ef 8276
fa55d2aa
PE
82772013-06-23 Paul Eggert <eggert@cs.ucla.edu>
8278
8279 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
8280 * callproc.c (Fcall_process):
8281 * process.c (create_process):
8282 Make sure SIGCHLD is caught before we fork,
8283 since Emacs startup no arranges to catch SIGCHLD.
8284 * process.c (lib_child_handler): Initialize to null, not to
8285 dummy_handler.
8286 (catch_child_signal): Allow self to be called lazily.
8287 Do nothing if it's already been called.
8288 Assume caller has blocked SIGCHLD (all callers do now).
8289 * emacs.c (main): Do not catch SIGCHLD here; defer it until
8290 just before it's really needed.
8291 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
8292 since it hasn't been caught yet.
8293
f3f9606c
LMI
82942013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
8295
8296 * image.c (compute_image_size): New function to implement
8297 :max-width and :max-height.
8298 (imagemagick_load_image): Use it.
8299
c7041908
PE
83002013-06-23 Paul Eggert <eggert@cs.ucla.edu>
8301
8302 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
8303 * callproc.c, process.h (block_child_signal, unblock_child_signal):
8304 Now extern.
8305 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
8306 * process.c (catch_child_signal): Block SIGCHLD while futzing with
8307 the SIGCHLD handler, since the code is not atomic and (due to glib)
8308 signals may be arriving now.
8309 * sysdep.c (init_signals): Do not catch child signals here;
8310 'main' now does that later, at a safer time.
8311
f86852b4
PE
83122013-06-22 Paul Eggert <eggert@cs.ucla.edu>
8313
0dfeed58
PE
8314 Clean up SIGCHLD handling a bit (Bug#14569).
8315 * process.c, process.h (catch_child_signal):
8316 Now always extern, even if !NS_IMPL_GNUSTEP.
8317 * process.c (catch_child_signal): Move glib tickler here from
8318 init_process_emacs, so that it's done earlier in Emacs
8319 initialization. Also move the noninteractive && !initialized
8320 check here from init_process_emacs. This is all a bit cleaner for
8321 GNUish platforms, and I hope it works around the Cygwin bug.
8322 * sysdep.c (init_signals): Invoke catch_child_signal here, so
8323 that glib signal handling is tickled before glib creates threads.
8324
f86852b4
PE
8325 * process.c (wait_reading_process_output): Avoid int overflow
8326 when reading more than 2 GiB total from a process.
8327
cbd6509c
PE
83282013-06-21 Paul Eggert <eggert@cs.ucla.edu>
8329
8330 * process.c (create_process): Handle a couple more cases,
8331 i.e., work even if new_argv and wait_child_setup[i] are cached.
8332 Use Fcall_process's style for volatile vars.
8333
9de1114a
AS
83342013-06-21 Andreas Schwab <schwab@linux-m68k.org>
8335
8336 * process.c (create_process): Mark PROCESS volatile.
8337
fbe9e0b9
PE
83382013-06-21 Paul Eggert <eggert@cs.ucla.edu>
8339
8340 Use C99-style flexible array members if available.
8341 This avoids some subtle aliasing issues, which typically
8342 aren't a problem with GCC but may be a problem elsewhere.
8343 * alloc.c (sdata): New typedef, replacing the old struct sdata.
8344 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
8345 In either case, it uses a flexible array member rather than
8346 the old struct hack. All uses changed.
8347 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
8348 Adjust to sdata reorganization.
8349 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
8350 Use offsetof (struct, flex_array_member), not sizeof (struct), as
8351 that ports better to pre-C99 non-GCC.
8352 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
8353 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
8354 as the latter has changed.
8355 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
8356 and port better to pre-C99 GCC.
8357 * image.c (struct xpm_cached_color):
8358 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
8359 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
8360 Use FLEXIBLE_ARRAY_MEMBER.
8361 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
8362 Move decl to top level so it gets checked against implementation.
8363 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
8364 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
8365
1fc71008
PE
83662013-06-20 Paul Eggert <eggert@cs.ucla.edu>
8367
8368 * syntax.c: Integer cleanups.
8369 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
8370 All uses that need 0-or-2 changed to:
8371 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
8372 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
8373 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
8374 (char_quoted, prev_char_comend_first, back_comment)
8375 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
8376 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
8377 Use bool for boolean.
8378 (update_syntax_table, skip_chars, skip_syntaxes):
8379 Prefer int to unsigned when either will do.
8380 (back_comment): Return boolean success flag, like forw_comment,
8381 instead of positive-or-minus-1 (which might have overflowed int anyway).
8382 Don't stuff ptrdiff_t into int.
8383 (syntax_spec_code, syntax_code_spec): Now const.
8384 (Fmatching_paren, scan_lists, scan_sexps_forward):
8385 Use enum syntaxcode for syntax code.
8386 (Fmatching_paren): Check that arg is a character, not just an integer.
8387 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
8388 (Finternal_describe_syntax_value): Omit no-longer-needed
8389 comparison to 0.
8390 (skip_chars): Use char, not unsigned char, when the distinction
8391 doesn't matter.
8392 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
8393 * bytecode.c (exec_byte_code):
8394 * syntax.c (syntax_spec_code, Fchar_syntax)
8395 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
8396 (init_syntax_once):
8397 * syntax.h (SYNTAX_WITH_FLAGS):
8398 Omit unnecessary casts.
8399
b932cad7
EZ
84002013-06-20 Eli Zaretskii <eliz@gnu.org>
8401
8402 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
8403 line dimensions here, to avoid race conditions with the main
8404 thread. (Bug#14062, bug#14630, bug#14669)
8405
8406 * w32term.c (w32_draw_window_cursor): Compute the header line and
8407 mode line dimensions here.
8408 <w32_system_caret_window, w32_system_caret_hdr_height>:
8409 <w32_system_caret_mode_height>: New variables.
8410
8411 * w32term.h: Declare them.
8412
89561f72
PE
84132013-06-20 Paul Eggert <eggert@cs.ucla.edu>
8414
5013fc08
PE
8415 * alloc.c (die): Move "assertion failed" string here ...
8416 * lisp.h (eassert): ... from here. Also, suppress evaluation of
8417 COND when SUPPRESS_CHECKING. This shrinks the executable text
8418 size by 0.8% to 2.2% when configured with --enable-checking,
8419 depending on optimization flags (GCC 4.8.1 x86-64).
8420
89561f72
PE
8421 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
8422
763a086d 84232013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
89561f72
PE
8424
8425 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
8426 base is 2; this is more accurate.
8427
983aeb9a
JB
84282013-06-19 Juanma Barranquero <lekktu@gmail.com>
8429
8430 * sound.c (string_default): Move to !WINDOWSNT section.
8431 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
8432
178ba3e6
PE
84332013-06-19 Paul Eggert <eggert@cs.ucla.edu>
8434
bbc51b15
PE
8435 * sound.c: Integer cleanups.
8436 Remove unnecessary forward decls.
8437 (struct sound_device): The 'file' member is now a Lisp_Object, not
8438 a char *, so that we needn't invoke alloca on a huge size.
8439 (Fplay_sound_internal): Adjust to this.
8440 (string_default): New function.
8441 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
8442 Use it to adjust to the struct sound_device change.
8443 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
8444 (be2hs) [0]: Remove.
8445
178ba3e6
PE
8446 * syntax.c (skip_chars): Don't use uninitialized storage
8447 when searching a multibyte buffer for characters that are not in a
8448 unibyte string that contains non-ASCII characters.
8449
69f60cdc
JD
84502013-06-18 Jan Djärv <jan.h.d@swipnet.se>
8451
8452 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
8453 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
8454
0d6224d4
PE
84552013-06-18 Paul Eggert <eggert@cs.ucla.edu>
8456
8457 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
8458
3c542890
KH
84592013-06-18 Kenichi Handa <handa@gnu.org>
8460
f7e3f7cd
KH
8461 * font.c (Ffont_spec): Signal an error for an invalid font name
8462 (Bug#14648).
3c542890 8463
9349e5f7
PE
84642013-06-18 Paul Eggert <eggert@cs.ucla.edu>
8465
8466 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
8467 In particular this ports to 32-bit sparc Sun cc.
8468 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
8469 array with a dummy element at specpdl[-1], so that its address can
8470 be taken portably.
8471 (unbind_to): Do not copy the binding; not needed, now that we
8472 copy old_value in the one place where the copy is needed.
8473 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
8474 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
8475 (union specbinding): Rename from struct specbinding. Redo layout
8476 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
8477 which is not portable. With Sun C 5.12 32-bit sparc, the
8478 declaration causes nargs to be an unsigned bitfield, a behavior
8479 that the C standard allows; but Emacs wants nargs to be signed.
8480 The overall type is now a union of structures rather than a
8481 structure of union of structures, and the 'kind' member is now a
8482 bitfield, so that the overall type doesn't grow. All uses changed.
8483 * process.c (Fmake_serial_process): Remove unnecessary initialization.
8484
0a4df6a5
PE
84852013-06-17 Paul Eggert <eggert@cs.ucla.edu>
8486
ec6ecaad
PE
8487 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
8488 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
8489
0a4df6a5
PE
8490 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
8491
7bfe8dbc
EZ
84922013-06-17 Eli Zaretskii <eliz@gnu.org>
8493
8494 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
8495 unless we know that the window w's frame is a frame object.
8496 Another attempt at solving bug#14062 and bug#14630.
8497
708e05f6
LMI
84982013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
8499
8500 * textprop.c (property_set_type): New enum.
8501 (add_properties): Allow appending/prepending text properties.
8502 (add_text_properties_1): Factored out of Fadd_text_properties.
ef099a94 8503 (Fadd_text_properties): Move all the code into
708e05f6
LMI
8504 add_text_properties_1.
8505 (Fadd_face_text_property): New function that calls
8506 add_text_properties_1.
8507
84575e67
PE
85082013-06-17 Paul Eggert <eggert@cs.ucla.edu>
8509
8510 Move functions from lisp.h to individual modules when possible.
8511 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
8512 * alloc.c (XFLOAT_INIT, set_symbol_name):
8513 * buffer.c (CHECK_OVERLAY):
8514 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
8515 (set_char_table_parent):
8516 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
8517 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
8518 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
8519 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
8520 (set_blv_valcell):
8521 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
8522 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
8523 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
8524 (backtrace_args, backtrace_debug_on_exit):
8525 * floatfns.c (CHECK_FLOAT):
8526 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
8527 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
8528 (set_hash_hash, set_hash_hash_slot, set_hash_index)
8529 (set_hash_index_slot):
8530 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
8531 * marker.c (CHECK_MARKER):
8532 * textprop.c (CHECK_STRING_OR_BUFFER):
8533 * window.c (CHECK_WINDOW_CONFIGURATION):
8534 Move here from lisp.h, and make these functions static rather than
8535 extern inline.
8536 * buffer.c (Qoverlayp):
8537 * data.c (Qsubrp):
8538 * fns.c (Qhash_table_p):
8539 * window.c (Qwindow_configuration_p):
8540 Now static.
8541 * lisp.h: Remove the abovementioned defns and decls.
8542
44e18199 8543 Use functions, not macros, for XINT etc (Bug#11935).
84575e67
PE
8544 In lisp.h, prefer functions to function-like macros, and
8545 constants to object-like macros, when either will do. This:
8546 . simplifies use, as there's no more need to worry about
8547 arguments' side effects being evaluated multiple times.
8548 . makes the code easier to debug on some platforms.
8549 However, when using gcc -O0, keep using function-like macros
8550 for a few critical operations, for performance reasons.
8551 This sort of thing isn't needed with gcc -Og, but -Og
8552 is a GCC 4.8 feature and isn't widely-enough available yet.
8553 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
8554 Remove enum lsb_bits; no longer needed.
8555 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
8556 * buffer.c (Qoverlap):
8557 * data.c (Qsubrp):
8558 * fns.c (Qhash_table_p):
8559 Now extern, so lisp.h can use these symbols.
8560 * dispextern.h: Include character.h, for MAX_CHAR etc.
8561 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
8562 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8563 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
8564 (GLYPH_CODE_P): Move here from lisp.h.
8565 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8566 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
8567 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
8568 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
8569 XUNTAG now returns void *.
8570 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
8571 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
8572 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
8573 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
8574 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
8575 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
8576 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
8577 (lisp_h_XPNTR, lisp_h_XSYMBOL):
8578 New macros, renamed from their sans-lisp_h_ counterparts.
8579 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
8580 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
8581 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
8582 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
8583 If compiling via GCC without optimization, define these as macros
8584 in addition to inline functions.
8585 To disable this, compile with -DINLINING=0.
8586 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
8587 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
8588 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
8589 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
8590 (INTMASK, VALMASK): Now macros, since static values cannot be
8591 accessed from extern inline functions.
8592 (VALMASK): Also a constant, for benefit of old GDB.
8593 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
8594 is INTEGERP, which can fold it in.
5165d44a 8595 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
84575e67
PE
8596 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
8597 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
8598 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
8599 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
8600 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
8601 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
8602 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
8603 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
8604 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
8605 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
8606 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
8607 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
8608 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
8609 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
8610 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
8611 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
8612 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
8613 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
8614 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
8615 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
8616 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
8617 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
8618 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
8619 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
8620 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
8621 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
8622 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
8623 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
8624 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
8625 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
8626 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
8627 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
8628 Now functions.
8629 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
8630 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
8631 (VALMASK): Define in one place rather than in two, merging the
8632 USE_LSB_TAG parts; this is simpler.
8633 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
8634 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
8635 Move up, to avoid use before definition.
8636 Also include "globals.h" earlier, for the same reason.
8637 (make_natnum): New function.
8638 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
8639 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
8640 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
8641 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
8642 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
8643 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
8644 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
8645 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
8646 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
8647 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
8648 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
8649 (Qwindow_configuration_p, Qimage): New forward declarations.
8650 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
8651 (STRING_COPYIN): Remove; unused.
8652 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
8653 (xcar_addr, xcdr_addr): New functions. All uses changed.
8654 (IEEE_FLOATING_POINT): Now a constant, not a macro.
8655 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
8656 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8657 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
8658 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
8659 (TYPE_RANGED_INTEGERP): Simplify.
8660 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
8661 (setlocale, fixup_locale, synchronize_system_messages_locale)
8662 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
8663 Now empty functions, not macros.
8664 (functionp): Return bool, not int.
8665 * window.c (Qwindow_configuration_p): Now extern,
8666 so window.h can use it.
8667 * window.h (Qwindowp): Move decl back to lisp.h.
8668
9583ec36
EZ
86692013-06-15 Eli Zaretskii <eliz@gnu.org>
8670
8671 * xdisp.c (Fline_pixel_height): New function, required for solving
8672 bug #14567.
8673
210272ce
PE
86742013-06-15 Paul Eggert <eggert@cs.ucla.edu>
8675
8676 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
8677
de0503df
SM
86782013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
8679
8680 * lread.c (syms_of_lread):
8681 * fns.c (Fprovide): Adjust to new format of after-load-alist.
8682
afbfe143
KD
86832013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
8684
8685 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
8686
d177e213
XF
86872013-06-12 Xue Fuqiao <xfq.free@gmail.com>
8688
8689 * fileio.c (expand_file_name): Doc fix.
8690
05e3e412
PE
86912013-06-11 Paul Eggert <eggert@cs.ucla.edu>
8692
f7394b12
PE
8693 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
8694 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
8695 Wait for self, not for 0. This can't hurt on GNU or similar
8696 system, and may help with Cygwin.
8697
05e3e412
PE
8698 * keyboard.c: Don't use PROP (...) as an lvalue.
8699 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
8700 Use set_prop (A, B), not PROP (A) = B.
8701
17dd3097
EZ
87022013-06-10 Eli Zaretskii <eliz@gnu.org>
8703
8704 * xdisp.c (get_it_property): Use it->window instead of generating
8705 a Lisp object from it->w.
8706
52fab9c9
EZ
87072013-06-09 Eli Zaretskii <eliz@gnu.org>
8708
8709 * xdisp.c (get_it_property): If it->object is a buffer, pass to
8710 get-char-property the window that is being rendered, instead of
8711 the buffer, to support window-specific overlays. (Bug#14575)
ad257d4f
EZ
8712 (compute_display_string_pos): When W is NULL, use the current
8713 buffer as the object to pass to get-char-property.
8714 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
8715 pointer member of the bidi iterator, since no window is pertinent
8716 to this function.
52fab9c9 8717
5bf97bfc
EZ
87182013-06-08 Eli Zaretskii <eliz@gnu.org>
8719
8720 * bidi.c (bidi_fetch_char): Accept additional argument, the window
8721 being displayed, and pass it to compute_display_string_pos.
8722 (bidi_level_of_next_char, bidi_resolve_explicit_1)
8723 (bidi_paragraph_init): All callers changed.
8724
8725 * xdisp.c (init_from_display_pos, init_iterator)
8726 (handle_single_display_spec, next_overlay_string)
8727 (get_overlay_strings_1, reseat_1, reseat_to_string)
e7b41c4c
JB
8728 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
8729 Set bidi_it.w member from it->w.
5bf97bfc
EZ
8730 (compute_display_string_pos): Accept additional argument, the
8731 window being displayed, and pass it to Fget_char_property.
8732 (Bug#14575)
8733
8734 * dispextern.h (struct bidi_it): New member w, the window being
8735 displayed.
8736 (compute_display_string_pos): Adjust prototype.
8737
5de0e011
JD
87382013-06-08 Jan Djärv <jan.h.d@swipnet.se>
8739
e7b41c4c 8740 * xgselect.c: Remove unneeded include xterm.h.
b33f93ee
JD
8741
8742 * process.c (wait_reading_process_output): Check for NS before GLIB.
8743 GLIB may be linked in due to rsvg, but ns_select must be called.
8744
5de0e011
JD
8745 * xgselect.c (xg_select): Remove call to window_system_available
8746 and g_main_context_pending at the top, so Gdk events (i.e. file
8747 notify) are processed when Emacs is started with -nw.
8748
a822acff
EZ
87492013-06-07 Eli Zaretskii <eliz@gnu.org>
8750
8751 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
8752 (ctagsfiles3): New variable, includes only *.m files.
8753 (TAGS): Use an explicit language name in the regular expressions,
8754 to avoid transformation of '/SOMETHING' by MSYS to
8755 'c:\MSYS\SOMETHING'.
8756
6c0a9ed1
RC
87572013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
8758
8759 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
8760
9ef6111b
EZ
87612013-06-06 Eli Zaretskii <eliz@gnu.org>
8762
8763 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
8764 still need to set the mouse pointer shape and activate help-echo.
8765 (Bug#14558)
8766
7d300d64
PE
87672013-06-06 Paul Eggert <eggert@cs.ucla.edu>
8768
8769 A few porting etc. fixes for the new file monitor code.
8770 See the thread containing
8771 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
8772 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
8773 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
8774 (dir_monitor_callback, Fgfile_rm_watch):
8775 Use assq_no_quit instead of Fassoc, for speed.
8776 (dir_monitor_callback, Fgfile_rm_watch):
8777 eassert that the monitor is a fixnum.
8778 (dir_monitor_callback): No need for CDR_SAFE.
8779 Simplify building of lisp with alternative tails.
8780 (Fgfile_add_watch, Fgfile_rm_watch):
8781 Do not assume glib functions set errno reliably on failure.
8782 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
8783 and signal an error otherwise.
8784 (Fgfile_rm_watch): Prefer CONSP to !NILP.
8785 Use Fdelq instead of Fdelete, for speed.
8786
817ebfcf
EZ
87872013-06-05 Eli Zaretskii <eliz@gnu.org>
8788
8789 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
8790 don't insist on being invoked on a highlighted tool-bar button.
8791 Avoids losing tool-bar functionality when mouse-highlight is nil.
8792 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
8793 Don't highlight when mouse-highlight is nil.
8794 (note_mouse_highlight): When mouse-highlight is nil, don't return
8795 right away; instead, run tool-bar and mode-line highlight
8796 subroutine, clear any existing highlight, and revert the mouse
8797 pointer to its default shape. (Bug#14558)
8798
55577e7c
SM
87992013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
8800
8801 * lisp.mk (lisp): Add prog-mode.el.
8802
f019a684
PE
88032013-06-05 Paul Eggert <eggert@cs.ucla.edu>
8804
8805 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
8806 * process.c (dummy_handler): New function.
8807 (lib_child_handler): New static var.
8808 (handle_child_signal): Invoke it.
8809 (catch_child_signal): If a library has set up a signal handler,
8810 save it into lib_child_handler.
8811 (init_process_emacs): If using glib and not on Windows, tickle glib's
8812 child-handling code so that it initializes its private SIGCHLD handler.
8813 * syssignal.h (SA_SIGINFO): Default to 0.
8814 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
8815 31; it should no longer be needed now.
8816
90db8702
MA
88172013-06-05 Michael Albinus <michael.albinus@gmx.de>
8818
8819 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
8820
8821 * gfilenotify.c (globals_of_gfilenotify): New function.
8822 (syms_of_gfilenotify): Move global initialization there.
8823
8824 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
8825
bfa3acd6
SM
88262013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
8827
8828 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
8829 * keyboard.c (menu_bar_items, tool_bar_items):
8830 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
8831 not override local keymaps any more.
8832
ba59bd80
EZ
88332013-06-04 Eli Zaretskii <eliz@gnu.org>
8834
8835 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
8836
7f203aa1
EZ
88372013-06-03 Eli Zaretskii <eliz@gnu.org>
8838
9337e206
EZ
8839 * w32console.c (initialize_w32_display): Return the dimensions of
8840 the console window via 2 additional arguments, not via the current
8841 frame. This avoids crashes due to overrunning the bounds of
8842 frame's decode_mode_spec_buffer, which is not resized following
8843 the change of the frame dimensions from the initial 10x10.
8844
8845 * w32term.h (w32_initialize_display_info): Adjust prototype.
8846
8847 * term.c (init_tty): Take dimensions of the frame from the values
8848 returned by initialize_w32_display.
8849
7f203aa1
EZ
8850 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
8851 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
8852 (LIBES): Add $(GFILENOTIFY_LIBS).
8853
8854 * w32inevt.c (handle_file_notifications): Add dummy implementation
8855 for !HAVE_W32NOTIFY.
8856
8857 * w32term.c: Wrap code with HAVE_W32NOTIFY.
8858
55a87246
JD
88592013-06-03 Jan Djärv <jan.h.d@swipnet.se>
8860
8861 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
8862
8863 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
8864
8865 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
8866
3d5ee10a
PE
88672013-06-03 Paul Eggert <eggert@cs.ucla.edu>
8868
8869 Fix minor problems found by static checking.
8870 * data.c (pure_write_error):
8871 Use xsignal2, not Fsignal, as Fsignal might return.
8872 * eval.c (set_backtrace_debug_on_exit): Now static.
8873 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
8874 No longer inline. EXTERN_INLINE is needed only for functions
8875 defined in .h files. Reindent function header as per GNU style.
8876 (backtrace_p, backtrace_top, backtrace_next):
8877 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
8878 compiler or linker. Add extern decls to pacify gcc -Wall.
8879 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
8880 Now static.
8881 * frame.c (free_monitors): Define only on platforms that need it.
8882 * nsterm.m (ns_term_init):
8883 * process.c (catch_child_signal):
8884 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
8885 defined on all porting targets these days.
8886 * process.c, process.h (catch_child_signal):
8887 Make it extern only if NS_IMPL_GNUSTEP is defined.
8888
e2d8a6f0
EZ
88892013-06-03 Eli Zaretskii <eliz@gnu.org>
8890
8891 * w32.c (gettimeofday): Make the signature identical to prototype
8892 in nt/inc/sys/time.h.
8893
a8a7c5f6
SM
88942013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
8895
8896 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
8897 .gdbinit.
8898
8899 * keyboard.c (safe_run_hooks_error): Improve error message.
8900
8901 * data.c (pure_write_error): Add `object' argument.
8902 * puresize.h (CHECK_IMPURE): Use it.
8903
c9628c79
MA
89042013-06-03 Michael Albinus <michael.albinus@gmx.de>
8905
8906 * Makefile.in (NOTIFY_OBJ): New variable.
8907 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
8908
8909 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
8910 Call syms_of_gfilenotify.
8911
8912 * gfilenotify.c: New file.
8913
8914 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
8915 and Qfile_w32notify.
8916 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
8917 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
8918
8919 * lisp.h: Declare syms_of_gfilenotify.
8920
8921 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
8922
2f592f95
SM
89232013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
8924
8925 Merge the specpdl and backtrace stacks. Make the structure of the
8926 specpdl entries more obvious via a tagged union of structs.
8927 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
8928 (enum specbind_tag): New enum.
8929 (struct specbinding): Make it a tagged union of structs.
8930 Add a case for backtrace records.
8931 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
8932 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
8933 (backtrace_debug_on_exit): New accessors.
8934 (struct backtrace): Remove.
8935 (struct catchtag): Remove backlist field.
8936 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8937 Move to eval.c.
8938 (Flocal_variable_p): Speed up the common case where the binding is
8939 already loaded.
8940 * eval.c (backtrace_list): Remove.
8941 (set_specpdl_symbol, set_specpdl_old_value): Remove.
8942 (set_backtrace_args, set_backtrace_nargs)
8943 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
8944 (backtrace_next): New functions.
8945 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
8946 (unwind_to_catch, internal_lisp_condition_case)
8947 (internal_condition_case, internal_condition_case_1)
8948 (internal_condition_case_2, internal_condition_case_n): Don't bother
8949 with backtrace_list any more.
8950 (Fsignal): Adjust to new backtrace format.
8951 (grow_specpdl): Move up.
8952 (record_in_backtrace): New function.
8953 (eval_sub, Ffuncall): Use it.
8954 (apply_lambda): Adjust to new backtrace format.
8955 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
8956 data.c.
8957 (specbind): Adjust to new specpdl format. Simplify.
8958 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
8959 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
8960 backtrace format.
8961 (mark_backtrace): Remove.
8962 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
8963 * xdisp.c (redisplay_internal): Use record_in_backtrace.
8964 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
8965 Use mark_specpdl.
8966 * profiler.c (record_backtrace): Use get_backtrace.
8967 (handle_profiler_signal): Use backtrace_top_function.
8968 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
8969 accessor functions.
8970
c0342369
JD
89712013-06-02 Jan Djärv <jan.h.d@swipnet.se>
8972
8973 * process.h (catch_child_signal): Declare.
8974
8975 * process.c (catch_child_signal): New function.
8976 (init_process_emacs): Call it.
8977
8978 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
8979 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
8980 NS_IMPL_COCOA.
8981 (x_set_cursor_type): Remove declaration.
8982 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
a6c4680a 8983 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
c0342369
JD
8984 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
8985 (ns_get_color): Use F suffix on float.
8986 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
8987 (ns_get_rgb_color): Remove.
8988 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
8989 (note_mouse_movement): x and y are CGFloat.
8990 (ns_draw_fringe_bitmap): Remove unused rowY.
8991 Change #if to COCOA && >= 10_6.
8992 (ns_draw_window_cursor): Remove unused overspill.
8993 (ns_draw_underwave): width and x are EamcsCGFloat.
8994 (ns_draw_box): thickness is CGFloat.
8995 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
8996 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
8997 if not in main thread.
8998 (ns_get_pending_menu_title, ns_check_menu_open)
8999 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
9000 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
9001 (sendFromMainThread:): New method.
9002 (changeFont:): size is CGFloat.
9003 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
9004 Disable warning about permanent text.
a6c4680a 9005 (characterIndexForPoint:): Adjust return type depending on GNUstep
c0342369
JD
9006 version.
9007 (mouseDown:): delta is CGFloat.
9008 (updateFrameSize): Remove unised variable f.
9009 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
9010 Cast float to EmacsCGFloat.
9011 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
9012 also to -1 when restoring.
9013 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
9014 inside NS_IMPL_COCOA.
9015 (toggleFullScreen:): Put call to toggleFullScreen inside
9016 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
9017 (setPosition:portion:whole:): por is CGFloat.
9018 (getMouseMotionPart:window:x:y:): Add F suffix to float.
9019 (mouseDown:): Use CGFloat.
9020 (mouseDragged:): Remove unised variable edge.
9021 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
9022
a6c4680a 9023 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
c0342369
JD
9024 of CGFloat differs.
9025 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
9026 when NS_IMPL_GNUSTEP.
9027 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
9028 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
9029 (EmacsToolbar): Add clearAll. Add tag argument to
9030 addDisplayItemWithImage.
9031 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
9032
9033 * nsselect.m (ns_get_local_selection): Remove unused variable type.
9034
9035 * nsmenu.m (ns_update_menubar): Make static.
9036 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
9037 (fillWithWidgetValue:): Add cast to SEL for setAction.
9038 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
a6c4680a 9039 (update_frame_tool_bar): Update code for GNUstep.
c0342369
JD
9040 (clearAll): New method.
9041 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
4f405069 9042 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
e7b41c4c 9043 Move identifierToItem setObject and activeIdentifiers addObject before
c0342369
JD
9044 call to insertItemWithItemIdentifier.
9045 (validateVisibleItems): Fix indentation.
9046 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
9047 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
9048 UtilityWindow to aStyle, remove call to setStyleMask.
9049
9050 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
9051
9052 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
9053 (ns_charset_covers, ns_get_covering_families, nsfont_open):
9054 Use F suffix on floats.
9055 (ns_char_width): Returns CGFloat.
9056 (ns_ascii_average_width): w is CGFloat instead of float.
e7b41c4c 9057 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
c0342369
JD
9058 DPSxshow.
9059 (ns_glyph_metrics): CGFloat instead of float.
9060
a0eb10b3
JB
9061 * nsfns.m (x_set_foreground_color, x_set_background_color):
9062 Use EmacsCGFloat.
9063 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
9064 remove unused variables.
9065 (Fns_read_file_name): Keep track if panel is for save.
9066 Use ns_filename_from_panel/ns_directory_from_panel.
c0342369 9067 (Fns_list_services): delegate only used for COCOA.
a6c4680a
GM
9068 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
9069 Just return the input if GNUstep.
c0342369
JD
9070 (x_screen_planes): Remove.
9071 (Fxw_color_values): Use EmacsCGFloat
9072 (Fns_display_monitor_attributes_list): Only get screen number for
9073 Cocoa.
ef099a94 9074 (getDirectory, getFilename): Remove from EmacsOpenPanel and
c0342369
JD
9075 EmacsSavePanel.
9076 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
9077 ns_directory_from_panel.
9078
da9aff11
PE
90792013-06-01 Paul Eggert <eggert@cs.ucla.edu>
9080
9081 * process.c (handle_child_signal): Also use WCONTINUED.
9082 This is so that list-processes doesn't mistakenly list the process
9083 as stopped, when the process has actually been continued and is
9084 now running.
9085
0e64479a
PE
90862013-05-31 Paul Eggert <eggert@cs.ucla.edu>
9087
fc186a96
PE
9088 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
9089 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
9090 not already configured.
9091
0e64479a
PE
9092 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
9093
38b787fa
EZ
90942013-05-29 Eli Zaretskii <eliz@gnu.org>
9095
9096 * Makefile.in (mostlyclean): Remove *.res files.
9097
22513e52
SM
90982013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
9099
9100 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
9101 a buffer (bug#8447).
9102
6ef3db10
EZ
91032013-05-27 Eli Zaretskii <eliz@gnu.org>
9104
9105 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
9106 display vector, and we backtrack, handle the case that the
9107 previous character position is also displayed from a display
9108 vector or covered by a display string or image. (Bug#14476)
9109
6799bb26
JD
91102013-05-25 Jan Djärv <jan.h.d@swipnet.se>
9111
9112 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
9113 (struct MonitorInfo, free_monitors): Remove.
9114 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
9115 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
9116 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
9117 Qframes, Qsource.
9118
9119 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
9120 (struct MonitorInfo, free_monitors): Remove.
9121 (ns_screen_name): Make static.
9122 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
9123 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
9124 Qframes, Qsource.
9125
9126 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
9127 (struct MonitorInfo): New struct.
9128 (free_monitors, make_monitor_attribute_list): Declare.
9129
22513e52
SM
9130 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
9131 New Lisp_Object:s.
6799bb26
JD
9132 (free_monitors, make_monitor_attribute_list): New functions.
9133 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
9134 Qsource.
9135
38cd43eb
XF
91362013-05-25 Xue Fuqiao <xfq.free@gmail.com>
9137
9138 * callproc.c (call_process): Refine the doc string. (Bug#14045)
9139
2af0948d
SM
91402013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
9141
a7eb9b0f
SM
9142 * keyboard.c: Apply keyboard decoding only to events that come directly
9143 from the tty, not from unread-command-events (bug#14368).
0f1d2934 9144 (read_event_from_main_queue): New function, extracted from read_char.
a7eb9b0f
SM
9145 (read_decoded_char): Remove.
9146 (read_decoded_event_from_main_queue): New function to replace it.
9147 (read_char): Use it.
9148 (read_key_sequence): Use read_char rather than read_decoded_char.
9149
2af0948d
SM
9150 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
9151
9698f11c 91522013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
1413e9a5
BR
9153
9154 * casetab.c (init_casetab_once): Fix last change (bug#14424).
9155
e6d2f155
KH
91562013-05-22 Kenichi Handa <handa@gnu.org>
9157
9158 The following changes are to fix the setting of
9159 buffer-file-coding-system on, for instance, C-x RET c unix RET
9160 _FILE_OF_DOS_EOL_TYPE_ RET.
9161
9162 * coding.h (struct coding_system): New member detected_utf8_chars.
9163
9164 * coding.c (detect_coding_utf_8): Count characters and check EOL
9165 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
9166 BOM is there.
9167 (setup_coding_system): Do not initialize coding->head_ascii.
9168 (check_ascii): Do not set coding->eol_seen but update it. Do not
9169 call adjust_coding_eol_type here.
1413e9a5
BR
9170 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
9171 If the eol-type of CODING is already specified, adjust the eol type
e6d2f155
KH
9172 of the found coding-system.
9173 (decode_coding_gap): Cancel previous change. Utilize the
9174 character numbers counted by detect_coding_utf_8. Fix detection
9175 of BOM for utf-8.
9176
9698f11c 91772013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
fc30d803
SM
9178
9179 * search.c (looking_at_1): Only set last_thing_searched if the match
9180 changed the match-data (bug#14281).
9181
ecc3c6ed
DA
91822013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
9183
9184 * xdisp.c (reseat_at_previous_visible_line_start):
a0eb10b3 9185 Already declared in dispextern.h, so remove it here.
ecc3c6ed
DA
9186 (move_it_vertically_backward): Likewise.
9187
5ba8bf35
YM
91882013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9189
9190 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
d6635ba2 9191 (Fx_display_pixel_width, Fx_display_pixel_height)
fc30d803
SM
9192 (Fx_display_mm_width, Fx_display_mm_height):
9193 Mention `display-monitor-attributes-list' in docstrings.
5ba8bf35 9194
91e8418b 9195 * nsfns.m (ns_get_screen): Remove function. All uses removed.
a0eb10b3 9196 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
91e8418b
YM
9197 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
9198 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
9199 (Fx_display_backing_store, Fx_display_visual_class)
9200 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
9201 (Fx_display_grayscale_p, Fx_display_pixel_width)
9202 (Fx_display_pixel_height, Fx_display_planes)
9203 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
9204 (Fx_display_screens): Don't confuse X11 screens with NS screens.
9205 (Fx_display_mm_width, Fx_display_mm_height)
9206 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
9207 height for all physical monitors as in X11.
9208
fc30d803
SM
9209 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
9210 Return pixel width or height for all physical monitors as in X11.
91e8418b 9211
31ff141c
PE
92122013-05-18 Paul Eggert <eggert@cs.ucla.edu>
9213
9214 Port --enable-gcc-warnings to clang.
9215 * bytecode.c (exec_byte_code):
9216 * regex.c:
9217 Redo diagnostic pragmas to pacify clang, too.
9218 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
9219 * editfns.c (Fencode_time):
9220 * fileio.c (file_accessible_directory_p):
9221 * font.c (font_unparse_xlfd):
9222 Use '&"string"[index]' instead of '"string" + (index)'.
9223 * undo.c (user_error): Remove; unused.
9224
df065a0b
EZ
92252013-05-16 Eli Zaretskii <eliz@gnu.org>
9226
04d360e7
EZ
9227 * insdel.c (insert_1_both): Document the arguments, instead of
9228 referring to insert_1, which no longer exists.
9229
5bb98290
EZ
9230 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
9231 some window, increment windows_or_buffers_changed, so that
9232 *Messages* display in that window is updated. (Bug#14408)
9233
df065a0b
EZ
9234 * w32.c: Include epaths.h.
9235 (init_environment): Use cmdproxy.exe without leading directories.
9236 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
9237 case.
9238 (gettimeofday): Adjust signature and return value to Posix
9239 expectations.
9240
9241 * unexw32.c (open_output_file): Delete the existing emacs.exe
9242 before creating it, to break the hard link to the versioned
9243 executable.
9244
9245 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
9246 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
9247 (FIRSTFILE_OBJ): New variables.
9248 (W32_RES): Rename to EMACSRES. All users changed.
9249 (base_obj): Use $(CM_OBJ).
9250 (ALLOBJS): Use $(FIRSTFILE_OBJ).
9251 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
9252 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
9253 $(W32_RES_LINK) before $(LIBES).
9254 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
9255
1aa8d505
SM
92562013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9257
6e911150
SM
9258 * makefile.w32-in (DOC): Use just "DOC".
9259
9260 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
9261
1aa8d505
SM
9262 * process.c: Export default filters and sentinels to Elisp.
9263 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
9264 New constants.
9265 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
9266 (Fset_process_sentinel, Fformat_network_address):
9267 Default to them instead of nil.
9268 (server_accept_connection): Sentinels can't be nil any more.
9269 (read_and_dispose_of_process_output): New function, extracted from
9270 read_process_output.
9271 (read_process_output): Use it; filters can't be nil.
9272 (Finternal_default_process_filter): New function, extracted from
9273 read_process_output.
9274 (exec_sentinel_unwind): Remove function.
9275 (exec_sentinel): Don't zilch sentinel while running.
9276 (status_notify): Sentinels can't be nil.
9277 (Finternal_default_process_sentinel): New function extracted from
9278 status_notify.
9279 (setup_process_coding_systems): Default filter is not nil any more.
9280 (syms_of_process): Export new Elisp functions and initialize
9281 new constants.
9282 * lisp.h (make_lisp_proc): New function.
9283
5ac2eb34
SM
92842013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9285
9286 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
9287
eda9c7d7
EZ
92882013-05-14 Eli Zaretskii <eliz@gnu.org>
9289
9290 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
5ac2eb34
SM
9291 unless we know that the window w is a leaf window.
9292 Another attempt at solving bug#14062.
eda9c7d7 9293
8fdeaad5
JD
92942013-05-14 Jan Djärv <jan.h.d@swipnet.se>
9295
9296 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
9297 fdesc (Bug#14375).
9298
44aa9ee6
PE
92992013-05-12 Paul Eggert <eggert@cs.ucla.edu>
9300
9301 * image.c (gif_load): Check that subimages fit (Bug#14345).
9302
759fd763
SM
93032013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
9304
9305 * lread.c (skip_dyn_eof): New function.
9306 (read1): Use it to skip the end of a file in response to #@00.
9307
9308 * doc.c (get_doc_string): Slightly relax the sanity checking.
9309
4465bfb4
JD
93102013-05-09 Jan Djärv <jan.h.d@swipnet.se>
9311
9312 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
9313 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
9314 (MonitorInfo): New struct.
9315 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
9316 (Fns_display_monitor_attributes_list): New functions.
9317 (display-usable-bounds): Remove.
9318 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
9319 Qsource.
9320
7583e2a0
PE
93212013-05-09 Paul Eggert <eggert@cs.ucla.edu>
9322
9323 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
9324 (GTK_CHECK_VERSION): New macro, if not already defined.
9325 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
9326 replaced by GTK_CHECK_VERSION.
9327
ad75d77e
PE
93282013-05-08 Paul Eggert <eggert@cs.ucla.edu>
9329
9330 * xterm.h (GTK_PREREQ): New macro.
9331 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
9332 to use this macro instead, for consistency and clarity.
9333
07525f77
EZ
93342013-05-08 Eli Zaretskii <eliz@gnu.org>
9335
9336 * xdisp.c (row_for_charpos_p): New function, with code of
9337 cursor_row_p, but accepts an additional argument CHARPOS instead
9338 of using a hardcoded PT.
9339 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
9340 (row_containing_pos): Call row_for_charpos_p instead of partially
9341 doing the same. Fixes cursor positioning under longlines-mode
9342 when longlines-show-effect includes more than one newline, when
9343 moving the cursor vertically up.
9344
d901fc8d
JB
93452013-05-08 Juanma Barranquero <lekktu@gmail.com>
9346
9347 * makefile.w32-in (ACL_H): New macro.
9348 ($(BLD)/fileio.$(O)): Update dependencies.
9349
f269bc61
PE
93502013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9351
e7b41c4c 9352 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
ffdc270a
PE
9353 * Makefile.in (LIB_ACL): New macro.
9354 (LIBACL_LIBS): Remove.
9355 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
9356 * fileio.c: Include <acl.h>.
9357 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
9358 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
9359 !acl_errno_valid.
9360 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
9361 it ourselves.
9362
f269bc61
PE
9363 * unexelf.c: Don't assume ElfW (Half) fits in int.
9364 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
9365 when dealing with ElfW (Half) values, since they can exceed 2**31
9366 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
9367 (entry_address): Omit unused NUM arg. All uses changed.
9368
a261c53e
JL
93692013-05-07 Juri Linkov <juri@jurta.org>
9370
9371 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
9372 to the string converted from number with `Fnumber_to_string'.
9373 (Bug#14254)
9374
2b66427d
PE
93752013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9376
9377 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
9378 This fixes a problem introduced by my previous change.
9379
15acfe41
GM
93802013-05-07 Glenn Morris <rgm@gnu.org>
9381
9382 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
9383
5ea03bf5
JD
93842013-05-07 Jan Djärv <jan.h.d@swipnet.se>
9385
9386 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
9387
e0c9d565
PE
93882013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9389
9390 Static checking by GCC 4.8.0.
9391 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
9392 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
9393 (x_get_monitor_attributes_fallback)
9394 (x_get_monitor_attributes_xinerama)
9395 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
9396 Define only if USE_GTK.
9397 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
9398 (x_get_monitor_attributes_fallback): Omit unused locals.
9399 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
9400 Use double, not float, to avoid mixed-mode floating point arithmetic.
9401
4e3f9230
YM
94022013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9403 Jan Djärv <jan.h.d@swipnet.se>
9404
9405 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
9406 (XINERAMA_CFLAGS): New macros.
9407 (ALL_CFLAGS, LIBES): Use them.
9408
9409 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
9410 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
9411 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
9412 (syms_of_xfns): DEFSYM them.
9413 (struct MonitorInfo): New struct.
9414 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
9415 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
9416 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
9417 (x_get_monitor_attributes_xinerama): New functions.
9418 (Fx_display_monitor_attributes_list): New primitive.
9419 (syms_of_xfns): Defsubr it.
9420
9421 * xterm.h (x_display_info): Add Xatom_net_workarea and
9422 Xatom_net_current_desktop.
9423
9424 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
9425 and dpyinfo->Xatom_net_current_desktop.
9426
05839b6a
EZ
94272013-05-06 Eli Zaretskii <eliz@gnu.org>
9428
9429 * xdisp.c (pos_visible_p): Use the special code for finding the
9430 beginning of a display property or overlay for any "replacing"
9431 display property, not just for display strings. This solves
9432 incorrect reporting of position by posn-at-point. (Bug#14241)
9433
dc4a2ee0
PE
94342013-05-06 Paul Eggert <eggert@cs.ucla.edu>
9435
5ee94506
PE
9436 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
9437 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
9438 Verify that ElfW (Half) fits in int.
9439 (fatal): Use same signature as lisp.h.
9440 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
9441 configure and build with -DUNEXELF_DEBUG without worrying about
9442 other modules that use DEBUG.
9443 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
9444 possibly-wide integers now uses it instead of plain fprintf.
9445 (entry_address): New function, which avoids problems with 32-bit
9446 overflow on 64-bit hosts.
9447 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
9448 (round_up): Don't assume the remainder fits in int.
9449 (find_section): Use bool for boolean. Simplify debug code.
9450 (unexec): Don't assume file sizes fit in int or size_t.
9451 Omit unnecessary trailing newline in 'fatal' format.
9452 Use strerror rather than outputting decimal error number.
9453 Remove unused code when emacs is not defined;
9454 this file relies on Emacs now.
9455 Don't assume e_phnum and e_shnum are positive.
9456
dc4a2ee0
PE
9457 * regex.c: Fix problems when DEBUG is defined.
9458 (extract_number, extract_number_and_incr): Define regardless of
9459 whether DEBUG is defined; that's simpler and makes the code less
9460 likely to go stale in the normal case when DEBUG is not defined.
9461 Return int rather than taking an int * arg. All callers changed.
9462 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
9463 Remove, replacing with ...
9464 (DEBUG_PRINT): New macro. All callers changed.
9465 (DEBUG_COMPILES_ARGUMENTS): New macro.
9466 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
9467 (print_compiled_pattern, print_double_string) [DEBUG]:
9468 Use prototype rather than old-style definition.
9469 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
9470 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
9471 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
9472 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
9473 Don't assume ptrdiff_t, size_t, and long are the same width as int.
9474 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
9475 This matters only when DEBUG is defined.
9476
14c7ed05
EZ
94772013-05-05 Eli Zaretskii <eliz@gnu.org>
9478
9479 * xdisp.c (set_iterator_to_next): Set the
9480 ignore_overlay_strings_at_pos_p flag only if we are _really_
9481 iterating over an overlay string, as indicated by the
9482 current.overlay_string_index member. (Bug#14306)
9483
e6076b1b
JD
94842013-05-05 Jan Djärv <jan.h.d@swipnet.se>
9485
9486 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
9487 to where it is used, to avoid autorelease issues (Bug#14050).
9488
cbee2131
PE
94892013-05-05 Paul Eggert <eggert@cs.ucla.edu>
9490
9491 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
9492 * fileio.c (syms_of_fileio): Implement this.
9493 * filelock.c (create_lock_file): If symbolic links don't work, so
9494 we use a regular file as a lock file, do not fsync the lock file;
9495 it's not needed.
9496
30c7e542
SM
94972013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9498
9499 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
9500 (syms_of_minibuf): Adjust accodingly.
9501 * lread.c (Fread):
9502 * callint.c (Fcall_interactively): Adjust calls accordingly.
9503
5bebd186
EZ
95042013-05-04 Eli Zaretskii <eliz@gnu.org>
9505
9506 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
30c7e542
SM
9507 w->contents is a buffer before computing everything else.
9508 Use parentheses to disambiguate last part of the condition.
5bebd186
EZ
9509
9510 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
9511 assertion violations. (Bug#14062)
9512
0fb0a4f3
DR
95132013-05-01 David Reitter <david.reitter@gmail.com>
9514
9515 * nsfns.m (ns_tooltip): Initialize.
9516
9e63b4a5
EZ
95172013-04-28 Eli Zaretskii <eliz@gnu.org>
9518
9519 * coding.c (decode_coding_gap): Don't remove the character before
9520 a newline unless it's a CR character. (Bug#14287)
9521
ad60824e
DN
95222013-04-28 Dan Nicolaescu <dann@gnu.org>
9523
9524 * dispextern.h (struct face): Move enum face_underline_type
9525 earlier so that bitfields can be in the same word.
9526
edbdcec0
JD
95272013-04-28 Jan Djärv <jan.h.d@swipnet.se>
9528
9529 * nsfns.m (handlePanelKeys): New function.
9530 (EmacsOpenPanel:performKeyEquivalent:)
9531 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
9532 arrows/function/control and copy/paste keys (Bug#14296).
9533
0208ede7
JL
95342013-04-27 Juri Linkov <juri@jurta.org>
9535
9536 * callint.c (Fcall_interactively): Call `Qread_number' for
9537 interactive code letter `n' instead of using duplicate code.
9538 (Bug#14254)
9539
b8dd59f7
PE
95402013-04-27 Paul Eggert <eggert@cs.ucla.edu>
9541
9542 * systime.h (make_timeval): Declare as 'const'.
9543
8bd722db
KH
95442013-04-27 Kenichi Handa <handa@gnu.org>
9545
9546 * font.c (font_open_entity): Always open a font of manageable
9547 size.
9548
13d0e56f 95492013-04-26 Paul Eggert <eggert@cs.ucla.edu>
cbee2131 9550
f780d632
PE
9551 Port better to AIX (Bug#14258).
9552 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
9553 to pacify AIX xlc.
9554
ec509856
KH
95552013-04-24 Kenichi Handa <handa@gnu.org>
9556
9557 * coding.c (decode_coding_iso_2022): When an invalid escape
9558 sequence is encountered, reset the invocation and designation
9559 status to the safest one.
9560
84fc48e5
PE
95612013-04-22 Paul Eggert <eggert@cs.ucla.edu>
9562
9563 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
9564 Without this fix, "make distclean" leaves stamp-h1 behind.
9565
806bda47
EC
95662013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
9567
9568 * w32fns.c (w32_fullscreen_rect): New function to compute the
9569 window rectangle for the given fullscreen mode.
9570 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
9571 longer tunes the window size. This keeps the window's edges flush
9572 with the screen and allows the taskbar to hide itself in fullboth.
9573
9574 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
9575 window decorations and uses the entire screen.
9576
9577 * w32term.h (w32_fullscreen_rect) Add prototype.
9578 (struct w32_output): Replace normal_width, normal_height,
9579 normal_top, and normal_left members with a single normal_placement
9580 struct.
9581 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
9582 Remove macros.
9583 (FRAME_NORMAL_PLACEMENT): New macro.
9584
9cc2810b
JB
95852013-04-16 Juanma Barranquero <lekktu@gmail.com>
9586
9587 * minibuf.c (Ftest_completion): Silence compiler warning.
9588
fd16b54c
EZ
95892013-04-15 Eli Zaretskii <eliz@gnu.org>
9590
9591 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
5fbcd237 9592 bug#14062.
fd16b54c
EZ
9593
9594 * frame.h (WINDOW_FRAME): Protect macro and its argument with
9595 parentheses.
9596
9597 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
9598 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
9599 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
9600 parentheses where appropriate.
9601
9e3379a0
PE
96022013-04-14 Paul Eggert <eggert@cs.ucla.edu>
9603
9604 * keyboard.c (timer_start_idle): Remove no-longer-used local.
9605
ddd6b685
EZ
96062013-04-14 Eli Zaretskii <eliz@gnu.org>
9607
a544fbe1 9608 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
ddd6b685
EZ
9609 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
9610 Mention in the doc string that setting these variables takes
9611 effect only after a call to set-window-buffer. (Bug#14200)
9612
29b79ba1
EZ
96132013-04-13 Eli Zaretskii <eliz@gnu.org>
9614
9615 * indent.c (Fvertical_motion): Don't consider display strings on
9616 overlay strings as display strings on the buffer position we
9617 started from. This prevents vertical cursor motion from jumping
9618 more than one line when there's an overlay string with a display
9619 property at end of line.
9620 Reported by Karl Chen <Karl.Chen@quarl.org> in
9621 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
9622
562c6ee9
SM
96232013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
9624
9625 * window.c (select_window): `record_buffer' even if window is
9626 already selected (bug#14191).
9627
fcc1fe85
EZ
96282013-04-11 Eli Zaretskii <eliz@gnu.org>
9629
9630 * window.c (Fwindow_end): Test more flags, including the buffer's
9631 last_overlay_modified flag, to determine whether the window's
9632 display is really up-to-date. Prevents the function from
9633 returning a stale value. (Bug#14170)
9634 (Fwindow_line_height): Fix the test for up-to-date-ness of the
9635 current matrix.
9636
f009190a
EZ
96372013-04-10 Eli Zaretskii <eliz@gnu.org>
9638
9639 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
562c6ee9
SM
9640 garbaged only if it is not already the top frame on its TTY.
9641 This prevents flickering due to constant redrawing of TTY frames when
f009190a
EZ
9642 there are GUI frames open in the same session. (Bug#13864)
9643
78ce603d
SM
96442013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
9645
9646 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
9647 of marking the idle timers directly.
9648
a8036e40
SM
96492013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
9650
9651 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
9652 tables (bug#14054).
9653
7ffe7ef6
SM
96542013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
9655
9656 * window.c (select_window): Don't record_buffer while the invariant is
9657 temporarily broken (bug#14161).
9658
9659 * fns.c (Fdelq): Don't assume !NILP => CONSP.
9660
7d9f6883
EZ
96612013-04-07 Eli Zaretskii <eliz@gnu.org>
9662
9663 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
9664
5406cfd9
RF
96652013-04-07 Romain Francoise <romain@orebokech.com>
9666
9667 Ignore additional platform-specific ACL errors (Bug#13702).
9668 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
9669 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
9670
95c0e83b
JD
96712013-03-31 Jan Djärv <jan.h.d@swipnet.se>
9672
9673 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
9674 f->output_data.ns.
9675
876da980
PE
96762013-04-07 Paul Eggert <eggert@cs.ucla.edu>
9677
9678 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
9679 This bug was introduced by my 2013-02-25 change that simplified
9680 data_start configuration. Without this change, on GNU/Linux
9681 an Emacs configured with --enable-profiling fails immediately
9682 due to a profiler signal.
9683 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
9684 with these flags. On platforms where special flags are needed
9685 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
9686 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
9687 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
9688
7452b7bd
DA
96892013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
9690
9691 Get rid of some platform-specific functions examining window
9692 system and its capabilities. This is a partial rework of the
9693 2013-04-05 change.
9694 * lisp.h (have_menus_p): Remove prototype. This function is
9695 replaced with platform-independent window_system_available.
9696 (check_window_system): Move to...
9697 * frame.h (decode_window_system_frame, window_system_available):
9698 ...here, add new prototypes.
9699 * frame.c (window_system_available, decode_window_system_frame):
9700 New functions.
9701 (check_window_system): Platform-independent now.
9702 * xterm.h (x_in_use): Remove declaration.
9703 (check_x_frame):
9704 * w32term.h (check_x_frame):
9705 * nsterm.h (check_x_frame): Remove prototypes. This function
9706 is replaced with platform-independent decode_window_system_frame.
9707 * msdos.c (have_menus_p): Remove.
9708 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
9709 Remove platform-specific functions. Use check_window_system,
9710 decode_window_system_frame and check_ns_display_info where
9711 appropriate. Minor style and comment tweaks.
9712 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
9713 (check_x_frame): Likewise.
9714 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
9715 Likewise.
9716 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
9717 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
9718 * xmenu.c, xselect.c: All related users changed.
9719
251e9147
KH
97202013-04-03 Kenichi Handa <handa@gnu.org>
9721
9722 The following changes is to optimize the code for reading UTF-8
9723 files.
9724
562c6ee9 9725 * coding.c (check_ascii): Rename from detect_ascii. Return value
251e9147
KH
9726 changed. Check EOL format. Do not call adjust_coding_eol_type
9727 here.
9728 (check_utf_8): New function.
9729 (adjust_coding_eol_type): Do nothing if already adjusted.
9730 (detect_coding): Compare the return value of check_ascii with
9731 coding->src_bytes. Call adjust_coding_eol_type if necessary.
9732 (decode_coding_gap): Optimize for valid UTF-8.
9733
8bc369d4
KH
97342013-03-21 Kenichi Handa <handa@gnu.org>
9735
9736 * coding.c (syms_of_coding): Cancel previous change.
9737
9738 * insdel.c (insert_from_gap): Fix previous change.
9739
73931ad1
DA
97402013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
9741
9742 Consistently use platform-specific function to detect window system.
9743 * lisp.h (check_window_system): New prototype. This function is
9744 going to replace check_x, check_w32 and check_ns.
9745 (have_menus_p): Mention msdos.c in comment.
9746 * fontset.c (check_window_system_func): Remove. Adjust all users.
9747 * fontset.h (check_window_system_func): Remove prototype.
9748 * nsterm.h (check_ns):
9749 * xterm.h (check_x):
9750 * w32term.h (check_w32): Likewise.
9751 * menu.c (Fx_popup_menu): Use check_window_system.
9752 * msdos.c (check_window_system): Define for MS-DOS.
9753 * nsfns.m (check_window_system): Define for NS. Adjust all users.
9754 * w32fns.c (check_window_system): Likewise for MS-Windows.
9755 * xfns.c (check_window_system): Likewise for X.
9756 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
9757 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
9758
7216e43b
PE
97592013-04-02 Paul Eggert <eggert@cs.ucla.edu>
9760
9761 Prefer < to > in range checks such as 0 <= i && i < N.
9762 This makes it easier to visualize quantities on a number line.
9763 This patch doesn't apply to all such range checks,
9764 only to the range checks affected by the 2013-03-24 change.
9765 This patch reverts most of the 2013-03-24 change.
9766 * alloc.c (xpalloc, Fgarbage_collect):
9767 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
9768 * character.c (string_escape_byte8):
9769 * charset.c (read_hex):
9770 * data.c (cons_to_unsigned):
9771 * dispnew.c (update_frame_1):
9772 * doc.c (Fsubstitute_command_keys):
9773 * doprnt.c (doprnt):
9774 * editfns.c (hi_time, decode_time_components):
9775 * fileio.c (file_offset):
9776 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
9777 * font.c (font_intern_prop):
9778 * frame.c (x_set_alpha):
9779 * gtkutil.c (get_utf8_string):
9780 * indent.c (check_display_width):
9781 * keymap.c (Fkey_description):
9782 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
9783 * lread.c (read1):
9784 * minibuf.c (read_minibuf_noninteractive):
9785 * process.c (wait_reading_process_output):
9786 * search.c (Freplace_match):
9787 * window.c (get_phys_cursor_glyph):
9788 * xdisp.c (redisplay_internal):
9789 * xsmfns.c (smc_save_yourself_CB):
9790 Prefer < to > for range checks.
9791 * dispnew.c (sit_for): Don't mishandle NaNs.
9792 This fixes a bug introduced in the 2013-03-24 change.
9793 * editfns.c (decode_time_components): Don't hoist comparison.
9794 This fixes another bug introduced in the 2013-03-24 change.
9795
92759988
DA
97962013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
9797
9798 * frame.h (struct frame): Drop scroll_bottom_vpos
9799 member becaue all real users are dead long ago.
9800 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
9801 * xdisp.c (redisplay_internal): Adjust user.
9802
812a0930 98032013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
9a1971bb 9804
f38ab167
JD
9805 * nsmenu.m (showAtX:Y:for:): setLevel to
9806 NSPopUpMenuWindowLevel (Bug#13998).
9807
6d01f1fe
JD
98082013-03-30 Jan Djärv <jan.h.d@swipnet.se>
9809
9810 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
9811 (ns_check_pending_open_menu): Declare.
9812
9813 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
9814 (x_activate_menubar): Update the menu with title that matches
9815 ns_get_pending_menu_title, and call
9816 ns_check_pending_openmenu (Bug#12698).
9817 (menuWillOpen:): New method.
9818 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
9819
9820 * nsterm.m (menu_will_open_state, menu_mouse_point)
9821 (menu_pending_title): New varaibles.
9822 (ns_get_pending_menu_title, ns_check_menu_open)
9823 (ns_check_pending_open_menu): New functions.
9824
781f4782
DA
98252013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
9826
9827 * indent.c (current_column_bol_cache): Remove leftover which is not
9828 used in Fmove_to_column any more.
9829 (current_column, scan_for_column): Adjust users.
9830 * keyboard.c (last_point_position_buffer, last_point_position_window):
9831 Remove leftovers which are not used for recording undo any more.
9832 (command_loop_1, syms_of_keyboard): Adjust users.
9833 * xdisp.c (last_max_ascent): Remove leftover which is not used in
9834 redisplay_window any more.
9835 (move_it_to): Adjust user.
9836
1921c31b
JB
98372013-03-29 Juanma Barranquero <lekktu@gmail.com>
9838
9839 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
9840 Update dependencies.
9841
717b8bcd
SM
98422013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9843
9844 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
9845 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
9846 forward references.
9847
e74aeda8
DA
98482013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
9849
9850 * window.h (struct window): Replace hchild, vchild and buffer slots
fa9daa28 9851 with a single slot 'contents'. This is possible because each valid
e74aeda8
DA
9852 window may have either the child window (in vertical or horizontal
9853 combination) or buffer to display (for the leaf window). Using that,
fa9daa28 9854 a lot of operations to traverse and/or change window hierarchies may
e74aeda8
DA
9855 be simplified. New member horizontal is used to distinguish between
9856 horizontal and vertical combinations of internal windows.
9857 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
9858 (WINDOW_VERTICAL_COMBINATION_P): New macros.
9859 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
9860 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
9861 Use contents slot, not buffer, where appropriate.
9862 (wset_combination): New function.
9863 (wset_buffer): Add eassert.
9864 (Fframe_first_window): Simplify the loop reaching first window.
9865 (Fwindow_buffer): Use WINDOW_LEAF_P.
9866 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
9867 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
9868 (unshow_buffer): Convert initial debugging check to eassert.
9869 (replace_window, recombine_windows, Fdelete_other_windows_internal)
9870 (make_parent_window, window_resize_check, window_resize_apply)
9871 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
9872 (Fset_window_configuration, delete_all_child_windows, save_window_save):
9873 Adjust to match struct window changes.
9874 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
9875 (mark_window_cursors_off, count_windows, get_leaf_windows)
9876 (foreach_window_1): Simplify the loop.
9877 * alloc.c (mark_object): Do not check for the leaf window because
9878 internal windows has no glyph matrices anyway.
9879 * dispnew.c (clear_window_matrices, showing_window_margins_p)
9880 (allocate_matrices_for_window_redisplay, fake_current_matrices)
9881 (allocate_matrices_for_frame_redisplay, free_window_matrices)
9882 (build_frame_matrix_from_window_tree, mirror_make_current)
9883 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
9884 (update_window_tree, set_window_update_flags): Simplify the loop.
9885 (sync_window_with_frame_matrix_rows): Enforce live window.
9886 Use contents slot, not buffer, where appropriate.
9887 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
9888 and WINDOW_HORIZONTAL_COMBINATION_P.
9889 (make_frame_visible_1): Simplify the loop.
9890 Use contents slot, not buffer, where appropriate.
9891 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
9892 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
9893 (expose_window_tree): Likewise.
9894 Use contents slot, not buffer, where appropriate.
9895 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
9896 to avoid deleted windows. Use contents slot instead of buffer.
9897 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
9898 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
9899 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
9900 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
9901
121ab1cd
EZ
99022013-03-28 Eli Zaretskii <eliz@gnu.org>
9903
ef454cf7
EZ
9904 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
9905 identify the reasons for assertion violations in bug#14062 and
9906 similar ones.
21e930f8
EZ
9907 (Fx_show_tip): Fix compilation error under
9908 "--enable-check-lisp-object-type". (Bug#14073)
ef454cf7 9909
121ab1cd
EZ
9910 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
9911 Reported by <rzl24ozi@gmail.com>.
9912
5c89ca24
DA
99132013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
9914
9915 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
9916 start marker...
562c6ee9
SM
9917 (unwind_with_echo_area_buffer): ...to restore it here.
9918 This is needed to ensure that...
5c89ca24
DA
9919 (redisplay_window): ...both window markers are valid here,
9920 which is verified by eassert.
9921 * editfns.c (save_excursion_save): Do not assume that
9922 selected_window always displays the buffer.
c7f53895
DA
9923 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
9924 Fix comment.
5c89ca24 9925
f557c1b1
SM
99262013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
9927
9928 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
9929 the upcase table.
9930
40693bba 99312013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
9932
9933 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
9934
c86f791f
EZ
99352013-03-27 Eli Zaretskii <eliz@gnu.org>
9936
9937 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
9938 since MinGW's w32api headers do. This avoids compiler warnings.
9939
9940 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
9941 if already defined.
9942
c6e72e17
EZ
99432013-03-26 Eli Zaretskii <eliz@gnu.org>
9944
9945 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
9946
54e95010
JD
99472013-03-26 Jan Djärv <jan.h.d@swipnet.se>
9948
9949 * gtkutil.c (style_changed_cb): Check if frame is live and an
9950 X frame (Bug#14038).
9951
b88b62de
EZ
99522013-03-26 Eli Zaretskii <eliz@gnu.org>
9953
a18d7de6
EZ
9954 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
9955 Define only for _WIN32_WINNT less than 0x0500.
da9dcbb8
EZ
9956 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
9957 MinGW64.
8f5e14c8
EZ
9958 Move inclusion of time.h before sys/time.h, so that MinGW64 could
9959 see its own definitions of 'struct timeval' and 'struct timezone'.
a18d7de6 9960
b88b62de
EZ
9961 Fix incompatibilities between MinGW.org and MinGW64 headers.
9962 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
9963
9964 * w32.c (REPARSE_DATA_BUFFER): Guard with
9965 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
9966
c074e458
JD
99672013-03-25 Jan Djärv <jan.h.d@swipnet.se>
9968
9969 * xterm.c: Include X11/XKBlib.h
9970 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
9971
908589fd
AS
99722013-03-24 Andreas Schwab <schwab@linux-m68k.org>
9973
9974 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
9975 written backwards.
9976 * blockinput.h (input_blocked_p): Likewise.
9977 * bytecode.c (exec_byte_code): Likewise.
9978 * callproc.c (call_process_kill, call_process_cleanup)
9979 (Fcall_process): Likewise.
9980 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
9981 (Fccl_execute_on_string): Likewise.
9982 * character.c (string_escape_byte8): Likewise.
9983 * charset.c (read_hex): Likewise.
9984 * cm.c (calccost): Likewise.
9985 * data.c (cons_to_unsigned): Likewise.
9986 * dired.c (directory_files_internal, file_name_completion):
9987 Likewise.
9988 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
9989 (sit_for): Likewise.
9990 * doc.c (Fsubstitute_command_keys): Likewise.
9991 * doprnt.c (doprnt): Likewise.
9992 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
9993 * emacsgtkfixed.c: Likewise.
9994 * fileio.c (file_offset, Fwrite_region): Likewise.
9995 * floatfns.c (Fexpt, fmod_float): Likewise.
9996 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
9997 Likewise.
9998 * font.c (font_intern_prop): Likewise.
9999 * frame.c (x_set_alpha): Likewise.
10000 * gtkutil.c (get_utf8_string): Likewise.
10001 * indent.c (check_display_width): Likewise.
10002 * intervals.c (create_root_interval, rotate_right, rotate_left)
10003 (split_interval_right, split_interval_left)
10004 (adjust_intervals_for_insertion, delete_node)
10005 (interval_deletion_adjustment, adjust_intervals_for_deletion)
10006 (merge_interval_right, merge_interval_left, copy_intervals)
10007 (set_intervals_multibyte_1): Likewise.
10008 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
10009 * keymap.c (Fkey_description): Likewise.
10010 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
10011 * lread.c (openp, read_integer, read1, string_to_number):
10012 Likewise.
10013 * menu.c (ensure_menu_items): Likewise.
10014 * minibuf.c (read_minibuf_noninteractive): Likewise.
10015 * print.c (printchar, strout): Likewise.
10016 * process.c (create_process, Faccept_process_output)
10017 (wait_reading_process_output, read_process_output, send_process)
10018 (wait_reading_process_output): Likewise.
10019 * profiler.c (make_log, handle_profiler_signal): Likewise.
10020 * regex.c (re_exec): Likewise.
10021 * regex.h: Likewise.
10022 * search.c (looking_at_1, Freplace_match): Likewise.
10023 * sysdep.c (get_child_status, procfs_ttyname)
10024 (procfs_get_total_memory): Likewise.
10025 * systime.h (EMACS_TIME_VALID_P): Likewise.
10026 * term.c (dissociate_if_controlling_tty): Likewise.
10027 * window.c (get_phys_cursor_glyph): Likewise.
10028 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
10029 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
10030 Likewise.
10031 * xfns.c (Fx_window_property): Likewise.
10032 * xmenu.c (set_frame_menubar): Likewise.
10033 * xselect.c (x_get_window_property, x_handle_dnd_message):
10034 Likewise.
10035 * xsmfns.c (smc_save_yourself_CB): Likewise.
10036 * xterm.c (x_scroll_bar_set_handle): Likewise.
10037
2bf7d27a
DA
100382013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
10039
10040 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
10041 to be optional or nil. Adjust comment and convert it to docstring.
10042 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
10043 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
10044
a9ebfa0b
PE
100452013-03-24 Paul Eggert <eggert@cs.ucla.edu>
10046
10047 Static checking by GCC 4.8-20130319.
10048 * image.c (gif_load): Assume pass < 3 to pacify GCC.
10049 * process.c (Fset_process_datagram_address)
10050 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
35e951cd 10051 * xdisp.c (get_char_face_and_encoding)
a9ebfa0b
PE
10052 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
10053 (get_glyph_face_and_encoding): Prepare face before possibly using it.
10054 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
10055
4f3576ee
KB
100562013-03-24 Ken Brown <kbrown@cornell.edu>
10057
789b5e9a
KB
10058 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
10059 fix compilation on 64-bit Cygwin, where underscores are not
10060 automatically prepended.
10061
4f3576ee
KB
10062 * w32term.c (w32_initialize): Silence compiler warning.
10063
b5b7745f
EZ
100642013-03-23 Eli Zaretskii <eliz@gnu.org>
10065
cdc0d0bd
EZ
10066 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
10067 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
562c6ee9
SM
10068 variables, to save and restore frame dimensions.
10069 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
10070 after returning from a 'fullscreen' configuration.
10071 use SendMessage instead of PostMessage to send the SC_RESTORE message,
cdc0d0bd
EZ
10072 to avoid races between the main thread and the input thread.
10073
10074 * w32term.h (struct w32_output): New members normal_width,
10075 normal_height, normal_top, normal_left, and prev_fsmode.
10076 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
10077 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
10078 members of a frame.
10079
b5b7745f
EZ
10080 * w32term.c (w32fullscreen_hook): Record last value of the frame's
10081 'fullscreen' parameter. Always record previous width and height
10082 of the frame, except when switching out of maximized modes, so
10083 that they could be restored correctly, instead of resetting to the
10084 default frame dimensions. Send SC_RESTORE command to the frame,
10085 unless we are going to send SC_MAXIMIZE, to restore the frame
10086 resize hints in the mouse pointer shown by the window manager.
10087 (Bug#14032)
10088
10089 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
10090
10091 * lisp.h (get_frame_param): Adjust conditions for prototype
10092 declaration.
10093
a3454eed
KB
100942013-03-22 Ken Brown <kbrown@cornell.edu>
10095
10096 * unexcw.c: Drop unneeded inclusion of w32common.h.
10097 (report_sheap_usage): Declare.
10098 (read_exe_header): Add magic numbers for x86_64.
10099 (fixup_executable): Fix printf format specifier for unsigned long
10100 argument.
10101
5a49b79c
DA
101022013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
10103
10104 * frame.h (struct frame): Put menu_bar_window under #ifdef
10105 because this member is not needed when X toolkit is in use.
10106 (fset_menu_bar_window):
10107 * dispnew.c (clear_current_matrices, clear_desired_matrices)
10108 (free_glyphs, update_frame):
10109 * xdisp.c (expose_frame): Likewise.
10110 (display_menu_bar): Likewise. Remove redundant eassert.
10111 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
10112 toolkit is in use.
10113
d6723bf7
PE
101142013-03-21 Paul Eggert <eggert@cs.ucla.edu>
10115
7b1123d8
PE
10116 Use functions and constants to manipulate Lisp_Save_Value objects.
10117 This replaces code that used macros and strings and token-pasting.
10118 The change makes the C source a bit easier to follow,
10119 and shrinks the Emacs executable a bit.
10120 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
10121 (make_save_value): Change 1st arg from string to enum. All callers
10122 changed.
10123 (INTX): Remove.
10124 (mark_object): Use if, not #if, for GC_MARK_STACK.
10125 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
10126 (XSAVE_OBJECT): Now functions, not macros.
10127 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
10128 the constant was never used.
10129 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
10130 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
10131 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
10132 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
10133 New constants.
10134 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
10135 type3 with a single member save_type. All uses changed.
10136 (save_type, set_save_pointer, set_save_integer): New functions.
10137 * print.c (PRINTX): Remove.
10138
d6723bf7
PE
10139 * alloc.c: Remove redundant static declarations.
10140
5f24fa51
DA
101412013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
10142
10143 * window.h (struct window): Convert left_col, top_line, total_lines
10144 and total_cols from Lisp_Objects to integers. Adjust comments.
10145 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
10146 Remove.
10147 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
10148 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
10149 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
10150 Adjust users where appropriate.
10151
42143acd
DA
101522013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
10153
10154 * frame.h (struct frame): Drop resx and resy because the same data is
10155 available from window system-specific output context. Adjust users.
562c6ee9
SM
10156 (default_pixels_per_inch_x, default_pixels_per_inch_y):
10157 New functions to provide defaults when no window system available.
42143acd 10158 (FRAME_RES_X, FRAME_RES_Y): New macros.
562c6ee9 10159 (NUMVAL): Move from xdisp.c.
42143acd
DA
10160 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
10161 (Ffont_face_attributes, Fopen_font):
10162 * image.c (gs_load):
10163 * w32font.c (fill_in_logfont):
10164 * xdisp.c (calc_pixel_width_or_height):
10165 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
10166 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
10167
c0a17406
KH
101682013-03-20 Kenichi Handa <handa@gnu.org>
10169
10170 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
10171 to 1 (temporary workaround until a bug related to ASCII
10172 optimization is fixed).
10173
095d384d
DA
101742013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
10175
10176 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
10177 Signal error if window is not internal. Adjust docstring.
10178 (delete_all_child_windows): Use combination_limit to save the buffer.
10179 (Fset_window_configuration): Adjust accordingly.
cf4bb06d
DA
10180 * print.c (syms_of_print): Initialize debugging output not here...
10181 (init_print_once): ...but in a new function here.
10182 * lisp.h (init_print_once): Add prototype.
10183 * emacs.c (main): Add call to init_print_once. Adjust comments.
095d384d 10184
748fa866
DA
101852013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
10186
10187 * window.c (window_resize_check, window_resize_apply)
10188 (window_from_coordinates, recombine_windows, set_window_buffer)
10189 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
10190 (Fsplit_window_internal, Fdelete_window_internal)
10191 (freeze_window_starts): Use bool for booleans.
10192 * window.h (window_frame_coordinates, resize_frame_windows)
10193 (freeze_window_starts, set_window_buffer): Adjust prototypes.
10194
81519fd2
SM
101952013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
10196
10197 * dispnew.c (bitch_at_user): Use `user-error'.
10198
6db423a9
KB
101992013-03-17 Ken Brown <kbrown@cornell.edu>
10200
10201 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
10202 as return type of image_background. (Bug#13981)
10203 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
10204
8f2906f5
JD
102052013-03-16 Jan Djärv <jan.h.d@swipnet.se>
10206
960ce480 10207 * nsterm.m (updateFrameSize:): Change resize increments if needed.
6615748a 10208 (ns_select): Don't return with result uninitialized.
960ce480 10209
8f2906f5
JD
10210 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
10211 and getDirectory.
10212
81519fd2
SM
10213 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
10214 New functions.
8f2906f5
JD
10215 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
10216 directories. If filename is nil, get directory name (Bug#13932).
10217 Use getFilename and getDirectory.
10218 (getFilename, getDirectory): New methods for EmacsSavePanel and
10219 EmacsOpenPanel.
10220 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
10221
cded56c1
PE
102222013-03-15 Paul Eggert <eggert@cs.ucla.edu>
10223
10224 * coding.c (decode_coding_gap): Fix typo caught by static checking.
10225
251e9147 102262013-03-15 Kenichi Handa <handa@gnu.org>
8a44e6d1
KH
10227
10228 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
10229 (adjust_after_replace): Make it back to static. Delete the third
10230 arg text_at_gap_tail. Cancel the code for handling it.
10231
10232 * coding.h (struct coding_system): New member eol_seen.
10233
10234 * coding.c (detect_ascii): New function.
10235 (detect_coding): Set coding->head_ascii and coding->eol_seen only
10236 when the source bytes are actually scanned. On detecting for
10237 coding_category_utf_8_auto, call detect_ascii instead of scanning
10238 source bytes directly.
10239 (produce_chars): Call insert_from_gap with the new arg 0.
10240 (encode_coding): Likewise.
10241 (decode_coding_gap): Control ASCII optimization by the variable
10242 disable_ascii_optimization instead of #ifndef .. #endif.
10243 Deccode EOL format according to coding->eol_seen.
10244 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
10245 variable.
10246
8a44e6d1
KH
10247 * lisp.h (adjust_after_replace): Cancel externing it.
10248 (insert_from_gap): Adjust prototype.
10249
5f795e34
EZ
102502013-03-15 Eli Zaretskii <eliz@gnu.org>
10251
10252 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
10253 FULLSCREEN_MAXIMIZED. (Bug#13935)
10254
f258b4be
DA
102552013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
10256
10257 * region-cache.c (find_cache_boundary, move_cache_gap)
10258 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
10259 Simplify debugging check and convert to eassert. Adjust comment.
10260 (pp_cache): Put under ENABLE_CHECKING.
10261
a5cc4dde
EZ
102622013-03-14 Eli Zaretskii <eliz@gnu.org>
10263
10264 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
10265 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
10266 and WM_ACTIVATEAPP.
10267 (w32fullscreen_hook): If the frame is visible, reset
10268 f->want_fullscreen flag after changing the frame size. If the
10269 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
10270 (Bug#13953)
10271
3fc5e44a
DC
102722013-03-13 Daniel Colascione <dancol@dancol.org>
10273
10274 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
10275 too so that these builds can use Cygwin's file conversion
10276 functions. (We've been building and linking cygw32.o all along
10277 and just not using it.)
10278
47d7532e
PE
102792013-03-13 Paul Eggert <eggert@cs.ucla.edu>
10280
10281 File synchronization fixes (Bug#13944).
10282 * Makefile.in (LIB_FDATASYNC): New macro.
10283 (LIBES): Use it.
10284 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
10285 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
10286 Don't worry about HAVE_FSYNC, since a substitute fsync is
10287 available if the system lacks one.
10288 (Fwrite_regin): Retry fsync if interrupted.
10289
c7ffccaf
EZ
102902013-03-13 Eli Zaretskii <eliz@gnu.org>
10291
4e2df81d 10292 * w32term.c (w32_read_socket): If the Emacs frame is being
c7ffccaf
EZ
10293 activated, call w32fullscreen_hook, to make sure the new frame
10294 dimensions are in effect. (Bug#13937)
10295
8a7debc1
DA
102962013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
10297
10298 * xdisp.c (init_iterator): Simplify because both character and byte
10299 positions are either specified or -1. Add eassert. Adjust comment.
ffcd945e
DA
10300 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
10301 character and byte positions can be obtained from marker.
8a7debc1 10302
7fd8c501
PE
103032013-03-13 Paul Eggert <eggert@cs.ucla.edu>
10304
d9df6f40
PE
10305 Static checking by Sun C 5.12.
10306 * alloc.c (buffer_memory_full) [REL_ALLOC]:
10307 * bytecode.c (exec_byte_code):
10308 * dispnew.c (init_display):
10309 * eval.c (error):
10310 * fileio.c (Fsubstitute_in_file_name):
10311 * keyboard.c (Fevent_convert_list):
10312 * keymap.c (Fsingle_key_description):
10313 * term.c (maybe_fatal, fatal):
10314 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
10315 * xsmfns.c (Fhandle_save_session):
10316 Omit unreachable code.
10317 * keymap.c (map_keymap_char_table_item): Cast void * to
10318 a function pointer type; the C Standard requires this.
10319
7fd8c501
PE
10320 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
10321 Include <sys/param.h> unconditionally, as that works elsewhere and
10322 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
10323 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
10324 and FreeBSD now.
10325
a020afb9 10326See ChangeLog.12 for earlier changes.
aac0c6e3
MR
10327
10328;; Local Variables:
10329;; coding: utf-8
aac0c6e3
MR
10330;; End:
10331
ba318903 10332 Copyright (C) 2011-2014 Free Software Foundation, Inc.
aac0c6e3
MR
10333
10334 This file is part of GNU Emacs.
10335
10336 GNU Emacs is free software: you can redistribute it and/or modify
10337 it under the terms of the GNU General Public License as published by
10338 the Free Software Foundation, either version 3 of the License, or
10339 (at your option) any later version.
10340
10341 GNU Emacs is distributed in the hope that it will be useful,
10342 but WITHOUT ANY WARRANTY; without even the implied warranty of
10343 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10344 GNU General Public License for more details.
10345
10346 You should have received a copy of the GNU General Public License
10347 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.