todo-mode.el: Don't drop full parameter list.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
8e102bcc
SB
12014-05-06 Samuel Bronson <naesten@gmail.com>
2
3 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
4 are matched (bug#17413).
5
863f07de
JC
62014-05-06 Jarek Czekalski <jarekczek@poczta.onet.pl>
7
8 Stop tooltips pulling Emacs window to front (Bug#17408).
9 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
10 SetWindowPos invocations.
11
879e3628
JD
122014-05-05 Jan Djärv <jan.h.d@swipnet.se>
13
14 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
15 not initialized (Bug#17398).
16
61febcb6
PE
172014-05-04 Paul Eggert <eggert@cs.ucla.edu>
18
19 Revert recent libpng changes (Bug#17339).
20 * Makefile.in (PNG_CFLAGS): Remove; all uses removed.
21 * image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
22
d355cad6
PE
232014-05-03 Paul Eggert <eggert@cs.ucla.edu>
24
25 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
26 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
27 because WCONTINUED is always defined now.
28 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
29
74a9022a
EZ
302014-05-03 Eli Zaretskii <eliz@gnu.org>
31
32 * buffer.c (overlay_strings): Fix the wording of the commentary.
33
6f074205
PE
342014-05-02 Paul Eggert <eggert@cs.ucla.edu>
35
36 Consult libpng-config more consistently (Bug#17339).
37 * Makefile.in (PNG_CFLAGS): New var.
38 (ALL_CFLAGS): Use it.
39 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
40 CFLAGS now handles this.
41
d136f184
GM
422014-05-01 Glenn Morris <rgm@gnu.org>
43
44 * floatfns.c (Fisnan):
45 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
46
28c05b69
EZ
472014-05-01 Eli Zaretskii <eliz@gnu.org>
48
49 * term.c (tty_menu_activate): A better initialization for cursor
50 coordinates.
51
23c931aa
SM
522014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
53
54 * intervals.c: Tighten assertions.
55 (create_root_interval): Make sure the interval is not empty.
56 (intervals_equal): Use booleans.
57 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
58 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
59 (balance_possible_root_interval): Simplify and use booleans.
60 (split_interval_right, split_interval_left): Check LENGTH, and remove
61 now redundant assertion.
62 (adjust_intervals_for_insertion): Remove now redundant assertions.
63 (delete_node, interval_deletion_adjustment)
64 (adjust_intervals_for_deletion, merge_interval_right)
65 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
66 (reproduce_interval): Make sure the interval is not empty.
67
bc6cb3ef
PE
682014-04-30 Paul Eggert <eggert@cs.ucla.edu>
69
70 * term.c (tty_menu_activate): Don't assume row and col are initialized.
71 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
72 satisfaction that they would always be initialized.
73
a55ea27f
EZ
742014-04-29 Eli Zaretskii <eliz@gnu.org>
75
76 * term.c (tty_menu_display): Move the cursor to the active menu
77 item.
78 (tty_menu_activate): Return the cursor to the active menu item
79 after displaying the menu and after displaying help-echo. See
80 http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
81 for the details of why this is needed by screen readers and
82 Braille displays.
83
4a25c1cb
GM
842014-04-29 Glenn Morris <rgm@gnu.org>
85
86 * process.c (handle_child_signal):
87 Handle systems without WCONTINUED. (Bug#15110, 17339)
88
80d982d7
EZ
892014-04-23 Eli Zaretskii <eliz@gnu.org>
90
91 * search.c (Fnewline_cache_check): Don't try to count newlines
4a25c1cb 92 outside the buffer's restriction, as find_newline doesn't support that.
80d982d7 93
0fae5004
PE
942014-04-22 Paul Eggert <eggert@cs.ucla.edu>
95
34e856d5
PE
96 Port to GCC 4.9.0 with --enable-gcc-warnings.
97 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
98 All uses removed.
99 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
100 a way that also works with GCC 4.9.0.
101
0fae5004
PE
102 * search.c (Fnewline_cache_check): Remove unused locals.
103
2f999d52
EZ
1042014-04-22 Eli Zaretskii <eliz@gnu.org>
105
106 * search.c (find_newline1): New subroutine.
107 (Fnewline_cache_check): New function.
108 (syms_of_search): Defsubr it.
109
6709d4da
JC
1102014-04-21 Jarek Czekalski <jarekczek@poczta.onet.pl>
111
112 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
113 * keyboard.c (unblock_input): Add comment.
114 * xgselect.c (xg_select): Prevent Glib main loop recursion.
115
d7b659bb
SM
1162014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
117
118 * intervals.c (rotate_right, rotate_left): Fix up length computation.
119 Also change identifiers to match the comments, and add more assertions
120 (bug#16234).
121
ea0ca0f4
EZ
1222014-04-18 Eli Zaretskii <eliz@gnu.org>
123
124 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
125 glyph is written to TEXT_AREA of the temporary glyph_row.
126 (Bug#17288)
127
31559517
PE
1282014-04-18 Paul Eggert <eggert@cs.ucla.edu>
129
130 * emacs.c (close_output_streams): Don't clear and restore errno.
131
53e46f3a
JD
1322014-04-17 Jan Djärv <jan.h.d@swipnet.se>
133
134 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
135 never becomes visible, i.e. using XMonad (Bug#17237).
136
f76da67d
EZ
1372014-04-17 Eli Zaretskii <eliz@gnu.org>
138
8915b842
EZ
139 * xdisp.c (Fline_pixel_height): Don't assume that the current
140 buffer and the selected window's buffer are one and the same.
141 (Bug#17281)
142
f76da67d
EZ
143 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
144 paragraph-start cache before the newline cache. (Bug#17269)
145
63032a0e
SM
1462014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
147
148 * window.c (save_window_save): Lookup window_point_insertion_type in
149 the right buffer (bug#15457).
150 (Qwindow_point_insertion_type): New var.
151 (syms_of_window): Initialize it.
152
bf6b4923
EZ
1532014-04-16 Eli Zaretskii <eliz@gnu.org>
154
ad62a115 155 Fix the MSDOS build.
bf6b4923
EZ
156 * unexcoff.c [MSDOS]: Include libc/atexit.h.
157 (copy_text_and_data): Zero out the atexit chain pointer before
158 dumping Emacs.
159
160 * termhooks.h (encode_terminal_code): Update prototype.
161
162 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
163 visible for all DOS_NT ports, not just WINDOWSNT.
164 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
165
166 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
167 unless it is defined.
168 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
169
170 * process.c (close_on_exec, accept4, process_socket): Move into
171 the "ifdef subprocesses" part.
172 (catch_child_signal): Condition by "ifdef subprocesses".
173 (syms_of_process) <Qinternal_default_process_sentinel>
174 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
175
176 * msdos.h: Add prototypes for new functions.
177 (EINPROGRESS): Define.
178 (O_CLOEXEC): Define to zero.
179
180 * msdos.c (check_window_system): Remove unnecessary an
181 incompatible duplicate function.
63032a0e
SM
182 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
183 New functions in support of new functionality.
bf6b4923
EZ
184
185 * menu.c (single_menu_item): Add visual indication of submenu
186 also for menus on MSDOS frames.
187 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
188
189 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
190 when async subprocesses aren't supported.
191
192 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
193
194 * emacs.c (close_output_streams): Zero out errno before calling
195 close_stream.
196
197 * dired.c [MSDOS]: Include msdos.h.
198
199 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
200 (DATA_START) [MSDOS]: Define.
201 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
202
203 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
204 Ifdef away for MSDOS.
205 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
206 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
207 for MSDOS.
208 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
209 Use temporary file template that is compatible with mkostemp.
210 Move vfork-related portions under #ifndef MSDOS.
211 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
212
ad0dfd98
EZ
2132014-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
214
215 * buffer.c (Foverlays_at): Add argument `sorted'.
216
2172014-04-14 Eli Zaretskii <eliz@gnu.org>
218
219 * insdel.c (invalidate_buffer_caches): When deleting or replacing
220 text, invalidate the bidi_paragraph_cache upto and including the
221 preceding newline.
222
13a5993b
PE
2232014-04-13 Paul Eggert <eggert@cs.ucla.edu>
224
225 Port to IRIX 6.5 (Bug#9684).
226 * alloc.c (TAGGABLE_NULL): New constant,
227 for porting to hosts with nontrivial DATA_SEG_BITS settings.
228 (next_vector, set_next_vector): Use it.
229 * conf_post.h (INET6) [IRIX6_5]: Define.
230 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
231 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
232 * lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out,
233 for consistency with how TAGGABLE_NULL is computed.
234
ff252be0
EZ
2352014-04-13 Eli Zaretskii <eliz@gnu.org>
236
ced78c5a
EZ
237 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
238 before passing it to system APIs.
239
ff252be0
EZ
240 * puresize.h (BASE_PURESIZE): Bump by 1K. (Bug#17255)
241
285d6d5d
SM
2422014-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
243
244 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
245 make sure stack.byte_string_start is not de-adjusted by pushhandler.
246
a9108bf1
PE
2472014-04-12 Paul Eggert <eggert@cs.ucla.edu>
248
249 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
250
180c8ce0
EZ
2512014-04-12 Eli Zaretskii <eliz@gnu.org>
252
253 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
254 covered by a display string that ends in a newline, and that cases
255 going back by DVPOS lines to hit the search limit, lift the limit
256 and go back until DVPOS is reached. (Bug#17244)
257
258 * indent.c (Fvertical_motion): Handle correctly the case when the
259 display string is preceded by an empty line.
260
95765a6a
EZ
2612014-04-11 Eli Zaretskii <eliz@gnu.org>
262
263 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
264 use S_IWRITE instead.
265
34e083e3
GM
2662014-04-11 Glenn Morris <rgm@gnu.org>
267
268 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
269
0cccc183
KB
2702014-04-09 Ken Brown <kbrown@cornell.edu>
271
272 * Makefile.in (EMACS_MANIFEST): Revert last change.
273
e3b83880
SM
2742014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
275
276 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
277
278 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
279 (symbol_block_pinned): New var.
280 (Fmake_symbol): Initialize `pinned'.
281 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
282 pinned and signal an error for un-purifiable objects.
283 (pure_cons): Use it.
284 (Fpurecopy): Use it, except for objects that can't be purified.
285 (mark_pinned_symbols): New function.
286 (Fgarbage_collect): Use it.
287 (gc_sweep): Remove hack made unnecessary.
288
50ea0f87
GM
2892014-04-05 Glenn Morris <rgm@gnu.org>
290
291 * keyboard.c (Fopen_dribble_file): Doc tweak.
292
11a9c72f
JD
2932014-04-04 Jan Djärv <jan.h.d@swipnet.se>
294
295 Backport from trunk.
296 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
50ea0f87
GM
297 bar is zero height, just return (Bug#16976).
298 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
299 * nsterm.h (EmacsView): Add wait_for_tool_bar.
300 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
11a9c72f 301 is nil. If waiting for toolbar to complete, force a redraw.
50ea0f87 302 (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976).
11a9c72f 303
ebe8e076
KB
3042014-04-03 Ken Brown <kbrown@cornell.edu>
305
306 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
307
ffcd5669
MR
3082014-04-02 Martin Rudalics <rudalics@gmx.at>
309
310 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
311 width from font width (Bug#17163).
312
632e91a6
MR
3132014-03-30 Martin Rudalics <rudalics@gmx.at>
314
315 * frame.c (x_set_frame_parameters): Calculate default values of
316 new frame sizes only after all other frame parameters have been
317 processed (Bug#17142).
318
9c67d3ba
KB
3192014-03-28 Ken Brown <kbrown@cornell.edu>
320
321 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
322 (Bug#17112)
323
08be62f4
YM
3242014-03-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
325
326 * xterm.c (x_draw_image_glyph_string): Adjust image background
327 width accordingly when its x position is adjusted. (Bug#17115)
328
0c4e715c
YM
3292014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
330
331 * w32term.c (x_draw_image_glyph_string): Fix computation of height
332 and width of image background when it is displayed with a 'box'
333 face. (Bug#17115)
334
3fd3e736
PE
3352014-03-26 Paul Eggert <eggert@penguin.cs.ucla.edu>
336
337 More backward-compatible fix to char-equal core dump (Bug#17011).
338 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
339 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
b18d7820 340
05b250c2
PE
341 Fix core dump in char-equal (Bug#17011).
342 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
343 unibyte buffers, as we can't tell whether the characters are
344 actually unibyte.
345
b18d7820
PE
346 * insdel.c (adjust_markers_for_delete): Remove unused local.
347
37ea8275
BR
3482014-03-24 Barry O'Reilly <gundaetiapo@gmail.com>
349
350 Have (MARKER . ADJUSTMENT) undo records always be immediately
351 after their corresponding (TEXT . POS) record in undo list.
352 (Bug#16818)
353 * lisp.h (record-delete): New arg record_markers.
354 (record_marker_adjustment): No longer needed outside undo.c.
355 * insdel.c (adjust_markers_for_delete): Move calculation of marker
356 adjustments to undo.c's record_marker_adjustments. Note that
357 fileio.c's decide_coding_unwind is another caller to
358 adjust_markers_for_delete. Because it has undo list bound to t,
359 it does not rely on adjust_markers_for_delete to record marker
360 adjustments.
361 (del_range_2): Swap call to record_delete and
362 adjust_markers_for_delete so as undo marker adjustments are
363 recorded before current deletion's adjustments, as before.
364 (adjust_after_replace):
365 (replace_range): Pass value for new record_markers arg to
366 delete_record.
63032a0e 367 * undo.c (record_marker_adjustment): Rename to
37ea8275
BR
368 record_marker_adjustments and made static.
369 (record_delete): Check record_markers arg and call
370 record_marker_adjustments.
371 (record_change): Pass value for new record_markers arg to
372 delete_record.
373 (record_point): at_boundary calculation no longer needs to account
374 for marker adjustments.
375
f2999a33
MR
3762014-03-24 Martin Rudalics <rudalics@gmx.at>
377
378 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
379 (Bug#17077).
380
33f0ba7e
GM
3812014-03-23 Glenn Morris <rgm@gnu.org>
382
383 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
384
f6614a47
SM
3852014-03-23 Stefan Monnier <monnier@iro.umontreal.ca>
386
387 * buffer.c (struct sortvec): Add field `spriority'.
388 (compare_overlays): Use it.
389 (sort_overlays): Set it.
390
88c569ef
EZ
3912014-03-23 Eli Zaretskii <eliz@gnu.org>
392
393 * xdisp.c (redisplay_window): If all previous attempts to find the
394 cursor row failed, try a few alternatives before falling back to
9729c262 395 the top-most row of the window. Use row_containing_pos. (Bug#17047)
88c569ef 396
e4e40f72
DC
3972014-03-22 Daniel Colascione <dancol@dancol.org>
398
399 * process.c (conv_sockaddr_to_lisp): When extracting the string
400 names of AF_LOCAL sockets, stop before reading uninitialized
401 memory.
402
e611af50
DC
4032014-03-23 Daniel Colascione <dancol@dancol.org>
404
405 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
406 array. (ASAN caught.)
407
fef27dc1
YM
4082014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
409
410 Fix regression introduced by patch for Bug#10500.
411 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
412 * w32term.c (x_draw_image_relief): Likewise.
413
21e18b30
MR
4142014-03-21 Martin Rudalics <rudalics@gmx.at>
415
416 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
417 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
418 maximize a frame for odd default fonts.
419
1271626a
PE
4202014-03-20 Paul Eggert <eggert@cs.ucla.edu>
421
422 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
423
caecb91c
SM
4242014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
425
049fac7c
SM
426 * doc.c (store_function_docstring): Warn when we don't know where to
427 put a docstring.
428 (Fsubstitute_command_keys): Don't advertise the fact that
429 text-properties are dropped, since we think it's a bug that we'll fix
430 in 24.5.
431
caecb91c
SM
432 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
433 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
434 * frame.c (frame_garbaged): Make "docstring" more precise.
435
7b9cb544
GM
4362014-03-20 Glenn Morris <rgm@gnu.org>
437
438 * charset.c (init_charset): When we cannot find the charsets directory,
439 mention if EMACSDATA is set.
440
37ca9077
PE
4412014-03-19 Paul Eggert <eggert@cs.ucla.edu>
442
d16ae622
PE
443 * fns.c (Frandom): Fix rare bug where the result isn't random.
444
37ca9077
PE
445 Fix porting inconsistency about rounding to even.
446 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
447 This way, the unusual !HAVE_RINT case acts like the usual
448 HAVE_RINT case, and we can fix the documentation accordingly.
449
722493d7
EZ
4502014-03-19 Eli Zaretskii <eliz@gnu.org>
451
452 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
453 (w32_wnd_proc): Initialize the dwHoverTime member of
454 TRACKMOUSEEVENT structure.
455
525d9a3c
TZ
4562014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
457
458 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
459
2a3d9a06
EZ
4602014-03-16 Eli Zaretskii <eliz@gnu.org>
461
462 * search.c (find_newline): Speed up the function when using the
5f0da6ce 463 newline cache, by halving the number of calls to
2a3d9a06
EZ
464 region_cache_forward and region_cache_backward. (Bug#16830)
465
b6d8543c
JB
4662014-03-15 Juanma Barranquero <lekktu@gmail.com>
467
468 * buffer.c (Fset_buffer): Document return value (bug#17015).
469
cfd5e825
MR
4702014-03-14 Martin Rudalics <rudalics@gmx.at>
471
472 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
473 nil, always resize character wise to avoid potential loss of the
474 mode line (Bug#16923 related).
475
8960529e
MR
4762014-03-12 Martin Rudalics <rudalics@gmx.at>
477
478 * frame.c (x_set_frame_parameters): Always calculate new sizes
479 pixelwise to avoid potential loss when rounding.
480
b0b486db
DA
4812014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
482
483 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
484 * xterm.c (x_free_frame_resources): Free all allocated cursors.
485
70db0db7
EZ
4862014-03-10 Eli Zaretskii <eliz@gnu.org>
487
488 * w32.c (fstatat): Don't add an extra slash if the argument ends
489 with a slash: this fails the subsequent call to stat_worker on
490 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
491
7e940b65
MR
4922014-03-09 Martin Rudalics <rudalics@gmx.at>
493
494 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
495
e61a31bf
JD
4962014-03-08 Jan Djärv <jan.h.d@swipnet.se>
497
498 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
499
7e940b65
MR
500 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
501 when frame is only on one screen (Bug#14713).
e61a31bf 502
2c65ad21
EZ
5032014-03-08 Eli Zaretskii <eliz@gnu.org>
504
505 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
506 there's a valid wrap point in the display line, the last glyph
507 cannot "just barely fit" on this row, because display_line doesn't
508 let it. Instead, proceed as if the last glyph didn't fit, so that
509 we eventually back up the iterator to the wrap point. This avoids
510 delusional behavior of move_it_to, whereby it proceeds to the next
511 display line, but sets current_x to zero for all the glyphs that
caecb91c
SM
512 without word-wrap would fit on the previous display line.
513 One result was that visual-order cursor movement behaved erratically
2c65ad21
EZ
514 under word-wrap.
515 (Fmove_point_visually): Add code to find the x coordinate of the
516 last character before wrap point, under word-wrap on a TTY.
517
b646ea12
EZ
5182014-03-07 Eli Zaretskii <eliz@gnu.org>
519
520 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
521 also return value of MOVE_POS_MATCH_OR_ZV from
522 move_it_in_display_line_to, when moving from beginning of line to
523 point's position. (Bug#16961)
524
2c6053e8
MR
5252014-03-07 Martin Rudalics <rudalics@gmx.at>
526
527 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
528 * window.c (Fselect_window): Explain NORECORD and
529 `buffer-list-update-hook' in doc-string.
530
cac0a1d6
MR
5312014-03-06 Martin Rudalics <rudalics@gmx.at>
532
533 * window.c (Fother_window_for_scrolling): Check that
534 Vother_window_scroll_buffer is a buffer.
535
12e852a2
DA
5362014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
537
538 * xterm.c (xim_initialize): Always pass a copy of resource name
539 to XRegisterIMInstantiateCallback and eassert whether return
540 value is True. Passing copy is important because Xlib doesn't
541 make its own copy and resource name argument usually points to
542 SSDATA (Vx_resource_name), which may be changed from Lisp.
543 (xim_close_display): For XUnregisterIMInstantiateCallback,
544 always eassert return value and pass exactly the same values
caecb91c
SM
545 as were used for XRegisterIMInstantiateCallback.
546 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
12e852a2
DA
547 sources to check why if you are interested.
548
e1a2cb1c
MR
5492014-03-05 Martin Rudalics <rudalics@gmx.at>
550
551 * dispnew.c (change_frame_size_1): Add new_lines instead of
552 new_height, the latter may be still zero if passed as such.
553 * window.c (Fwindow_pixel_height): Mention bottom divider in
554 doc-string.
555
d2f720ac
PE
5562014-03-05 Paul Eggert <eggert@cs.ucla.edu>
557
e1a2cb1c
MR
558 Fix "resource temporarily unavailable" with xgselect
559 (Bug#16925).
e6e8a5eb
PE
560 * xgselect.c: Include <stdbool.h>.
561 (xg_select) [!USE_GTK]: Don't lose track of errno.
562
d2f720ac
PE
563 Fix minor --enable-gcc-warnings issues.
564 * widget.c (update_various_frame_slots, EmacsFrameResize):
565 Avoid unused locals. Prefer 'if' to '#if' when either will do.
566
94a089b5
KB
5672014-03-04 Ken Brown <kbrown@cornell.edu>
568
569 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
570 represent the actual adjustment needed for alignment.
571
201572ec
EZ
5722014-03-04 Eli Zaretskii <eliz@gnu.org>
573
574 * gmalloc.c (aligned_alloc): Don't allocate more memory than
575 needed, and don't reallocate if the initial allocation already
576 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
577
a55130ca
YM
5782014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
579
580 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
581 (Bug#16932)
582
5b87d0d9
MN
5832014-03-04 Michal Nazarewicz <mina86@mina86.com>
584
585 * cmds.c (delete-char): Update docstring pointing out that the
586 function ignores `delete-active-region' and `overwrite-mode'.
587
bd650c24
EZ
5882014-03-03 Eli Zaretskii <eliz@gnu.org>
589
757c70af
EZ
590 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
591
bd650c24
EZ
592 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
593 allocated buffer due to alignment.
594 (freehook): If the block to be freed was allocated by
595 'aligned_alloc', find its real pointer before calling 'free'.
596 (Bug#16901)
597 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
598 backtrace.
599
8c1c7611
DA
6002014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
601
602 * font.c (toplevel): Adjust comment about font cache layout.
603 (font_clear_cache): Fix to match real font cache layout.
604 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
605 (Fframe_font_cache) [FONT_DEBUG]: New function.
606 (syms_of_font) [FONT_DEBUG]: Defsubr it.
607
19dae293
DA
608 Avoid crashes when X fonts are erroneously freed on reused X
609 'Display *' connection data (Bug#16069). Note that X font
610 resources still may be leaked, but currently there is no way
611 to completely avoid it.
612 * xterm.h (struct x_display_info): New member x_id. Add comments.
613 * xterm.c (x_display_id): New variable.
614 (x_term_init): Assign identifier to each opened X connection.
615 * xfont.c (struct xfont): New member x_display_id.
616 (xfont_open): Initialize it with frame's display id.
617 (xfont_close): Check whether font's display id matches the one
618 recorded for the given display. Adjust comment.
619 * xftfont.c (struct xftfont_info):
620 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
621
2907acd4
MR
6222014-03-01 Martin Rudalics <rudalics@gmx.at>
623
624 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
625 * window.c (Fother_window_for_scrolling): Don't try to scroll a
626 killed Vother_window_scroll_buffer.
627 (Vother_window_scroll_buffer): Fix doc-string accordingly.
628
cb8b26b4
EZ
6292014-03-01 Eli Zaretskii <eliz@gnu.org>
630
631 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
632 that start with more than 2 slashes as UNCs. (Bug#16751)
633
8268febf
PE
6342014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
635
636 Fix a few crashes and leaks when cloning C strings.
637 * alloc.c, lisp.h (dupstring): New function.
638 * gtkutil.c (xg_get_font):
639 * term.c (tty_default_color_capabilities):
640 * xsettings.c (store_monospaced_changed)
641 (store_font_name_changed, parse_settings)
642 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
643 This avoids some unlikely crashes due to accessing freed storage,
644 and avoids some minor memory leaks in the more-typical case.
645
5c809195
MR
6462014-02-28 Martin Rudalics <rudalics@gmx.at>
647
648 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
649 cursor when modeline can't be dragged (Bug#16647).
650
2241d76e
GM
6512014-02-28 Glenn Morris <rgm@gnu.org>
652
653 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
654 from custom-delayed-init-variables. (Bug#11565)
655
653b6ea3
MR
6562014-02-27 Martin Rudalics <rudalics@gmx.at>
657
658 More fixes for mouse glyph calculations (Bug#16647).
659 * window.c (coordinates_in_window): In intersection of
660 horizontal and vertical window dividers prefer the horizontal
661 one. Add some extra parens to last fix.
662 (window_relative_x_coord): Return x-coordinate for header and
663 mode line too.
664 * xdisp.c (remember_mouse_glyph): In text area don't extend
665 glyph into mode line to show the vertical drag cursor there
666 immediately. Subdivide mouse glyphs in right fringes to show a
667 horizontal drag cursor as soon as we enter the "grabbable width"
668 portion. Handle vertical border case separately. Do not
669 subdivide window divider areas.
670 (note_mouse_highlight): On bottom divider of bottommost windows
671 show vertical drag cursor only when the minibuffer window can be
672 resized.
673
11de63ed
EZ
6742014-02-27 Eli Zaretskii <eliz@gnu.org>
675
676 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
677 reset by the face of the object just displayed. See also bug#76.
678 (get_next_display_element): If the string came from a display
679 property, examine the box face attribute at it->position, not at
680 it->current.pos, since the latter was not updated yet. (Bug#16870)
681 (handle_face_prop): Improve commentary.
682
d8c25f59
MA
6832014-02-27 Michael Albinus <michael.albinus@gmx.de>
684
685 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
686 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
687
aea124c4
MR
6882014-02-26 Martin Rudalics <rudalics@gmx.at>
689
690 Fixes around Bug#16647.
691 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
692 ON_BOTTOM_DIVIDER cases.
693 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
694 only if the window has no right divider.
695 (Fcoordinates_in_window_p): Fix doc-string.
696
0e46275b
JB
6972014-02-25 Juanma Barranquero <lekktu@gmail.com>
698
699 * lread.c (Funintern): Fix doc to match advertised calling convention.
700
7c56ecf5
DC
7012014-02-24 Daniel Colascione <dancol@dancol.org>
702
703 * keyboard.c (read_char): Close race that resulted in lost events.
704
f33095ed
GM
7052014-02-22 Glenn Morris <rgm@gnu.org>
706
ca58fa73
GM
707 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
708 * window.c (window-resize-pixelwise): Doc fixes.
709
f33095ed
GM
710 * process.c (Finternal_default_process_filter)
711 (Finternal_default_process_sentinel): Doc tweaks.
712
458e643b
GM
7132014-02-21 Glenn Morris <rgm@gnu.org>
714
715 * process.c (Fprocess_buffer, Faccept_process_output)
716 (Finternal_default_process_filter, Finternal_default_process_sentinel):
717 Doc fixes.
718
8dd3e94f
MR
7192014-02-21 Martin Rudalics <rudalics@gmx.at>
720
721 * window.c (Fwindow_scroll_bar_width): New function.
722
9901fa1a
PE
7232014-02-21 Paul Eggert <eggert@cs.ucla.edu>
724
725 Pacify GCC when configuring with --enable-gcc-warnings.
726 * xdisp.c (move_it_in_display_line_to) [lint]:
727 Initialize recently-added local.
728
48198420
DC
7292014-02-21 Daniel Colascione <dancol@dancol.org>
730
731 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
732
44a2be2d
EZ
7332014-02-20 Eli Zaretskii <eliz@gnu.org>
734
735 * xdisp.c (init_iterator): Don't dereference a bogus face
736 pointer. (Bug#16819)
dba8296c
EZ
737 (try_cursor_movement): Don't use cursor position if
738 set_cursor_from_row failed to compute it. This avoids assertion
739 violations in MATRIX_ROW.
679f7827
EZ
740 (move_it_in_display_line_to): Save the iterator state in ppos_it
741 only once per call. Reimplement the method used to return to the
742 best candidate position if all the positions found in display line
743 are beyond TO_CHARPOS. This cuts down the number of calls to
744 bidi_shelve_cache, which moves a lot of stuff when lines are long
745 and include bidirectional text. (Bug#15555)
44a2be2d 746
189e7007
GM
7472014-02-20 Glenn Morris <rgm@gnu.org>
748
749 * data.c (Fdefalias): Doc fix.
750
c0213820
EZ
7512014-02-19 Eli Zaretskii <eliz@gnu.org>
752
d34f67da
EZ
753 * xdisp.c (display_line): Fix horizontal scrolling of large images
754 when fringes are turned off. This comes at a price of not
755 displaying the truncation/continuation glyphs in this case.
756 (Bug#16806)
757
c0213820
EZ
758 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
759 CreateDIBSection returns an error indication, zero out *ximg after
760 destroying the image. This avoids crashes in memory allocations
761 due to the fact that some of the callers also call
762 x_destroy_x_image, which will attempt to free an already free'd
763 block of memory.
764
5185f8ed
MR
7652014-02-18 Martin Rudalics <rudalics@gmx.at>
766
767 * widget.c (update_various_frame_slots): Don't set
768 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
769
1825653e
MA
7702014-02-18 Michael Albinus <michael.albinus@gmx.de>
771
772 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
773
3cb98721
PE
7742014-02-17 Paul Eggert <eggert@cs.ucla.edu>
775
776 temacs --daemon fix (Bug#16599).
777 * emacs.c (main): Initialize daemon_pipe[1] here ...
778 (syms_of_emacs): ... instead of here.
779
35e951cd 7802014-02-16 Anders Lindgern <andlind@gmail.com>
62901354
AL
781
782 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
783 is set (Bug#16505).
784
fa8ac13c
DC
7852014-02-16 Daniel Colascione <dancol@dancol.org>
786
787 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
788 (xd_get_connection_address): Use it.
789 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
790 xd_get_connection_address because the latter signals if the bus
791 we're trying to close is already disconnected.
792
e2607667
EZ
7932014-02-13 Eli Zaretskii <eliz@gnu.org>
794
795 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
796 argument to CreateThread. This avoids segfaults on Windows 9X.
797 Reported by oslsachem <oslsachem@gmail.com>.
798
d51c175a
PE
7992014-02-13 Paul Eggert <eggert@cs.ucla.edu>
800
801 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
802 * unexhp9k800.c (unexec_error): New function, to simplify the code.
803 (check_lseek): New function, to report lseek errors.
804 (save_data_space, update_file_ptrs, read_header, write_header)
805 (copy_file, copy_rest, unexec): Use these news functions.
806 (update_file_ptrs): Don't assume wraparound behavior when
807 converting a large size_t value to off_t.
808
28c16c40
DA
8092014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
810
811 * composite.c (fill_gstring_header): Pass positions as C integers
812 and move parameters checking to...
ccd5d23b
DA
813 (Fcomposition_get_gstring): ...this function. Handle case when
814 buffer positions are in reversed order and avoid crash (Bug#16739).
815 Adjust docstring.
28c16c40
DA
816 * buffer.c (validate_region): Mention current buffer in error message.
817
c295fc18 8182014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
a9a61c77
JD
819
820 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
821
81bf5420
LI
8222014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
823
824 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
825
9a84bfd6
GM
8262014-02-11 Glenn Morris <rgm@gnu.org>
827
828 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
829 Replace refs to "OpenStep" in messages.
830
e41fe0d3
PE
8312014-02-10 Paul Eggert <eggert@cs.ucla.edu>
832
833 Avoid "." at end of error diagnostics.
834 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
835 * font.c (Ffont_at):
836 * nsfns.m (ns_display_info_for_name):
837 * nsselect.m (Fx_own_selection_internal):
838 * nsterm.m (performDragOperation:):
839 Remove "." from end of diagnostic.
840
a3a8a7da
LI
8412014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
842
843 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
844 unintuitive (bug#15824).
8cd86d04 845 (Fyes_or_no_p): Doc fix (bug#15456).
a3a8a7da 846
c6795590
DA
8472014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
848
849 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
850 and avoid warning.
575593db
DA
851 * eval.c (call_debugger): When exiting the debugger, do not allow
852 max_specpdl_size less than actual binding depth (Bug#16603).
853 (syms_of_eval): Adjust docstring.
c6795590 854
fe461220
LI
8552014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
856
c838bca9
LI
857 * cmds.c (Fself_insert_command): Output a clearer error message on
858 negative repetitions (bug#9476).
859
fe461220
LI
860 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
861
af3e68a0
LI
8622014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
863
8acaaad7
LI
864 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
865
aa60235a
LI
866 * minibuf.c (Fread_string): Doc clarification (bug#15422).
867
af3e68a0
LI
868 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
869
85ade7ee
JB
8702014-02-08 Juanma Barranquero <lekktu@gmail.com>
871
872 * keyboard.c (Frecursive_edit): Fix typo in docstring.
873
bb01d7bb
LI
8742014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
875
fff711ee
LI
876 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
877
bb01d7bb
LI
878 * keyboard.c (Frecursive_edit): Say more precicely how throwing
879 `exit' works (bug#15865).
880
99f10a5d
MR
8812014-02-07 Martin Rudalics <rudalics@gmx.at>
882
9be95071 883 Constrain window box/body sizes and margin widths (Bug#16649).
99f10a5d
MR
884 * xdisp.c (window_box_width): Don't return less than zero.
885 (window_box_left_offset, window_box_right_offset): Don't return
886 more than the window's pixel width.
dc0e4c48
MR
887 * window.c (window_body_height, window_body_width): Don't return
888 negative value.
9be95071 889 (window_resize_apply): Adjust margin width, if necessary.
99f10a5d 890
a0baf35f
GM
8912014-02-07 Glenn Morris <rgm@gnu.org>
892
893 * nsterm.m (syms_of_nsterm): Doc fix.
894
829f4f22
EZ
8952014-02-06 Eli Zaretskii <eliz@gnu.org>
896
5b87d0d9
MN
897 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
898 New variables: pointers through which to call the respective APIs.
829f4f22 899 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
5b87d0d9
MN
900 (filename_from_ansi, sys_link, check_windows_init_file):
901 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
829f4f22
EZ
902 This is required on Windows 9X, where we dynamically load
903 UNICOWS.DLL which has their non-stub implementations.
904 (maybe_load_unicows_dll): Assign addresses to these 2 function
905 pointers after loading UNICOWS.DLL.
906
907 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
908 MultiByteToWideChar and WideCharToMultiByte through function
909 pointers.
910
5b87d0d9
MN
911 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
912 New declarations.
829f4f22 913
029788c7
JD
9142014-02-06 Jan Djärv <jan.h.d@swipnet.se>
915
916 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
917 for OSX >= 10.9 if separate spaces are used.
918 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
919
314ffdb1
GM
9202014-02-06 Glenn Morris <rgm@gnu.org>
921
922 * buffer.c (cache-long-scans): Doc fix.
923
6d48053b
EZ
9242014-02-05 Eli Zaretskii <eliz@gnu.org>
925
926 * w32fns.c (Fw32_shell_execute): Doc fix.
927
bfdd79d3
BG
9282014-02-05 Bastien Guerry <bzg@gnu.org>
929
930 * syntax.c (Fforward_word): Call Fconstrain_to_field with
931 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
932
fa49abf8
MR
9332014-02-05 Martin Rudalics <rudalics@gmx.at>
934
415e3810
MR
935 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
936 outside the window (Bug#16649).
937
fa49abf8
MR
938 * xdisp.c (note_mouse_highlight): When entering a margin area show
939 a non-text cursor (Bug#16647).
940
8e5917ec
PE
9412014-02-04 Paul Eggert <eggert@cs.ucla.edu>
942
943 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
944 It prompted a compile-time diagnostic on GNU/Linux.
945 Simplify to remove the need for the label.
946
e139a33c
EZ
9472014-02-04 Eli Zaretskii <eliz@gnu.org>
948
949 * w32menu.c (w32_popup_dialog): Don't condition the whole function
950 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
951 to show it; otherwise return 'unsupported--w32-dialog' to signal
5b87d0d9
MN
952 to the caller that emulation with menus is necessary.
953 This resurrects code inadvertently deleted by the 2013-10-08 commit.
e139a33c
EZ
954 (Bug#16636)
955 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
956
957 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
958 by HAVE_DIALOGS.
959
960 * menu.c (Fx_popup_dialog): Don't condition the call to
961 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
962 special symbol 'unsupported--w32-dialog', emulate the dialog with
963 a menu by calling x-popup-menu.
964
965 * menu.h (Qunsupported__w32_dialog): New extern variable.
966
86d2bf49
MA
9672014-02-04 Michael Albinus <michael.albinus@gmx.de>
968
969 * keyboard.c (kbd_buffer_get_event): Read file notification events
970 also in batch mode.
971
972 * xgselect.c (xg_select): Read glib events in any case, even if
973 there are no file descriptors to watch for. (Bug#16519)
974
764ec9e5
MR
9752014-02-03 Martin Rudalics <rudalics@gmx.at>
976
977 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
978 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
979 * w32term.c (w32_draw_window_divider): Handle first and last
980 pixels specially.
981 * w32term.h (w32_fill_area_abs): New function.
982 * xdisp.c (x_draw_right_divider): Don't draw over bottom
983 divider.
984 * xfaces.c (realize_basic_faces): Handle new face ids.
985 * xfns.c (Fx_create_frame): Call x_default_parameter for right
986 and bottom divider width.
987 * xterm.c (x_draw_window_divider): Handle first and last pixels
988 specially.
989
34baf96c
DA
9902014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
991
992 * print.c (Fexternal_debugging_output): Add cast to pacify
993 --enable-gcc-warnings.
9cad4576
DA
994 * eval.c (call_debugger): Grow specpdl if the debugger was
995 entered due to specpdl overflow (Bug#16603) and allow more
996 specpdl space for the debugger itself.
34baf96c 997
b4168649
MR
9982014-02-02 Martin Rudalics <rudalics@gmx.at>
999
1000 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
1001 (Bug#16619)
1002
cb13e9a8
EZ
10032014-02-01 Eli Zaretskii <eliz@gnu.org>
1004
28e6cee8
EZ
1005 * w32fns.c (Ffile_system_info): Use WINAPI in the function
1006 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
1007
9ef58a52
EZ
1008 * print.c (Fexternal_debugging_output): If the argument character
1009 is non-ASCII, encode it with the current locale's encoding before
1010 writing the result to the terminal. (Bug#16448)
1011
cb13e9a8
EZ
1012 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
1013 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
1014 for it. (Bug#16558)
1015
507a173f
AS
10162014-01-30 Andreas Schwab <schwab@linux-m68k.org>
1017
1018 * process.c (create_process): Reset SIGPROF handler in the child.
1019 * callproc.c (call_process): Likewise.
1020
e9abb8a8
PE
10212014-01-29 Paul Eggert <eggert@cs.ucla.edu>
1022
1023 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
1024
198af6df
EZ
10252014-01-29 Eli Zaretskii <eliz@gnu.org>
1026
824a51e6
EZ
1027 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
1028 of zero to print strings, GDB doesn't like it.
1029
198af6df
EZ
1030 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
1031 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
1032 we still use correct addresses. (Bug#16576)
1033
52840a9c
KH
10342014-01-27 K. Handa <handa@gnu.org>
1035
f2726fa2
GM
1036 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
1037 to preserve the code detection behavior of 24.3.
52840a9c 1038 * coding.h (struct coding_system): New member detected_utf8_bytes.
52840a9c
KH
1039 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
1040 (decode_coding_gap): Use short cut for UTF-8 file reading only
1041 when coding->detected_utf8_bytes equals to coding->src_bytes.
52840a9c
KH
1042 * fileio.c (Finsert_file_contents): Cancel the previous change.
1043
5442c6ce
MR
10442014-01-29 Martin Rudalics <rudalics@gmx.at>
1045
1046 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
1047 that are not visible.
1048
61c2b0b3
JD
10492014-01-29 Jan Djärv <jan.h.d@swipnet.se>
1050
1051 * xmenu.c (create_and_show_popup_menu): Handle case when no key
1052 is grabbed (Bug#16565).
1053
1dcb169c
MR
10542014-01-28 Martin Rudalics <rudalics@gmx.at>
1055
1056 * xdisp.c (last_max_ascent): Re-remove after erroneously
1057 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
1058 from 2013-03-29.
1059 (move_it_to): Re-remove reference to last_max_ascent.
1060 (Fwindow_text_pixel_size): Add iterator's max_ascent and
5b87d0d9
MN
1061 max_descent here instead of calling line_bottom_y.
1062 Fix doc-string.
1dcb169c 1063
6affb4a8
DA
10642014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
1065
1066 * terminal.c (initial_free_frame_resources): New function.
1067 (init_initial_terminal): Install new hook to free face cache
1068 on initial frame and avoid memory leak. For details, see
1069 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
2275de87 1070 * xfaces.c (free_frame_faces): Adjust comment.
6affb4a8 1071
12cb2b06
PE
10722014-01-26 Paul Eggert <eggert@cs.ucla.edu>
1073
1074 * data.c (Fstring_to_number): Document results if unparsable
1075 (Bug#16551).
1076
4988180d
JD
10772014-01-26 Jan Djärv <jan.h.d@swipnet.se>
1078
1079 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
1080
4f8c23b1
PE
10812014-01-26 Paul Eggert <eggert@cs.ucla.edu>
1082
e6f29a68
PE
1083 When decoding, prefer ptrdiff_t to int for buffer positions etc.
1084 * coding.c (detect_coding_utf_8, emacs_mule_char)
1085 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
1086 (check_utf_8, decode_coding):
1087 * coding.h (struct coding_system.errors):
1088 Use ptrdiff_t, not int, for integer values derived from buffer and
1089 string positions.
1090
4f8c23b1
PE
1091 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
1092 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
1093 before invoking decode_coding_gap, since there's just one block.
1094
45ccd909
MR
10952014-01-25 Martin Rudalics <rudalics@gmx.at>
1096
1097 Fix handling of face attributes in Fx_create_frame (Bug#16529).
1098 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
1099 too early. Again run change_frame_size before assigning menu-
1100 and tool-bar-lines.
1101
83682f3e
FP
11022014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
1103
1104 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
1105 arrives, call x_check_fullscreen, in case the new display has a
1106 different resolution. (Bug#16517)
1107
e96f7bf1
EZ
11082014-01-25 Eli Zaretskii <eliz@gnu.org>
1109
1110 * term.c (read_menu_input): If the selected frame changes, exit
1111 the menu.
1112 (tty_menu_show): If the selected frame changes while we displayed
1113 a menu, throw to top level. (Bug#16479)
1114
afd4479f
SM
11152014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
1116
1117 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
1118
0fadc0b0
PE
11192014-01-24 Paul Eggert <eggert@cs.ucla.edu>
1120
1121 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
1122 * data.c (count_one_bits_word): Fix bug (negated comparison)
1123 when BITS_PER_ULL < BITS_PER_BITS_WORD.
1124
aac1f8dd
DA
11252014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1126
5b87d0d9
MN
1127 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
1128 Avoid undefined behavior by initializing display property bit of a
aac1f8dd
DA
1129 string processed by the bidirectional iterator. For details, see
1130 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
1131
ed44be70
PE
11322014-01-23 Paul Eggert <eggert@cs.ucla.edu>
1133
1134 Minor cleanup of previous change.
1135 * image.c (imagemagick_error, Fimagemagick_types):
1136 Omit some recently-introduced and unnecessary casts and assignments.
1137
565935c8
DA
11382014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
1139
1140 Fix two memory leaks discovered with Valgrind.
1141 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
1142 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
1143
6cb4da45
MR
11442014-01-22 Martin Rudalics <rudalics@gmx.at>
1145
1146 Fixes in window size functions around Bug#16430 and Bug#16470.
1147 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
1148 (Fwindow_mode_line_height, Fwindow_header_line_height)
1149 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
1150 Minor doc-string adjustments.
1151 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
1152 Rewrite doc-strings.
1153 (window_body_height, window_body_width): Do not count partially
1154 visible lines/columns when PIXELWISE is nil (Bug#16470).
1155 (Qfloor, Qceiling): New symbols.
1156
f7551c6c
EZ
11572014-01-21 Eli Zaretskii <eliz@gnu.org>
1158
1159 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
1160 when the image cache is not yet allocated. (Bug#16509)
1161
5004c3bf
DA
11622014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
1163
1164 * buffer.c (Fkill_buffer): When killing an indirect buffer,
1165 re-attach intervals to its base buffer (Bug#16502).
1166 * intervals.c (set_interval_object): Move from here...
1167 * intervals.h (set_interval_object): ... to here. Fix comments.
1168
f952002e
PE
11692014-01-20 Paul Eggert <eggert@cs.ucla.edu>
1170
009581fa 1171 Avoid undefined behavior by initializing buffer redisplay bit.
3c35702f
PE
1172 Problem reported by Dmitry Antipov in
1173 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
009581fa 1174 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
3c35702f 1175
f952002e
PE
1176 Revert some of the CANNOT_DUMP fix (Bug#16494).
1177 * lread.c (init_lread): Fix typo: NILP, not !NILP.
1178
21f95411
EZ
11792014-01-19 Eli Zaretskii <eliz@gnu.org>
1180
1181 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
1182 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
1183 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
1184 they are replaced by macros that expand into direct calls to the
1185 corresponding functions from GDI32.DLL.
1186 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
1187 variables in the Cygwin build, they are unused.
1188
d25f735b
KH
11892014-01-19 K. Handa <handa@gnu.org>
1190
1191 * composite.c (composition_update_it): Fix previous change.
1192
5197f0c2
EZ
11932014-01-18 Eli Zaretskii <eliz@gnu.org>
1194
1195 Fix file name handling on MS-Windows 9X.
1196 * w32.c (maybe_load_unicows_dll): New function.
1197
1198 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
1199 on, to make sure we can convert file names to and from UTF-8 on
1200 Windows 9X. This fixes a failure to start up because Emacs cannot
1201 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
1202
1203 * w32font.c [WINDOWSNT]: Include w32.h.
1204 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
1205 of implementing the same stuff.
1206 Remove now unused g_b_init_is_windows_9x.
1207
1208 * w32.h (maybe_load_unicows_dll): Add prototype.
1209
20adfbd8
EZ
12102014-01-17 Eli Zaretskii <eliz@gnu.org>
1211
1212 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
1213 switch to single keyboard. Prevents daemon crashes when a new
1214 client connects while we show a TTY menu in an existing client.
1215 (Bug#16479)
1216
d1eaf34b
PE
12172014-01-14 Paul Eggert <eggert@cs.ucla.edu>
1218
1219 Fix MinGW64 porting problem with _setjmp.
1220 Reported by Eli Zaretskii in:
1221 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
1222 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
1223 the old _setjmp and _longjmp. All uses changed.
1224
1b49bd5d
DC
12252014-01-13 Daniel Colascione <dancol@dancol.org>
1226
5b87d0d9
MN
1227 * textprop.c (Fremove_list_of_text_properties):
1228 Correctly handle reaching the end of the interval tree. (Bug#15344)
1b49bd5d 1229
a3f2bf1b
MR
12302014-01-13 Martin Rudalics <rudalics@gmx.at>
1231
1232 * xdisp.c (resize_mini_window): Round height to a multiple of
1233 frame's line height. Fix bug in calculation of window start
1234 position (Bug#16424).
1235
6c21e306
JD
12362014-01-13 Jan Djärv <jan.h.d@swipnet.se>
1237
1238 * macfont.m: Include termchar.h.
1239 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
1240 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
5b87d0d9 1241 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
6c21e306
JD
1242 *_WITH_GC_* to take face and f as parameters.
1243 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
1244 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
1245
7a1b473c
DC
12462014-01-13 Daniel Colascione <dancol@dancol.org>
1247
1248 Fix menu item updating in the presence of the Unity global menu
1249 GTK+ module.
1250
1251 * gtkutil.h (xg_have_tear_offs): Add frame parameter
1252 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
1253 tear-off.
c295fc18 1254 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
7a1b473c 1255 updating menus; explain why.
a787d37a
DC
1256 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
1257 problem it's supposed to solve and it interferes with detecting
1258 the presence of a global menu.
7a1b473c
DC
1259 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
1260 parameter.
1261
67671fb1
KH
12622014-01-11 K. Handa <handa@gnu.org>
1263
1264 * composite.c (composition_update_it): Fix indexing of
1265 LGSTRING_CHAR (Bug#15984).
1266
e05d3a05
FP
12672014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
1268
1269 * unexw32.c (_start) [__MINGW64__]: Define to __start.
1270
02013850
EZ
12712014-01-11 Eli Zaretskii <eliz@gnu.org>
1272
1273 * xdisp.c (try_window_id): Don't use this function's optimizations
1274 if overlays in the buffer displayed by the window have changed
1275 since last redisplay. (Bug#16347)
1276 (message_dolog): Fix indentation.
1277
f96d0a6b
MR
12782014-01-11 Martin Rudalics <rudalics@gmx.at>
1279
1280 * frame.c (frame_resize_pixelwise): Fix doc-string.
1281
7d7ccb88
MR
12822014-01-10 Martin Rudalics <rudalics@gmx.at>
1283
1284 Fix handling of internal borders (Bug#16348).
5b87d0d9
MN
1285 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
1286 Remove internal border width from pixel width of windows.
7d7ccb88
MR
1287 (change_frame_size_1): Don't return early when frame's pixel
1288 size changes - we still have to record the new sizes in the
1289 frame structure.
1290 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
1291 also when toolbar gets larger.
1292 * window.c (check_frame_size): Include internal_border_width in
1293 check.
1294 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
5b87d0d9
MN
1295 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
1296 In non-toolkit/non-GTK version clear internal border.
7d7ccb88
MR
1297 * xterm.c (x_clear_under_internal_border): New function for
1298 non-toolkit/non-GTK version.
1299 (x_after_update_window_line): In non-toolkit/non-GTK version
1300 don't do that.
5b87d0d9
MN
1301 (handle_one_xevent, x_set_window_size):
1302 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
7d7ccb88
MR
1303 * xterm.h (x_clear_under_internal_border): Extern it.
1304
be316ede
PE
13052014-01-07 Paul Eggert <eggert@cs.ucla.edu>
1306
1307 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
1308 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
1309 it again.
1310
9f4e49e9
EZ
13112014-01-06 Eli Zaretskii <eliz@gnu.org>
1312
1313 * xdisp.c (redisplay_window): Don't skip window redisplay if the
1314 last value of point is not equal to buffer's point. (Bug#16129)
1315
81da295e
PE
13162014-01-05 Paul Eggert <eggert@cs.ucla.edu>
1317
da5ecfa9
PE
1318 Spelling fixes.
1319 * nsterm.h (updateCollectionBehavior): Rename from
1320 updateCollectionBehaviour. All uses changed.
1321
81da295e
PE
1322 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
1323 * Makefile.in (SETFATTR): New macro.
1324 (temacs$(EXEEXT)): Use it.
1325
5159d590
MR
13262014-01-04 Martin Rudalics <rudalics@gmx.at>
1327
1328 Fix maximization behavior on Windows (Bug#16300).
1329 * w32fns.c (w32_fullscreen_rect): Don't handle
1330 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
1331 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
1332 of SetWindowPos. Restore last placement also when leaving
1333 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
1334 but the FULLSCREEN_BOTH case.
1335
56a0e352
PE
13362014-01-03 Paul Eggert <eggert@cs.ucla.edu>
1337
1338 Port to C89.
1339 * data.c (arithcompare_driver):
1340 * fileio.c (Fcar_less_than_car):
1341 * fns.c (internal_equal):
1342 * frame.c (delete_frame):
1343 * lisp.h (enum More_Lisp_Bits):
1344 * lread.c (read1):
1345 Avoid C99 constructs that don't work in C89.
1346 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
1347 to port to C89, which doesn't have 'long long'.
1348 (count_trailing_zero_bits): Use them.
1349
0d53f628
CY
13502014-01-03 Chong Yidong <cyd@gnu.org>
1351
1352 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
1353
44c5e192
MR
13542014-01-02 Martin Rudalics <rudalics@gmx.at>
1355
1356 Further adjust frame/window scrollbar width calculations.
5b87d0d9
MN
1357 * window.c (apply_window_adjustment):
1358 Set windows_or_buffers_changed.
44c5e192
MR
1359 (Fwindow_scroll_bars): Return actual scrollbar width.
1360 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
1361 For non-toolkit builds again use 14 as minimum width and set
1362 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
1363 * xterm.c (XTset_vertical_scroll_bar): Take width from
1364 WINDOW_SCROLL_BAR_AREA_WIDTH.
1365 (x_new_font): Rename wid to unit. Base calculation of new
1366 scrollbar width on toolkit used and make it analogous to that of
1367 x_set_scroll_bar_default_width.
1368 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
1369 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
1370 of GetSystemMetrics.
1371 * w32term.c (w32_set_vertical_scroll_bar): Take width from
1372 WINDOW_SCROLL_BAR_AREA_WIDTH.
1373 (x_new_font): Make it correspond to changes in xterm.c.
1374
b00cdd96
PE
13752014-01-01 Paul Eggert <eggert@cs.ucla.edu>
1376
1377 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
1378 This is a cleaner way to fix the MinGW-w64 porting problem.
1379 Check for INTPTR_MAX misconfiguration.
1380
c10e9ece
EZ
13812014-01-01 Eli Zaretskii <eliz@gnu.org>
1382
1383 * search.c (newline_cache_on_off, find_newline): In indirect
1384 buffers, use the newline cache of the base buffer.
1385
1386 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
1387 buffer, invalidate the caches of its base buffer. (Bug#16265)
1388
1389 * indent.c (width_run_cache_on_off, compute_motion): In indirect
1390 buffers, use the width-run cache of the base buffer.
1391
1392 * xdisp.c (redisplay_window): When the window displays an indirect
1393 buffer, and the character widths in the display table have
1394 changed, invalidate the width-run cache of the corresponding base
1395 buffer.
1396
1397 * fileio.c (Finsert_file_contents): When invalidating the newline
1398 cache, consider the case of inserting into indirect buffer.
1399
1400 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
1401 In indirect buffers, use the paragraph cache of the base buffer.
1402
91415fb1
MR
14032013-12-31 Martin Rudalics <rudalics@gmx.at>
1404
1405 * window.c (grow_mini_window): Fix last change.
1406
a2301006
JD
14072013-12-31 Jan Djärv <jan.h.d@swipnet.se>
1408
1409 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
1410
0bbd0e0b
FP
14112013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
1412
bd717ca4
FP
1413 * w32term.c (w32_initialize): Use LCID and LOWORD.
1414
1415 * w32proc.c (create_child): Use pid_t for 5th argument.
1416 (IsValidLocale): Don't provide prototype for MinGW64.
1417 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
1418 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
1419
1420 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
1421 MinGW64 doesn't support.
1422
1423 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
1424
0bbd0e0b
FP
1425 * w32.c (set_named_security_info): New function.
1426 (acl_set_file): Fall back on set_named_security_info if
1427 set_file_security fails.
1428 (g_b_init_set_named_security_info_w)
1429 (g_b_init_set_named_security_info_a): New static variables.
1430 (globals_of_w32): Initialize them to zero.
1431 (set_named_security_info): Set them to non-zero if the
1432 corresponding API is available.
5b87d0d9
MN
1433 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
1434 New function typedefs.
0bbd0e0b 1435
9b3c0a16
MR
14362013-12-31 Martin Rudalics <rudalics@gmx.at>
1437
1438 Some more fixes following pixelwise resize changes including one
1439 for Bug#16306.
1440 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
1441 of frame_resize_pixelwise.
1442 * widget.c (pixel_to_text_size): New function.
1443 (update_wm_hints): Have size hints respect value of
1444 frame_resize_pixelwise.
1445 (EmacsFrameResize): Alway process resize requests pixelwise.
1446 * window.c (grow_mini_window): Make sure mini window is at least
1447 one line tall.
1448 * xdisp.c (display_menu_bar): Make sure menubar extends till
1449 right end of frame.
1450 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
1451 (x_set_tool_bar_lines): Calculate pixelwise.
1452 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
1453 frame_resize_pixelwise.
1454
2db9da01
JB
14552013-12-30 Juanma Barranquero <lekktu@gmail.com>
1456
1457 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
1458 variables not used there.
1459
1b7259fc
EZ
14602013-12-30 Eli Zaretskii <eliz@gnu.org>
1461
1462 * w32.c (sys_umask): New function. (Bug#16299)
1463
564eb533
MR
14642013-12-30 Martin Rudalics <rudalics@gmx.at>
1465
1466 * dispnew.c (change_frame_size_1): Take old width of root window
9b3c0a16 1467 from that window's pixel width. (Bug#16284)
564eb533 1468
a560b856
PE
14692013-12-29 Paul Eggert <eggert@cs.ucla.edu>
1470
1471 Plain copy-file no longer chmods an existing destination (Bug#16133).
1472 * fileio.c (realmask): Now a static var, not a local.
1473 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
1474 Remove arg STATPTR. All uses changed.
1475 (Fcopy_file): Do not alter permissions of existing destinations,
1476 unless PRESERVE-PERMISSIONS (renamed from
1477 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
1478 Avoid race when testing for existing destinations and for
1479 when input and output files are the same.
1480 If changing the group fails, adjust both default and
1481 preserved permissions so that access is not granted to the
1482 wrong group.
1483 (Fset_default_file_modes, init_fileio): Update realmask.
1484 (Fdefault_file_modes): Use realmask instead of calling umask.
1485
411bf4a4
PE
14862013-12-28 Paul Eggert <eggert@cs.ucla.edu>
1487
1488 Fix pipe bug with OS X emacs --daemon (Bug#16262).
1489 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
1490 flags on the daemon pipe ends before execing.
1491
bf7bea5d
EZ
14922013-12-28 Eli Zaretskii <eliz@gnu.org>
1493
1494 * w32fns.c (Fx_create_frame): Error out if called from a TTY
1495 session. (Bug#14739)
1496
fdadeb49
JC
14972013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
1498
1499 * callproc.c (Vexec_path): Document that exec-directory is in it.
1500
765fe182
JD
15012013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
1502
1503 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
1504 default.
1505
0f1d2934
CY
15062013-12-27 Chong Yidong <cyd@gnu.org>
1507
1508 * data.c (Fsymbol_function): Doc fix.
1509
0cbab19e
MR
15102013-12-26 Martin Rudalics <rudalics@gmx.at>
1511
1512 Some more tinkering with Bug#16051.
1513 * window.c (resize_frame_windows): Don't let the size of the
1514 root window drop below the frame's default character size.
1515 Never ever delete any subwindows - let the window manager do the
1516 clipping.
1517
1518 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
1519 of toolbar lines needed when they exceed the height of the root
1520 window.
1521 (unwind_create_frame_1): New function.
1522 (Fx_create_frame): Generally inhibit calling the window
1523 configuration change hook here. Remove extra call to
1524 change_frame_size - it's not needed when we don't run the
1525 configuration change hook.
1526
e76119d7
PE
15272013-12-26 Paul Eggert <eggert@cs.ucla.edu>
1528
1529 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
1530 On my Fedora 19 platform the core dumps were so big that
1531 my desktop became nearly catatonic.
1532 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
1533 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
1534 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
1535 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
1536 a clang-only syntax.
1537 * conf_post.h (__has_feature): New macro, if not already defined.
1538 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
1539 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
1540
9ab3ce4d
EZ
15412013-12-25 Eli Zaretskii <eliz@gnu.org>
1542
1543 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
1544 is a file name. (Bug#16252)
1545
c9352587
CY
15462013-12-25 Chong Yidong <cyd@gnu.org>
1547
35e951cd 1548 * keyboard.c (Voverriding_terminal_local_map)
c9352587
CY
1549 (Voverriding_local_map): Doc fix.
1550
1551 * keymap.c (Vemulation_mode_map_alists): Doc fix.
1552
ec6e26b8
EZ
15532013-12-24 Eli Zaretskii <eliz@gnu.org>
1554
1555 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
1556 file name when it is submitted to ShellExecute. Simplify code.
1557 Don't test DOCUMENT for being a string, as that is enforced by
1558 CHECK_STRING. Doc fix.
1559
0db7548b
EZ
15602013-12-23 Eli Zaretskii <eliz@gnu.org>
1561
1562 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
1563 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
1564 redisplay_tool_bar does. Improve and fix commentary.
1565 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
1566 limits of the glyph matrices. (Bug#16051)
cdcec259
EZ
1567 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
1568 only when the new size is different from the old one, and the new
1569 size can be achieved given the frame height.
0db7548b 1570
30143e3d
JD
15712013-12-23 Jan Djärv <jan.h.d@swipnet.se>
1572
1573 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
1574
aec3bf9f
GM
15752013-12-23 Glenn Morris <rgm@gnu.org>
1576
1577 * lread.c (Fload): Mention load-prefer-newer in doc.
1578
a2b89a51
MR
15792013-12-22 Martin Rudalics <rudalics@gmx.at>
1580
1581 Handle Bug#16207 by being more restrictive when running hooks.
1582 * window.c (unwind_change_frame): New function.
1583 (Fset_window_configuration): Don't run configuration change hook
1584 while the frame configuration is unsafe. Call select_window
1585 twice.
1586
2dc383bc
XF
15872013-12-22 Xue Fuqiao <xfq.free@gmail.com>
1588
1589 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
1590
df8b4c35
JD
15912013-12-21 Jan Djärv <jan.h.d@swipnet.se>
1592
1593 * nsterm.h: Declare EmacsColor category.
1594
1595 * nsterm.m (NSColor): Implement EmacsColor category.
1596 (ns_get_color): Use colorUsingDefaultColorSpace.
1597 (ns_get_color, ns_term_init): Use colorForEmacsRed.
1598
1599 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
1600
7667eeb9
EZ
16012013-12-21 Eli Zaretskii <eliz@gnu.org>
1602
1603 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
1604 having the PNG_NORETURN attribute, to avoid compiler warning in
1605 my_png_error.
1606
5b2b60f0
YM
16072013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1608
1609 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
1610
1611 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
1612 fringe background extension.
1613 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
1614 because they are now always the same as `left' and `width',
1615 respectively. Remove code for the case that `width' and
1616 `sb_width' are different.
1617
c44de18d
MR
16182013-12-20 Martin Rudalics <rudalics@gmx.at>
1619
1620 Remove scroll_bar_actual_width from frames.
1621 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
1622 * frame.c (Fscroll_bar_width): Return scroll bar area width.
1623 (x_figure_window_size):
1624 * nsterm.m (x_set_window_size):
1625 * widget.c (set_frame_size):
1626 * w32term.c (x_set_window_size):
1627 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
1628 scroll_bar_actual_width.
1629
1630 Convert scroll_bar members to integers on Windows.
1631 * w32term.h (struct scroll_bar): Convert top, left, width,
1632 height, start, end and dragging to integers.
1633 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
1634 scroll_bar members.
1635 * w32term.c (w32_set_scroll_bar_thumb)
1636 (w32_scroll_bar_handle_click): Remove XINT conversions for
1637 scroll_bar members. Treat bar->dragging as integer.
1638 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
1639 first element. Remove XINT conversions for scroll_bar members.
1640 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
1641 Remove XINT conversions for scroll_bar members.
1642
1643 Fix assignment for new window total sizes.
1644 * window.c (Fwindow_resize_apply_total): Assign values for
1645 minibuffer window.
1646
f5df4ceb
CY
16472013-12-20 Chong Yidong <cyd@gnu.org>
1648
1649 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
1650 argument to `append'.
1651
79f7284f
EZ
16522013-12-19 Eli Zaretskii <eliz@gnu.org>
1653
5df389f5
EZ
1654 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
1655 current text face, for extending the face of the display margins.
1656 (Bug#16192)
1657
79f7284f
EZ
1658 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
1659 Doc fix. (Bug#16190)
1660
1269a680
JD
16612013-12-19 Jan Djärv <jan.h.d@swipnet.se>
1662
1663 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
1664 Remove.
1665
1666 * nsterm.m (Qfile, Qurl): New.
1667 (EV_MODIFIERS2): New macro.
1668 (EV_MODIFIERS): Use EV_MODIFIERS2.
1669 (ns_term_init): Remove font and color from DND, does not work on
1670 newer OSX, and other ports don't have them.
1671 (performDragOperation:): Handle modifiers used during drag.
1672 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
1673 Remove global Lisp variables used to communicate with ns-win.el.
1674 Remove font and color handling.
1675 (syms_of_nsterm): Defsym Qfile and Qurl.
1676
e9dc713d 16772013-12-19 Anders Lindgren <andlind@gmail.com>
680e6b8c
JD
1678
1679 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
1680 (ns_constrain_all_frames, x_set_offset): Remove assignment to
1681 dont_constrain.
1682 (updateFrameSize:, windowWillResize:toSize:): Add trace.
1683 (constrainFrameRect): Remove special case nr_screens == 1.
1684 Don't constrain size to size of view.
1685
1686 * nsterm.h (ns_output): Remove dont_constrain.
1687
e9dc713d 16882013-12-19 Anders Lindgren <andlind@gmail.com>
570c054a
JD
1689
1690 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
1691
518c40a2
PE
16922013-12-18 Paul Eggert <eggert@cs.ucla.edu>
1693
1694 Minor fixes for recent openp changes.
1695 * lisp.h (GCPRO7): New macro.
1696 * lread.c (openp): Use bool for boolean; all callers changed.
1697 Protect save_string from GC. Don't assume that file descriptors
1698 are nonzero. Redo save_mtime comparison to avoid bogus GCC
1699 warning about uninitialized variable.
1700
39e896c1
EZ
17012013-12-18 Eli Zaretskii <eliz@gnu.org>
1702
1703 * w32fns.c (emacs_abort): Use intptr_t as argument of
1704 INT_BUFSIZE_BOUND, to avoid compiler warnings.
1705
9cdb8d85
GM
17062013-12-18 Glenn Morris <rgm@gnu.org>
1707
1f41ee56
GM
1708 * lread.c (Fload): Pass load_prefer_newer to openp.
1709 Don't bother checking mtime if openp already did it.
1710 (openp): Add `newer' argument, to check all suffixes
1711 and find the newest file.
1712 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
1713 * callproc.c (call_process):
1714 * charset.c (load_charset_map_from_file):
1715 * emacs.c (init_cmdargs):
1716 * image.c (x_create_bitmap_from_file, x_find_image_file):
1717 * lisp.h (openp):
1718 * lread.c (Flocate_file_internal):
1719 * process.c (Fformat_network_address):
1720 * sound.c (Fplay_sound_internal):
1721 * w32.c (check_windows_init_file):
1722 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
1723
9cdb8d85
GM
1724 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
1725
af025ae8
EZ
17262013-12-17 Eli Zaretskii <eliz@gnu.org>
1727
60e62dc5
EZ
1728 * w32.c (getloadavg): Don't index samples[] array with negative
1729 indices. Recover from wall-clock time being set backwards.
1730
af025ae8
EZ
1731 * w32term.c (w32_initialize): Declare the argument of
1732 set_user_model as const.
1733
1734 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
1735 (w32_menu_show): Constify some arguments passed to MessageBox.
1736
1737 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
1738 to initialize Lisp objects.
1739
1740 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
1741 initialize Lisp objects.
1742
1743 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
1744 use variables used only on X under that condition.
1745
1746 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
1747 variables not used there.
1748
8fb8c4f3
PE
17492013-12-16 Paul Eggert <eggert@cs.ucla.edu>
1750
1751 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
1752 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
1753
397e886f
EZ
17542013-12-16 Eli Zaretskii <eliz@gnu.org>
1755
1756 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
1757 code, revealed in presence of R2L characters, character
1758 compositions, and display vectors. A better fix for Bug#16148.
5e6d03b2
EZ
1759 (extend_face_to_end_of_line): Don't reference tool_bar_window in
1760 GTK and NS builds, they don't have this member of struct frame.
397e886f
EZ
1761
1762 * dispextern.h (struct composition_it): Correct a comment for the
1763 'width' member.
1764
32779713
PE
17652013-12-16 Paul Eggert <eggert@cs.ucla.edu>
1766
1767 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
1768 This prevents a compilation error on C compilers that do not
1769 default functions to return 'int' if not declared. Also, add
1770 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
1771 since it now uses inline functions.
1772
d865f6b5
EZ
17732013-12-16 Eli Zaretskii <eliz@gnu.org>
1774
1775 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
1776 display margins on mode line, header line, and in the frame's
1777 tool-bar window. (Bug#16165)
1778
0fa30f33
AS
17792013-12-16 Andreas Schwab <schwab@suse.de>
1780
1781 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
1782
82cf20e4
TZ
17832013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
1784
1785 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
c295fc18 1786 `CHECK_LIST_CONS'.
82cf20e4 1787
d144ef06
MR
17882013-12-16 Martin Rudalics <rudalics@gmx.at>
1789
1790 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
1791
5ae356d9
DA
17922013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
1793
1794 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
1795 intended to find bogus pointers in font objects (Bug#16140).
1796 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
1797 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
1798 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
1799 Disable for MS-Windows due to Bug#15876; apparently this
1800 requires more or less substantial changes in fontset code.
1801 * xfont.c (xfont_close):
1802 * xftfont.c (xftfont_close): Call x_display_info_for_display
1803 to check whether 'Display *' is valid (Bug#16093 and probably
1804 Bug#16069).
1805
e088f894
EZ
18062013-12-15 Eli Zaretskii <eliz@gnu.org>
1807
db50ad5f
EZ
1808 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
1809 Reported by Juanma Barranquero <lekktu@gmail.com>.
1810
1014b1dc
EZ
1811 * process.c (Fprocess_send_eof): Don't crash if someone tries to
1812 open a pty on MS-Windows. (Bug#16152)
1813
e088f894
EZ
1814 * emacs.c (decode_env_path): Fix bogus comparison against
1815 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
1816
119f64db
JB
18172013-12-15 Juanma Barranquero <lekktu@gmail.com>
1818
1819 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
1820 (Fx_file_dialog): Add parentheses around && to silence warning.
1821
1822 * w32term.c (construct_drag_n_drop): Remove unused local variable.
1823
dd1fb8cb
EZ
18242013-12-15 Eli Zaretskii <eliz@gnu.org>
1825
cdeb10ce
EZ
1826 * xdisp.c (extend_face_to_end_of_line): Extend background of
1827 non-default face in margin areas as well. (Bug#16151)
1828 (display_line): Call extend_face_to_end_of_line for continued
1829 lines as well, if the display margins have non-zero width.
1830 (set_glyph_string_background_width): When needed, set the
1831 extends_to_end_of_line_p flag on glyph strings to be drawn in
1832 margin areas, not only in the text area.
1833
dd1fb8cb
EZ
1834 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
1835 startup.
1836
27c1b043
PE
18372013-12-15 Paul Eggert <eggert@cs.ucla.edu>
1838
1839 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
1840 Don't worry about verify_error being t, since it has to be a list.
1841
96c06863
PE
18422013-12-14 Paul Eggert <eggert@cs.ucla.edu>
1843
1844 Use bool for boolean, focusing on headers.
1845 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
1846 No need to include <stdbool.h>, since conf_post.h does it now.
1847 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
1848 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
1849 (SET_PER_BUFFER_VALUE_P):
1850 * ccl.c, ccl.h (setup_ccl_program):
1851 * ccl.h (CHECK_CCL_PROGRAM):
1852 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
1853 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
1854 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
1855 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
1856 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
1857 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
1858 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
1859 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
1860 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
1861 (CHARSET_FAST_MAP_SET):
1862 * coding.c (decode_coding_ccl, encode_coding_ccl):
1863 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
1864 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
1865 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
1866 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
1867 (decode_coding_c_string):
1868 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
1869 * conf_post.h (has_attribute):
35e951cd 1870 * dispextern.h (trace_redisplay_p)
96c06863
PE
1871 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
1872 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
35e951cd 1873 (SET_GLYPH_FROM_CHAR_GLYPH)
96c06863
PE
1874 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
1875 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
1876 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
1877 (cursor_in_mouse_face_p):
1878 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
1879 (blank_row, prepare_desired_row)
1880 (build_frame_matrix_from_leaf_window, make_current)
1881 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
1882 (update_window, scrolling_window, update_frame_line):
1883 * disptab.h (GLYPH_FOLLOW_ALIASES):
1884 * editfns.c (Fformat):
1885 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
1886 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
1887 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
1888 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
1889 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
1890 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
1891 (FONT_DEFERRED_LOG):
35e951cd 1892 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
96c06863
PE
1893 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
1894 (FRAME_MOUSE_UPDATE):
1895 * fringe.c (Fdefine_fringe_bitmap):
1896 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
1897 (x_create_bitmap_from_xpm_data, xpm_load_image):
1898 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
1899 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
1900 (MERGE_INTERVAL_CACHE):
1901 * keymap.h (KEYMAPP):
1902 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
1903 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
1904 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
1905 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
1906 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
1907 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
1908 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
1909 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
1910 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
1911 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
1912 (SETUP_BUFFER_SYNTAX_TABLE):
1913 * systime.h (timespec_valid_p):
1914 * term.c (save_and_enable_current_matrix):
1915 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
1916 * xdisp.c (in_display_vector_p, display_tool_bar_line)
1917 (redisplay_internal, try_window_reusing_current_matrix)
1918 (sync_frame_with_window_matrix_rows, try_window_id)
1919 (display_menu_bar, display_tty_menu_item, display_mode_line)
1920 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
b4dd49e0 1921 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
96c06863
PE
1922 * xmenu.c (xmenu_show):
1923 * xterm.c (use_xim, x_term_init):
1924 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
1925 (struct x_bitmap_record):
1926 Use bool for booleans.
1927 * ccl.c (struct buffer_text):
1928 * ccl.h (struct ccl_program):
1929 * charset.h (struct charset):
1930 * cm.h (struct cm):
1931 * coding.h (struct iso_2022_spec, struct coding_system):
1932 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
1933 (struct glyph_string, struct face, struct face_cache)
1934 (struct bidi_string_data, struct bidi_it)
1935 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
1936 (struct image):
1937 * editfns.c (Fformat):
1938 * frame.h (struct frame):
1939 * fringe.c (struct fringe_bitmap):
1940 * intervals.h (struct interval):
1941 * keyboard.h (struct kboard):
1942 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
1943 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
1944 (struct Lisp_Buffer_Local_Value, union specbinding):
1945 * macfont.m (struct macfont_info):
1946 * process.h (struct Lisp_Process):
1947 * termchar.h (struct tty_display_info):
1948 * window.h (struct window):
1949 * xterm.h (struct x_output):
1950 Use bool_bf for boolean bit-fields.
1951 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
1952 All callers changed.
1953 * ccl.h (struct ccl_program): Remove unused members private_state,
1954 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
1955 eight_bit_control.
1956 (struct ccl_spec): Remove unused members cr_carryover,
1957 eight_bit_carryover.
1958 * conf_post.h: Include <stdbool.h>.
1959 (bool_bf): New type.
1960 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
35e951cd
JB
1961 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
1962 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
1963 'do { ... } while (false)' brackets.
b4dd49e0
PE
1964 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
1965 Args must now be expressions; all callers changed.
96c06863
PE
1966 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
1967 (PRODUCE_GLYPHS): Simplify use of boolean.
1968 * fileio.c (Fcopy_file):
1969 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
1970 * lisp.h (UNGCPRO): Return void, not int.
1971 (FOR_EACH_TAIL): Use void expression, not int expression.
1972 * region-cache.c: Reindent.
1973 * region-cache.h: Copy comments from region-cache.c, to fix
1974 incorrect remarks about booleans.
1975
2897da4d
EZ
19762013-12-14 Eli Zaretskii <eliz@gnu.org>
1977
1978 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
1979 when character at point is displayed from a display vector.
1980 (Bug#16148)
1981
31b4827e
TZ
19822013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
1983
1984 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
1985 now a list of certificate validation checks that will abort a
1986 connection with an error.
1987 (Fgnutls_boot): Document it and use it.
1988
5645852c
MR
19892013-12-14 Martin Rudalics <rudalics@gmx.at>
1990
1991 * w32term.c (w32_enable_frame_resize_hack): New variable.
1992 (x_set_window_size): Use it to hack frame resizing on Windows
1993 (Bug#16028).
1994
ec4440cf
EZ
19952013-12-14 Eli Zaretskii <eliz@gnu.org>
1996
1997 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
1998 Windows-specific code to w32.c. Change error message text to
1999 match that of Posix platforms.
2000
2001 * w32.c (w32_copy_file): New function, most of the code copied and
2002 reworked from Fcopy_file. Improve error handling. Plug memory
2003 leak when errors are thrown. Support file names outside of the
2004 current codepage. (Bug#7100)
2005
dc7909c4
PE
20062013-12-13 Paul Eggert <eggert@cs.ucla.edu>
2007
2008 * lread.c (load_path_default): Prototype.
2009
06a4f110
GM
20102013-12-13 Glenn Morris <rgm@gnu.org>
2011
2012 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
2013 (dump_path): Remove.
2014 (load-path-default): Remove `changed' argument.
2015 Do not set dump_path permanently. Simplify.
2016 (init_lread): Simplify.
2017 (syms_of_lread): Remove dump_path.
2018
5035fbc1
DA
20192013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
2020
2021 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
2022 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
2023 2013-12-12 font-related change to avoid Bug#16128, which
2024 is quite hard to fix without even more substantial changes.
2025
b6c888cc
DA
20262013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
2027
2028 * font.c (font_close_object): Check for live frame (Bug#16128).
2029
11dde529
PE
20302013-12-13 Paul Eggert <eggert@cs.ucla.edu>
2031
2032 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
2033 Return ptrdiff_t, not int, since it's a buffer size.
2034 Reindent/reparen some macros to a more Gnuish style.
2035
4618713a
PE
20362013-12-12 Paul Eggert <eggert@cs.ucla.edu>
2037
2038 Avoid undefined behavior with huge regexp interval counts.
2039 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
e9dc713d 2040 since it's now specialized to interval counts. All uses changed.
4618713a
PE
2041 Do not assume wrapraound on signed integer overflow.
2042 (regex_compile): Simplify based on the above changes.
2043
01633a17
EZ
20442013-12-12 Eli Zaretskii <eliz@gnu.org>
2045
2046 Support file names on MS-Windows that use characters outside of
2047 the current system codepage. (Bug#7100)
2048
2049 * w32.c (get_file_security, set_file_security)
2050 (create_symbolic_link): Separate pointers and boolean flags for
2051 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
2052 non-zero, else the former.
2053 (codepage_for_filenames, filename_to_utf16, )
5b87d0d9
MN
2054 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
2055 New functions.
01633a17
EZ
2056 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
2057 characters.
2058 (normalize_filename): Lose the DBCS code, now works on UTF-8.
2059 Accept only one argument; all callers changed.
2060 (dostounix_filename): Remove the second argument, now works in
2061 UTF-8. All callers changed.
2062 (parse_root): Lose DBCS code.
2063 (get_long_basename, w32_get_short_filename, init_environment)
2064 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
2065 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
2066 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
2067 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
2068 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
2069 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
2070 otherwise.
2071 (ansi_encode_filename): New function.
2072 (get_emacs_configuration, get_emacs_configuration_options):
2073 Functions deleted.
2074 (add_volume_info, GetCachedVolumeInformation): Run the input file
2075 name through unixtodos_filename, to ensure it is stored and
2076 referenced in canonical form.
2077 (get_volume_info): Lose the DBCS code, now works in UTF-8.
2078 (logon_network_drive, sys_link, utime): Improve error handling.
2079 (sys_access): New function.
2080 (hashval, generate_inode_val): Unused functions deleted.
2081 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
2082 (check_windows_init_file): Convert error message from UTF-8 to
2083 ANSI codepage, for display in the message box.
2084 (globals_of_w32): Set w32_unicode_filenames according to the OS
2085 version.
2086
2087 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
2088 w32_unicode_filenames is non-zero, ANSI mode otherwise.
2089 (syms_of_w32term): Declare w32-unicode-filenames.
2090
2091 * w32proc.c (new_child, delete_child): Remove code that handled
2092 unused pending_deletion and input_file members of the child struct.
2093 (create_child, sys_spawnve): Convert all file names to ANSI
2094 codepage. Use ANSI APIs explicitly; forcibly fail if any file
2095 name cannot be encoded in ANSI codepage. Don't use
2096 unixtodos_filename, mirror slashes by hand.
2097 (record_infile, record_pending_deletion): Functions deleted.
2098 (Fw32_short_file_name): Call w32_get_short_filename instead of
2099 GetShortPathName.
2100
2101 * w32notify.c (add_watch): Work in Unicode mode when
2102 w32_unicode_filenames is non-zero, ANSI mode otherwise.
2103 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
2104 instead, do the same with Lisp primitives.
2105
2106 * w32fns.c (file_dialog_callback, Fx_file_dialog)
2107 (Fsystem_move_file_to_trash, Fw32_shell_execute)
2108 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
2109 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
2110 (Fw32_shell_execute): Improve error reporting.
2111 (Fdefault_printer_name): Ifdef away for Cygwin.
2112
2113 * w32.h (struct _child_process): Remove input_file and
2114 pending_deletion members that are no longer used.
2115 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
2116 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
2117 (ansi_encode_filename): New and updated prototypes.
2118
2119 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
2120 APIs explicitly.
2121 (unexec): Don't use dostounix_filename, it expects a file name in
2122 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
2123 ANSI encoding.
2124
2125 * fileio.c (Ffile_name_directory, file_name_as_directory)
2126 (directory_file_name, Fexpand_file_name)
2127 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
2128 arguments of dostounix_filename.
2129 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
2130 use MAX_UTF8_PATH for size of file-name strings.
2131 (emacs_readlinkat): Build an explicitly unibyte string for file
2132 names.
a544fbe1
GM
2133 (syms_of_fileio) <file-name-coding-system>:
2134 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
01633a17
EZ
2135
2136 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
2137 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
2138 directories to UTF-8.
2139 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
2140 environment, and each element of the input PATH, to UTF-8.
2141
2142 * dired.c (file_attributes): Use build_unibyte_string explicitly
2143 to make Lisp strings from user and group names.
2144
2145 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
2146 decode_file.
2147
2148 * coding.c (decode_file_name, encode_file_name): New functions.
2149
2150 * termcap.c (tgetent): Adapt to the change in arguments of
2151 dostounix_filename.
2152
2153 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
2154 names.
2155
2156 * msdos.c (dostounix_filename, init_environment): Adapt to the
2157 change in arguments of dostounix_filename.
2158
2159 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
2160 [WINDOWSNT]: Encode file names passed to the image libraries in
2161 ANSI codepage.
2162
2163 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
2164 [WINDOWSNT]: Convert file names to the current ANSI codepage.
2165
2166 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
2167 arguments of dostounix_filename.
2168
cf86e18b
DA
21692013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
2170
2171 * font.h (struct font_entity) [HAVE_NS]: New field to record
2172 font driver which was used to create this entity.
2173 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
2174 frame where the font was opened.
2175 (font_close_object): Add prototype.
2176 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
2177 (font_close_object): Not static any more. Lost frame arg.
2178 Adjust comment and users.
2179 * alloc.c (cleanup_vector): Call font_close_object to adjust
2180 per-frame font counters correctly. If HAVE_NS, also call
2181 driver-specific cleanup for font-entity objects.
2182 * ftfont.c (ftfont_open):
2183 * nsfont.m (nsfont_open):
2184 * w32font.c (w32font_open_internal):
2185 * xfont.c (xfont_open):
2186 * xftfont.c (xftfont_open): Save frame pointer in font object.
2187 * macfont.m (macfont_open): Likewise.
2188 (macfont_descriptor_entity): Save driver pointer to be able
2189 to call its free_entity routine when font-entity is swept.
2190 * ftxfont.c (ftxfont_open): Add eassert because frame
2191 pointer should be saved by ftfont_driver.open.
2192
96542302
DA
21932013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
2194
2195 * xterm.c (x_make_frame_visible): Restore hack which is needed when
2196 input polling is used. This is still meaningful for Cygwin, see
2197 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
5b87d0d9
MN
2198 * keyboard.c (poll_for_input_1, input_polling_used):
2199 Define unconditionally.
397a32c1
DA
2200 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
2201 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
2202 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
2203 (font_for_char): Prefer ptrdiff_t to int for buffer position.
2204 (face_for_char): Likewise. Rearrange eassert and return ASCII
2205 face for CHAR_BYTE8_P.
2206 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
96542302 2207
1421be84
KB
22082013-12-11 Ken Brown <kbrown@cornell.edu>
2209
2210 * dispextern.h (erase_phys_cursor):
2211 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
2212
5a80236f
DA
22132013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
2214
2215 * nsterm.m (x_free_frame_resources):
2216 * term.c (tty_free_frame_resources):
2217 * xterm.c (x_free_frame_resources): Do not check for non-NULL
2218 face cache because it's implied by free_frame_faces anyway.
2219 * w32term.c (x_free_frame_resources): Likewise. Do not call
2220 free_frame_faces twice.
2221
4ec52e2f
RS
22222013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2223
2224 * editfns.c (Fformat_time_string): Mention %F in the doc.
2225
d94c40c1
MR
22262013-12-11 Martin Rudalics <rudalics@gmx.at>
2227
2228 * window.c (resize_frame_windows): Don't return immediately when
2229 the root window's size doesn't change - the minibuffer window
2230 may still have to be repositioned/resized.
2231 * xfns.c (Fx_create_frame): Always change the frame size after
2232 initializing the frame's faces.
2233 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
2234 change_frame_size should already have done it.
2235 (x_new_font): Assign new tool- and menu-bar heights.
2236 (x_set_window_size_1): Account for tool- and menu-bar heights
e9dc713d 2237 (Bug#16013). Don't set pixel sizes since change_frame_size
d94c40c1
MR
2238 should already have done it.
2239
a8f9bc05
PE
22402013-12-11 Paul Eggert <eggert@cs.ucla.edu>
2241
2242 Remove the option of using libcrypto.
2243 * Makefile.in (LIB_CRYPTO): Remove.
2244 (LIBES): Don't use it.
2245
26ec2ce9
JL
22462013-12-11 Juri Linkov <juri@jurta.org>
2247
2248 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
2249 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
2250
a71cfa02
DA
22512013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
2252
2253 * xdisp.c (display_tool_bar_line): Don't extend on a previously
2254 drawn tool bar items (Bug#16058).
e8374b39 2255 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
a71cfa02 2256
336fe071
KB
22572013-12-09 Ken Brown <kbrown@cornell.edu>
2258
2259 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
2260
2261 * lisp.h (get_frame_param): Adjust conditions for prototype
2262 declaration.
2263
ad8a47b8
DA
22642013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
2265
2266 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
2267 Avoid unused macro warning if configured --without-xft.
2268
5e48429a
JD
22692013-12-09 Jan Djärv <jan.h.d@swipnet.se>
2270
2271 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
2272
40f18bf3
JD
22732013-12-08 Jan Djärv <jan.h.d@swipnet.se>
2274
a6c4680a 2275 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
b3e42b70 2276
a6c4680a 2277 * emacs.c (main): Call fixup_locale a second time for GNUstep.
40f18bf3 2278
acfe4602
MR
22792013-12-08 Martin Rudalics <rudalics@gmx.at>
2280
2281 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
2282
95b3d095
PE
22832013-12-08 Paul Eggert <eggert@cs.ucla.edu>
2284
e9551b12
PE
2285 Use libcrypto's checksum implementations if available, for speed.
2286 * Makefile.in (LIB_CRYPTO): New macro.
2287 (LIBES): Use it.
2288
95b3d095
PE
2289 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
2290 The macro didn't conform to C99 due to type mismatch,
2291 which caused compilation failure with Sun C 5.12,
2292 and it was confusing anyway. Include window.h to declare
2293 redisplay_other_windows.
2294
0d9cba29
SM
22952013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
2296
2297 * window.c (set_window_buffer): Update mode line (bug#16084).
2298
67840e66
PE
22992013-12-07 Paul Eggert <eggert@cs.ucla.edu>
2300
2301 Fix minor problems found by static checking.
2302 * keyboard.c (poll_for_input_1, input_polling_used):
2303 Define only if HAVE_NTGUI.
2304 * xmenu.c (popup_activate_callback): Omit unnecessary
2305 check against USE_X_TOOLKIT, which must be defined here anyway.
2306 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
2307 Now static.
2308
947003b5
MR
23092013-12-07 Martin Rudalics <rudalics@gmx.at>
2310
2311 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
2312
7def8cbd
JD
23132013-12-07 Jan Djärv <jan.h.d@swipnet.se>
2314
c4142a83
JD
2315 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
2316
1bb2debd
JD
2317 * nsterm.m (x_set_window_size): Remove fprintf.
2318 (init): Define always. Set applicationDidFinishLaunchingCalled
a6c4680a 2319 for GNUstep.
0d9cba29
SM
2320 (applicationDidFinishLaunching:):
2321 Set applicationDidFinishLaunchingCalled.
1bb2debd
JD
2322 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
2323 not called.
2324
2325 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
2326
fa6fa1a1 2327 Pixel resize changes for NS (Bug#16049).
7def8cbd
JD
2328 * nsterm.m (x_set_window_size): Change parameters rows/cols to
2329 height/width. row/cols are locals.
2330 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
2331 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
2332 (windowWillResize): Remove gsextra. Calculate extra as in
2333 updateFrameSize.
0d9cba29
SM
2334 (x_new_font): Don't change frame size if fullscreen.
2335 Change size pixelwise.
7def8cbd
JD
2336
2337 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
2338 comment in xfns.c. Change to pixelwise call.
2339
6d6aa291
EZ
23402013-12-06 Eli Zaretskii <eliz@gnu.org>
2341
2342 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
2343 (Bug#16070)
2344
64ed4306
DA
23452013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
2346
2347 * xterm.c (input_signal_count): Remove.
2348 (x_dispatch_event): Define unconditionally.
2349 (x_make_frame_visible): Process X events until the frame
2350 is really visible (Bug#16027).
2351 * xterm.h (x_dispatch_event): Declare unconditionally.
2352
c619527c
JD
23532013-12-05 Jan Djärv <jan.h.d@swipnet.se>
2354
2355 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
2356
2357 * nsterm.m (x_set_window_size): Handle pixelwise.
2358
8bea269d
MR
23592013-12-05 Martin Rudalics <rudalics@gmx.at>
2360
2361 * w32term.c (x_new_font):
2362 * xterm.c (x_new_font): Calculate new frame size from new font
2363 size (Bug#16028).
2364
22800ae9
SM
23652013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
2366
105324ce
SM
2367 * lisp.h (FOR_EACH_TAIL): New macro.
2368 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
2369
22800ae9
SM
2370 * window.c (select_window): Call second wset_redisplay before we change
2371 selected_window (bug#16034).
2372
c521fe29
PE
23732013-12-04 Paul Eggert <eggert@cs.ucla.edu>
2374
2375 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
2376
913250cf
EZ
23772013-12-04 Eli Zaretskii <eliz@gnu.org>
2378
2379 * w32xfns.c: Include window.h, to avoid a compiler warning.
2380
5961ad6c
SM
23812013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
2382
2383 * window.c (window_scroll): Mark window for redisplay (bug#16034).
2384 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
2385 window_scroll takes care of it.
2386 (Fset_window_point, Fdelete_other_windows_internal)
2387 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
2388 (Fsplit_window_internal, Fdelete_window_internal)
2389 (Fresize_mini_window_internal, Fset_window_configuration)
2390 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
2391 cause redisplay instead of forcing a complete redisplay.
2392 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
2393 we're only affecting the selected_window.
2394
ad826124
EZ
23952013-12-04 Eli Zaretskii <eliz@gnu.org>
2396
2397 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
2398 directional control characters. Update type and category
2399 determination according to the UBA from Unicode v6.3.
2400 (bidi_category_t): New category EXPLICIT_FORMATTING.
2401
2402 * dispextern.h (bidi_type_t): Update to include new bidirectional
2403 properties introduced with Unicode v6.3. (Bug#16043)
2404
2db4a1b6
MR
24052013-12-04 Martin Rudalics <rudalics@gmx.at>
2406
2407 * xterm.c (XTflash): Fix coordinate of bottom area to flash
2408 (Bug#16044).
2409
a378aa9d
DA
24102013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
2411
2412 * font.c (font_list_entities): Remove dummy assignment.
2413 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
2414 used on graphic displays only. Remove unused 'font_encoder' member.
a84c9950 2415 (struct font_bitmap): Remove unused 'extra' member.
a378aa9d 2416 * nsfont.m (nsfont_open):
a84c9950
DA
2417 * w32font.c (w32font_open_internal):
2418 * ftfont.c (ftfont_get_bitmap): Adjust users.
a378aa9d 2419
2654ac09
PE
24202013-12-03 Paul Eggert <eggert@cs.ucla.edu>
2421
5df474aa
PE
2422 Use bool for boolean.
2423 * tparam.c (tparam1):
2424 * undo.c (record_point, record_property_change):
2425 Use bool for boolean, for local vars that are always true or false.
2426
2654ac09
PE
2427 Minor integer overflow fixes (Bug#16033).
2428 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
2429 This improves on the previous fix to this function.
2430 (window_resize_check): When summing up pixel counts, don't rely on
2431 undefined behavior if the sum overflows.
2432
7303a0ae
MR
24332013-12-03 Martin Rudalics <rudalics@gmx.at>
2434
2435 * window.c (Fset_window_new_pixel): Don't choke at negative
2436 argument value (Bug#16033).
2437
2438 * xfns.c (Fx_create_frame): Add another call to change_frame_size
2439 to avoid crash in window_box_height.
2440
2441 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
2442 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
2443 calculation.
2444 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
2445
25636e13
PE
24462013-12-03 Paul Eggert <eggert@cs.ucla.edu>
2447
2448 Minor integer overflow fixes.
2449 * window.c (Fset_window_new_pixel, grow_mini_window):
2450 * xdisp.c (Fwindow_text_pixel_size):
2451 Avoid undefined behavior on signed integer overflow.
2452 * xfns.c (x_set_mouse_color):
2453 Check that drag shape fits in 'unsigned', since that's what X wants.
2454
21bf394d
EZ
24552013-12-02 Eli Zaretskii <eliz@gnu.org>
2456
2457 Improve reporting of fatal exception on MS-Windows.
2458 * w32fns.c (my_exception_handler): New function.
2459 (globals_of_w32fns): Set it up as the unhandled exception
2460 handler. Initialize exception code and address to zeros.
2461 (emacs_abort): If the exception code and address are available,
2462 print them at the beginning of the backtrace. Fix the format of
2463 printing addresses (was producing 0x0x12345678 on XP).
2464 (Bug#15994)
2465
f345395c
HE
24662013-12-02 Helmut Eller <eller.helmut@gmail.com>
2467
2468 * eval.c (Fbacktrace__locals): New function.
2469 (syms_of_eval): Defsubr it.
2470
dacc9715
DA
24712013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
2472
2473 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
2474 Define here to unify between...
2475 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
2476 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
2477
e0e0af3b
YM
24782013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2479
2480 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
2481
2482 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
2483 fringe background extension.
2484 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
2485 because they are now always the same as `left' and `width',
2486 respectively. Remove code for the case that `width' and
2487 `sb_width' are different.
2488
75b09539
PE
24892013-12-01 Paul Eggert <eggert@cs.ucla.edu>
2490
2491 Fix minor problems found by static checking.
2492 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
2493 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
2494 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
2495
5f9aee6f
LMI
24962013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2497
2498 * image.c (imagemagick_compute_animated_image): Don't crash if we
2499 have an animation with different-sized images (bug#15313).
2500
90caab3f
MR
25012013-11-30 Martin Rudalics <rudalics@gmx.at>
2502
2503 Remove some unused items introduced during pixelwise change.
2504 * window.c (window_resize_total_check): Remove unused function.
2505 * xdisp.c (remember_mouse_glyph): Remove unused label.
2506 (Ftool_bar_height): Move declaration inside #if.
2507 * xterm.c (x_set_window_size): Don't use r and c.
2508
6ae87264
JB
25092013-11-30 Juanma Barranquero <lekktu@gmail.com>
2510
2511 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
2512 `value' and `endp'.
2513
2514 * window.c (Fset_window_configuration): Comment out unused variables.
2515
2516 * w32term.c (w32_read_socket): Remove unused variable `buf'.
2517
f80e1bb6
JD
25182013-11-30 Jan Djärv <jan.h.d@swipnet.se>
2519
eb6f376d
JD
2520 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
2521
8e2d7ef2
JD
2522 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
2523
2524 * gnutls.c (gnutls_audit_log_function): Only declare and define if
2525 HAVE_GNUTLS3 (Bug#16001).
2526
f80e1bb6
JD
2527 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
2528 if interrupts are deferred (Bug#15801).
2529
10634b40 25302013-11-30 Martin Rudalics <rudalics@gmx.at>
880e6158
MR
2531
2532 Support resizing frames and windows pixelwise.
2533 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
2534 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
2535 (struct glyph_matrix): Replace window_left_col and
2536 window_top_line by window_pixel_left and window_pixel_top.
0d9cba29
SM
2537 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
2538 Minor rewrite.
880e6158
MR
2539 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
2540 (draw_window_divider, move_it_to, x_draw_right_divider)
2541 (x_draw_bottom_divider, change_frame_size): Add or fix
2542 declarations.
2543 * dispnew.c (change_frame_size_1): Change prototype.
2544 (adjust_glyph_matrix, required_matrix_width)
2545 (adjust_frame_glyphs_for_window_redisplay): Use pixel
2546 values instead of lines and columns.
2547 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
2548 WINDOW_TOTAL_FRINGE_WIDTH.
2549 (handle_window_change_signal, do_pending_window_change)
2550 (init_display): Adjusts calls of change_frame_size.
2551 (change_frame_size, change_frame_size_1): Handle pixelwise
2552 changes.
0d9cba29
SM
2553 * frame.c (Qright_divider_width, Qbottom_divider_width):
2554 New Lisp objects.
880e6158
MR
2555 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
2556 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
2557 (x_set_internal_border_width, x_set_vertical_scroll_bars)
2558 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
2559 values.
2560 (set_frame_param): New function.
2561 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
2562 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
2563 (Ffringe_width, Fborder_width, Fright_divider_width)
2564 (Fbottom_divider_width): New functions, defsubr them.
0d9cba29
SM
2565 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
2566 New argument pixelwise.
880e6158
MR
2567 (struct frame_parm_table): New members Qright_divider_width and
2568 Qbottom_divider_width.
2569 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
2570 (x_report_frame_params): Handle Qright_divider_width and
2571 Qbottom_divider_width.
0d9cba29
SM
2572 (x_set_right_divider_width, x_set_bottom_divider_width):
2573 New functions.
880e6158
MR
2574 (frame_resize_pixelwise): New option.
2575 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
2576 new_pixelwise, right_divider_width and bottom_divider_width;
2577 remove total_lines; rename text_lines, text_cols, new_text_lines
2578 and new_text_cols to text_height, text_width, new_height and
2579 new_width respectively.
2580 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
2581 FRAME_TEXT_WIDTH respectively.
2582 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
2583 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
0d9cba29
SM
2584 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
2585 New macros.
880e6158
MR
2586 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
2587 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
2588 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
2589 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
2590 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
2591 (FRAME_TOTAL_COLS_ARG): Remove macro.
2592 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
2593 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
2594 (x_wm_set_size_hint): Handle frame pixel sizes.
0d9cba29
SM
2595 * indent.c (compute_motion, Fcompute_motion):
2596 Call window_body_width instead of window_body_cols.
880e6158
MR
2597 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
2598 (make_lispy_position): Handle right and bottom dividers.
2599 (Fsuspend_emacs): Pixelize call of change_frame_size.
2600 * keyboard.h: Extern Qright_divider, Qbottom_divider.
2601 * lisp.h: Extern set_frame_param.
2602 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
2603 x_set_window_size.
0d9cba29
SM
2604 (Fx_create_frame): Add entry for vertical_drag_cursor.
2605 Pixelize call of change_frame_size.
880e6158
MR
2606 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
2607 * nsterm.m (ns_update_window_end): Optionally draw right
2608 divider.
0d9cba29
SM
2609 (x_set_window_size): Add argument pixelwise.
2610 Call check_frame_size and change_frame_size with pixelwise zero.
880e6158
MR
2611 (ns_draw_window_divider): New function.
2612 (ns_redisplay_interface): Add ns_draw_window_divider.
2613 (updateFrameSize:): Call change_frame_size with pixelwise zero.
2614 (x_new_font): Call x_set_window_size with pixelwise zero.
2615 * print.c (print_object): For a window print its sequence
2616 number again.
2617 * term.c (Fresume_tty): Pixelize call of change_frame_size.
2618 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
2619 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
2620 (w32_createwindow): Use scroll bar area width.
0d9cba29
SM
2621 (w32_wnd_proc): Handle bottom divider width.
2622 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
2623 (Fx_create_frame): Default divider width parameters.
2624 Caclulate sizes pixelwise. Add vertical drag cursor support.
2625 (x_create_tip_frame): Default divider widths to zero.
2626 Pixelize call to change_frame_size.
880e6158
MR
2627 (Fx_show_tip): Add handling of divider widths. Pixelize window
2628 position and sizes.
2629 (Fw32_frame_rect): New function.
2630 (frame_parm_handler w32_frame_parm_handlers): Add divider
2631 widths.
2632 (Vx_window_vertical_drag_shape): Add variable.
2633 * w32inevt.c (resize_event, maybe_generate_resize_event):
2634 Pixelize change_frame_size calls.
2635 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
2636 call.
2637 * w32term.c (w32_draw_window_divider): New function.
2638 (x_update_window_end): Handle right divider.
2639 (w32_draw_fringe_bitmap, x_scroll_run)
2640 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
0d9cba29
SM
2641 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
2642 Calculate new frame sizes pixelwise.
880e6158
MR
2643 (x_new_font): Pixelize call to x_set_window_size.
2644 (x_check_fullscreen): Pixelize call to change_frame_size.
2645 (x_set_window_size_1, x_set_window_size): New argument
2646 pixelwise. Calculate pixelwise.
2647 (x_wm_set_size_hint): Use scroll bar area width.
2648 (w32_redisplay_interface): Add w32_draw_window_divider.
2649 * w32term.h (struct w32_output): Add vertical drag cursor.
2650 * widget.c (set_frame_size, update_wm_hints)
2651 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
2652 change_frame_size.
2653 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
2654 * window.c (sequence_number): Restore.
2655 (Fwindow_pixel_width, Fwindow_pixel_height)
2656 (Fwindow_mode_line_height, Fwindow_header_line_height)
2657 (window_pixel_to_total, Frun_window_scroll_functions)
2658 (Fset_window_new_pixel, window_resize_apply_total)
2659 (Fwindow_resize_apply_total): New functions.
2660 (window_body_height, window_body_width): Rename from
0d9cba29
SM
2661 window_body_lines. New argument PIXELWISE.
2662 Calculate pixelwise.
880e6158
MR
2663 (Fwindow_body_height, Fwindow_body_width): New argument
2664 PIXELWISE.
2665 (coordinates_in_window, window_relative_x_coord): Use window's
2666 pixel width instead of total width.
2667 (replace_window, recombine_windows): Initialize pixel values.
2668 (resize_root_window, resize_frame_windows, grow_mini_window)
0d9cba29
SM
2669 (shrink_mini_window): New argument PIXELWISE.
2670 Calculate pixelwise.
880e6158
MR
2671 (Fdelete_other_windows_internal, adjust_window_margins)
2672 (window_resize_check, window_resize_apply)
2673 (Fdelete_window_internal, Fresize_mini_window_internal)
2674 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
2675 (check_frame_size): Rename arguments. New argument PIXELWISE.
2676 Calculate pixelwise.
2677 (set_window_buffer): Make samebuf bool. Run configuration change
2678 hook only if buffer changed.
2679 (Fset_window_buffer): Rewrite doc-string.
2680 (make_window): Initialize new_pixel slot.
2681 (Fwindow_resize_apply): Check pixel size of root window.
2682 (Fsplit_window_internal): Call 2nd argument pixel_size.
2683 Calculate pixelwise.
2684 (Fscroll_left, Fscroll_right): Call window_body_width instead of
2685 window_body_cols.
2686 (save_window_data): New slots frame_text_width,
2687 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
2688 (saved_window): New slots pixel_left, pixel_top, pixel_height,
2689 pixel_width.
2690 (Fcurrent_window_configuration, Fset_window_configuration)
2691 (save_window_save, compare_window_configurations): Handle new
2692 slots in save_window_data and saved_window.
2693 (Fset_window_scroll_bars): Fix doc-string.
2694 (window_resize_pixelwise): New variable.
0d9cba29
SM
2695 (coordinates_in_window, Fcoordinates_in_window_p):
2696 Handle dividers.
880e6158 2697 (make_parent_window): Adjust sequence_number.
0d9cba29
SM
2698 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
2699 New functions.
880e6158
MR
2700 * window.h (struct window): New members new_pixel, pixel_left,
2701 pixel_top, pixel_width, pixel_height. Restore sequence_number.
2702 (wset_new_pixel): New function.
2703 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
2704 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
2705 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
2706 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
2707 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
2708 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
2709 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
2710 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
2711 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
2712 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
2713 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
2714 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
2715 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
2716 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
2717 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
2718 Rewrite.
2719 (resize_frame_windows, grow_mini_window, shrink_mini_window)
2720 (window_body_width, check_frame_size): Adapt external declarations.
2721 * xdisp.c (last_max_ascent): New integer.
2722 (window_text_bottom_y): Handle bottom divider.
2723 (window_box_width, window_box_height): Calculate pixelwise.
2724 (get_glyph_string_clip_rects): Handle right divider.
2725 (remember_mouse_glyph): When windows are resized pixelwise
2726 proceed with width and height set to 1.
2727 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
2728 WINDOW_TOTAL_WIDTH.
2729 (move_it_to): Calculate and return maximum x position
2730 encountered.
2731 (Fwindow_text_pixel_size): New function.
2732 (resize_mini_window, update_tool_bar): Calculate pixelwise.
0d9cba29
SM
2733 (tool_bar_lines_needed): Rename to tool_bar_height.
2734 Calculate pixelwise.
2735 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
2736 Calculate pixelwise.
880e6158
MR
2737 (redisplay_tool_bar): Calculate pixelwise.
2738 (redisplay_window): Calculate pixelwise. Handle dividers.
2739 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
2740 (x_draw_vertical_border): Handle dividers.
2741 (define_frame_cursor1): Handle vertical drag cursor.
2742 (x_draw_right_divider, x_draw_bottom_divider): New functions.
2743 (expose_window): Calculate pixelwise. Handle dividers.
2744 (init_xdisp): Initialize pixel values.
2745 * xfaces.c (Qwindow_divider): New face.
2746 (realize_basic_faces): Realize it.
2747 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
2748 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
2749 (x_set_scroll_bar_default_width): Default actual width to 16.
2750 (Fx_create_frame): Set sizes pixelwise.
0d9cba29
SM
2751 (x_create_tip_frame): Default divider widths to zero.
2752 Pixelize call of change_frame_size.
880e6158
MR
2753 (Fx_show_tip): Handle divider widths. Initial pixel position
2754 and sizes.
2755 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
2756 (Vx_window_vertical_drag_shape): New option.
2757 * xmenu.c (free_frame_menubar): Pixelize call of
2758 x_set_window_size.
2759 * xterm.c (x_draw_window_divider): New function.
2760 (x_update_window_end): Optionally draw right divider.
2761 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
2762 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
2763 (handle_one_xevent, x_new_font): Calculate pixelwise.
2764 (x_set_window_size_1, x_set_window_size): New argument
2765 pixelwise. Calculate pixelwise.
2766 (x_wm_set_size_hint): Pixelize call of check_frame_size.
2767 (struct x_redisplay_interface): Add x_draw_window_divider.
2768 * xterm.h (struct x_output): Add vertical_drag_cursor.
2769
44ad1cf7
SM
27702013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
2771
2772 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
2773 Set invisible frames's `redisplay' when a full redisplay is requested.
2774 (redisplay_window): Set must_be_updated_p instead (bug#15999).
2775 (redisplay_mode_lines): Don't set must_be_updated_p any more.
2776 (display_mode_lines): Set it here instead.
2777
2778 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
2779
2780 * dispextern.h (set_window_update_flags): Remove.
2781
da048127
SM
27822013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2783
9f4ffeee
SM
2784 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
2785
a8253776
SM
2786 * xdisp.c (REDISPLAY_SOME_P): New macro.
2787 (redisplay_internal): Use it (bug#15999).
2788 (prepare_menu_bars, redisplay_window): Use it as well.
2789
4e36a6a6 2790 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
da048127 2791
579ca67b
TS
27922013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
2793
2794 * w32font.c (g_b_init_get_char_width_32_w): New static var.
2795 (globals_of_w32font): Zero it out.
2796 (GetCharWidth32W_Proc): New function pointer.
2797 (get_char_width_32_w): New function.
2798 (compute_metrics): If get_glyph_outline_w returns an error, try
2799 get_char_width_32_w before declaring a failure. This avoids
2800 punishing raster (a.k.a. "bitmap") fonts by slowing down
2801 redisplay. (Bug#6364).
b7f79a5c 2802
da048127
SM
28032013-11-29 Eli Zaretskii <eliz@gnu.org>
2804
b7f79a5c
EZ
2805 * xdisp.c (clear_mouse_face): Don't invalidate the entire
2806 mouse-highlight info, just signal frame_up_to_date_hook that mouse
2807 highlight needs to be redisplayed. (Bug#15913)
2808
49faeaaf
PE
28092013-11-29 Paul Eggert <eggert@cs.ucla.edu>
2810
2811 Fix minor problems found by static checking.
2812 * buffer.h (struct buffer_text, struct buffer):
2813 * frame.h (struct frame):
2814 * window.h (struct window):
2815 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
2816 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
2817 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
2818 no-longer-valid use of HAVE_MENUS.
2819 * xdisp.c (propagate_buffer_redisplay): Now static.
2820
ef869611
SM
28212013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2822
7cdf484b
SM
2823 * xmenu.c (Fmenu_or_popup_active_p):
2824 * window.c (Fset_window_configuration):
2825 * menu.c (Fx_popup_menu, Fx_popup_dialog):
2826 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
2827 * fns.c (Fyes_or_no_p):
2828 * editfns.c (Fmessage_box, Fmessage_or_box):
2829 * alloc.c (make_save_ptr_ptr):
2830 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
2831
ef869611
SM
2832 * window.c (Fset_window_configuration): Move select_window later.
2833
655ab9a3
SM
28342013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
2835
2836 Refine redisplay optimizations to only redisplay *some* frames/windows
2837 rather than all of them.
2838 * xdisp.c (REDISPLAY_SOME): New constant.
2839 (redisplay_other_windows, wset_redisplay, fset_redisplay)
2840 (bset_redisplay, bset_update_mode_line): New functions.
2841 (message_dolog): Use bset_redisplay.
2842 (clear_garbaged_frames): Use fset_redisplay.
2843 (echo_area_display): Use wset_redisplay.
2844 (buffer_shared_and_changed): Remove.
2845 (prepare_menu_bars): Call Vpre_redisplay_function before updating
2846 frame titles. Compute the actual set of windows redisplayed.
2847 Don't update frame titles and menu bars for frames that don't need to
2848 be redisplayed.
2849 (propagate_buffer_redisplay): New function.
2850 (AINC): New macro.
2851 (redisplay_internal): Use it. Be more selective in the set of windows
2852 we redisplay. Propagate windows_or_buffers_changed to
2853 update_mode_lines a bit later to simplify the code.
2854 (mark_window_display_accurate_1): Reset window and buffer's
2855 `redisplay' flag.
2856 (redisplay_window): Do nothing if neither the window nor the buffer nor
2857 the frame needs redisplay.
2858 * window.h (struct window): Add `redisplay' field.
2859 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
2860 (redisplay_other_windows, window_list): New declarations.
2861 * window.c (select_window, Fset_window_start): Use wset_redisplay.
2862 (window_list): Not static any more.
2863 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
2864 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
2865 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
2866 * frame.c (Fmake_frame_visible): Don't redisplay everything.
2867 * frame.h (struct frame): Add `redisplay' field.
2868 Move `external_menu_bar' bitfield next to other bit-fields.
2869 (SET_FRAME_GARBAGED): Use fset_redisplay.
2870 (SET_FRAME_VISIBLE): Don't garbage the frame;
2871 Use redisplay_other_windows.
2872 * buffer.h (struct buffer): Add `redisplay' field.
2873 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
2874 (modify_overlay): Use bset_redisplay.
2875 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
2876
9c099ca7
EZ
28772013-11-28 Eli Zaretskii <eliz@gnu.org>
2878
2879 Support w32 file notifications in batch mode.
2880 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
2881 invalid (which happens in batch mode). If non-interactive, call
2882 handle_file_notifications to store file notification events in the
2883 input queue. (Bug#15933)
2884
655ab9a3 2885 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
9c099ca7 2886
655ab9a3 2887 * w32inevt.c (handle_file_notifications): Now external, not static.
9c099ca7
EZ
2888
2889 * w32term.h (handle_file_notifications): Provide prototype.
2890
2891 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
2892 init_crit, since init_display, which does that otherwise, is not
2893 called.
2894
7e3bf78c
GM
28952013-11-27 Glenn Morris <rgm@gnu.org>
2896
2897 * Makefile.in ($(lispsource)/international/charprop.el): New.
2898 (emacs$(EXEEXT)): Depend on charprop.el.
2899
fb6a5d68
EZ
29002013-11-27 Eli Zaretskii <eliz@gnu.org>
2901
de1e0d91
EZ
2902 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
2903 deleting portions of the buffer under non-nil REPLACE argument.
2904 (Bug#15973)
2905
fb6a5d68
EZ
2906 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
2907 directory, watch it and not its parent.
2908 (add_watch): Allow empty string in FILE.
2909
72fdd473
MR
29102013-11-27 Martin Rudalics <rudalics@gmx.at>
2911
2912 * window.c (Fset_window_start, window_resize_apply)
2913 (window_scroll): Reset window_end_valid (Bug#15957).
2914
cb6c95a3
GM
29152013-11-27 Glenn Morris <rgm@gnu.org>
2916
2917 * Makefile.in (leimdir): Now in lisp source directory.
2918 ($(leimdir)/leim-list.el): Just use ../leim .
2919 * epaths.in (PATH_DUMPLOADSEARCH):
2920 * lread.c (load_path_default):
2921 * nsterm.m (ns_load_path): No more leim directory.
2922
ed87760c
AS
29232013-11-26 Andreas Schwab <schwab@suse.de>
2924
2925 * .gdbinit (xgettype): Add cast.
2926
624780f0
GM
29272013-11-26 Glenn Morris <rgm@gnu.org>
2928
2929 Preload leim-list.el.
2930 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
2931 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
2932 is a single directory.
2933
4aaf6b61
PE
29342013-11-25 Paul Eggert <eggert@cs.ucla.edu>
2935
3f73284a
PE
2936 bool-vector-subsetp is now the normal direction (Bug#15912).
2937 * data.c (Fbool_vector_subsetp): Test whether the first argument
2938 is a subset of the second one, not the reverse. Add doc string.
2939
4aaf6b61
PE
2940 Fix minor problems found by static checking.
2941 * lread.c (load_path_default): Now static.
2942 * textprop.c (text_property_stickiness): Be consistent about the
2943 test used when deciding whether to consider the previous character.
2944 This simplifies the code a bit.
2945
511fa0d3
SM
29462013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
2947
a5fa8eb4
SM
2948 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
2949
511fa0d3
SM
2950 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
2951 (syms_of_frame): Don't defsubr them.
2952
97bacf8c
GM
29532013-11-25 Glenn Morris <rgm@gnu.org>
2954
310294a3
GM
2955 * lread.c (load_path_default): Change the sense of the argument.
2956 (init_lread): When EMACSLOADPATH is set, do not ignore changes
2957 from dump_path. When it is not, avoid checking dump_path twice.
2958
97bacf8c
GM
2959 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
2960 uninstalled dump_path against installed Vload_path. (Bug#15964)
2961
450533b0
SM
29622013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
2963
740bcff0
SM
2964 Export get_pos_property to Elisp.
2965 * editfns.c (Fget_pos_property): Rename from get_pos_property.
2966 (syms_of_editfns): Export it to Elisp.
2967
450533b0
SM
2968 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
2969
1db72ad3
RF
29702013-11-23 Romain Francoise <romain@orebokech.com>
2971
2972 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
2973 initialization here ...
2974 (syms_of_fileio): ... from here.
2975
2c98e669
SM
29762013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
2977
2978 * lread.c (init_lread): Fix int/Lisp_Object mixup.
2979 Please use --enable-check-lisp-object-type.
2980
50dca5df
GM
29812013-11-23 Glenn Morris <rgm@gnu.org>
2982
2983 * process.c (get_process): Explicit error for dead buffers.
2984
d7aff0d6
GM
29852013-11-23 Andreas Schwab <schwab@linux-m68k.org>
2986
2987 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
2988
17e0445b
GM
29892013-11-23 Glenn Morris <rgm@gnu.org>
2990
2991 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
2992 * lread.c (load_path_check): Take path to check as argument.
2993 (load_path_default): New, split from init_lread.
2994 (init_lread): Move calc of default load-path to load_path_default.
2995 Empty elements in EMACSLOADPATH now stand for the default.
2996 (load-path): Doc fix.
2997 * emacs.c (decode_env_path): Add option to treat empty elements
2998 as nil rather than ".".
2999 * callproc.c (init_callproc_1, init_callproc):
3000 * image.c (Vx_bitmap_file_path):
3001 * lisp.h (decode_env_path):
3002 * lread.c (Vsource_directory):
3003 Update for new argument spec of decode_env_path.
3004
cd88d682
EZ
30052013-11-22 Eli Zaretskii <eliz@gnu.org>
3006
3007 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
3008 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
3009
75360f19
PE
30102013-11-21 Paul Eggert <eggert@cs.ucla.edu>
3011
7e8ed4f7
PE
3012 Fix some dependency problems that cause unnecessary recompiles.
3013 Problem reported by RMS in
3014 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
3015 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
3016 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
3017 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
7e8ed4f7
PE
3018 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
3019 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
3020 (boostrap-clean): No need to remove stamp-oldxmenu.
3021
75360f19
PE
3022 Fix recently introduced bool vector overrun.
3023 This was due to an optimization that went awry.
3024 Reported by Glenn Morris in
3025 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
3026 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
3027 for empty vectors, undoing the 2013-11-18 change.
3028 * data.c (bool_vector_binop_driver): Rely on this.
3029 Fix bug that occasionally overran the destination.
3030 * lisp.h (struct Lisp_Bool_vector): Document this.
3031
f03f7d3d
JD
30322013-11-20 Jan Djärv <jan.h.d@swipnet.se>
3033
e9dc713d 3034 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
cab0d91d
JD
3035 to handle dialogs.
3036
f03f7d3d
JD
3037 * nsterm.m (init, run, stop:): Comment out for now, does not work
3038 with dialogs.
3039
12455b2f
PE
30402013-11-19 Paul Eggert <eggert@cs.ucla.edu>
3041
3042 * charset.c (syms_of_charset): Don't read past end of string.
3043
8d1c3af9
GM
30442013-11-19 Glenn Morris <rgm@gnu.org>
3045
3046 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
3047
8e015705
BJ
30482013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
3049
3050 Add hooks to run on gaining/losing focus. (Bug#15029)
3051 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
3052 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
3053 (syms_of_frame): Add focus-in-hook, focus-out-hook.
3054
87d86601
PE
30552013-11-18 Paul Eggert <eggert@cs.ucla.edu>
3056
23e79746
PE
3057 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
3058 The old names predated the API change that put destination at end.
3059
ec2c4ee6
PE
3060 Improve API of recently-added bool vector functions (Bug#15912).
3061 The old API had (bool-vector-count-matches A B)
3062 and (bool-vector-count-matches-at A B I), which gave the
3063 misleading impression that the two functions were variants, one
3064 with a location I. The new API has (bool-vector-count-population A)
3065 and (bool-vector-count-consecutive A B I) to make the distinction
3066 clearer. The first function no longer has a B argument, since the
3067 caller can easily determine the number of nils if the length and
3068 number of ts is known.
3069 * data.c (Fbool_vector_count_population): Rename from
3070 bool_vector_count_matches, and accept just 1 argument.
3071 (Fbool_vector_count_consecutive): Rename from
3072 Fbool_vector_count_matches_at.
3073
87d86601
PE
3074 Always allocate at least one bits_word per bool vector.
3075 See Daniel Colascione in:
3076 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
3077 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
3078 * data.c (bool_vector_binop_driver): Rely on this. Tune.
3079 * lisp.h (struct Lisp_Bool_vector): Document this.
3080
37c790b3
EZ
30812013-11-18 Eli Zaretskii <eliz@gnu.org>
3082
3083 * insdel.c (invalidate_buffer_caches): New function, consolidated
3084 from part of prepare_to_modify_buffer.
3085 (insert_from_gap, prepare_to_modify_buffer):
655ab9a3
SM
3086 * coding.c (code_convert_region, code_convert_string):
3087 Call invalidate_buffer_caches. (Bug#15841)
37c790b3
EZ
3088
3089 * lisp.h (invalidate_buffer_caches): Add prototype.
3090
96e78d1f
EZ
30912013-11-17 Eli Zaretskii <eliz@gnu.org>
3092
3093 * w32term.c (x_update_window_end): Don't invalidate the entire
3094 mouse-highlight info, just signal frame_up_to_date_hook that mouse
3095 highlight needs to be redisplayed. (Bug#15913)
3096
0f679e86
PE
30972013-11-17 Paul Eggert <eggert@cs.ucla.edu>
3098
3099 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
3100
3d6dec8d
EZ
31012013-11-16 Eli Zaretskii <eliz@gnu.org>
3102
d17f4dba
EZ
3103 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
3104 while we are using Vprin1_to_string_buffer.
3105
3d6dec8d
EZ
3106 * keymap.c (describe_map): Don't crash if PT is 1 both before and
3107 after inserting the description string. (Bug#15907)
3108
2fcc742f
PE
31092013-11-15 Paul Eggert <eggert@cs.ucla.edu>
3110
3111 * data.c: Work around bogus GCC diagnostic about shift count.
3112 Reported by Eli Zaretskii in
3113 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
3114 (pre_value): New function.
3115 (count_trailing_zero_bits): Use it.
3116
73583a99
EZ
31172013-11-15 Eli Zaretskii <eliz@gnu.org>
3118
3119 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
3120 assume C macros are not supported even under -g3 in these old GCC
3121 versions.
3122
a1f03e89
LL
31232013-11-15 Leo Liu <sdl.web@gmail.com>
3124
3125 * minibuf.c (Ftry_completion, Fall_completions)
3126 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
3127
1a191e5c
PE
31282013-11-15 Paul Eggert <eggert@cs.ucla.edu>
3129
3130 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
3131 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
3132 This avoids placing unnecessary constants into the Emacs code.
3133
c9f63070
KI
31342013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
3135
3136 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
3137 for Cygwin w32 build.
3138
3139 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
3140 for Cygwin w32 build. (Bug#15892)
3141
d672ac3c
PE
31422013-11-14 Paul Eggert <eggert@cs.ucla.edu>
3143
2cf00efc
PE
3144 Simplify, port and tune bool vector implementation.
3145 * alloc.c (bool_vector_exact_payload_bytes)
3146 (bool_vector_payload_bytes): Remove.
3147 (bool_vector_fill): Return its argument.
3148 * alloc.c (bool_vector_fill):
3149 * lread.c (read1):
3150 * print.c (print_object):
3151 Simplify by using bool_vector_bytes.
3152 * alloc.c (make_uninit_bool_vector):
3153 New function, broken out from Fmake_bool_vector.
3154 (Fmake_bool_vector): Use it. Use tail call.
3155 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
3156 * data.c (BITS_PER_ULL): New constant.
3157 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
3158 if long long versions don't exist.
3159 (shift_right_ull): New function.
3160 (count_one_bits_word): New function, replacing popcount_bits_word
3161 macro. Don't assume that bits_word is no wider than long long.
3162 (count_one_bits_word, count_trailing_zero_bits):
3163 Don't assume that bits_word is no wider than long long.
3164 * data.c (bool_vector_binop_driver, bool_vector_not):
3165 * fns.c (Fcopy_sequence):
3166 * lread.c (read1):
3167 Create an uninitialized destination, to avoid needless work.
3168 (internal_equal): Simplify.
3169 (Ffillarray): Prefer tail call.
3170 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
3171 contain at least one word.
3172 (bits_word_to_host_endian): Prefer if to #if. Don't assume
3173 chars are narrower than ints.
3174 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
3175 * fns.c (Fcopy_sequence):
3176 Simplify and tune.
3177 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
3178 Don't try to port to hosts where bits_word values have holes; the
3179 code wouldn't work there anyway. Verify this assumption, though.
3180 (bool_vector_bytes): New function.
3181 (make_uninit_bool_vector): New decl.
3182 (bool_vector_fill): Now returns Lisp_Object.
3183
d672ac3c
PE
3184 * xfns.c (xic_create_fontsetname):
3185 * xrdb.c (gethomedir): Prefer tail calls.
3186
bd7cd30a
PE
31872013-11-12 Paul Eggert <eggert@cs.ucla.edu>
3188
b3671617
PE
3189 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
3190 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
e3ac17b6 3191
bd7cd30a
PE
3192 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
3193 that requires a return value.
3194 (Fset_buffer_modified_p): Take advantage of this change to do
3195 a tail call.
3196
ecda65d4
SM
31972013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
3198
3199 * buffer.c (Frestore_buffer_modified_p): Sync it with
3200 Fset_buffer_modified_p.
3201 (Fforce_mode_line_update): New function, moved from subr.el.
3202 (Fset_buffer_modified_p): Use them.
3203 (syms_of_buffer): Defsubr Fforce_mode_line_update.
3204
5389db9e
PE
32052013-11-11 Paul Eggert <eggert@cs.ucla.edu>
3206
3207 * search.c (find_newline): Rewrite to prefer offsets to pointers.
3208 This avoids undefined behavior when subtracting pointers into
3209 different aways. On my platform it also makes the code a tad
3210 smaller and presumably faster.
3211
7818df11
SM
32122013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
3213
3214 * keyboard.c (command_loop_1): Use region-extract-function.
3215 * insdel.c (Qregion_extract_function): Not static any more (can we
3216 stop pretending that these vars can benefit from being marked static?).
3217
85f37d10
EZ
32182013-11-09 Eli Zaretskii <eliz@gnu.org>
3219
3220 * search.c (find_newline): If buffer text is relocated during the
3221 "dumb loop", adjust C pointers into buffer text to follow suit.
3222 (Bug#15841)
3223
0449d6cd 32242013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
b24ac90f
JD
3225
3226 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
3227 for conversion (Bug#15837).
3228
addccbd0
EZ
32292013-11-09 Eli Zaretskii <eliz@gnu.org>
3230
3231 * fileio.c (Finsert_file_contents): Invalidate the newline cache
3232 for the entire range of inserted characters. (Bug#15841)
3233
5b97b4c0
JD
32342013-11-08 Jan Djärv <jan.h.d@swipnet.se>
3235
3236 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
3237 unspecified.
3238 (realize_default_face): Remove assignment to distant-foreground if
3239 unspecified (Bug#15815).
3240
080db47f
EZ
32412013-11-08 Eli Zaretskii <eliz@gnu.org>
3242
3243 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
3244 cache-long-scans disabled, since we don't want to call
3245 prepare_to_modify_buffer (in insert_1_both) for each message we
3246 display.
3247
3248 * buffer.h (bset_cache_long_scans): New INLINE function, moved
3249 from buffer.c. Improve commentary to the buffer field setter
3250 functions.
3251
3252 * buffer.c (bset_cache_long_scans): Static function deleted.
3253 Improve commentary to the buffer field setter functions.
3254 (init_buffer_once): Default for cache-long-scans changed to t.
3255 (Bug#15797)
3256
7f1913b2
PE
32572013-11-08 Paul Eggert <eggert@cs.ucla.edu>
3258
220a304a
PE
3259 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
3260
7f1913b2
PE
3261 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
3262 This bug was introduced in my 2013-06-21 change, and caused
3263 struct Lisp_Sub_Char_Table objects to be given too many slots,
3264 which broke 'make -C admin/unidata'.
3265
5ee29210
JD
32662013-11-07 Jan Djärv <jan.h.d@swipnet.se>
3267
3268 Import changes from mac-port 4.5.
3269 * macfont.m (mac_font_copy_default_descriptors_for_language)
3270 (mac_font_copy_default_name_for_charset_and_languages): Declare.
3271 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
3272 (macfont_language_default_font_names): New.
3273 (macfont_list): Rearrange language/charset code.
3274 (macfont_close): Don't check for macfont_info->cache.
3275 (mac_ctfont_create_preferred_family_for_attributes): New font
3276 selection code, call
3277 mac_font_copy_default_name_for_charset_and_languages.
3278 (mac_font_copy_default_descriptors_for_language)
3279 (mac_font_copy_default_name_for_charset_and_languages): New functions.
3280
3281 * macfont.h (kCTVersionNumber10_9): Define if not defined.
3282
aea07e2c
PE
32832013-11-07 Paul Eggert <eggert@cs.ucla.edu>
3284
3285 Port to C11 aligned_alloc, and fix some integer overflows.
3286 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
3287 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
3288 and use of posix_memalign replaced with aligned_alloc.
3289 (aligned_alloc): New function, defined or declared as needed.
3290 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
3291 Don't undef; configure.ac now does this.
3292 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
3293 (calloc, aligned_alloc): Check for integer overflow.
3294 (aligned_alloc): Rename from memalign. All uses changed.
3295 (memalign): New function, an alias for aligned_alloc.
3296
e2e894cf
SM
32972013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3298
3299 * xdisp.c (redisplay_internal): Fix typo in last change.
3300
a5d376b0
PE
33012013-11-06 Paul Eggert <eggert@cs.ucla.edu>
3302
3303 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
3304
2ec9db5d
SM
33052013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3306
3307 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
3308 redisplay--mode-lines-cause.
3309 (redisplay_internal): Keep them uptodate. Remove redundant check of
3310 buffer_shared_and_changed.
3311 * *.[chm]: Number every assignment to update_mode_lines so we
3312 can track why it is set.
3313
d7ac0815
EZ
33142013-11-06 Eli Zaretskii <eliz@gnu.org>
3315
3316 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
3317
94ae2ad4
SM
33182013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3319
3320 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
3321 can track why it is set.
3322
798aef02
PE
33232013-11-06 Paul Eggert <eggert@cs.ucla.edu>
3324
3325 Integer-related fixes for term.c etc.
3326 * dispextern.h (face_tty_specified_color): New function.
3327 * term.c (turn_on_face): Don't rely on undefined behavior when
94ae2ad4
SM
3328 assigning an out-of-range value to 'long'.
3329 Simplify test for toggling highlight.
798aef02
PE
3330 (tty_capable_p): Omit last two (unused) args. All callers changed.
3331 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
3332 (read_menu_input, tty_menu_activate, tty_menu_show):
3333 * xfaces.c (x_supports_face_attributes_p)
3334 (tty_supports_face_attributes_p):
3335 Use bool for boolean. All callers changed.
3336 (tty_supports_face_attributes_p): Omit defaults for color indices;
3337 no longer needed. Simplify tail call.
3338
9e6e9826
SM
33392013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
3340
3341 * xdisp.c (prepare_menu_bars): Mark static.
3342 * lisp.h (prepare_menu_bars): Don't declare.
3343 * xselect.c (x_handle_selection_clear):
3344 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
3345
7544a9d3
PE
33462013-11-05 Paul Eggert <eggert@cs.ucla.edu>
3347
3348 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
3349 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
3350
2e670b95
SM
33512013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
3352
3353 * keyboard.c (Fcommand_error_default_function): Rename from
3354 Fdefault_error_output.
3355
2ea0d614
JC
33562013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
3357
2e670b95
SM
3358 * keyboard.c (Fdefault_error_output): New function, extracted from
3359 cmd_error_internal.
3360 (syms_of_keyboard): Use it for Vcommand_error_function.
2ea0d614 3361
70de5e86
SM
33622013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
3363
3364 * eval.c (handlerlist_sentinel): New variable (bug#15802).
3365 (init_eval): Use it to ensure handlerlist is non-NULL.
3366 (unwind_to_catch): Make sure we never set handlerlist to NULL.
3367 (Fsignal): Adjust NULLness test of handlerlist.
70de5e86
SM
3368 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
3369
d57f4dde
EZ
33702013-11-05 Eli Zaretskii <eliz@gnu.org>
3371
3372 * callproc.c (call_process): Call prepare_to_modify_buffer before
3373 decoding text read from the sub-process, as the decoded stuff will
3374 be inserted into the buffer. This will invalidate the various
3375 caches maintained for the buffer. (Bug#15148)
3376
29aa2b71
XF
33772013-11-05 Xue Fuqiao <xfq.free@gmail.com>
3378
3379 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
3380 string of glyphless-char-display.
3381
ceb486d4
JD
33822013-11-05 Jan Djärv <jan.h.d@swipnet.se>
3383
3384 * nsfns.m (ns_get_name_from_ioreg): New function.
3385 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
3386 OSX >= 10.9. Use ns_get_name_from_ioreg.
3387
69369809
PE
33882013-11-05 Paul Eggert <eggert@cs.ucla.edu>
3389
df5b4930
PE
3390 Simplify and port recent bool vector changes.
3391 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
3392 only in this file. Use a more-efficient implementation if the
3393 second argument is a power of 2.
3394 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
3395 Remove no-longer-necessary compile-time checks.
3396 (bool_vector_exact_payload_bytes): New function.
3397 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
3398 exact payload changed to call the new function. Do not assume
3399 that the arg or result fits in ptrdiff_t.
3400 (bool_vector_fill): New function.
3401 (Fmake_bool_vector): Use it. Don't assume bit counts fit
3402 in ptrdiff_t.
3403 (vroundup_ct): Don't assume arg fits in size_t.
3404 * category.c (SET_CATEGORY_SET): Remove. All callers now just
3405 invoke set_category_set.
3406 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
3407 All callers changed. Use bool_vector_set.
3408 * category.h (XCATEGORY_SET): Remove; no longer needed.
3409 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
3410 bool_vector_bitref.
3411 * data.c (Faref): Use bool_vector_ref.
3412 (Faset): Use bool_vector_set.
3413 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
3414 (Fbool_vector_not, Fbool_vector_count_matches)
3415 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
3416 * fns.c (concat): Use bool_vector_ref.
3417 (Ffillarray): Use bool_vector_fill.
3418 (mapcar1): Use bool_vector_ref.
3419 (sxhash_bool_vector): Hash words, not bytes.
3420 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
3421 a constant, since it's now used in #if.
3422 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
3423 unsigned char on unusual architectures, so that we no longer
3424 assume that the number of bits per bits_word is a power of two or
3425 is a multiple of 8 or of CHAR_BIT.
3426 (Qt): Add forward decl.
3427 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
3428 at least as strictly as bits_word.
3429 (bool_vector_data, bool_vector_uchar_data): New accessors.
3430 All data structure accesses changed to use them.
3431 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
3432 (bool_vector_set): New functions.
3433 (bool_vector_fill): New decl.
3434 (ROUNDUP): Move to alloc.c as described above.
3435
69369809
PE
3436 Fix recent gnutls changes.
3437 * gnutls.c (Fgnutls_boot): Don't assume C99.
3438 * process.c (wait_reading_process_output): Fix typo in recent change.
3439
194b4d9f
TZ
34402013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
3441
3442 * process.c (wait_reading_process_output, read_process_output)
3443 (send_process): Check gnutls_state is not NULL.
3444
3445 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
3446 (Fgnutls_boot): Set process gnutls_p later, after initialization.
3447
c8b09927
JD
34482013-11-04 Jan Djärv <jan.h.d@swipnet.se>
3449
3450 * nsterm.m (init, run, stop:): New methods in EmacsApp for
3451 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
3452
3453 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
3454 OSX >= 10.9.
3455
3456 * nsfns.m (Fx_create_frame): Fix memory leak.
3457
3458 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
3459 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
3460 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
3461
d0065ff1
EZ
34622013-11-04 Eli Zaretskii <eliz@gnu.org>
3463
3464 * xdisp.c (message3_nolog, message_with_string): Encode the string
3465 before writing it to the terminal in a non-interactive session.
3466
3467 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
3468 sure we concatenate them into a unibyte string.
3469
3470 * fileio.c (make_temp_name): Encode PREFIX, and decode the
3471 resulting temporary name before returning it to the caller.
3472 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
3473 is a unibyte string, convert NAME to a unibyte string to ensure
3474 that the result is also a unibyte string.
3475
3476 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
3477 create unibyte strings from default paths and directory/file
3478 names.
3479
3480 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
3481 string.
3482
3483 * callproc.c (init_callproc): Use build_unibyte_string to make
3484 sure we create unibyte strings from default paths and
3485 directory/file names.
3486
3487 * buffer.c (init_buffer): Don't store default-directory of
be80645a 3488 *scratch* in multibyte form. The original problem which led to
d0065ff1
EZ
3489 that is described in
3490 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
3491 but it was solved long ago. (Bug#15260)
3492
91f2d272
PE
34932013-11-04 Paul Eggert <eggert@cs.ucla.edu>
3494
3495 Port to stricter C99 platforms.
3496 Especially, C99 prohibits nesting a struct X inside struct Y if
3497 struct X has a flexible array member.
3498 * alloc.c (struct sdata): New type.
3499 (sdata): Implement in terms of struct sdata.
3500 Remove u member; all uses replaced by next_vector, set_next_vector.
3501 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
3502 (SDATA_DATA_OFFSET): Now a constant, not a macro.
3503 (struct sblock): Rename first_data member to data, which is now
3504 a flexible array member. All uses changed.
3505 (next_vector, set_next_vector, large_vector_vec): New functions.
3506 (vector_alignment): New constant.
3507 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
3508 (struct large-vector): Now merely a NEXT member, since the old approach
3509 ran afoul of stricter C99. All uses changed to use
3510 large_vector_vec or large_vector_offset.
3511 (large_vector_offset): New constant.
3512 * dispnew.c: Include tparam.h, for tgetent.
3513 Do not include term.h; no longer needed.
3514 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
3515 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
3516 (struct Lisp_Vector): Use a flexible array member for contents,
3517 instead of a union with a member that is an array of size 1.
3518 All uses changed.
3519 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
3520 fact that the struct no longer contains a union.
3521 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
3522 (struct Lisp_Save_Value, struct Lisp_Free):
3523 Use unsigned, not int, for spacers, to avoid c99 warning.
3524 (union specbinding): Use unsigned, not bool, for bitfield, as
3525 bool is not portable to pre-C99 hosts.
3526
6dc6d301
GM
35272013-11-04 Glenn Morris <rgm@gnu.org>
3528
3529 * emacs.c (usage_message): Mention that `-L :...' appends.
3530
b0b9e592
GM
35312013-11-02 Glenn Morris <rgm@gnu.org>
3532
fca2fccb
GM
3533 * Makefile.in (abs_builddir): Remove.
3534 (bootstrap_exe): Use relative filename.
3535
c617f3d0
GM
3536 Use relative filenames in TAGS files.
3537 * Makefile.in (abs_srcdir): Remove it again.
3538 (.PHONY): Remove frc.
3539 (maintainer-clean): No more TAGS-LISP file.
3540 (TAGS): Pass relative file names to etags.
3541 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
3542
b0b9e592 3543 * Makefile.in (abs_srcdir): New, set by configure.
739f57cd 3544 (lispdir): Remove.
b0b9e592
GM
3545 (maintainer-clean): Remove pointless echo. That should be in the
3546 top-level Makefile, if anywhere. Delete TAGS-LISP.
3547 (extraclean): No s/ and m/ directories for some time.
739f57cd
GM
3548 (TAGS): Also depend on ctagsfiles3.
3549 Remove no-longer-defined S_FILE.
b0b9e592 3550 Pass absolute filenames to etags once more.
739f57cd 3551 (TAGS-LISP): Replace lispdir with its expansion.
b0b9e592
GM
3552 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
3553 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
3554
0c21fa44
JD
35552013-11-02 Jan Djärv <jan.h.d@swipnet.se>
3556
94ae2ad4
SM
3557 * xfaces.c (check_lface_attrs, realize_default_face):
3558 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
39dd7bb2 3559 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
0c21fa44 3560
a90e5a33
PE
35612013-11-02 Paul Eggert <eggert@cs.ucla.edu>
3562
3563 * emacs.c (original_pwd): Remove global var by making it local.
3564 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
3565
3c334c14
JD
35662013-11-01 Jan Djärv <jan.h.d@swipnet.se>
3567
3568 * xfaces.c: Declare color_distance.
3569 (QCdistant_foreground): New variable.
3570 (NEAR_SAME_COLOR_THRESHOLD): New define.
3571 (load_color2): New function.
3572 (load_color): Call load_color2.
3573 (load_face_colors): Call load_color2 and if distant-color is specified
3574 calculate distant and use distant-color if colors are near.
3575 (LFACE_DISTANT_FOREGROUND): New define.
3576 (merge_face_ref, Finternal_set_lisp_face_attribute)
3577 (Finternal_get_lisp_face_attribute)
3578 (x_supports_face_attributes_p): Handle distant-foreground similar to
3579 foreground.
3580 (syms_of_xfaces): DEFSYM QCdistant_foreground.
3581
94ae2ad4
SM
3582 * dispextern.h (lface_attribute_index):
3583 Add LFACE_DISTANT_FOREGROUND_INDEX.
3c334c14 3584
d14c81ee
CB
35852013-11-01 Claudio Bley <claudio.bley@googlemail.com>
3586
94ae2ad4
SM
3587 * image.c (pbm_next_char): New function.
3588 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
0e7690de
CB
3589 (pbm_scan_number): Use it.
3590 (Qlibjpeg_version): New variable.
d14c81ee
CB
3591 (syms_of_image): DEFSYM and initialize it.
3592
26ca8870
JD
35932013-10-31 Jan Djärv <jan.h.d@swipnet.se>
3594
3595 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
3596
8fd07417
GM
35972013-10-31 Glenn Morris <rgm@gnu.org>
3598
3599 * emacs.c (original_pwd): New char.
3600 (main): If using --chdir, store original_pwd.
3601 (init_cmdargs): When setting Vinvocation_directory based on a
3602 relative argv[0], use original_pwd if set. (Bug#15768)
3603
4c9797cb
SM
36042013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3605
3606 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
3607
dcd163ac
PE
36082013-10-29 Paul Eggert <eggert@cs.ucla.edu>
3609
3610 * insdel.c: Fix minor problems found by static checking.
3611 (Qregion_extract_function): Now static.
3612 (prepare_to_modify_buffer_1): Remove unused locals.
3613
3472b6c6
SM
36142013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3615
3616 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
3617 (syms_of_xdisp): Declare pre-redisplay-function.
3618 (markpos_of_region): Remove function.
3619 (init_iterator, compute_stop_pos, handle_face_prop)
3620 (face_before_or_after_it_pos, reseat_to_string)
3621 (get_next_display_element, window_buffer_changed)
3622 (redisplay_internal, try_cursor_movement, redisplay_window)
3623 (try_window_reusing_current_matrix, try_window_id, display_line)
3624 (note_mode_line_or_margin_highlight, note_mouse_highlight)
3625 (display_string, mouse_face_from_buffer_pos): Remove region handling.
3626 * window.h (struct window): Remove field `region_showing'.
3627 * dispextern.h (struct it): Remove region_beg/end_charpos.
3628 (face_at_buffer_position, face_for_overlay_string)
3629 (face_at_string_position): Update prototypes.
3630 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
3631 (face_at_string_position): Remove `region_beg' and `region_end' args.
3632 * fontset.c (Finternal_char_font):
3633 * font.c (font_at, font_range): Adjust calls accordingly.
3634 * insdel.c (Qregion_extract_function): New var.
3635 (syms_of_insdel): Initialize it.
3636 (prepare_to_modify_buffer_1): Use it.
3637
2d9783e0
DA
36382013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
3639
3640 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
3641 * ftxfont.c (ftxfont_get_gcs):
3642 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
3643 * xfaces.c (x_free_colors, x_free_dpy_colors)
3644 (x_create_gc, unload_color):
3645 * xselect.c (x_property_data_to_lisp):
3646 * xsettings.c (parse_settings):
3647 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
3648 (get_bits_and_offset): Adjust definition.
3649 * frame.c (XParseGeometry): Adjust locals.
3650 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
3651 * regex.h (toplevel): Likewise for reg_syntax_t.
3652
dee4ba59
SM
36532013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3654
3655 * eval.c (run_hook_with_args): Use FUNCTIONP.
3656
0085b9be
DA
36572013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
3658
3659 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
3660 fields, drop 'allocated_p' member and use -1 for uninitialized value.
3661 * w32term.h (struct w32_output): Similarly but do not use -1 because...
3662 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
3663 on MS-Windows anyway.
3664 (free_face_colors): Define only if HAVE_X_WINDOWS and...
3665 (free_realized_face): ...adjust user.
3666 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
3667 white relief pixels to -1.
3668 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
3669 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
3670 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
3671
b7e0ef72
PE
36722013-10-28 Paul Eggert <eggert@cs.ucla.edu>
3673
3674 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
3675 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
3676 in practice now. All callers changed.
3677
5d3311e5
DA
36782013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
3679
3680 * dispextern.h (struct face): Use bitfields for 'underline_type'
3681 and 'box' members. Remove set-but-unused members 'pixmap_w' and
3682 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
3683 'stipple' member. Move 'lface' member up to help...
3684 * xfaces.c (make_realized_face): ...this function to find and
3685 clear just the members that need clearing.
3686 (load_face_colors, realize_x_face):
3687 * xdisp.c (extend_face_to_end_of_line): Adjust user.
3688
0f771d26
DA
36892013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
3690
3691 * xftfont.c (struct xftfont_info): Remove set-but-unused
3692 'screen' member.
3693 (xftfont_open): Adjust user.
3694 (xftfont_get_colors): Remove useless prototype.
3695
c556b44b
EZ
36962013-10-26 Eli Zaretskii <eliz@gnu.org>
3697
3698 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
3699 before passing them to 'unexec'. (Bug#15260)
3700
2a03e2bc
XF
37012013-10-26 Xue Fuqiao <xfq.free@gmail.com>
3702
3703 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
3704
6702c559
EZ
37052013-10-25 Eli Zaretskii <eliz@gnu.org>
3706
f67599d5
EZ
3707 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
3708 the changed signature of the font driver's 'close' method.
3709
6702c559
EZ
3710 * w32font.h (w32font_close): Adjust the prototype to the change in
3711 function definition.
3712
3713 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
3714
3715 * w32uniscribe.c (uniscribe_close): Adapt the call to
3716 w32font_close to its new prototype.
3717
78e0b35c
DA
37182013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
3719
3720 Omit unused frame argument of font API's close function.
3721 * font.h (struct font): Drop frame argument. Adjust comment.
3722 * font.c (font_clear_cache, font_close_object): Adjust users.
3723 * ftfont.c (ftfont_close):
3724 * ftxfont.c (ftxfont_close):
3725 * macfont.m (macfont_close):
3726 * nsfont.m (nsfont_close):
3727 * w32font.c (w32font_close):
3728 * xfont.c (xfont_close):
86bd985e
DA
3729 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
3730 tweak comments and make functions safe if called more than once for
3731 the same font object.
3732
3733 Perform font-specific cleanup when font object is swept by GC. See
3734 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
3735 * alloc.c (cleanup_vector): New function.
3736 (sweep_vector): Call it for each reclaimed vector object.
3737 * font.h (struct font): Adjust comment.
78e0b35c 3738
eb9a3661
GM
37392013-10-24 Glenn Morris <rgm@gnu.org>
3740
3741 * Makefile.in (abs_top_srcdir): New, set by configure.
3742
df24a230
DA
37432013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
3744
66b238df 3745 Adjust recent font-related changes to fix bug#15686.
df24a230 3746 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
66b238df 3747 is a live window system frame, mark its default font too.
df24a230 3748
b8e3b0a9
GM
37492013-10-23 Glenn Morris <rgm@gnu.org>
3750
3751 * Makefile.in (RUN_TEMACS): Make relative (again).
3752 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
3753 (bootstrap-emacs$(EXEEXT)):
3754 Quote entities that might contain whitespace.
3755
e4ea223d
PE
37562013-10-23 Paul Eggert <eggert@cs.ucla.edu>
3757
3758 Port to Solaris 10 and its bundled GCC.
3759 Problem reported by Timothy C. Burt.
3760 * floatfns.c (isfinite, isnan): Redefine unconditionally.
3761
fc54bdd5
DA
37622013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
3763
3764 Do not allow font caches to grow too large.
3765 * alloc.c (compact_font_cache_entry, compact_font_caches):
3766 New functions or stub if not HAVE_WINDOW_SYSTEM.
3767 (compact_undo_list): Factor out from Fgarbage_collect.
3768 Add comment.
3769 (mark_face_cache): Mark face font. Move down to avoid
3770 extra prototypes.
3771 (mark_terminals): Do not mark font cache here.
3772 (Fgarbage_collect): Call compaction functions described
3773 above. Adjust comment.
3774
aca5fcdc
JD
37752013-10-20 Jan Djärv <jan.h.d@swipnet.se>
3776
a9f8deec
JD
3777 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
3778 chdir to HOME (bug#15607).
3779
aca5fcdc
JD
3780 * nsterm.m (Qcocoa, Qgnustep): New variables.
3781 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
a6c4680a 3782 (ns_get_color): Make selection color work for GNUstep also.
aca5fcdc 3783
c4e3099f
EZ
37842013-10-18 Eli Zaretskii <eliz@gnu.org>
3785
3786 * keyboard.c (make_lispy_event): Remove GPM-specific code that
3787 handles mouse clicks. Instead, let GPM use the same code as all
3788 the other mice use. See the discussion starting at
3789 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
3790 for the details of the problem with the menu bar this fixes.
3791
d141d701
DA
37922013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
3793
3794 Remove port-specific display name lists to avoid extra
3795 complexity and data duplication with display info lists.
3796 * xterm.h (x_display_name_list): Remove declaration.
3797 * xterm.c (x_display_name_list): Remove.
3798 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
3799 * xfns.c (x_display_info_for_name, Fx_display_list):
3800 Likewise. Use x_display_list where appropriate.
3801 * w32term.h (w32_display_name_list): Remove declaration.
3802 * w32term.c (w32_display_name_list): Remove.
3803 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
3804 Adjust users.
3805 * w32fns.c (x_display_info_for_name, Fx_display_list):
3806 Likewise. Use x_display_list where appropriate.
3807 * nsterm.h (ns_display_name_list): Remove declaration.
3808 * nsterm.m (ns_display_name_list): Remove.
3809 (ns_term_init, syms_of_nsterm): Adjust users.
3810 * nsfns.m (ns_display_info_for_name, Fx_display_list):
3811 Likewise. Use x_display_list where appropriate.
3812 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
3813 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
3814 (mark_terminals): Mark per-terminal font cache.
3815
ef566920
BR
38162013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
3817
3818 Don't run timers in input-pending-p. Its new check-timers param
e9dc713d 3819 provides the prior behavior. (Bug#15045).
39c87140 3820 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
ef566920 3821
f2752e01
PE
38222013-10-17 Paul Eggert <eggert@cs.ucla.edu>
3823
3d798ba7
PE
3824 Make some functions static in non-Microsoft builds.
3825 On my platform (Fedora 19 x86-64), this shrinks the
3826 Emacs executable (text+data) by 0.25%.
3827 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
3828 (load_color) [!MSDOS]:
3829 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
3830 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
3831 * lisp.h (check_existing):
3832 * process.h (conv_sockaddr_to_lisp, network_interface_list)
3833 (network_interface_info) [!WINDOWSNT]:
3834 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
3835 Remove extern decls.
3836 * fileio.c (check_existing):
3837 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
3838 * process.c (conv_sockaddr_to_lisp, network_interface_list)
3839 (network_interface_info) [!WINDOWSNT]:
3840 * term.c (encode_terminal_code) [!WINDOWSNT]:
3841 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
3842 * xfaces.c (load_color) [!MSDOS]:
3843 Now static.
3844 * fileio.c (check_existing, check_executable, check_writable):
3845 * process.c (network_interface_list, network_interface_info):
3846 Move earlier, so that we don't need forward decls.
3847 * gnutls.c (fn_gnutls_transport_set_errno)
3848 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
3849 Remove; unused.
3850 * w32.c (init_environment): Use faccessat rather than
3851 check_existing, partly for consistency with the rest of the code
3852 in this file, partly so that check_existing can be static.
3853
bb9937df
PE
3854 Make VALMASK visible to GDB even if clang is used (Bug#15574).
3855 * emacs.c (MAIN_PROGRAM): New macro.
3856 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
3857 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
3858
f2752e01
PE
3859 bool vector int width fixes
3860 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
3861 (Fbool_vector_count_matches_at):
3862 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
3863 can exceed PTRDIFF_MAX, at least in theory.
3864 (Fbool_vector_count_matches_at):
3865 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
3866
0a2b8e3c
PE
38672013-10-16 Paul Eggert <eggert@cs.ucla.edu>
3868
3869 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
3870 (struct sockaddr): Add forward decl, for platforms that lack it.
3871
2318fcca
JD
38722013-10-16 Jan Djärv <jan.h.d@swipnet.se>
3873
3874 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
3875 Qnil (Bug#15628).
3876
b911a94d
EZ
38772013-10-16 Eli Zaretskii <eliz@gnu.org>
3878
3dffe395
EZ
3879 * w32.c (network_interface_get_info, network_interface_list)
3880 (network_interface_info): New functions. (Bug#15610)
3881 (GetAdaptersInfo_Proc): New typedef.
3882 (get_adapters_info): New wrapper function.
3883 (globals_of_w32): Initialize g_b_init_get_adapters_info.
3884
dee4ba59
SM
3885 * process.h (network_interface_list, network_interface_info):
3886 New prototypes.
3dffe395
EZ
3887
3888 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
3889 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
3890 all systems. Return non-nil for systems that HAVE_NET_IF_H and
3891 for WINDOWSNT. Doc fix.
3892 (syms_of_process): Defsubr Snetwork_interface_list and
3893 Snetwork_interface_info unconditionally.
3894
b911a94d
EZ
3895 * menu.c (have_boxes): Fix redundant simulation of radio buttons
3896 in NS GUI sessions. (Bug#15629)
3897
04d47595
DA
38982013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
3899
3900 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
3901
5e15c624
PE
39022013-10-15 Paul Eggert <eggert@cs.ucla.edu>
3903
3904 * print.c (print_object): Print " ..." when truncating bool vectors.
3905
5d64d770
EZ
39062013-10-15 Eli Zaretskii <eliz@gnu.org>
3907
3908 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
3909 standard mouse buttons.
3910
3911 * termhooks.h (struct input_event): Remove incorrect commentary.
3912
c911772e
PE
39132013-10-15 Paul Eggert <eggert@cs.ucla.edu>
3914
454e2fb9
PE
3915 Disallow bool vector operations on mixed-length operands.
3916 The old behavior left garbage in the result vector sometimes,
3917 and didn't seem to be useful.
3918 * data.c (Qwrong_length_argument): New static var.
3919 (wrong_length_argument): New function.
3920 (bool_vector_binop_driver): Check that args agree in length.
3921
c911772e
PE
3922 * keyboard.c, keyboard.h (all_kboards): Now static.
3923
57f623e2
XF
39242013-10-15 Xue Fuqiao <xfq.free@gmail.com>
3925
3926 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
3927 note from the lispref.
3928
47c4d1e9
DA
39292013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
3930
3931 * nsterm.h (struct ns_display_info): Remove set-but-unused
3932 member image_cache (image caches are per-terminal anyway).
3933 (FRAME_X_IMAGE_CACHE): Remove.
3934 * nsterm.m (ns_initialize_display_info): Adjust user.
3935
ccd4a783
EZ
39362013-10-14 Eli Zaretskii <eliz@gnu.org>
3937
279066b2
EZ
3938 * w32proc.c: Include mingw_time.h.
3939
3940 * w32.c: Include mingw_time.h.
3941
ccd4a783
EZ
3942 Implement scrolling of TTY menus when the screen is too short.
3943
3944 * term.c (tty_menu_display): Accept an additional argument, the
3945 menu item from which to start displaying the menu. Account for
3946 the value of Y when limiting the menu to the number of available
3947 screen lines.
3948 (mi_result): New enumeration.
3949 (read_menu_input): Return enumerated value. When the y coordinate
3950 hits min_y or max_y, return scroll indication instead of wrapping
3951 around the menu.
3952 (tty_menu_activate): Handle the scrolling indications from
3953 read_menu_input. Compute the first menu item to display and pass
3954 it to tty_menu_display.
3955
77e3b1b7
DA
39562013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
3957
3958 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
3959 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
3960 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
3961 Adjust to match the change described below.
3962 (struct terminal): Move must_write_spaces, line_ins_del_ok,
3963 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
3964 memory_below_frame members to...
3965 * termchar.h (struct tty_display_info): ...here because they're
3966 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
3967 * term.c (init_tty):
3968 * nsterm.m (ns_create_terminal):
3969 * w32term.c (w32_create_terminal):
3970 * xterm.c (x_create_terminal): Adjust users.
3971 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
3972 to filter out non-TTY frames. Adjust comment.
3973 (scrolling): Adjust user. Prefer eassert for debugging check.
3974
e558436b
DA
39752013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
3976
3977 * xfaces.c (PT_PER_INCH): Remove unused macro.
3978 * termhooks.h (struct terminal): Remove set-but-unused
3979 member fast_clear_end_of_line.
3980 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
3981 * nsterm.m (ns_create_terminal):
3982 * term.c (init_tty):
3983 * w32term.c (w32_create_terminal):
3984 * xterm.c (x_create_terminal): Adjust users.
3985
1c0a7493
PE
39862013-10-14 Paul Eggert <eggert@cs.ucla.edu>
3987
3988 * lisp.h (bool_vector_size): New function.
3989 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
3990 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
3991 (Fbool_vector_not, Fbool_vector_count_matches_at):
3992 Remove uses of 'eassume' that should no longer be needed,
3993 because they are subsumed by the 'eassume' in bool_vector_size.
3994
567f95ec
EZ
39952013-10-12 Eli Zaretskii <eliz@gnu.org>
3996
3997 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
3998 after inclusion of gif_lib.h, thus fixing compiler warnings caused
3999 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
4000
abe02020
EZ
40012013-10-11 Eli Zaretskii <eliz@gnu.org>
4002
4003 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
4004 have different dimensions. (Bug#15575)
4005
4006 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
4007 visibility.
4008
4009 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
4010
9428abbf
DA
40112013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4012
4013 * term.c (tty_menu_show): Never return with unbalanced
4014 specpdl. Use eassert for debugging check. Adjust style.
4015
052bac0b
EZ
40162013-10-11 Eli Zaretskii <eliz@gnu.org>
4017
4018 * term.c (read_menu_input): Make selection of menu items
4019 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
4020 (tty_menu_activate): Fix off-by-one error when computing max_y.
4021
e1f9f9e3
TZ
40222013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
4023
4024 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
4025 audit logging (only used with GnuTLS 3.x) and enable it.
4026
7d563e36
DA
40272013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4028
4029 * dispnew.c (redraw_frame): Remove useless #ifdef because
4030 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
4031 Also, move TTY fflush to...
4032 * term.c (tty_update_end): ...this function.
4033
48621e69
EZ
40342013-10-11 Eli Zaretskii <eliz@gnu.org>
4035
4036 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
4037 the end of the frame's glyph matrix. (Bug#15575)
4038
4039 * term.c (tty_menu_display): Don't move cursor while overwriting
4040 frame's glyphs with menu items. Limit the number of items
4041 displayed to what can be shown on the available screen lines,
4042 excluding the echo area.
4043 (tty_menu_activate): Limit the Y coordinate allowed by
4044 read_menu_input to the last screen line used for menu display.
4045
b9ff995e
PE
40462013-10-11 Paul Eggert <eggert@cs.ucla.edu>
4047
4048 * lisp.h (eassume): New macro.
4049 Also, include <verify.h>, for 'assume'.
4050 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
4051 (vroundup, vector_nbytes):
4052 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
4053 (Fbool_vector_not, Fbool_vector_count_matches)
4054 (Fbool_vector_count_matches_at):
4055 Use eassume, not eassert.
4056 * casetab.c (set_identity, shuffle):
4057 * composite.c (composition_gstring_put_cache):
4058 * dispnew.c (update_frame_1):
4059 * ftfont.c (ftfont_shape_by_flt):
4060 * image.c (gif_load):
4061 * intervals.c (offset_intervals):
4062 * macfont.m (macfont_shape):
4063 Remove calls to 'assume' that are no longer needed, because
4064 --enable-gcc-warnings no longer generates bogus warnings
4065 when these calls are removed.
4066
33ac0265
DA
40672013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4068
4069 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
4070
ee041f2d
SM
40712013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
4072
4073 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
4074 (Qsubstitute_env_in_file_name): New var.
4075 (syms_of_fileio): Define it.
4076
00036e1d
EZ
40772013-10-10 Eli Zaretskii <eliz@gnu.org>
4078
4079 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
4080 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
4081 (Bug#15575)
4082
4083 * term.c (save_and_enable_current_matrix): Don't allocate and
4084 don't save margin areas.
4085 (restore_desired_matrix): Don't restore margin areas.
4086 (free_saved_screen): Don't free margin areas.
4087
99149625
PE
40882013-10-10 Paul Eggert <eggert@cs.ucla.edu>
4089
4090 * image.c: Pacify --enable-gcc-warnings.
4091 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
4092 #define only if used.
4093
a5dab159
EZ
40942013-10-10 Eli Zaretskii <eliz@gnu.org>
4095
4096 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
4097 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
4098 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
4099 (gif_load): For giflib v5.x and later, display the error message
4100 produced by giflib when its functions fail.
4101 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
4102 (Bug#15531)
4103
6bbe6da8
DA
41042013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4105
4106 * keyboard.c (last_event_timestamp): Remove. For X selection and
4107 GTK popup menus, it may be obtained from per-frame X display info.
4108 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
4109 (process_special_events): Adjust users.
4110 * keyboard.h (last_event_timestamp): Remove declaration.
4111 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
4112 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
4113 * menu.h (xmenu_show): Adjust prototype.
4114 * menu.c (Fx_popup_menu): Adjust user.
4115 * xselect.c (x_own_selection, x_get_foreign_selection)
4116 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
4117
1afcba63
DA
41182013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4119
4120 * keyboard.c (init_kboard): Now static. Add arg
4121 to denote window system. Adjust comment.
4122 (init_keyboard): Adjust user.
4123 (allocate_kboard): New function.
4124 (syms_of_keyboard):
4125 * nsterm.m (ns_term_init):
4126 * term.c (init_tty):
4127 * w32term.c (w32_create_terminal):
4128 * xterm.c (x_term_init): Use it.
4129 * keyboard.h (init_kboard): Remove prototype.
4130 (allocate_kboard): Add prototype.
4131
f3606ef7
BF
41322013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
4133
4134 * image.c (GIFLIB_MAJOR): Ensure it's defined.
4135 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
4136
e20bb249
PE
41372013-10-09 Paul Eggert <eggert@cs.ucla.edu>
4138
4139 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
4140
9f6a18d2
EZ
41412013-10-09 Eli Zaretskii <eliz@gnu.org>
4142
4143 * term.c (tty_menu_activate): Flush the output stream after
4144 showing the cursor, and don't mark the frame garbaged at exit from
4145 the function. Fixes redisplay glitches when moving from one menu
4146 to another.
4147
0486beac
JD
41482013-10-09 Jan Djärv <jan.h.d@swipnet.se>
4149
4150 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
4151 or throw error (Bug#15570).
4152
0d5d3029
PE
41532013-10-09 Paul Eggert <eggert@cs.ucla.edu>
4154
ab7ce978
PE
4155 * intervals.c (temp_set_point_both): Move test into 'eassert',
4156 for speed.
4157
0d5d3029
PE
4158 * lisp.h (eassert): Don't use 'assume'.
4159 Sometimes 'assume' wins in performance, and sometimes it loses,
4160 so it shouldn't be used all the time. Perhaps we need two
4161 flavors of 'eassert', one for where 'assume' is far more likely
4162 to help or to hurt; but that can be done later.
1afcba63 4163 Problem reported by Dmitry Antipov in
0d5d3029
PE
4164 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
4165 Also, don't include <verify.h>; no longer needed.
4166
fa022909
GM
41672013-10-09 Glenn Morris <rgm@gnu.org>
4168
4169 * eval.c (Fcond): Doc tweak.
4170
051277bf
EZ
41712013-10-09 Eli Zaretskii <eliz@gnu.org>
4172
4173 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
4174 expressions with side effects to eassert. (Bug#15565)
4175
79804536
SM
41762013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
4177
4178 * fns.c (hashfn_user_defined): Allow hash functions to return any
4179 Lisp_Object.
4180
3b158d11
PE
41812013-10-08 Paul Eggert <eggert@cs.ucla.edu>
4182
4183 Fix minor problems found by static checking.
4184 * dispnew.c (save_current_matrix): Omit unnecessary casts.
4185 * dispnew.c (update_frame_with_menu): Mark debug local as used.
4186 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
4187 * keyboard.c (read_menu_command): Remove unused local.
4188 * lisp.h (read_menu_command): New decl.
4189 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
4190 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
4191 Return ptrdiff_t, not int.
4192 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
4193 not int, for benefit of xpalloc.
4194 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
4195 and xpalloc.
4196 (have_menus_p): Remove; unused.
4197 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
4198 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
4199 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
4200 Now static.
4201 (save_and_enable_current_matrix): Omit unnecessary casts.
4202 (read_menu_input): Omit local extern decl (now in lisp.h).
4203 Don't access uninitialized storage if mouse_get_xy fails.
4204 (tty_menu_activate): Mark local as initialized, for lint.
4205 (tty_menu_activate, tty_meny_show): Remove unused locals.
4206
4ed77415
EZ
42072013-10-08 Eli Zaretskii <eliz@gnu.org>
4208
4209 Support menus on text-mode terminals.
4210 * xterm.h (xw_popup_dialog): Add prototype.
4211
4212 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
4213 (xmenu_show): Block input here, instead in Fx_popup_menu.
4214 (xw_popup_dialog): New function, with X-specific bits of popup
4215 dialogs.
4216
dee4ba59
SM
4217 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
4218 New functions.
4ed77415
EZ
4219
4220 * window.c (Fset_window_configuration): Use run-time tests of the
4221 frame type instead of compile-time conditionals, when menu-bar
4222 lines are considered.
4223
4224 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
4225 (w32_popup_dialog): New prototypes.
4226
4227 * w32menu.c (Fx_popup_dialog): Function deleted.
4228 (w32_popup_dialog): New function, with w32 specific bits of popup
4229 dialogs. Block input here.
4230
4231 * w32inevt.c (w32_console_read_socket): Minor change to add
4232 debugging TTY events.
4233
4234 * w32fns.c (show_hourglass): If returning early because the frame
4235 is not a GUI frame, unblock input.
4236
4237 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
4238 (cursorY): New functions.
4239
4240 * termhooks.h (cursorX, cursorY): Prototypes of functions on
4241 WINDOWSNT, macros that call curX and curY elsewhere.
4242
4243 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
4244
4245 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
4246 specific function to hide and show cursor on a text-mode terminal.
4247 (tty_menu_struct, struct tty_menu_state): New structures.
4248 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
4249 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
4250 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
4251 (tty_menu_locate, save_and_enable_current_matrix)
4252 (restore_desired_matrix, screen_update, read_menu_input)
4253 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
4254 (tty_pop_down_menu, tty_menu_last_menubar_item)
4255 (tty_menu_new_item_coords, tty_menu_show): New functions.
4256 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
4257
4258 * nsterm.h (ns_popup_dialog): Adjust prototype.
4259
4260 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
4261 of in x-popup-menu.
4262 (ns_popup_dialog): Adapt order of arguments to the other
4263 *_menu_show implementations.
4264 (Fx_popup_dialog): Function deleted.
4265
4266 * msdos.c (x_set_menu_bar_lines): Delete unused function.
4267
c295fc18 4268 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
4ed77415
EZ
4269
4270 * menu.c (have_boxes): New function.
4271 (single_keymap_panes): Use it instead of a compile-time
4272 conditional.
4273 (single_menu_item): Use run-time tests of the frame type instead
4274 of compile-time conditionals.
4275 (encode_menu_string): New function.
4276 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
4277 the macro, since different types of frame need different encoding
4278 of menu items.
4279 (digest_single_submenu): Use run-time tests of frame type instead
4280 of, or in addition to, compile-time conditionals.
4281 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
4282 (Fx_popup_menu): Detect when the function is called from keyboard
dee4ba59
SM
4283 on a TTY. Don't barf when invoked on a text-mode frame.
4284 Check frame type at run time, instead of compile-time conditionals for
4285 invoking terminal-specific menu-show functions.
4286 Call tty_menu_show on text-mode frames.
4287 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
4ed77415
EZ
4288 run time to determine which alternative to invoke; support dialogs
4289 on TTYs.
4290
4291 * keyboard.h <Qmouse_movement>: Declare.
4292
4293 * keyboard.c <Qmouse_movement>: Now extern.
4294 <Qecho_keystrokes>: New static variable.
4295 (read_key_sequence): Accept an additional argument, a flag to
4296 prevent redisplay during reading of the key sequence. All callers
4297 changed.
4298 (read_menu_command): New function.
4299 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
4300 autosave.
4301 (toolkit_menubar_in_use): New function.
4302 (make_lispy_event): Use it instead of a compile-time test.
4303
4304 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
4305 window-system being available.
4306
4307 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
4308 to x-popup-dialog on the frame type, they all now support popup
4309 dialogs.
4310
4311 * dispnew.c (save_current_matrix): Save the margin areas.
4312 (restore_current_matrix): Restore margin areas.
4313 (update_frame_with_menu): New function.
4314
4315 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
4316 Add prototypes.
4317
4318 * alloc.c (make_save_ptr): Now compiled unconditionally.
4319
ecab13d4
DA
43202013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
4321
4322 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
4323 (redraw_frame, update_frame): Adjust users.
4324 * dispextern.h (set_window_update_flags): Adjust prototype.
4325 * xdisp.c (redisplay_internal): When updating all frames with zero
4326 windows_or_buffers_changed, assume that only the windows that shows
4327 current buffer should be really updated.
4328
f8498081
DA
43292013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
4330
4331 Do not allocate huge temporary memory areas and objects while encoding
4332 for file I/O, thus reducing an enormous memory usage for large buffers.
4333 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
4334 * coding.h (struct coding_system): New member raw_destination.
4335 * coding.c (setup_coding_system): Initialize it to zero.
4336 (encode_coding_object): If raw_destination is set, do not create
4337 dst_object. Add comment.
4338 * fileio.c (toplevel): New constant E_WRITE_MAX.
4339 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
4340 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
4341
d180bde8
JD
43422013-10-08 Jan Djärv <jan.h.d@swipnet.se>
4343
35e951cd 4344 * nsterm.m (windowDidExitFullScreen:)
d180bde8
JD
4345 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
4346
87c4314d
PE
43472013-10-08 Paul Eggert <eggert@cs.ucla.edu>
4348
18978362
PE
4349 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
4350 * keyboard.c (unblock_input_to): Don't process pending signals
4351 if a fatal error is in progress.
4352
87c4314d
PE
4353 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
4354 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
4355 they're talking about words in Lisp bool vectors.
4356 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
1142cc2a
PE
4357 * data.c (popcount_bits_word): Rename from popcount_size_t.
4358 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
4359 All uses changed.
87c4314d 4360
595e113b
PE
43612013-10-07 Paul Eggert <eggert@cs.ucla.edu>
4362
4363 Improve support for popcount and counting trailing zeros (Bug#15550).
4364 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
4365 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
4366 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
4367 (popcount_size_t_msc, popcount_size_t_gcc):
4368 Remove; now done by Gnulib.
4369 (popcount_size_t): Now a macro that defers to Gnulib.
4370 (count_trailing_zero_bits): Return int, for consistency with
4371 Gnulib and because Emacs prefers signed to unsigned int.
4372 Don't assume that size_t is either unsigned int or unsigned long
4373 or unsigned long long.
4374 (size_t_to_host_endian): Do not assume that size_t is either
4375 exactly 32 or exactly 64 bits wide.
4376 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
4377 etc., so that it's now an enum constant, not a macro.
4378 No need to assume that it's either 32 or 64.
4379
ddb317ba
JD
43802013-10-07 Jan Djärv <jan.h.d@swipnet.se>
4381
4382 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
4383 on >= 10.7.
4384
bd74250f
DA
43852013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
4386
4387 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
764636db 4388 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
bd74250f 4389
223752d7
PE
43902013-10-07 Paul Eggert <eggert@cs.ucla.edu>
4391
4392 emacs_read and emacs_write now use void *, not char *.
4393 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
4394 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
4395 Buffer arg is now void *, not char *. This matches plain
4396 'read' and 'write' better, and avoids a constraint violation
4397 on Solaris 9 with Oracle Studio.
4398
3c439e0a
DA
43992013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
4400
4401 * alloc.c (Fmake_string): For ASCII char initializer, prefer
4402 memset to explicit loop. Otherwise copy largest possible chunk
4403 from initialized to uninitialized part, thus allowing the longer
4404 memcpy runs and reducing the number of loop iterations.
4405
28c76099
JD
44062013-10-06 Jan Djärv <jan.h.d@swipnet.se>
4407
4408 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
4409 hide toolbar (Bug#15388).
4410 (windowDidEnterFullScreen:): If presentation options are zero,
4411 set them here (Bug#15388).
a3e9050c
JD
4412 (ns_update_auto_hide_menu_bar): Remove runtime check.
4413 Don't auto hide dock unless menubar is also auto hidden.
28c76099 4414
544a2a80
XF
44152013-10-05 Xue Fuqiao <xfq.free@gmail.com>
4416
4417 * editfns.c (message): Mention batch mode in doc string.
4418
a27fd309
JD
44192013-10-05 Jan Djärv <jan.h.d@swipnet.se>
4420
4421 * nsterm.m (check_native_fs): Remove erroneous comment.
4422
942f6f82
DA
44232013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
4424
4425 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
4426 uses find_newline instead of scan_newline and so doesn't move point.
4427
157fec2e
PE
44282013-10-04 Paul Eggert <eggert@cs.ucla.edu>
4429
4eed3157
PE
4430 Use hardware support for byteswapping on glibc x86 etc.
4431 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
4432 whereas the old swap64 needed 30.
4433 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
4434 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
4435 Use byteswap.h's macros to swap bytes.
4436 * lisp.h (swap16, swap32, swap64): Remove.
4437 All uses replaced by bswap_16, bswap_32, bswap_64.
4438
157fec2e
PE
4439 * bytecode.c (exec_byte_code): Use some more volatile variables
4440 to work around local variables getting clobbered by longjmp.
4441 Port to pre-C99, which doesn't allow decls after stmts.
4442
b52f569d
PE
44432013-10-03 Paul Eggert <eggert@cs.ucla.edu>
4444
75273afb
PE
4445 * lisp.h (eassert): Assume that COND is true when optimizing.
4446 In other words, take on the behavior of eassert_and_assume.
4447 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
4448 (eassert_and_assume): Remove. All uses replaced by eassert.
4449
ead45345
PE
4450 * xdisp.c (Qglyphless_char): Now static.
4451
0a858ebf
PE
4452 Adjust to merge from gnulib.
4453 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
4454 * lisp.h: Include <verify.h>, for 'assume'.
4455
b52f569d
PE
4456 * eval.c (clobbered_eassert): New macro.
4457 (internal_catch, internal_condition_case)
4458 (internal_condition_case_1, internal_condition_case_2)
4459 (internal_condition_case_n): Use it instead of eassert
4460 when the argument contains locals clobbered by longjmp.
4461 Don't use clobbered locals outside of clobbered_eassert.
4462 (internal_lisp_condition_case): Use a volatile variable
4463 to work around a local variable's getting clobbered.
4464
adf2aa61
SM
44652013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
4466
4467 * lisp.h (struct handler): Merge struct handler and struct catchtag.
4468 (PUSH_HANDLER): New macro.
4469 (catchlist): Remove.
4470 (handlerlist): Always declare.
4471
4472 * eval.c (catchlist): Remove (merge with handlerlist).
4473 (handlerlist, lisp_eval_depth): Not static any more.
4474 (internal_catch, internal_condition_case, internal_condition_case_1)
4475 (internal_condition_case_2, internal_condition_case_n):
4476 Use PUSH_HANDLER.
4477 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
4478 handlerlist/catchlist.
4479 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
4480 handlerlist which can only handle a single condition-case handler at
4481 a time.
4482 (find_handler_clause): Simplify since we only a single branch here
4483 any more.
4484
4485 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
4486 and Bpophandler.
4487 (bcall0): New function.
4488 (exec_byte_code): Add corresponding cases. Improve error message when
4489 encountering an invalid byte-code. Let Bunwind_protect accept
4490 a function (rather than a list of expressions) as argument.
4491
4492 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
4493 and make them unconditional now that they're heap-allocated.
4494
328a8179
SM
44952013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
4496
4497 * charset.c (Fdecode_char, Fencode_char): Remove description of
4498 `restriction' arg. now that it's hidden by advertised-calling-convention.
4499
c348360a
JD
45002013-10-02 Jan Djärv <jan.h.d@swipnet.se>
4501
328a8179
SM
4502 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
4503 Remove unused variable (from mac-port).
c348360a
JD
4504 (macfont_draw): Use s->ybase for correct y position.
4505
1a23cd48
DA
45062013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4507
4508 * frame.h (struct frame): Drop has_minibuffer member because...
4509 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
4510 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
4511
29bf4de4
DA
45122013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4513
4514 * window.h (struct window): Prefer enum text_cursor_kinds to int
4515 for phys_cursor_type member. Move the latter, phys_cursor_width,
4516 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
4517 * window.c (replace_window, make_window): Adjust users.
4518
a30ddace
DA
45192013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4520
4521 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
4522 this module is never compiled otherwise.
4523
45435f08
AA
45242013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
4525
4526 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
4527 (Bug#15500).
4528
92e5298b
EZ
45292013-09-29 Eli Zaretskii <eliz@gnu.org>
4530
4531 * xdisp.c (get_next_display_element): Don't call face_for_font in
4532 a build configured --without-x. (Bug#15484)
4533
caa50be2
JD
45342013-09-29 Jan Djärv <jan.h.d@swipnet.se>
4535
66d13b20
JD
4536 * window.c (calc_absolute_offset): #elif should be #elif defined.
4537
caa50be2
JD
4538 * frame.c (delete_frame): Block/unblock input to overcome race
4539 condition (Bug#15475).
4540
062e286b 45412013-09-29 Andreas Politz <politza@hochschule-trier.de>
d3e2acb6
AP
4542
4543 * frame.c (delete_frame): Record selected frame only after
4544 calling Qdelete_frame_functions (Bug#15477).
4545
1610938f
JD
45462013-09-28 Jan Djärv <jan.h.d@swipnet.se>
4547
4548 * nsterm.m (ns_selection_color): Remove.
4549 (ns_get_color): Check for ns_selection_(fg|bg)_color using
4550 NSColor selectedText(Background)Color. Only for COCOA.
4551 (ns_term_init): Remove assignment of ns_selection_color, logic
4552 moved to ns_get_color.
4553
328a8179 4554 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
1610938f
JD
4555 NS_SELECTION_COLOR_DEFAULT.
4556 (NS_SELECTION_FG_COLOR_DEFAULT): New.
4557
0d2647e6
EZ
45582013-09-28 Eli Zaretskii <eliz@gnu.org>
4559
4560 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
4561 frame' does not have the tool_bar_window member.
4562
ba355de0
BR
45632013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
4564
4565 Signal error when reading an empty byte-code object (Bug#15405)
c295fc18
JB
4566 * lread.c (read1): Signal error.
4567 * alloc.c (make_byte_code): eassert header size.
4568 (sweep_vectors): Change an int to size_t.
ba355de0 4569
4710d6f4
PE
45702013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4571
cf647d93
PE
4572 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
4573 instead of ints, as it's the usual style for offsetof constants. See:
4574 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
4575
4710d6f4
PE
4576 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
4577 This is ugly, but it should fix the performance problem for older
4578 GCC versions in the short run. I'll look into integrating the
4579 Gnulib module for popcount, as a better fix.
4580 See the thread starting in:
4581 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
4582 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
4583 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
4584 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
4585 (popcount_size_t): Use it.
4586
10ebac9d
DC
45872013-09-24 Daniel Colascione <dancol@dancol.org>
4588
4589 * process.c (Fnetwork_interface_info): Fix build break due to
4590 vector changes.
4591
9da0f50e
PE
45922013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4593
4594 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
4595 Prefer signed to unsigned integers where either will do.
4596 No need for 'const' on locals that do not escape.
4597 Omit easserts with unnecessary and unportable assumptions about
4598 alignment. Avoid unnecessary casts to char *.
4599
d6d9cbc1
DA
46002013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
4601
4602 Use union for the payload of struct Lisp_Vector.
4603 This helps to avoid a few glitches dictated by C's aliasing rules.
4604 * lisp.h (struct Lisp_Vector): Use union for next and
4605 contents member. Adjust comment. Change related users.
4606 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
4607 Related users changed.
4608 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
4609 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
4610 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
4611 * xfaces.c, xfont.c, xmenu.c: Related users changed.
4612
ec7bc82f
DA
46132013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
4614
4615 Optimize glyph row clearing and copying routines.
4616 * dispextern.h (struct glyph_row): Change layout of struct
4617 glyph_row to help copy_row_except_pointers. Adjust comment.
4618 * dispnew.c (null_row): Remove.
4619 (clear_glyph_row): Use offsetof and memset to find and clear
4620 just the members that need clearing. Adjust comment.
4621 (copy_row_except_pointers): Likewise for copying.
4622
d160dd0c
PE
46232013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4624
7be68de5
PE
4625 Some minor cleanups of recently-added bool vector code.
4626 * conf_post.h (assume): Always return void. Use lint version
4627 only if GCC and MSC versions don't apply.
4628 * conf_post.h (assume):
4629 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
4630 Depend on _MSC_VER, not __MSC_VER, for consistency with
4631 the rest of Emacs.
4632 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
4633 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
4634 (bool_vector_binop_driver, count_trailing_zero_bits)
4635 (size_t_to_host_endian): Now static, not static inline;
4636 the latter isn't needed with modern compilers and doesn't
4637 work with older compilers anyway.
4638
d160dd0c
PE
4639 * alloc.c (valgrind_p): Use bool for boolean.
4640
e08813d0
DA
46412013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
4642
4643 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
4644 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
4645 (display_last_displayed_message_p, message_buf_print)
4646 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
4647 Use bool for boolean.
3a6a78fd
DA
4648 * dispextern.h (cancel_line, init_desired_glyphs):
4649 Remove ancient leftover.
4650 (help_echo_showing_p, hourglass_shown_p):
e08813d0
DA
4651 * lisp.h (noninteractive_need_newline): Adjust declaration.
4652
5492865b
DA
46532013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
4654
4655 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
4656 Move to...
4657 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
4658 ...this file and convert the latter to static. Adjust comment.
4659 (make_initial_frame):
4660 * window.c (init_window_once): Adjust user.
4661 * frame.h (last_nonminibuf_frame): Remove declaration.
4662 * lisp.h (selected_frame): Likewise.
4663 * msdos.c (the_only_display_info): Adjust comment.
4664
cd548fa4
EZ
46652013-09-23 Eli Zaretskii <eliz@gnu.org>
4666
f03eddbf
EZ
4667 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
4668 computing the end column of mouse-highlight that comes from
4669 display or overlay strings. (Bug#15437)
b519df23
EZ
4670 (note_mouse_highlight): Adapt calculation of last argument to
4671 mouse_face_from_string_pos to the above change.
f03eddbf 4672
cd548fa4
EZ
4673 * conf_post.h (__has_builtin): Define to zero, if undefined, on
4674 all platforms, not just for clang.
4675
8762e524
JD
46762013-09-23 Jan Djärv <jan.h.d@swipnet.se>
4677
4678 * filelock.c (lock_file_1): Rearrange to remove compiler warning
4679 about excess arguments to snprintf.
4680
4681 * conf_post.h(assume): Use __builtin_unreachable for clang.
4682
d4a9284f
JB
46832013-09-23 Juanma Barranquero <lekktu@gmail.com>
4684
4685 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
4686 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
4687
a84683fd
DC
46882013-09-23 Daniel Colascione <dancol@dancol.org>
4689
4690 * alloc.c (USE_VALGRIND): New macro; on by default
4691 when ENABLE_CHECKING.
ffb3f67a 4692 (mark_maybe_object, mark_maybe_pointer)
a84683fd
DC
4693 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
4694 valgrind purposes.
4695 (valgrind_p) [USE_VALGRIND]: New variable.
4696 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
4697
8fef36c6
JD
46982013-09-22 Jan Djärv <jan.h.d@swipnet.se>
4699
fb83ea63
JD
4700 * process.c (wait_reading_process_output): Change int pnamelen to
4701 socklen_t.
4702
35e951cd 4703 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
fb83ea63
JD
4704 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
4705 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
4706 argument to unsigned long to avoid warning.
4707 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
4708
8fef36c6
JD
4709 * conf_post.h (assume): Fix compiler error: x shall be cond.
4710
cd9356f2
DC
47112013-09-22 Daniel Colascione <dancol@dancol.org>
4712
4713 * xfns.c (x_get_monitor_attributes): Suppress unused variable
4714 warning when compiling without a window system.
4715
3e0b94e7
DC
47162013-09-22 Daniel Colascione <dancol@dancol.org>
4717
4718 * data.c (Qbool_vector_p): New symbol.
ffb3f67a
PE
4719 (bool_vector_spare_mask, popcount_size_t_generic)
4720 (popcount_size_t_msc, popcount_size_t_gcc)
3e0b94e7
DC
4721 (popcount_size_t)
4722 (bool_vector_binop_driver)
ffb3f67a 4723 (count_trailing_zero_bits, size_t_to_host_endian)
3e0b94e7
DC
4724 (Fbool_vector_exclusive_or)
4725 (Fbool_vector_union)
ffb3f67a
PE
4726 (Fbool_vector_intersection, Fbool_vector_set_difference)
4727 (Fbool_vector_subsetp, Fbool_vector_not)
3e0b94e7
DC
4728 (Fbool_vector_count_matches)
4729 (Fbool_vector_count_matches_at): New functions.
4730 (syms_of_data): Intern new symbol, functions.
4731 * alloc.c (bool_vector_payload_bytes): New function.
4732 (Fmake_bool_vector): Instead of calling Fmake_vector,
4733 which performs redundant initialization and argument checking,
4734 just call allocate_vector ourselves. Make sure we clear any
4735 terminating padding to zero.
ffb3f67a 4736 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
3e0b94e7
DC
4737 instead of open-coding the size calculation.
4738 (vroundup_ct): New macro.
4739 (vroundup): Assume argument >= 0; invoke vroundup_ct.
ffb3f67a 4740 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
328a8179
SM
4741 * composite.c (composition_gstring_put_cache):
4742 Change lint_assume to assume.
3e0b94e7
DC
4743 * conf_post.h (assume): New macro.
4744 (lint_assume): Remove.
4745 * dispnew.c (update_frame_1): Change lint_assume to assume.
4746 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
4747 to assume.
4748 * image.c (gif_load): Change lint_assume to assume.
4749 * lisp.h (eassert_and_assume): New macro.
4750 (Qbool_vector_p): Declare.
ffb3f67a
PE
4751 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
4752 (swap16, swap32, swap64): New inline functions.
a12bf61e 4753 * macfont.m (macfont_shape): Change lint_assume to assume.
3e0b94e7
DC
4754 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
4755 * xsettings.c (parse_settings): Use new swap16 and
4756 swap32 from lisp.h instead of file-specific macros.
4757
76880d88
EZ
47582013-09-22 Eli Zaretskii <eliz@gnu.org>
4759
4760 * xdisp.c (try_window_id): Don't abort if cursor row could not be
4761 found (which can legitimately happen when the glyph row at the
4762 window start is disabled in the current_matrix. (Bug#15365)
4763
c6cfd910
PE
47642013-09-22 Paul Eggert <eggert@cs.ucla.edu>
4765
4766 Fix syntax.h bug introduced by recent INLINE change.
4767 syntax.h defined an extern inline function SYNTAX_ENTRY that was
4768 conditionally compiled one way in some modules, and a different
4769 way in others. This doesn't work with extern inline functions,
4770 which must have the same definition in all modules, because the
4771 defining code might be shared across modules, depending on the
4772 implementation. Symptoms reported by Martin Rudalics in:
4773 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
4774 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
4775 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
4776 overriding the corresponding functions in syntax.h.
4777 * syntax.h (syntax_property_entry, syntax_property_with_flags)
4778 (syntax_property): New inline functions.
4779 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
4780 Rewrite in terms of these new functions.
4781
b3f1d119
EZ
47822013-09-21 Eli Zaretskii <eliz@gnu.org>
4783
4784 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
4785 not chars_in_text, whose result depends on the multibyteness of
4786 the current buffer. (Bug#15426)
4787
00382e8b
PE
47882013-09-20 Paul Eggert <eggert@cs.ucla.edu>
4789
e3b29769
PE
4790 Port recent change to hosts where pointers aren't 'long'.
4791 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
4792 Don't assume that pointers are the same width as 'long'.
4793 Add a compile-time check that a pointer fits into two X slots.
4794
00382e8b
PE
4795 A simpler, centralized INLINE.
4796 * conf_post.h (INLINE): Define only if not already defined.
4797 This allows us to use a single INLINE, defined by one file
4798 per executable.
4799 * emacs.c (INLINE): Define it.
4800 Also, include category.h, charset.h, composite.h, dispextern.h,
4801 syntax.h, systime.h, so that their INLINE definitions are expanded
4802 properly for Emacs.
4803 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
4804 * buffer.h, buffer.c (BUFFER_INLINE):
4805 * category.h, category.c (CATEGORY_INLINE):
4806 * character.h, character.c (CHARACTER_INLINE):
4807 * charset.h, charset.c (CHARSET_INLINE):
4808 * composite.h, composite.c (COMPOSITE_INLINE):
4809 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
4810 * frame.h, frame.c (FRAME_INLINE):
4811 * intervals.h, intervals.c (INTERVALS_INLINE):
4812 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
4813 * lisp.h, alloc.c (LISP_INLINE):
4814 * process.h, process.c (PROCESS_INLINE):
4815 * syntax.h, syntax.c (SYNTAX_INLINE):
4816 * systime.h, sysdep.c (SYSTIME_INLINE):
a12bf61e 4817 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
00382e8b
PE
4818 * window.h, window.c (WINDOW_INLINE):
4819 Remove. All uses replaced with INLINE.
4820
2b943ba6
DA
48212013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
4822
4823 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
4824 to avoid Bug#15398.
4825
13d9698a
EZ
48262013-09-19 Eli Zaretskii <eliz@gnu.org>
4827
4828 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
4829 'const char *' to avoid compiler warnings due to similar change in
4830 the prototype of x_get_string_resource.
4831
ced135eb
DA
48322013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
4833
4834 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
4835 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
4836 going to replace static variables below. Adjust comments.
4837 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
4838 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
4839 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
4840 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
4841 Related users changed.
4842 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
4843 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
4844 last_mouse_movement_time, going to replace static variables below.
4845 Adjust comments.
4846 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
4847 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
4848 Remove.
4849 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
4850 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
4851 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
4852 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
4853 static variables below.
4854 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
4855 (last_mouse_scroll_bar): Remove.
4856 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
4857 (mouseExited): Related users changed.
4858
091f1e1f
DA
48592013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
4860
4861 Do not use external array to process X scroll bar messages.
4862 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
4863 (x_send_scroll_bar_event): Pack window pointer into two slots
4864 of XClientMessageEvent if we're 64-bit. Adjust comment.
4865 (x_scroll_bar_to_input_event): Unpack accordingly.
4866
582ed56c
DA
48672013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4868
4869 Ifdef away recent changes which aren't relevant to NS port.
4870 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
4871 [!HAVE_NS]: Declare as such.
4872 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
4873 [!HAVE_NS]: Define as such.
4874
18da0d8a
DA
48752013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4876
4877 * frame.c (x_redo_mouse_highlight): New function
4878 to factor out common code used in W32 and X ports.
4879 * dispextern.h (x_redo_mouse_highlight): Add prototype.
4880 * xterm.h (struct x_display_info):
4881 * w32term.h (struct w32_display_info):
4882 * nsterm.h (struct ns_display_info): New members
4883 last_mouse_motion_frame, last_mouse_motion_x and
4884 last_mouse_motion_y, going to replace static variables below.
4885 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
4886 (redo_mouse_highlight): Remove.
4887 (note_mouse_movement, syms_of_xterm): Adjust user.
4888 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
4889 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
4890 (redo_mouse_highlight): Remove.
4891 (note_mouse_movement, syms_of_w32term): Adjust user.
4892 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
4893 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
4894 Remove.
4895 (note_mouse_movement, mouseMoved, syms_of_nsterm):
4896 * nsfns.m (compute_tip_xy): Adjust user.
4897
7a0c745a
DA
48982013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4899
4900 * frame.c (x_mouse_grabbed): New function.
4901 * dispextern.h (x_mouse_grabbed): Add prototype.
4902 (last_mouse_frame): Remove declaration.
4903 * xterm.h (struct x_display_info):
4904 * w32term.h (struct w32_display_info):
4905 * nsterm.h (struct ns_display_info): New member
4906 last_mouse_frame, going to replace...
4907 * xdisp.c (last_mouse_frame): ...global variable.
4908 (note_tool_bar_highlight):
4909 * w32term.c (w32_mouse_position, w32_read_socket):
4910 * xterm.c (XTmouse_position, handle_one_xevent):
4911 Use x_mouse_grabbed.
4912 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
4913
0791d107
DA
49142013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4915
4916 * w32term.c (w32_read_socket): Avoid temporary
4917 variables in a call to x_real_positions.
4918 * xterm.c (handle_one_xevent): Likewise.
4919
2cd98812
DA
49202013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4921
4922 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
4923 (x_icon_type): Remove prototype.
4924 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
4925 * frame.c (x_icon_type): Remove.
4926 * w32term.c (x_make_frame_visible, x_iconify_frame):
4927 * xterm.c (x_make_frame_visible, x_iconify_frame):
4928 Use x_set_bitmap_icon to factor out common code.
4929
a6c2ee1b
DA
49302013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4931
4932 * dispextern.h (check_x_display_info, x_get_string_resource):
4933 Declare here just once and unify the latter.
4934 * frame.c (check_x_display_info, x_get_string_resource):
4935 * nsterm.h (check_x_display_info):
4936 * xrdb.c (x_get_string_resource):
4937 * xterm.h (check_x_display_info): Remove prototypes.
4938 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
4939 * w32reg.c (x_get_string_resource): Likewise.
4940 (w32_get_rdb_resource): Adjust user.
4941
baed3603
DA
49422013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4943
4944 * xterm.h (struct x_display_info): New member
4945 x_pending_autoraise_frame, going to replace...
4946 * xterm.c (pending_autoraise_frame): ...static variable.
4947 (x_new_focus_frame, XTread_socket): Adjust users.
4948 * w32term.h (struct w32_display_info): New member
4949 w32_pending_autoraise_frame, going to replace...
4950 * w32term.c (pending_autoraise_frame): ...global variable.
4951 (x_new_focus_frame, w32_read_socket): Adjust users.
4952
90582f05
GM
49532013-09-17 Glenn Morris <rgm@gnu.org>
4954
4955 * xdisp.c (message_dolog): If we create *Messages*,
4956 switch it to messages-buffer-mode.
4957
b7ad2f74
PE
49582013-09-17 Paul Eggert <eggert@cs.ucla.edu>
4959
4960 Don't overuse 'const' in types of locals.
4961 * bidi.c (bidi_count_bytes):
4962 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
4963 (xg_event_is_for_scrollbar):
4964 * xselect.c (x_handle_property_notify)
4965 (x_handle_selection_notify, x_handle_dnd_message):
4966 * xsettings.c, xsettings.h (xft_settings_event):
4967 * xterm.c (x_handle_net_wm_state, handle_one_event)
4968 (x_menubar_window_to_frame, x_detect_focus_change)
4969 (construct_mouse_click, note_mouse_movement)
4970 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
4971 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
4972 (handle_one_xevent, x_handle_net_wm_state):
4973 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
4974 (x_handle_dnd_message):
4975 Avoid unnecessary 'const', typically the second 'const' in
4976 'const foo * const arg', a 'const' that does not affect the API
4977 and doesn't significantly help the human reader.
4978
19452b86
DA
49792013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4980
4981 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
4982 only if Glib < 2.36.0.
4983 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
4984 * xsettings.c (init_gconf, init_gsettings): Do not check
4985 for g_type_init.
1893694e
DA
4986 * xterm.c (handle_one_xevent): Do not call to x_clear_area
4987 if GTK >= 2.7.0.
33b83dd7 4988 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
19452b86 4989
6434e343
JD
49902013-09-16 Jan Djärv <jan.h.d@swipnet.se>
4991
3f386383
JD
4992 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
4993 before calling g_type_init.
4994
6434e343
JD
4995 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
4996
4997 * nsterm.m (syms_of_nsterm): ... to here.
4998
83a119f8
DA
49992013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
5000
5001 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
5002 (ignore_next_mouse_click_timeout): Use Time as X does.
5003 (handle_one_xevent): Avoid cast and use unsigned comparison.
5004
61582e6a
DA
50052013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
5006
5007 Do not copy X event in handle_one_xevent except KeyPress case.
5008 Wnen XEvent is processed, it is unlikely to be changed except
5009 KeyPress case, so we can avoid copying and use const pointer to
5010 const data to make sure that an event is not changed elsewhere.
5011 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
5012 const' and do not create local copy except for the KeyPress event.
5013 Use casts to avoid a few glitches. Adjust formatting. Add comments.
5014 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
5015 (x_handle_net_wm_state, x_menubar_window_to_frame)
5016 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
5017 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
5018 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
5019 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
5020 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
5021 (x_handle_dnd_message):
5022 * xsettings.c (xft_settings_event):
5023 Use 'const XEvent * const' where appropriate.
a12bf61e 5024 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
61582e6a 5025
f8eb1572
DA
50262013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
5027
5028 Fix X event waiting to handle multiple frames.
5029 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
5030 * xterm.c (pending_event_wait): Remove. Adjust users.
5031 (x_detect_focus_change): Pass frame arg.
5032 (handle_one_xevent): Find related frame early and clear per-frame
5033 wait_event_type only if this is an event for the relevant frame.
5034 (x_wait_for_event): Use per-frame wait_event_type.
5035
3fa2054e
JD
50362013-09-15 Jan Djärv <jan.h.d@swipnet.se>
5037
745d3809 5038 * nsfns.m (Fx_create_frame): Fix font driver registration for
a6c4680a 5039 GNUstep.
745d3809
JD
5040
5041 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
5042 for syms_of_macfont.
5043
3fa2054e
JD
5044 * nsterm.m: Include macfont.h.
5045 (ns_tmp_flags, ns_tmp_font): Remove.
5046 (ns_compute_glyph_string_overhangs): Check for driver Qns.
5047 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
5048 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
5049 (changeFont:): Fix code style. Check for font driver type when
5050 getiing font.
5051
5052 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
5053 (f)->descent.
5054
5055 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
5056 (nsfont_open): Set font driver type.
5057 Set font->ascent and font->descent. Figure out font instead of
5058 ns_tmp_font, and flags instead of ns_tmp_flags.
e9dc713d 5059 Fix indentation. Remove call to ns_draw_text_decoration,
3fa2054e
JD
5060 moved to nsterm.
5061
5062 * nsfns.m: Include macfont.h.
5063 (Fx_create_frame): Register macfont driver, make a better default font.
5064 (Fns_popup_font_panel): Get font from macfont driver, if used.
5065
a12bf61e 5066 * macfont.m, macfont.h, macuvs.h: New files.
3fa2054e
JD
5067
5068 * font.h: Declare syms_of_macfont.
5069
5070 * font.c (syms_of_font): Call syms_of_macfont.
5071
5072 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
5073
0eed0355
DA
50742013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
5075
5076 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
5077 and it is always zero for others, so I assume that this is an ancient
5078 leftover which nobody will want to change any more.
5079 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
5080 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
5081 * frame.c (x_set_scroll_bar_width):
5082 * w32fns.c (w32_createscrollbar):
5083 * w32term.c (w32_set_vertical_scroll_bar):
5084 * xfns.c (x_set_scroll_bar_default_width):
5085 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
5086 (x_scroll_bar_expose): Related users changed.
5087
07013c68
DA
50882013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
5089
5090 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
5091 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
901049a6
DA
5092 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
5093 Define as such.
c7cc32f7
DA
5094 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
5095 Define once here...
5096 * nsterm.h, w32term.h, xterm.h: ...and not here.
901049a6
DA
5097 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
5098 Remove unused Xisms.
7f09455e
DA
5099 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
5100 these modules are never compiled otherwise.
07013c68 5101
0df00f59
EZ
51022013-09-14 Eli Zaretskii <eliz@gnu.org>
5103
08a209bf 5104 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
0df00f59
EZ
5105 Doc fix. (Bug#15375)
5106
fcd42c11
DA
51072013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5108
5109 Unify Fx_focus_frame between all ports.
5110 * frame.h (x_focus_frame): New prototype.
5111 * xfns.c (Fx_focus_frame): Remove.
5112 (syms_of_xfns): Do not defsubr it.
5113 (x_focus_frame): X implementation.
5114 * nsfns.m (Fx_focus_frame): Remove.
5115 (syms_of_nsfns): Do not defsubr it.
5116 (x_focus_frame): NS implementation.
5117 * w32term.c (Fx_focus_frame): Remove.
5118 (x_focus_on_frame): Rename to...
5119 (x_focus_frame): W32 implementation.
5120 * w32term.h (x_focus_on_frame): Remove prototype.
5121 * w32fns.c (Fx_focus_frame): Remove.
5122 (syms_of_w32fns): Do not defsubr it.
5123 * frame.c (Fx_focus_frame): Define here.
5124 (syms_of_frame): Defsubr here.
5125 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
5126
aad3612f
DA
51272013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5128
5129 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
5130 All of them are replaced with FRAME_DISPLAY_INFO, defined in
5131 each port to reference the port-specific window system data.
5132 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
5133 (FRAME_DISPLAY_INFO): Define.
5134 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
5135 (FRAME_DISPLAY_INFO): Define. Adjust users.
5136 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
5137 (FRAME_DISPLAY_INFO): Define. Adjust users.
5138 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
5139 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
5140 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
5141 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
5142 * xselect.c, xterm.c: All related users changed.
5143
9a650e62
DA
51442013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5145
5146 * xterm.h (x_window_to_frame, x_any_window_to_frame)
5147 (x_menubar_window_to_frame): Remove prototypes.
5148 * xfns.c (x_window_to_frame, x_any_window_to_frame)
5149 (x_menubar_window_to_frame, x_top_window_to_frame):
5150 Move from here...
5151 * xterm.c (x_window_to_frame, x_any_window_to_frame)
5152 (x_menubar_window_to_frame, x_top_window_to_frame):
5153 ...to here and convert all but the last to static.
5154
347ae3e1
EZ
51552013-09-12 Eli Zaretskii <eliz@gnu.org>
5156
5157 * lisp.mk (lisp): Add w32-common-fns.elc.
5158
15c6d837
XF
51592013-09-12 Xue Fuqiao <xfq.free@gmail.com>
5160
5161 * charset.c (char_charset): Document an exception for char-charset.
5162
27e90f77
DA
51632013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
5164
5165 * xterm.h (x_display_info): New field last_user_time...
5166 * xterm.c (toplevel): ...to replace static last_user_time.
5167 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
5168
8ffbc36b
DA
51692013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
5170
5171 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
5172 scroll bar values to prevent thumb from disappear and update comment.
5173
5ec0337a
GM
51742013-09-11 Glenn Morris <rgm@gnu.org>
5175
5176 * emacs.c (usage_message): Possessive apostrophe tweak.
5177
fb55b9d1
DA
51782013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5179
8d2db8be
DA
5180 * nsterm.m (syms_of_nsterm): Use Qns.
5181 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
5182 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
5183 * xfns.c (x_display_info_for_name, Fx_open_connection):
5184 Remove old '#if 0' code.
5185 (syms_of_xfns): Use Qx.
fb55b9d1
DA
5186 * termhooks.h (fullscreen_hook): Remove the leftover.
5187 (struct terminal): Fix typo in comment.
5188
927eec55
DA
51892013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5190
5191 Cleaning up a few X scroll bar bits.
5192 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
5193 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
5194 New member last_seen_part, going to replace...
5195 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
5196 (xt_action_hook) [USE_LUCID]: Adjust user.
5197 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
5198 Lucid-specific scroll bar support.
5199 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
5200 to int and adjust to use last_seen_part member.
5201 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
5202 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
5203 Initialize last_seen_part.
5204
71b28baa
SM
52052013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
5206
5207 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
5208 insert-buffer-substring an empty string.
5209
f5dacaae
PE
52102013-09-11 Paul Eggert <eggert@cs.ucla.edu>
5211
5212 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
5213 avoiding a GCC warning.
5214
742516e0
DA
52152013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5216
5217 Ifdef away frame tool bar code when it is not really used.
5218 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
5219 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
5220 and minimize_tool_bar_window_p under the above.
5221 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
5222 (fset_tool_bar_window): Likewise.
5223 * dispnew.c (clear_current_matrices, clear_desired_matrices)
5224 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
5225 (change_frame_size_1):
5226 * window.c (window_from_coordinates, Frecenter): Adjust users.
5227 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
5228 code is not really used.
5229 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
5230 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
5231 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
5232 [!USE_GTK && !HAVE_NS]: Define as such.
5233 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
5234 (note_mouse_highlight, expose_frame):
5235 * xfns.c (x_set_tool_bar_lines):
5236 * xterm.c (handle_one_xevent): Adjust users.
5237
73f82c7e
PE
52382013-09-11 Paul Eggert <eggert@cs.ucla.edu>
5239
5240 Fix corruption with multiple emacsclient -t instances (Bug#15222).
5241 This bug was introduced by my 2013-08-26 patch, which incorrectly
5242 assumed that the terminfo implementation doesn't use termcap buffers.
5243 * term.c (init_tty) [TERMINFO]: Remove optimization, as
5244 these buffers apparently are used after all.
5245 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
5246 (struct tty_display_info): Define members termcap_term_buffer and
5247 termcap_strings_buffer even if TERMINFO.
5248
53482f41
DA
52492013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5250
5251 Fix last change.
5252 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
5253 'usage' docstring entry to pacify make-docfile.
5254
52552013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
5256
5257 Change comparison functions =, <, >, <=, >= to take many arguments.
5258 * data.c: Change comparison functions' interface and implementation.
5259 * lisp.h: Make arithcompare available for efficient two arg
5260 comparisons.
5261 * bytecode.c: Use arithcompare.
5262 * fileio.c: Use new interface.
5263
533f258f
SM
52642013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
5265
5266 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
5267
8c27f5ff
SM
52682013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
5269
5270 * eval.c (Feval): Document the new use of `lexical'.
5271
0750a308
DA
52722013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5273
5274 Review and drop old frame resize hack.
5275 * frame.h (struct frame): Remove force_flush_display_p.
5276 * dispnew.c (update_frame): Adjust user and don't call
5277 flush_frame here. The comment has said that there was an issues
5278 with redisplaying fringes, but I don't see any differences with
5279 and without this hack. Hopefully we can continue without it.
5280 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
5281 current frame matrices twice if resized_p is set.
5282
83fc0554
DA
52832013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5284
5285 Do not populate pure Xism x_sync to other ports.
5286 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
5287 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
5288 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
5289 * w32term.h (x_sync): Remove prototype.
5290
fd462129
DA
52912013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5292
5293 Cleanup frame flushing.
8c27f5ff
SM
5294 * dispextern.h (struct redisplay_interface):
5295 Drop flush_display_optional because flush_display is enough
fd462129
DA
5296 for X and flushing via RIF is just a no-op for others.
5297 * frame.h (flush_frame): New function.
5298 * dispnew.c (update_frame):
5299 * minibuf.c (read_minibuf):
5300 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
5301 Use it.
5302 * keyboard.c (detect_input_pending_run_timers): Do not flush
5303 all frames but selected one in redisplay_preserve_echo_area.
5304 * nsterm.m (ns_flush): Remove no-op.
5305 (ns_redisplay_interface): Adjust user.
5306 * w32term.h (x_flush): Remove no-op.
5307 (w32_redisplay_interface): Adjust user.
5308 * xterm.c (x_flush): Simplify because we do not flush all
5309 frames at once any more. Adjust comment.
5310 (x_redisplay_interface): Adjust user.
5311
4b73fc73
PE
53122013-09-07 Paul Eggert <eggert@cs.ucla.edu>
5313
5314 Port --without-x --enable-gcc-warnings to Fedora 19.
5315 * gfilenotify.c (globals_of_gfilenotify):
5316 Call g_type_init only if using an older glib version that needs it.
5317
77394d40
DA
53182013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5319
5320 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
5321 (last_glyphless_glyph_merged_face_id): Remove declarations.
5322 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
5323 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
5324 (last_glyphless_glyph_merged_face_id): Now static.
5325 (merge_escape_glyph_face): New function, refactored from...
5326 (get_next_display_element): ...here.
5327 (merge_glyphless_glyph_face): New function, refactored from...
5328 (produce_glyphless_glyph): ...here...
5329 * term.c (produce_glyphless_glyph): ...and here.
5330
306d67bd
SM
53312013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
5332
5333 * eval.c (eval_sub): Only call Ffunction if necessary.
5334
7f6c6450
DA
53352013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5336
5337 Attempt to make redisplay more selective when changing cursor type.
5338 * frame.h (struct frame): New bitfield cursor_type_changed.
5339 * xdisp.c (cursor_type_changed): Remove.
5340 (try_cursor_movement, redisplay_window, try_window_id)
5341 (set_frame_cursor_types, try_window_reusing_current_matrix):
5342 Adjust to use per-frame bitfield.
5343 (redisplay_internal): Look for cursor type change on each visible
5344 frame and consider all frames if cursor type has been changed on
5345 the frame other than selected. If cursor type has been changed on
5346 selected frame only, do not use fast update.
5347
bd0443bb
DA
53482013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5349
5350 Attempt to make redisplay more selective when changing fonts.
5351 * frame.h (struct frame): New bitfield fonts_changed.
5352 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
5353 (adjust_frame_glyphs): Add prototype.
5354 * dispnew.c (fonts_changed_p): Remove.
8bda01d3 5355 (adjust_glyphs): Remove because we do not
bd0443bb
DA
5356 adjust matrices on all frames at once any more.
5357 (adjust_frame_glyphs): Block and unblock input here.
5358 (adjust_glyph_matrix): Use fonts_changed.
5359 (change_frame_size_1): Use adjust_frame_glyphs.
5360 * font.c (font_open_entity): Use fonts_changed.
5361 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
5362 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
5363 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
5364 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
5365 (shrink_mini_window, Fresize_mini_window_internal)
5366 (window_scroll_pixel_based, Fset_window_configuration)
5367 (apply_window_adjustment, Fset_window_vscroll):
5368 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
5369 Use adjust_frame_glyphs.
5370 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
5371 (try_window_reusing_current_matrix, try_window_id, display_line)
5372 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
5373 (redisplay_internal): Consider fonts_changed and adjust frame
5374 matrices for each frame only if the frame is visible. If font
5375 has been changed on some frame during full redisplay, retry
5376 only visible frames where the font has been actually changed.
5377
b9695828
DA
53782013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5379
5380 Cache current header and mode line height for each window.
5381 * window.h (struct window): New fields mode_line_height
5382 and header_line_height.
5383 * window.c (make_window): Initialize them.
5384 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
5385 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
5386 (current_mode_line_height, current_header_line_height):
5387 Remove declaration.
5388 * xdisp.c (current_mode_line_height, current_header_line_height):
5389 Remove.
5390 (pos_visible_p, init_xdisp): Adjust user.
5391 (redisplay_window): Invalidate mode_line_height and
5392 header_line_height if current and desired matrices do not agree.
5393
66738305
DA
53942013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5395
5396 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
5397 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
5398
257b3b03
DA
53992013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5400
5401 Make --without-x compatible with --enable-gcc-warnings.
5402 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
5403 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
5404 members under HAVE_WINDOW_SYSTEM.
5405 * keyboard.c (make_lispy_focus_out): Likewise.
5406 (record_menu_key): Move under HAVE_MENUS.
5407 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
5408 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
5409 (syms_of_xdisp): Adjust user.
5410 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
5411 (start_hourglass, cancel_hourglass):
5412 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
5413 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
5414 and CLEAR_FONT_TABLE_NFONTS.
5415 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
5416 Declare only if HAVE_WINDOW_SYSTEM.
5417 (lface_same_font_attributes_p, clear_face_gcs): Define only
5418 if HAVE_WINDOW_SYSTEM.
5419
98b7f4bd
DA
54202013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5421
5422 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
5423 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
5424 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
5425
a7e43722
SM
54262013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
5427
5428 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
5429
0c90b9ee
PE
54302013-09-04 Paul Eggert <eggert@cs.ucla.edu>
5431
5432 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
5433 This fixes a type error on hosts where ptrdiff_t is wider than int.
5434
d99760fa
SM
54352013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
5436
6629638e
SM
5437 * keyboard.c (read_key_sequence_vs): New function.
5438 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
5439 common code.
5440
d99760fa
SM
5441 * callint.c (Fcall_interactively): Always return a vector for 'K'.
5442
224e313d
PE
54432013-09-04 Paul Eggert <eggert@cs.ucla.edu>
5444
5445 Makefile improvements.
5446 * Makefile.in (config.status): Don't use double-colon rules, as
5447 they are not portable according to POSIX. Fix shell typo with `;
5448 I guess this rule has never been tested?
5449 (VCSWITNESS): New macro, to override any environment var.
5450
6d6ed1af
DA
54512013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
5452
5453 * xterm.h (struct x_display_info): Do not track X connection
5454 fd separately because it is always available from Display.
5455 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
5456 Adjust users.
5457
bc923770
DA
54582013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5459
5460 * buffer.c (drop_overlay):
5461 * fileio.c (restore_point_unwind): Prefer unchain_marker to
5462 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
5463
b1cf96de
DA
54642013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5465
5466 * buffer.c (Fmake_overlay, Fmove_overlay):
5467 * intervals.c (set_point_from_marker):
5468 * print.c (PRINTPREPARE): Prefer signal_error
5469 to plain error and report unsuitable marker too.
5470
d1fc6c21
DA
54712013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5472
5473 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
5474 for 'dragging' member.
d1ae6a0b
DA
5475 (struct x_output): Remove set-but-unused leftovers
5476 'left_before_move' and 'top_before_move'.
d1fc6c21
DA
5477 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
5478 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
5479 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
5480 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
5481 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
5482 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
d1ae6a0b 5483 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
ec5e7504 5484 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
d1fc6c21 5485
0ce9f6de
JD
54862013-09-03 Jan Djärv <jan.h.d@swipnet.se>
5487
5488 * nsfont.m (INVALID_GLYPH): New define.
5489 (nsfont_encode_char): Use INVALID_GLYPH.
5490 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
5491
b594a96c
DA
54922013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5493
5494 * xterm.c (x_last_mouse_movement_time): Revert last change.
5495 This code should use XDisplayMotionBufferSize to check display's
5496 motion history first, and there are few other issues as well.
5497 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
5498 (handle_one_xevent): Adjust user.
5499
8b098236
MR
55002013-09-02 Martin Rudalics <rudalics@gmx.at>
5501
9718b207
MR
5502 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
5503 * frame.c (Flast_nonminibuf_frame): ... to here.
5504 (check_minibuf_window): Don't abort if no window was found
5505 (Bug#15247).
8b098236 5506
84e70bba
DA
55072013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5508
5509 Use XGetMotionEvents to ask the last mouse motion time from X server.
5510 * xterm.c (X_MOTION_HISTORY): Default to 1.
5511 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
5512 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
5513 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
5514 Ifdef away legacy code.
5515 (XTmouse_position, x_scroll_bar_report_motion):
5516 Use x_last_mouse_movement_time.
fc85e20b
DA
5517 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
5518 UnmapNotify event.
84e70bba 5519
1fccc530
DA
55202013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5521
5522 * msdos.c (last_mouse_window): Move to...
5523 (dos_rawgetc): ...this function and adjust comment.
5524 * nsterm.m (last_window): Rename to last_mouse_window, move to...
5525 (mouseMoved): ...this function and adjust comment.
5526 * w32term.c (last_window): Likewise with...
5527 (w32_read_socket): ...this function.
5528 * xterm.c (last_window): Likewise with...
5529 (handle_one_xevent): ...this function.
5530
0ab10992
DA
55312013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5532
b7da754d 5533 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
0ab10992
DA
5534 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
5535 (handle_one_xevent): ...to here.
5536 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
5537 otherwise.
5538
0c7f856e
DA
55392013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5540
5541 * msdos.c (IT_set_terminal_window): Remove no-op.
5542 (initialize_msdos_display): Adjust terminal setup.
5543 * w32console.c (w32con_set_terminal_window): Remove no-op.
5544 (initialize_w32_display): Adjust terminal setup.
5545 * w32term.c (w32_set_terminal_window): Remove no-op.
5546 (w32_create_terminal): Adjust terminal setup.
5547 * xterm.c (XTset_terminal_window): Remove no-op.
5548 (x_create_terminal): Adjust terminal setup.
5549
a892a94c
DA
55502013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
5551
5552 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
5553 Remove no-ops.
5554 (ns_create_terminal): Adjust terminal setup.
5555 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
5556 Remove no-ops.
5557 (w32_create_terminal): Adjust terminal setup.
5558 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
5559 Remove no-ops.
5560 (x_create_terminal): Adjust terminal setup.
5561
cf91889a
DA
55622013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
5563
5564 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
5565 (CLIP_TEXT_POS_FROM_MARKER): New macro.
5566 * dispnew.c (buffer_posn_from_coords):
5567 * window.c (Fwindow_end, displayed_window_lines):
5568 * xdisp.c (redisplay_mode_lines): Use it.
5569
5b0891df
JD
55702013-09-01 Jan Djärv <jan.h.d@swipnet.se>
5571
5572 * fontset.c (face_for_char): Check char in the current face font first
5573 if HAVE_NS (Bug#15138).
5574
0a357e98
MR
55752013-08-31 Martin Rudalics <rudalics@gmx.at>
5576
5577 * window.c (temp_output_buffer_show): Make sure window returned
5578 by display_buffer is live (Bug#15213).
5579
9d7693d7
DA
55802013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
5581
5582 Minor cleanup to avoid forward declarations.
5583 * coding.h (struct ccl_spec): Remove forward declaration.
5584 * composite.h (toplevel): Include font.h.
5585 (struct composition_it, struct face, struct font_metrics):
5586 Remove forward declaration.
5587 * dispextern.h (struct image, struct atimer): Likewise.
5588 * emacsgtkfixed.h (struct frame): Likewise.
5589 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
5590 * font.h (struct font_driver, struct font, struct glyph_string)
5591 (struct face): Remove forward declaration.
5592 * fontset.h (struct face, struct font): Likewise.
5593 * frame.h (toplevel): Style cleanup.
5594 (enum output_method): Move to...
5595 * termhooks.h (enum output_method): ...here.
5596 (struct glyph, struct frame, struct ns_display_info)
5597 (struct x_display_info, struct w32_display_info):
5598 Remove forward declaration.
5599 * xterm.h (toplevel): Include termhooks.h.
5600 (struct font, struct window, struct glyph_matrix, struct frame)
5601 (struct input_event, struct face, struct image): Remove forward
5602 declaration.
5603 * gtkutil.h (struct _widget_value): Likewise.
5604 * keyboard.h (toplevel): Include termhooks.h.
5605 (struct input_event): Remove forward declaration.
5606
032f7451
DA
56072013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5608
5609 * intervals.c (set_point_from_marker): New function.
5610 * editfns.c (Fgoto_char):
5611 * process.c (Finternal_default_process_filter):
5612 * window.c (select_window_1): Use it.
5613 * buffer.h (set_point_from_marker): Add prototype.
5614
3f940c5a
EZ
56152013-08-29 Eli Zaretskii <eliz@gnu.org>
5616
5617 * w32.c (term_winsock): Call release_listen_threads before calling
5618 WSACleanup.
5619 (_sys_wait_accept): Wait for accept event in a loop with a finite
5620 timeout, instead of waiting indefinitely. Will hopefully avoid
5621 hanging during exit because WSACleanup deadlocks waiting for the
5622 event object to be released. (Bug#14333)
5623
5624 * w32proc.c (release_listen_threads): New function, signals all
5625 the reader threads that listen for connections to stop waiting.
5626
5627 * w32.h (release_listen_threads): Add prototype.
5628
101ed2bb
DA
56292013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5630
5631 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
5632 field of new marker (for sanity and safety).
20de2834
DA
5633 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
5634 anyway because XMISCTYPE is a function and can't be an lvalue).
101ed2bb 5635
1f5cf200
DA
56362013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5637
5638 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
35e951cd
JB
5639 (x_after_update_window_line, x_scroll_bar_create)
5640 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
1f5cf200
DA
5641 (handle_one_xevent, x_clear_frame_area):
5642 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
5643 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
5644 * xterm.h (x_clear_area): Adjust prototype.
5645
d2b36813
DA
56462013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5647
5648 Hook scanning and indentation functions to find_newline. This helps
5649 to avoid duplicated code and renders more respect to newline cache.
5650 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
5651 * cmds.c (Fforward_line):
5652 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
5653 Use find_newline and avoid unnecessary point movements.
5654 * search.c (scan_newline): Implement on top of find_newline.
5655
3ec7babc
SM
56562013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
5657
5658 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
5659 scoped code (bug#11258).
5660
5ab473cd
JD
56612013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
5662
5663 * nsterm.m (last_window): New variable.
5664 (EV_TRAILER2): New macro.
5665 (EV_TRAILER): Call EV_TRAILER2.
e9dc713d 5666 (mouseMoved:): Add support for mouse-autoselect-window
5ab473cd
JD
5667 on nextstep (Bug#6888).
5668
78779650
AS
56692013-08-28 Andreas Schwab <schwab@suse.de>
5670
5671 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
5672 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
5673 Remove unused macro definitions.
5674 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
3ec7babc
SM
5675 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
5676 Only define if emacs.
78779650 5677
c3c4768d
DA
56782013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5679
5680 Prefer enum glyph_row_area to int where appropriate.
5681 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
5682 Fix comment.
5683 (window_box, window_box_width, window_box_left, window_box_left_offset)
5684 (window_box_right, window_box_right_offset): Adjust prototypes.
5685 * xdisp.c (window_box, window_box_width, window_box_left)
5686 (window_box_left_offset, window_box_right, window_box_right_offset):
5687 Use enum glyph_row_area. Adjust users and tweak comment where needed.
5688 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
5689 * nsterm.m (ns_clip_to_row):
5690 * w32term.c (w32_clip_to_row):
5691 * xterm.c (x_clip_to_row): Likewise.
5692
6bdcbfe1
DA
56932013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5694
5695 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
5696 (Fprevious_overlay_change): Fast path for buffer with no overlays.
5697
50b13cde
PE
56982013-08-28 Paul Eggert <eggert@cs.ucla.edu>
5699
5700 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
5701 for portability to hosts where /bin/sh has problems.
5702
f60e429a
DA
57032013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5704
5705 Redesign redisplay interface to drop global output_cursor.
5706 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
5707 (toplevel): Remove declaration of output_cursor.
5708 (set_output_cursor, x_cursor_to): Remove prototype.
5709 * window.h (struct window): New member output_cursor.
5710 (output_cursor_to): New function to replace RIF member.
5711 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
5712 (update_text_area, set_window_cursor_after_update): Use it.
5713 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
5714 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5715 * nsterm.m (ns_update_window_begin, ns_update_window_end):
5716 * w32term.c (x_update_window_begin, x_update_window_end):
5717 * xterm.c (x_update_window_begin, x_update_window_end):
5718 Adjust to use per-window output cursor.
5719
43aac990
PE
57202013-08-27 Paul Eggert <eggert@cs.ucla.edu>
5721
d486344e
PE
5722 Simplify SELECT_TYPE-related code.
5723 Like EMACS_TIME, this portability layer is no longer needed, since
5724 Emacs has been using fd_set as a portability layer for some time.
5725 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
5726 (SELECT_TYPE): Remove. All uses changed to fd_set.
5727 (fd_set) [!FD_SET]: New typedef.
5728
43aac990
PE
5729 Simplify EMACS_TIME-related code.
5730 This portability layer is no longer needed, since Emacs has been
5731 using struct timespec as a portability layer for some time.
5732 * atimer.h, buffer.h, dispextern.h, xgselect.h:
5733 Include <time.h> rather than "systime.h"; that's all that's needed now.
5734 * dispnew.c: Include <timespec.h> rather than "systime.h";
5735 that's all that's needed now.
5736 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
5737 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
5738 TIMESPEC_RESOLUTION.
5739 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
5740 LOG10_TIMESPEC_RESOLUTION.
5741 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
5742 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
5743 (make_emacs_time): Remove. All used changed to make_timespec.
5744 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
5745 (current_timespec): Rename from current_emacs_time. All uses changed.
5746 (add_emacs_time): Remove. All uses changed to timespec_add.
5747 (sub_emacs_time): Remove. All uses change dot timespec_sub.
5748 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
5749 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
5750 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
5751 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
5752 (current_timespec): Rename from current_emacs_time. All uses changed.
5753 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
5754 changed to timespec_cmp.
5755 * xgselect.c: Include <timespec.h>, since our .h files don't.
5756
d350e350
DA
57572013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5758
5759 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
5760 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
5761 Remove the leftovers.
5762 * gtkutil.c (toplevel): Do not declare Qxft but include
5763 font.h to do so.
5764 * image.c (toplevel): Do not declare Vlibrary_cache because
5765 it's already done in lisp.h.
5766
9fed9729
DA
57672013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5768
5769 * lisp.h (Mouse_HLInfo): Move from here...
5770 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
5771 (reset_mouse_highlight): New function.
5772 * msdos.c (dos_set_window_size, IT_update_begin)
5773 (internal_terminal_init):
5774 * nsterm.m (ns_update_window_end, x_free_frame_resources)
5775 (ns_initialize_display_info):
5776 * w32console.c (initialize_w32_display):
5777 * w32term.c (x_update_window_end, x_free_frame_resources)
5778 (w32_initialize_display_info):
5779 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
5780 * window.c (Fdelete_other_windows_internal):
5781 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
5782 * termchar.h (toplevel):
5783 * xterm.h (toplevel): Include dispextern.h.
5784
f462f075
PE
57852013-08-26 Paul Eggert <eggert@cs.ucla.edu>
5786
5787 Fix minor problems found by static checking.
5788 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
5789 (expect): Avoid nested-if warning.
5790 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
5791 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
5792 * nsterm.h, nsterm.m (ns_select):
5793 * xgselect.c, xgselect.h (xg_select):
5794 Adjust signature to better match pselect's.
5795 * nsterm.m (ns_select):
5796 Don't set *TIMEOUT, since pselect doesn't.
5797 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
5798 diagnostic about assigning const char * to it.
5799 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
5800
068f9124
SM
58012013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
5802
5803 * lread.c (substitute_object_recurse): Handle hash-tables as well
5804 (bug#15190).
5805
f5adc984
PE
58062013-08-26 Paul Eggert <eggert@cs.ucla.edu>
5807
1fc8eb33
PE
5808 Fix unlikely core dump in init_tty, and simplify terminfo case.
5809 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
5810 The old version incorrectly dumped core if malloc returned a
5811 buffer containing only non-NUL bytes.
5812 (init_tty): Do not allocate or free termcap buffers; the
5813 struct does that for us now.
5814 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
5815 (struct tty_display_info): Define members termcap_term_buffer and
5816 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
5817 use them. Allocate them directly in struct rather than indirectly
5818 via a pointer, to simplify init_tty.
5819
f5adc984
PE
5820 * frame.c (check_minibuf_window): Initialize 'window' properly,
5821 so that Emacs reliably aborts later if 'window' is not initialized.
5822
efec3894
JD
58232013-08-26 Jan Djärv <jan.h.d@swipnet.se>
5824
5825 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
5826 of VoidSymbol (Bug#15154).
5827
e1d0341e
DA
58282013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5829
5830 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
5831 mouse_face_beg_y and mouse_face_end_y.
5832 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
5833 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
5834 Adjust users and update comment where appropriate.
5835
bfff6445
MR
58362013-08-26 Martin Rudalics <rudalics@gmx.at>
5837
5838 * frame.c (check_minibuf_window): New function.
068f9124
SM
5839 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
5840 Call check_minibuf_window (Bug#15183).
bfff6445 5841
c80016b3
DA
58422013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5843
5844 * window.h (struct window): Replace last_cursor with last_cursor_vpos
5845 because this is the only last cursor data we need to keep and consult.
5846 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
5847 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
5848 Adjust users.
5849
de396731
DA
58502013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5851
068f9124
SM
5852 Fix recovering from possible decompression error.
5853 Since insert_from_gap doesn't always move point, we can't use PT as
de396731 5854 the position where the partially decompressed data ends, and
447218dd 5855 should count how many bytes was produced so far.
de396731
DA
5856 * decompress.c (struct decompress_unwind_data): Add nbytes member.
5857 (unwind_decompress): Really delete partially uncompressed data.
5858 (Fzlib_decompress_region): Take decompressed data size into account.
5859
c76826d9
DA
58602013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5861
5862 * syntax.c (init_syntax_once): Adjust comment and do an early
5863 initialization of Qchar_table_extra_slots just once...
5864 * casetab.c (init_casetab_once):
5865 * category.c (init_category_once):
5866 * character.c (syms_of_character):
5867 * coding.c (syms_of_coding):
5868 * xdisp.c (syms_of_xdisp): ...and omit it here.
5869
b34454d0
EZ
58702013-08-24 Eli Zaretskii <eliz@gnu.org>
5871
11f20add
EZ
5872 * xdisp.c (get_next_display_element): Don't apply to characters
5873 from a display vector the logic of setting it->end_of_box_run_p
5874 suitable for characters from a buffer. (Bug#15175)
5875
b34454d0
EZ
5876 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
5877 to handle directories, rather than '_utime' which doesn't.
5878 (Bug#15176)
5879
6e1b469e
JD
58802013-08-24 Jan Djärv <jan.h.d@swipnet.se>
5881
5882 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
5883 or fullscreen (Bug#14627).
5884
9c05bccf
PE
58852013-08-24 Paul Eggert <eggert@cs.ucla.edu>
5886
5887 System-dependent integer overflow fixes.
5888 * process.c (Fset_process_window_size): Signal an error if
5889 the window size is outside the range supported by the lower level.
5890 * sysdep.c (set_window_size): Return negative on error,
5891 nonnegative on success, rather than -1, 0, 1 on not in system,
5892 failure, success. This is simpler. Caller changed.
5893 (serial_configure): Remove unnecessary initialization of local.
5894 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
5895 size fits in unsigned long; this isn't true on some 32-bit hosts.
5896 Avoid buffer overrun if some future version of /proc/meminfo has a
5897 variable name longer than 20 bytes.
5898 (system_process_attributes) [__FreeBSD__]:
5899 Don't assume hw.availpages fits in 'int'.
5900
c365c355
PE
59012013-08-23 Paul Eggert <eggert@cs.ucla.edu>
5902
5903 Don't let very long directory names overrun the stack.
5904 Fix some related minor problems involving "//", vfork.
5905 * callproc.c (encode_current_directory): New function.
5906 (call_process): Don't append "/"; not needed.
5907 * fileio.c (file_name_as_directory_slop): New constant.
5908 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
5909 this can save the caller having to alloca.
5910 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
5911 Use SAFE_ALLOCA, not alloca.
5912 (directory_file_name, Fexpand_file_name): Leave leading "//"
5913 alone, since it can be special even on POSIX platforms.
5914 * callproc.c (call_process):
5915 * process.c (Fformat_network_address):
5916 * sysdep.c (sys_subshell):
5917 Use encode_current_directory rather than rolling our own.
5918 (create_process): No need to encode directory; caller does that now.
5919 * process.h (encode_current_directory): New decl.
5920 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
5921 Rework to avoid 'goto xyzzy;'.
5922
6c6014d4
EZ
59232013-08-23 Eli Zaretskii <eliz@gnu.org>
5924
5925 * xdisp.c (handle_face_prop): If the default face was remapped use
5926 the remapped face for strings from prefix properties. (Bug#15155)
5927
9997ec56
DA
59282013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
5929
5930 Minor cleanup for redisplay interface and few related functions.
5931 * frame.h (enum text_cursor_kinds): Move from here...
5932 * dispextern.h (enum text_cursor_kinds): ...to here.
5933 (toplevel): Drop unnecessary declarations.
5934 (struct redisplay_interface): Use bool and enum text_cursor_kinds
5935 in update_window_end_hook and draw_window_cursor functions.
5936 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
5937 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
ffb3f67a 5938 * w32term.c (x_update_window_end, w32_draw_window_cursor):
9997ec56
DA
5939 * xterm.c (x_update_window_end, x_draw_window_cursor):
5940 * xdisp.c (display_and_set_cursor, update_window_cursor)
5941 (update_cursor_in_window_tree, x_update_cursor): Use bool and
5942 enum text_cursor_kinds where appropriate.
5943
7f780da6
DA
59442013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
5945
5946 Redesign redisplay interface to drop updated_row and updated_area.
5947 * dispextern.h (updated_row, updated_area): Remove declaration.
5948 (struct redisplay_interface): Pass glyph row and row area parameters
5949 to write_glyphs, insert_glyphs and clear_end_of_line functions.
5950 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5951 Adjust prototypes.
5952 * dispnew.c (updated_row, updated_area): Remove.
5953 (redraw_overlapped_rows, update_window_line): Adjust user.
5954 (update_marginal_area, update_text_area): Likewise. Pass updated row
5955 as a parameter. Prefer enum glyph_row_area to int where appropriate.
5956 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5957 Adjust users.
5958
26495794
PE
59592013-08-22 Paul Eggert <eggert@cs.ucla.edu>
5960
5961 * process.c (flush_pending_output): Remove stub.
5962 All uses removed.
5963
4a88129a
PE
59642013-08-21 Paul Eggert <eggert@cs.ucla.edu>
5965
5966 * callproc.c: Fix race that killed background processes (Bug#15144).
5967 (call_process): New arg TEMPFILE_INDEX. Callers changed.
5968 Record deleted process-id in critical section, not afterwards.
5969 Don't mistakenly kill process created by a call-process invocation
5970 that discards output and does not wait.
5971
0c5307b0
DA
59722013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
5973
5974 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
5975 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
5976 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
5977 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
5978 to shut up compiler in mark_object.
5979 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
5980
0d7c1e66
PE
59812013-08-21 Paul Eggert <eggert@cs.ucla.edu>
5982
5983 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
5984 We can't portably rely on PTY_OPEN doing that, even if
5985 it calls posix_openpt with O_CLOEXEC.
5986
3f246b65
KH
59872013-08-20 Kenichi Handa <handa@gnu.org>
5988
5989 * character.c (string_char): Improve commentary.
5990
8c2f38aa
PE
59912013-08-20 Paul Eggert <eggert@cs.ucla.edu>
5992
5993 * image.c (SIGNATURE_DIGESTSIZE): Remove.
5994 (struct animation_cache): Make signature a flexible array member.
5995 All uses changed. This is a tad slower but may insulate us better
5996 from future changes to ImageMagick.
5997
bb566cea
PE
59982013-08-19 Paul Eggert <eggert@cs.ucla.edu>
5999
6000 * image.c: Shrink memory needed for animation cache.
6001 (SIGNATURE_DIGESTSIZE): New constant.
6002 (struct animation_cache): Make 'signature' a fixed size array of bytes.
6003 (imagemagick_create_cache): Copy the signature. This saves
6004 several KB of memory that ImageMagick wastes per signature.
6005 Don't bother updating the update_time, as the caller does that now.
6006 (imagemagick_prune_animation_cache): Don't destroy the signature, as
6007 it's a fixed size struct member now.
6008 (imagemagick_get_animation_cache): Always destroy the signature,
6009 as it's now imagemagick_create_cache's responsibility to copy it.
6010 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
6011 and use memcmp rather than strcmp.
6012 eassert that ImageMagick returns a signature of the specified length.
6013
6da26928
LMI
60142013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
6015
6016 * image.c (imagemagick_get_animation_cache): Don't segfault on
6017 each invocation.
453f4022
LMI
6018 (imagemagick_get_animation_cache): Revert to previous definition
6019 so that it actually works. But keep the memory leak fix.
6020 (imagemagick_get_animation_cache): Fix memory leak.
6da26928 6021
22490125
PE
60222013-08-19 Paul Eggert <eggert@cs.ucla.edu>
6023
d0139df5
PE
6024 * image.c: Fix animation cache signature memory leak.
6025 Fix some other minor performance problems while we're at it.
6026 (imagemagick_create_cache): Clear just the members that
6027 need clearing. Don't set update_time, as caller does that now.
6028 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
6029 Simplify by using pointer-to-pointer instead of a prev pointer.
6030 (imagemagick_prune_animation_cache): Use make_emacs_time rather
6031 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
6032 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
6033 it's already a copy. Free the signature probe unless it's cached.
6034
22490125
PE
6035 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
6036 This was introduced by my 2013-08-12 fix for Bug#15035.
6037
deb31e75
DA
60382013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
6039
6040 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
6041 (imagemagick_prune_animation_cache): Now static.
6042
319a4d03
LMI
60432013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
6044
6045 * image.c (imagemagick_get_animation_cache): Don't segfault when
6046 pruning all entries.
6047
f747d82e
KB
60482013-08-18 Ken Brown <kbrown@cornell.edu>
6049
6050 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
6051 static heap if ENABLE_CHECKING is defined.
6052 (max_bss_sbrk_ptr): New variable.
6053 (bss_sbrk): Use it.
6054 (report_sheap_usage): Report maximum static heap usage instead of
6055 ending static heap usage.
6056
d2c28fab
EZ
60572013-08-17 Eli Zaretskii <eliz@gnu.org>
6058
6059 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
6060 of zlib_initialized according to the results of calling
6061 init_zlib_functions.
6062
274ff63f
LMI
60632013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
6064
6065 * image.c: Implement an ImageMagick per-image cache.
8a6f875f 6066 (imagemagick_get_animation_cache): Fix a double-free error.
49ceb676
LMI
6067 (imagemagick_load_image): Remove the ping_wand code, which only
6068 apparently saved time on invalid animated images, and slowed down
6069 everything else. Optimise for the common case.
274ff63f 6070
2bede2ed
XF
60712013-08-16 Xue Fuqiao <xfq.free@gmail.com>
6072
70ff8240
XF
6073 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
6074
de179a3e
XF
6075 * editfns.c (insert_before_markers): Mention overlay in the doc string.
6076
2bede2ed
XF
6077 * marker.c (set_marker): Remove documentation of undefined behavior.
6078
703dbeba
LMI
60792013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6080
6081 * image.c (imagemagick_compute_animated_image): Animate correctly
6082 when sub-images are smaller than the main image.
1d18b1e6
LMI
6083 (imagemagick_compute_animated_image): Setting the iterator row to
6084 zero is apparently not allowed.
79670014
LMI
6085 (imagemagick_compute_animated_image): Allow images that say they
6086 have sub-images that are bigger than the main image, but just crop
6087 them.
703dbeba 6088
63216c5e
JD
60892013-08-15 Jan Djärv <jan.h.d@swipnet.se>
6090
6091 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
6092
a5b5f73f
LMI
60932013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6094
6095 * image.c (imagemagick_compute_animated_image): Respect the GIF
6096 disposal methods.
6097
0fe73012
KB
60982013-08-15 Ken Brown <kbrown@cornell.edu>
6099
6100 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
6101 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
6102 needed.
6103
691a357f
PE
61042013-08-15 Paul Eggert <eggert@cs.ucla.edu>
6105
6106 Fix minor problems found by static checking.
6107 * frame.c (delete_frame):
6108 * xdisp.c (next_element_from_display_vector):
6109 Avoid uninitialized local.
6110 * image.c (imagemagick_compute_animated_image): Port to C89.
6111 Prefer usual GNU indentation style for loops.
6112 Be more careful about bizarrely large sizes, by using ptrdiff_t
6113 instead of int.
6114
42fe2e88
DA
61152013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6116
6117 Fix infinite frame selection loop (Bug#15025).
6118 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
6119
d39a3da6
EZ
61202013-08-15 Eli Zaretskii <eliz@gnu.org>
6121
068f9124
SM
6122 * xdisp.c (compute_window_start_on_continuation_line):
6123 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
d39a3da6
EZ
6124 to make sure we end up setting the window start at the leftmost
6125 visible character of the display line. This avoids funky
6126 horizontal shifting because the window start is not kept on the
6127 same position. (Bug#15090)
05426239
EZ
6128 (next_element_from_display_vector): Support 'box' face attribute
6129 in the face definitions of a display vector. (Bug#15099)
d39a3da6 6130
6e856b69
LMI
61312013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6132
6133 * image.c (imagemagick_compute_animated_image): Implement animated
6134 images (bug#14700).
995be755
LMI
6135 (imagemagick_compute_animated_image): Fix some compilation
6136 warnings. Implement a very simple cache to make the animation
6137 usable at all, but it should be replaced with a per-image cache.
6e856b69 6138
d5a1acfa
DA
61392013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6140
6141 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
6142 to do `for' loops over alist values.
6143 * buffer.h (FOR_EACH_BUFFER):
6144 * process.c (FOR_EACH_PROCESS): Use it.
6145 (handle_child_signal, status_notify, Fget_buffer_process)
6146 (kill_buffer_processes): Use FOR_EACH_PROCESS.
6147
9c253307
DA
61482013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6149
6150 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
6151 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
6152 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
6153 to xzalloc and so avoid redundant call to memset.
6154 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
6155 members because it is allocated with xzalloc and so already zeroed.
6156
05e64f9f
KB
61572013-08-14 Ken Brown <kbrown@cornell.edu>
6158
6159 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
6160 (Bug#15094).
6161
5b71542d
DA
61622013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6163
6164 Utility function and macro to copy Lisp string to C string.
6165 * lisp.h (xlispstrdupa): New macro.
6166 (xlispstrdup): New prototype.
6167 * alloc.c (xlispstrdup): New function.
6168 * callint.c (Fcall_interactively):
6169 * fileio.c (Ffile_name_directory, Fexpand_file_name)
6170 (Fsubstitute_in_file_name):
6171 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
6172 * image.c (x_create_bitmap_from_file):
6173 * w32term.c (w32_term_init):
6174 * xterm.c (x_term_init): Use xlispstrdup.
6175
71530c97
LMI
61762013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
6177
4ce82fb8
LMI
6178 * image.c (imagemagick_load_image): Make animated pictures work.
6179 There's still some problems with background color settings, though
6180 (bug#14700).
6181
71530c97
LMI
6182 * decompress.c (unwind_decompress): Always restore point.
6183
7510a061
XF
61842013-08-14 Xue Fuqiao <xfq.free@gmail.com>
6185
6186 * marker.c (set_marker): Reformat documentation.
6187
01c3051f
PE
61882013-08-14 Paul Eggert <eggert@cs.ucla.edu>
6189
aab1fcdf
PE
6190 * xdisp.c (cursor_type_changed): Now static.
6191
01c3051f
PE
6192 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
6193 Use changed. This avoids the need to call xmalloc and for the
6194 caller to call xfree, and avoids memory leaks in some situations.
6195
2084152a
DA
61962013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6197
6198 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
6199 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
94a4e898
DA
6200 (redisplay_window): If window_end_valid is cleared due to non-zero
6201 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
6202 so do not call to try_cursor_movement for that window.
2084152a 6203
02455cb6
DA
62042013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6205
6206 * window.h (struct window): Convert window_end_pos and
6207 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
6208 (wset_window_end_pos, wset_window_end_vpos): Remove.
6209 * dispnew.c (adjust_glyph_matrix):
6210 * window.c (Fwindow_end, replace_window, set_window_buffer)
6211 (make_window):
6212 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
6213 (set_vertical_scroll_bar, redisplay_window, try_window)
6214 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
6215 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
6216 (note_mouse_highlight): Adjust users.
6217 (try_cursor_movement): Likewise. Convert old precondition to eassert.
6218 Add comment.
6219
da5707e8
DA
62202013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6221
6222 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
6223 * image.c (imagemagick_filename_hint): Use `const char *' and
6224 prefer SSDATA to SDATA to avoid warnings.
6225
25554267
DA
62262013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6227
6228 Cleanup window fringes, margins and scroll bars adjustments.
6229 * window.c (set_window_fringes, set_window_margins)
6230 (set_window_scroll_bars, apply_window_adjustment): New functions.
6231 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
6232 (Fset_window_scroll_bars): Use them.
6233
38a2c910
DA
62342013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6235
6236 * window.h (struct window): Convert scroll_bar_width
6237 from Lisp_Object to integer. Adjust comment.
6238 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
6239 Adjust users.
6240 * window.c (wset_scroll_bar_width): Remove.
6241 (make_window): Initialize scroll_bar_width.
6242 (Fsplit_window_internal): Use direct assignment.
6243 (Fset_window_configuration, save_window_save):
6244 Convert Lisp_Object to integer and back where appropriate.
6245 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
6246 bar was actually changed, and mention this in docstring.
6247
2d065031
PE
62482013-08-13 Paul Eggert <eggert@cs.ucla.edu>
6249
6250 * decompress.c: Minor simplifications.
6251 (Fzlib_decompress_region): Don't bother verifying
6252 that avail_out <= UINT_MAX, as that was confusing.
6253 Mention the restriction in a comment instead.
6254 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
6255
a5bd5abb
JD
62562013-08-13 Jan Djärv <jan.h.d@swipnet.se>
6257
6258 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
6259 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
6260
66e7901a
LMI
62612013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
6262
6263 * image.c (imagemagick_filename_hint): Check for errors in the
6264 alist structure.
6265
2fa611b7
EZ
62662013-08-13 Eli Zaretskii <eliz@gnu.org>
6267
6268 * window.c (Fwindow_margins): Return nil when there's no marginal
6269 area, as per the documented API.
6270
6271 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
6272 Fmake_vector, as scroll bar's struct members are not all Lisp
6273 objects now. This avoids crashes in GC.
6274
6275 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
6276 bool, so its address could be taken.
6277
8259030d
LMI
62782013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
6279
6280 * image.c (imagemagick_filename_hint): New function to possibly
6281 apply `image-content-type-suffixes'.
6282 (imagemagick_load_image): Use it.
6283
866c710e
EZ
62842013-08-13 Eli Zaretskii <eliz@gnu.org>
6285
6286 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
6287 if loading zlib failed.
6288
f10490f0
JD
62892013-08-13 Jan Djärv <jan.h.d@swipnet.se>
6290
96311be7
JD
6291 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
6292 2013-08-13 checkin below. Change bool to BOOL, rule is:
6293 All Obj-C code uses BOOL, except for interfaces callable from C.
6294
f10490f0
JD
6295 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
6296
c8ae93b0
DA
62972013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6298
6299 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
6300 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
6301 bool instead of BOOL.
6302 * w32term.h (struct scroll_bar): Convert fringe_extended_p
6303 from Lisp_Object to bitfield. Adjust comment.
6304 * w32term.c (x_scroll_bar_create): Adjust user.
6305 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
6306 * xterm.c (XTset_vertical_scroll_bar): Likewise.
6307 Use bool for boolean.
6308 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
6309 to `unsigned int' when defining a bitfield.
6310
53b64418
PE
63112013-08-13 Paul Eggert <eggert@cs.ucla.edu>
6312
6313 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
6314
eeaf9bf3
DA
63152013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6316
6317 * window.h (struct window): Convert left_margin_cols and
6318 right_margin_cols from Lisp_Objects to integers. Adjust comment.
6319 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
6320 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
6321 Adjust users.
6322 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
6323 Adjust comment.
6324 (showing_window_margins_p, update_window_line, update_frame_1):
6325 * fringe.c (draw_fringe_bitmap_1):
6326 * xdisp.c (window_box_width): Adjust users.
6327 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
6328 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
6329 Use direct assignment.
6330 (Fset_window_configuration, save_window_save, Fwindow_margins):
6331 Convert Lisp_Object to integer and back where appropriate.
6332 (Fset_window_margins): Adjust user. Return t if any margin
6333 was actually changed, and mention this in docstring.
6334
956720af
XF
63352013-08-13 Xue Fuqiao <xfq.free@gmail.com>
6336
f73f4ce6 6337 * syntax.c (forward_word):
956720af
XF
6338 * cmds.c (forward_char, backward_char): Mention the optional argument.
6339
9e37ee3b
DA
63402013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6341
6342 * window.h (struct window): Convert left_fringe_width
6343 and right_fringe_width from Lisp_Objects to integers.
6344 Adjust comment.
6345 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
6346 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
6347 * window.c (wset_left_fringe_width, wset_right_fringe_width):
6348 Remove.
6349 (make_window): Initialize new integer fields to -1.
6350 (Fsplit_window_internal): Use direct assignment.
068f9124
SM
6351 (Fset_window_configuration, save_window_save):
6352 Convert Lisp_Object to integer and back where appropriate.
9e37ee3b
DA
6353 (Fset_window_fringes): Adjust user. Return t if any fringe
6354 was actually changed, and mention this in docstring.
6355
e4375ca7
DA
63562013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6357
6358 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
9cda66e4
DA
6359 * nsfns.m (x_set_cursor_type):
6360 * w32fns.c (x_set_cursor_type):
e903c210 6361 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
9cda66e4 6362 * xdisp.c (set_frame_cursor_types): ...but in common code.
e4375ca7 6363
a45543bc
DA
63642013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6365
6366 * font.c (clear_font_cache): New function, stripped from...
6367 (Fclear_font_cache): ...here, which now uses the function
6368 above. Adjust comment.
6369 * font.h (clear_font_cache): Add prototype.
6370 * xfaces.c (clear_face_cache): Use clear_font_cache.
6371
ae966a86
DA
63722013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6373
6374 * window.c (Fset_window_start): Compare `w', not `window' because
6375 `w' might not be equal to `window' after call to decode_live_window.
6376
297a545b
PE
63772013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6378
6379 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
6380 This fixes a problem introduced by the Bug#15035 patch
6381 when using GPG. Reported by Herbert J. Skuhra.
6382
aa942e2b
EZ
63832013-08-12 Eli Zaretskii <eliz@gnu.org>
6384
6385 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
6386 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
6387 not yet initialized.
6388
7699d09e
LMI
63892013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
6390
6391 * decompress.c (Fzlib_decompress_region): Support zlib
6392 decompression, too, and rename.
6393
1d238bc7
PE
63942013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6395
6396 Minor zlib configuration tweaks.
6397 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
6398 Don't assume presence of fn_inflateInit2_ zlib internal function.
6399
8a44a184
LMI
64002013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
6401
6402 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
6403 include the zlib prefix.
6404
594a4307
EZ
64052013-08-12 Eli Zaretskii <eliz@gnu.org>
6406
6407 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
6408 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
6409 define static variables that are pointers to zlib functions to be
6410 dynamically loaded.
6411 (init_zlib_functions) [WINDOWSNT]: New function.
6412 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
6413 New macros.
6414 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
6415 macros instead of invoking the zlib functions directly.
068f9124
SM
6416 (syms_of_decompress): DEFSYM Qzlib_dll.
6417 Staticpro Szlib_available_p.
594a4307 6418
d2e113bc
DA
64192013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
6420
6421 Avoid looping over all frame windows to freeze and unfreeze.
6422 * window.h (struct window): Drop frozen_window_start_p.
6423 (freeze_window_starts): Drop prototype.
6424 * frame.h (struct frame): New frozen_window_starts flag.
6425 (FRAME_WINDOWS_FROZEN): New macro.
6426 * window.c (freeze_window_start, freeze_window_starts):
6427 Remove.
6428 (select_window, replace_window): Adjust users.
6429 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
6430 (window_frozen_p): New function.
6431 (redisplay_window): Use it.
6432
94fcd171
PE
64332013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6434
6435 Fix some fd issues when running subprocesses (Bug#15035).
6436 Fix bugs that can leak files or file descriptors on errors.
6437 Don't unlink open temp files, as that's hard for users to diagnose
6438 when things go awry (e.g., temp disk exhausted).
6439 Don't bother to lock temp files. Check for invalid recursion.
6440 * callproc.c (synch_process_fd): Remove. All uses removed.
6441 (synch_process_tempfile): New var or macro.
6442 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
6443 New constants.
6444 (record_kill_process): New arg, the temp name. All callers changed.
6445 (delete_temp_file): Now just a simple wrapper around unlink.
6446 (call_process_kill): New arg, the call_process_fd array.
6447 Close them all. Clear synch_process_pid. Remove the temp file,
6448 or arrange for it to be removed.
6449 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
6450 that's been moved to synch_process_tempfile. Caller changed.
6451 Do not remove the tempfile; that's now call_process_kill's
6452 responsibility.
6453 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
6454 call_process_kill; the caller now does that.
6455 (call_process_cleanup): Do not close the process fd; that's now
6456 call_process_kill's responsibility.
6457 (Fcall_process): Implement via new function call_process, which
6458 has most of the old body of Fcall_process, but with a different API.
6459 (call_process): New function that does not open or close filefd if
6460 it is nonnegative. Record which fds need to be closed, and let
6461 call_process_kill close (and remove the tempfile, on MSDOS) on error.
6462 Signal an error if invoked recursively (could be done via a hook).
6463 Simplify creation of the tempfile in the MSDOS case.
6464 Don't create the output file until after checking for the executable.
6465 Report any failure to open /dev/null.
6466 Don't open /dev/null for writing twice; once is enough.
6467 Don't create pipe if all output is being discarded or sent to file.
6468 Don't worry about setting up the coding system or reading from the
6469 pipe if all output is being discarded.
6470 Hoist fd_error local into top level, to lessen block nesting.
6471 Don't record deleted pid here; now done by Fcall_process_region.
6472 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
6473 and note its success in synch_process_tempfile.
6474 Do not leak resources when child_setup fails.
6475 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
6476 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
6477 (create_temp_file): Now returns open fd, with an additional
6478 Lisp_Object * argument to return the name. All callers changed.
6479 Do not close the file; rewind it instead, and leave it open for
6480 the caller. Do not lock the temp file. Unwind-protect the file
6481 and the file-descriptor.
6482 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
6483 If an asynchrounous process, record it here, not in call_process.
6484 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
6485 * eval.c (set_unwind_protect): New function.
6486 * fileio.c (write_region): New function, generalized from the
6487 old Fwrite_region. Do not lock temp files.
6488 (Fwrite_region): Use it.
6489 * lisp.h (set_unwind_protect, write_region): New decls.
6490 * process.c: Include <verify.h>.
6491 (make_process): Mark fds as initially closed.
6492 (deleted_pid_list): Now a list of pid-filename pairs.
6493 All uses changed.
6494 (close_process_fd): New function.
6495 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
6496 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
6497 New constants. Verify that their number matches PROCESS_OPEN_FDS.
6498 (create_process, create_pty, Fmake_serial_process)
6499 (server_accept_connection): Record which fds need to be closed,
6500 and let deactivate_process close them.
6501 (Fmake_network_process): Do not discard the unwind-protect
6502 until it's safe to do so.
6503 (deactivate_process): Close the fds opened by create_process etc.
6504 (Fprocess_send_eof): Adjust to new way of recording open fds.
6505 Report an error if /dev/null can't be opened, instead of aborting.
6506 * process.h (PROCESS_OPEN_FDS): New constant.
6507 (struct Lisp_Process): New member open_fds.
6508 (record_kill_process, record_deleted_pid): Adjust signatures.
6509 (record_deleted_pid): Move decl here ...
6510 * syswait.h (record_deleted_pid): ... from here.
6511
d0e615c3
PE
65122013-08-11 Paul Eggert <eggert@cs.ucla.edu>
6513
6514 * decompress.c: Fix bugs with large buffers and weird inputs.
6515 Tune a bit. Reindent as per usual Emacs style.
6516 (BUFFER_SIZE): Remove.
6517 (Fdecompress_gzipped_region): Do not mishandle input buffers with
6518 more than UINT_MAX bytes. Decompress into the gap instead of into
6519 an auto buffer, as this should avoid copying. Return nil if
6520 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
6521 set immediate_quit; we shouldn't trust zlib code that much.
6522
313546eb
LMI
65232013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
6524
99a32242
LMI
6525 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
6526 errors, and really move the gap to where we want it.
6527
313546eb
LMI
6528 * lisp.h: Include decompress.c support.
6529
6530 * emacs.c (main): Include decompress.c support.
6531
6532 * Makefile.in: Include -lz if present.
6533
d2d699ac
JD
65342013-08-11 Jan Djärv <jan.h.d@swipnet.se>
6535
f90e3ebd
JD
6536 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
6537 (initWithTitle:): Initialize frame to 0.
6538 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
068f9124 6539 (fillWithWidgetValue:frame:): Rename from
f90e3ebd
JD
6540 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
6541
6542 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
6543 fillWithWidgetValue:frame:
6544
423d3b3f
JD
6545 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
6546 remove memory leak warnings.
6547
d2d699ac
JD
6548 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
6549 (ns_check_menu_open): Handle menu == nil. Remove assignment to
6550 menu_pending_title.
6551
6552 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
6553 (x_activate_menubar): Update the whole menu.
6554 (trackingNotification:): Call ns_check_menu_open if tracking ends.
6555 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
6556 current event is not NSSystemDefined (Bug#15001).
6557 Call ns_check_menu_open only if trackingMenu is 2.
6558 (menuDidClose:): New method, decrease trackingMenu.
6559 (fillWithWidgetValue:setDelegate:): New method.
6560 (fillWithWidgetValue:): Call the above.
6561
6562 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
6563
7d652d97
PE
65642013-08-11 Paul Eggert <eggert@cs.ucla.edu>
6565
6566 Omit some unnecessary casts.
6567 Many of these go back to the old pre-C89 days, when they may have
6568 been needed, but we've been assuming C89 or later for a while now.
6569 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
6570 (live_float_p, live_misc_p, live_vector_p):
6571 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
6572 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
6573 (defvar_per_buffer):
6574 * callint.c (Fcall_interactively):
6575 * doc.c (Fsubstitute_command_keys):
6576 * filelock.c (get_boot_time):
6577 * frame.c (xrdb_get_resource):
6578 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
6579 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
6580 (xg_get_file_name_from_selector, menuitem_destroy_callback)
6581 (menuitem_highlight_callback, menu_destroy_callback)
6582 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
6583 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
6584 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
6585 (xg_tool_bar_help_callback, tb_size_cb):
6586 * image.c (xpm_alloc_color, png_read_from_memory)
6587 (png_read_from_file, png_load_body, our_memory_skip_input_data)
6588 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
6589 (syms_of_image):
6590 * keymap.c (describe_map):
6591 * nsfns.m (Fns_display_monitor_attributes_list):
6592 * nsmenu.m (process_dialog:):
6593 * nsterm.m (hold_event):
6594 * process.c (wait_reading_process_output):
6595 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
6596 * scroll.c (do_direct_scrolling, scrolling_1):
6597 * termcap.c (tgetent):
6598 * window.c (check_window_containing, add_window_to_list)
6599 (freeze_window_starts):
6600 * xdisp.c (compare_overlay_entries, vmessage):
6601 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
6602 (x_get_monitor_attributes_xrandr)
6603 (Fx_display_monitor_attributes_list, x_display_info_for_name)
6604 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
6605 * xfont.c (xfont_match, xfont_open):
6606 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
6607 (menubar_selection_callback, menu_position_func)
6608 (popup_selection_callback, create_and_show_popup_menu)
6609 (dialog_selection_callback, create_and_show_dialog):
35e951cd 6610 * xrdb.c (x_get_string_resource)
7d652d97
PE
6611 (main) [TESTRM]:
6612 * xsmfns.c (x_session_check_input):
6613 * xterm.c (x_draw_glyphless_glyph_string_foreground)
6614 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
6615 (xaw_jump_callback, xaw_scroll_callback):
6616 Omit unnecessary casts.
6617
9acc1074
PE
66182013-08-10 Paul Eggert <eggert@cs.ucla.edu>
6619
6620 Minor string-length refactoring.
6621 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
6622 * frame.c (make_monitor_attribute_list):
6623 Prefer build_string to strlen + make_string.
6624
361c0eb8
JD
66252013-08-10 Jan Djärv <jan.h.d@swipnet.se>
6626
6627 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
6628 don't check minor_code (Bug#14417).
6629
14ba0822
EZ
66302013-08-09 Eli Zaretskii <eliz@gnu.org>
6631
6632 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
6633 vertical positions instead. This avoids calling MATRIX_ROW with
6634 row numbers that are possibly beyond valid limits. (Bug#15064)
6635
309f24d1
DA
66362013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
6637
6638 Use xstrdup and build_unibyte_string where applicable.
6639 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
6640 * xfns.c (x_window):
6641 * xrdb.c (x_get_customization_string):
6642 * xterm.c (xim_initialize):
6643 * w32fns.c (w32_window): Use xstrdup.
6644 (w32_display_monitor_attributes_list):
6645 * emacs.c (init_cmdargs):
6646 * keyboard.c (PUSH_C_STR):
6647 * nsfont.m (nsfont_open):
6648 * sysdep.c (system_process_attributes):
6649 * w32.c (system_process_attributes):
6650 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
6651
55902276
EZ
66522013-08-09 Eli Zaretskii <eliz@gnu.org>
6653
6654 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
6655 variables of these types so that GDB would know about them, as aid
6656 for debugging fatal exceptions. (Bug#15024) See also
6657 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
6658 discussions.
6659
10bf7f5a
JD
66602013-08-08 Jan Djärv <jan.h.d@swipnet.se>
6661
6662 * nsterm.m (ns_update_begin): Don't change clip path if it would be
6663 larger than the NSWindow (Bug#14934).
6664
65620264
DA
66652013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6666
6667 Redesign redisplay interface to drop global variable updated_window.
6668 Always pass currently updated window as a parameter to update routines.
6669 * dispextern.h (updated_window): Remove declaration.
6670 (struct redisplay_interface): Pass window parameter to
6671 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
6672 and after_update_window_hook.
6673 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
6674 Adjust prototypes.
6675 * dispnew.c (updated_window): Remove.
6676 (redraw_overlapped_rows, update_marginal_area, update_text_area)
6677 (update_window_line): Adjust to match redisplay interface changes.
6678 * nsterm.m (ns_update_window_begin, ns_update_window_end)
6679 (ns_scroll_run, ns_after_update_window_line):
6680 * w32term.c (x_update_window_begin, x_update_window_end)
6681 (x_after_update_window_line, x_scroll_run):
6682 * xterm.c (x_update_window_begin, x_update_window_end)
6683 (x_after_update_window_line, x_scroll_run):
6684 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
6685 Likewise. Adjust comments where appropriate.
6686 (x_cursor_to): Simplify because this is always called during window
6687 update (but install debugging check anyway).
6688 (expose_window): Check must_be_updated_p flag to see whether this
6689 function is called during window update.
6690
628fdc56
DA
66912013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6692
6693 Do not reset window modification event counters excessively.
6694 These leftovers and poor man's tricky methods to catch extra
6695 redisplay's attention are no longer needed.
6696 * frame.c (set_menu_bar_lines_1):
6697 * minibuf.c (read_minibuf_unwind):
6698 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
6699 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
6700 (window_scroll_line_based, Fset_window_configuration):
6701 * xdisp.c (redisplay_window): Do not reset last_modified and
6702 last_overlay_modified counters.
6703
8fd9c92e
JD
67042013-08-07 Jan Djärv <jan.h.d@swipnet.se>
6705
6706 * xselect.c (x_send_client_event): Set send_event and serial, memset
6707 data.l as it might be bigger than data.b. Use 24 bit mask to
6708 XSendEvent (Bug#15034).
6709
0ee18172
EZ
67102013-08-07 Eli Zaretskii <eliz@gnu.org>
6711
6712 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
6713 for TTY frames that are not the top frame on their console.
6714 (Bug#14616)
6715
16ddd1a6
MR
67162013-08-07 Martin Rudalics <rudalics@gmx.at>
6717
6718 * w32term.c (w32fullscreen_hook): Really maximize frame when
6719 asked for (Bug#14841).
6720
d2a95ffb
DA
67212013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6722
6723 Prefer selected_window to Fselected_window, likewise for frames.
6724 * buffer.c (Fbuffer_swap_text):
6725 * data.c (Fvariable_binding_locus):
6726 * window.c (run_window_configuration_change_hook): Adjust users.
6727 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
6728 Use decode_live_frame.
6729
170da1ec
DA
67302013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6731
6732 Be more careful if selected window shows the buffer other than current,
6733 use window_outdated only if this is not so. This change should also
6734 address some weird issues discussed in Bug#13012.
6735 * window.h (window_outdated): New prototype.
6736 * window.c (window_outdated): Now here. Convert from static and
6737 always assume window's buffer.
6738 (Fwindow_end, Fwindow_line_height): Use it.
6739 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
6740 and always assume window's buffer.
6741 (redisplay_window): Adjust user.
e5eefe9b 6742 (redisplay_internal): Call to reconsider_clip_changes once and
170da1ec
DA
6743 check whether mode line should be updated only if selected window
6744 shows current buffer.
6745 (run_window_scroll_functions): Use eassert for debugging check.
6746 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
6747
56b5d5b1
DA
67482013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6749
6750 * window.c (window_scroll, window_scroll_pixel_based)
6751 (window_scroll_line_based): Use bool for booleans.
6752
2878ba7e
PE
67532013-08-06 Paul Eggert <eggert@cs.ucla.edu>
6754
6755 * process.c: Fix minor off-by-one issues in descriptor counts.
6756 This shouldn't fix any real bugs, but it cleans up the code a bit.
6757 (max_process_desc, max_input_desc): -1, not 0, means none.
6758 All uses changed.
6759 (delete_input_desc): New function.
6760 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
6761 (deactivate_process): Scan backwards when recomuting max_process_desc;
6762 that should be faster.
6763 (init_process_emacs): Initialize max_input_desc.
6764
e30b79c1
DA
67652013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6766
6767 Use region cache to speedup bidi_find_paragraph_start.
6768 * buffer.h (struct buffer): New member bidi_paragraph_cache.
6769 Rename cache_long_line_scans to cache_long_scans.
6770 * buffer.c (bset_cache_long_line_scans): Rename to
6771 bset_cache_long_scans.
6772 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
6773 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
6774 into account.
6775 (syms_of_buffer): Rename cache-long-line-scans to
6776 cache-long-scans. Adjust docstring.
6777 * search.c (newline_cache_on_off):
6778 * indent.c (width_run_cache_on_off): Adjust users.
6779 * bidi.c (bidi_paragraph_cache_on_off): New function.
6780 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
068f9124
SM
6781 * insdel.c (prepare_to_modify_buffer):
6782 Invalidate bidi_paragraph_cache if enabled.
e30b79c1 6783
00012b86
DA
67842013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6785
6786 Invalidate region caches only if buffer text is going to be changed.
6787 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
6788 (modify_text): ...new prototype.
6789 (prepare_to_modify_buffer_1): New prototype.
6790 * textprop.c (modify_region): Rename to...
6791 (modify_text_properties): ...new function.
6792 (add_text_properties_1, set_text_properties, Fremove_text_properties)
6793 (Fremove_list_of_text_properties): Adjust users.
6794 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
6795 (modify_text): ...new function.
6796 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
6797 (prepare_to_modify_buffer_1): ...new function.
6798 * casefiddle.c (casify_region):
6799 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
6800 (Ftranspose_regions): Use modify_text.
6801
dc6c0eda
SM
68022013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
6803
6804 * lisp.mk (lisp): Add nadvice.elc.
6805
8f3a2c26
DA
68062013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
6807
6808 New macro to iterate over live buffers similar to frames.
6809 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
6810 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
6811 Declare buffer-related variables here to offload lisp.h.
6812 * buffer.c (Vbuffer_alist): Adjust comment.
6813 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
6814 (other_buffer_safely):
6815 * data.c (store_symval_forwarding):
6816 * dispnew.c (Fframe_or_buffer_changed_p):
6817 * fileio.c (Fdo_auto_save):
6818 * filelock.c (unlock_all_files):
6819 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
6820
e0fdb694
PE
68212013-08-04 Paul Eggert <eggert@cs.ucla.edu>
6822
6823 Fix some minor races in hosts lacking mkostemp (Bug#15015).
6824 * callproc.c (create_temp_file):
6825 * filelock.c (create_lock_file):
6826 Assume mkostemp, since it's now provided by Gnulib.
6827
63f5c6c2
EZ
68282013-08-04 Eli Zaretskii <eliz@gnu.org>
6829
6830 * w32.c (mkostemp): New function.
6831 (mktemp): Remove, no longer used. Most of the code reused in
6832 mkostemp. (Bug#15015)
484ab239 6833 (mktemp): Don't undef.
63f5c6c2 6834
f0b79313
DA
68352013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
6836
6837 * dispnew.c (glyph_matrix_count, glyph_pool_count):
6838 Move under GLYPH_DEBUG and ENABLE_CHECKING.
6839 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
6840 (free_glyph_pool, check_glyph_memory): Likewise for
6841 all users. Adjust comments where appropriate.
6842
98f638d6
PE
68432013-08-03 Paul Eggert <eggert@cs.ucla.edu>
6844
6845 * composite.h: Minor fixups.
6846 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
6847 to fix a misspelling, and change it to an inline function while
6848 we're at it (it need not be a macro). All uses changed.
6849 (composition_method, composition_valid_p):
6850 Rewrite to avoid assignments in if-conditions.
6851
75c59fb3
DA
68522013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
6853
6854 Do not use global Lisp_Object in composition macros.
6855 * composite.h (composition_temp): Remove declaration.
6856 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
6857 (composition_method, composition_valid_p): ...inline functions.
416a3e01 6858 (compose_region): Remove the leftover.
75c59fb3
DA
6859 * composite.c (composition_temp): Remove.
6860 (run_composition_function, update_compositions)
6861 (composition_compute_stop_pos, composition_adjust_point)
6862 (Ffind_composition_internal):
6863 * coding.c (handle_composition_annotation):
6864 * xdisp.c (handle_composition_prop, check_point_in_composition):
6865 Related users changed.
6866
a10c8269
DA
68672013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
6868
6869 Drop FRAME_PTR typedef.
6870 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
6871 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
6872 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
6873 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
6874 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
6875 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
6876 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
6877 All related users changed.
6878
a104f656
SM
68792013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
6880
6881 * eval.c (default_toplevel_binding): New function.
6882 (Fdefvar): Use it.
6883 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
6884 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
6885 (syms_of_eval): Export them.
6886 * data.c (Fdefault_value): Micro cleanup.
6887 * term.c (init_tty): Use "false".
6888
4b5c9326
DA
68892013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6890
6891 Fix X GC leak in GTK and raw (no toolkit) X ports.
6892 * xterm.c (x_free_frame_resources): If white and black relief
6893 GCs are allocated, always free them here.
6894 * xfns.c (x_make_gc): Omit redundant initialization.
6895 * widget.c (create_frame_gcs): Remove the leftover.
6896 (EmacsFrameDestroy): Do nothing because all GCs are now freed
6897 in x_free_frame_resources.
6898
b19aa636
JD
68992013-08-02 Jan Djärv <jan.h.d@swipnet.se>
6900
6901 * nsterm.m (windowWillResize:toSize:): Only change title if
6902 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
6903 modifying it.
6904 (viewDidEndLiveResize): New method.
6905
6906 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
6907 inside NS_IMPL_COCOA.
6908
af1f7e06
DA
69092013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6910
6911 * insdel.c (adjust_after_replace, replace_range, del_range_2):
6912 Do not check whether undo is enabled because record_insert and
6913 record_delete does that themselves.
6914
65b02bb9
DA
69152013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6916
6917 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
6918 member which is not really used any more.
6919 (FRAME_XIC_BASE_FONTNAME): Remove.
6920 * xfns.c (xic_free_fontset): Adjust user.
6921 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
6922 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
6923 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
6924 (xdialog_show): Use eassert for debugging check.
7ee0f047 6925 * w32term.c (x_unfocus_frame): Remove unused dummy function.
65b02bb9 6926
6318cde0
PE
69272013-08-01 Paul Eggert <eggert@cs.ucla.edu>
6928
6929 * fileio.c, fns.c (merge): Move extern decl from here ...
6930 * lisp.h (merge): ... to here.
6931
6c1a09ba
DA
69322013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6933
6934 Fix last font-related change.
6935 * w32font.h (w32font_list_internal, w32font_match_internal):
6936 Fix prototype.
35e951cd 6937 * w32uniscribe.c (uniscribe_list, uniscribe_match)
6c1a09ba
DA
6938 (uniscribe_list_family): Adjust to match font API change.
6939 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
6940 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
6941
f8c20208
DA
69422013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6943
6944 * frame.h (FRAME_MOUSE_UPDATE):
6945 * nsterm.m (ns_frame_up_to_date): Omit redundant check
6946 whether hlinfo->mouse_face_mouse_frame is non-NULL.
6947
fdb396e2
DA
69482013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6949
6950 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
6951 * font.h (struct font_driver): Change list, match, and list_family
6952 functions to accept struct frame * as first arg.
068f9124
SM
6953 * font.c (font_score, font_compare, font_sort_entities):
6954 Remove prototypes.
35e951cd 6955 (font_sort_entities, font_list_entities, font_select_entity)
fdb396e2
DA
6956 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
6957 match font API change.
6958 * xfont.c (xfont_list, xfont_match, xfont_list_family):
6959 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
6960 * ftxfont.c (ftxfont_list, ftxfont_match):
6961 * xftfont.c (xftfont_list, xftfont_match):
6962 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
35e951cd 6963 * w32font.c (w32font_list, w32font_match, w32font_list)
fdb396e2
DA
6964 (w32font_list_internal, w32_font_match_internal): Likewise.
6965 * xfaces.c (Fx_family_fonts): Adjust user.
6966
52b8a085
DA
69672013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6968
6969 Do not use pure Xism x_wm_set_icon_position in non-X ports.
6970 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
6971 only if HAVE_X_WINDOWS is in use.
6972 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
6973 * nsterm.m (x_wm_set_icon_position): Remove no-op.
6974 * w32term.c (x_wm_set_icon_position): Likewise.
6975 * w32fns.c (x_icon): Adjust user.
6976
c791c18e
DA
69772013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6978
6979 * xterm.c (last_mouse_press_frame): Remove the
6980 leftover which is not really used any more.
6981 (handle_one_xevent, syms_of_xterm): Adjust users.
1ca6cc28
DA
6982 (x_flush): Call XFlush once per each X display, not frame.
6983 This is better because this code always unconditionally skips
e9dc713d 6984 non-X frames in Vframe_list and issues the only XFlush if we
1ca6cc28 6985 have more than one X frame on the same X display.
2f935d86
DA
6986 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
6987 Use bool for booleans.
35e951cd 6988 (x_draw_glyph_string_background, cvt_string_to_pixel)
2f935d86
DA
6989 (cvt_pixel_dtor): Drop unnecessary prototypes.
6990 * xterm.h (x_display_ok): Adjust prototype.
c791c18e 6991
f435830e
DA
69922013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6993
6994 Drop unnecessary functions that deals with frame pixel size.
6995 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
6996 (x_pixel_height): Drop prototypes.
6997 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
6998 (x_pixel_height): Drop implementations.
6999 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
7000 which should be always valid for window frame.
7001 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
7002 * w32menu.c (Fx_popup_dialog):
7003 * xmenu.c (Fx_popup_dialog): Likewise for both.
7004
84231434
DA
70052013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
7006
7007 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
7008 frame parameters and call to Fmodify_frame_parameters just once.
4c131798
DA
7009 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
7010 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
7011 and mention nil frame in docstring.
84231434 7012
959067a1
DA
70132013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
7014
7015 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
7016 (x_figure_window_size): Likewise. Adjust to return long.
7017 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
7018 (toplevel): Move Qterminal_live_p to...
7019 * terminal.c (toplevel): ...here, make it static, and...
7020 (syms_of_terminal): ...DEFSYM here.
7021 * frame.h (Qterminal_live_p): Remove declaration.
7022 (make_frame, x_figure_window_size): Adjust prototype.
7023 * nsfns.m (Fx_create_frame): Use long for window flags.
7024
f4b169ce
PE
70252013-07-30 Paul Eggert <eggert@cs.ucla.edu>
7026
7027 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
7028 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
7029 Do not assume that emacs_close (INT_MAX) is a no-op.
7030
bee6a2c7
DA
70312013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7032
7033 * xfaces.c (make_face_cache): For struct face_cache, prefer
7034 xmalloc to xzalloc and so avoid redundant call to memset.
7035 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
7036
d7e6881a
DA
70372013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7038
7039 * fringe.c (draw_window_fringes, update_window_fringes)
7040 (compute_fringe_widths):
7041 * w32term.c (x_draw_glyph_string):
7042 * window.c (candidate_window_p, Frecenter):
7043 * xfaces.c (realize_basic_faces, realize_default_face)
7044 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
7045 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
7046 * xfns.c (x_set_cursor_color, xic_free_xfontset):
7047 * xmenu.c (Fx_menu_bar_open_internal):
7048 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
7049 * xsettings.c (xft_settings_event):
7050 * xterm.c (x_draw_glyph_string, x_had_errors_p):
7051 Use bool for booleans. Adjust style and comments where
7052 appropriate.
7053 * dispextern.h (draw_window_fringes, update_window_fringes)
7054 (compute_fringe_widths):
7055 * xterm.h (x_had_errors_p): Adjust prototype.
7056
ec3058af
DA
70572013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7058
7059 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
7060 CHECK_LIST. Rewrite the loop to avoid useless local variable.
7061
218e0637
DA
70622013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
7063
7064 * fns.c (toplevel): Remove comment before Fsafe_length because
7065 it checks for QUIT.
7066
e560aba9
PE
70672013-07-28 Paul Eggert <eggert@cs.ucla.edu>
7068
7069 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
7070
2e5ce5de
EZ
70712013-07-28 Eli Zaretskii <eliz@gnu.org>
7072
7073 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
7074 frame which got the message is still alive, before dereferencing
7075 its pointer. (Bug#14970)
7076
7077 * frame.c (delete_frame): Test "this" frame's minibuffer window to
7078 be a live window, before using it as such. (Bug#14970)
7079
e95da6d3
EZ
70802013-07-27 Eli Zaretskii <eliz@gnu.org>
7081
7082 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
7083 w32_detect_focus_change instead of doing part of its job by hand.
7084 This fixes the problem whereby FOCUS_OUT events were not sent to
7085 the event queue.
7086
a8f93651
EZ
70872013-07-26 Eli Zaretskii <eliz@gnu.org>
7088
fec92060
EZ
7089 * process.c (Fprocess_list): Doc fix.
7090
a8f93651
EZ
7091 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
7092 being re-exposed only if it didn't ask to become visible.
7093 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
7094 was previously iconified. (Bug#14841)
7095 (x_iconify_frame): Mark the frame iconified.
7096
d5a7a9d9
PE
70972013-07-26 Paul Eggert <eggert@cs.ucla.edu>
7098
7099 Fix minor problems found by static checking.
7100 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
7101 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
7102
56ea7291
SM
71032013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
7104
7105 * eval.c (set_specpdl_old_value): New function.
7106 (unbind_to): Minor simplification.
7107 (get_backtrace_frame): New function.
7108 (Fbacktrace_frame): Use it. Add `base' argument.
7109 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
7110 (syms_of_eval): Export backtrace-eval.
7111 * xterm.c (x_focus_changed): Simplify.
7112
9d611ffe
PE
71132013-07-25 Paul Eggert <eggert@cs.ucla.edu>
7114
7115 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
7116
999c74e3
EZ
71172013-07-24 Eli Zaretskii <eliz@gnu.org>
7118
7119 * xdisp.c (redisplay_window): Instead of moving point out of
7120 scroll margin, reject the force_start method, and try scrolling
7121 instead. (Bug#14780)
7122
198fa217
KB
71232013-07-24 Ken Brown <kbrown@cornell.edu>
7124
7125 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
7126 (Bug#14944).
7127
53840e55
PE
71282013-07-24 Paul Eggert <eggert@cs.ucla.edu>
7129
7130 * eval.c (Fprogn): Do not check that BODY is a proper list.
7131 This undoes the previous change. The check slows down the
7132 interpreter, and is not needed to prevent a crash. See
7133 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
7134
60967f56
GM
71352013-07-23 Glenn Morris <rgm@gnu.org>
7136
7137 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
7138
9ca960e2
PE
71392013-07-23 Paul Eggert <eggert@cs.ucla.edu>
7140
a29c3e6d
PE
7141 Port to GNU/Linux systems with tinfo but not ncurses.
7142 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
7143 to decide whether ncurses is being used. Without this change,
7144 GCC complains about tgetent not being declared, on a system
7145 that has tinfo installed but ncurses not installed.
7146
f274311c
PE
7147 * eval.c (Fprogn): Check that BODY is a proper list.
7148
16b0520a
PE
7149 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
7150 * data.c (Fsetq_default):
7151 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
7152 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
7153 (Fcondition_case):
7154 Tune by taking advantage of the fact that ARGS is always a list
7155 when a function is declared to have UNEVALLED args.
7156
9ca960e2
PE
7157 * emacsgtkfixed.c: Port to GCC 4.6.
7158 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
7159
afacaa1b
JB
71602013-07-23 Juanma Barranquero <lekktu@gmail.com>
7161
7162 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
7163 here to silence compiler warnings.
7164
368a85a4
PE
71652013-07-22 Paul Eggert <eggert@cs.ucla.edu>
7166
7167 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
7168 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
7169 from messing up Emacs's 'struct frame' (Bug#14923).
7170
f4e891b5
PE
71712013-07-21 Paul Eggert <eggert@cs.ucla.edu>
7172
7173 * alloc.c (make_save_ptr_ptr): Define this function.
7174 It was inadvertently omitted. It's needed only if
7175 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
7176
96c8b65e
JD
71772013-07-21 Jan Djärv <jan.h.d@swipnet.se>
7178
7179 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
7180 frame have focus (Bug#14895).
7181
ee010797
PE
71822013-07-21 Paul Eggert <eggert@cs.ucla.edu>
7183
7184 Avoid vfork-related deadlock more cleanly.
7185 * callproc.c (child_setup): When the child's exec fails, output
7186 the program name, as that's more useful. Use O_NONBLOCK to avoid
7187 deadlock.
7188 * process.c (create_process_1): Remove; no longer needed.
7189 (create_process): Remove timer hack; no longer needed, now that
7190 the child avoids deadlock.
7191
f0398ec1 71922013-07-20 Glenn Morris <rgm@gnu.org>
8bfcc21a
GM
7193
7194 * image.c (Fimage_flush): Fix doc typo.
7195
b2a069c2
PE
71962013-07-20 Paul Eggert <eggert@cs.ucla.edu>
7197
6496aec9
PE
7198 Fix array bounds violation when pty allocation fails.
7199 * process.c (PTY_NAME_SIZE): New constant.
7200 (pty_name): Remove static variable; it's now auto.
7201 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
7202 Take pty_name as an arg rather than using a static variable.
7203 All callers changed.
7204 (create_process): Recover pty_flag from process, not from volatile local.
7205 (create_pty): Stay inside array even when pty allocation fails.
7206 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
7207
b2a069c2
PE
7208 * lread.c (Fload): Avoid initialization only when lint checking.
7209 Mention that it's needed only for older GCCs.
7210
99107004
KH
72112013-07-20 Kenichi Handa <handa@gnu.org>
7212
7213 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
7214 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
7215
6b1b199d
AS
72162013-07-20 Andreas Schwab <schwab@linux-m68k.org>
7217
7218 * lread.c (Fload): Avoid uninitialized warning.
7219
4195afc3
PE
72202013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7221
3f5bef16
PE
7222 Fix some minor file descriptor leaks and related glitches.
7223 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
7224 (create_lock_file): Use write, not emacs_write.
7225 * image.c (slurp_file, png_load_body):
7226 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
7227 (server_accept_connection):
7228 Don't leak an fd on memory allocation failure.
7229 * image.c (slurp_file): Add a cheap heuristic for growing files.
7230 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
7231 as that's what the other routines do. Maybe input need not be
7232 blocked at all, but it's better to be consistent.
7233 Avoid undefined behavior when strlen is zero.
7234
4195afc3
PE
7235 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
7236 (NSTATICS): Now a constant; doesn't need to be a macro.
7237
a1aeeffe
RS
72382013-07-19 Richard Stallman <rms@gnu.org>
7239
7240 * coding.c (decode_coding_utf_8): Add simple loop for fast
7241 processing of ASCII characters.
7242
63b34baa
PE
72432013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7244
7245 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
7246
621dd9ac
EZ
72472013-07-19 Eli Zaretskii <eliz@gnu.org>
7248
7249 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
7250 unportable 'struct x_display_info'.
7251 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
7252 is a portable type.
7253
1396ac86
PE
72542013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7255
ab9980cd
PE
7256 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
7257 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
7258 or fscanf fails.
7259 (system_process_attributes): Prefer plain char to unsigned char
7260 when either will do. Clean up properly if interrupted or if
068f9124
SM
7261 memory allocations fail. Don't assume sscanf succeeds.
7262 Remove no-longer-needed workaround to stop GCC from whining.
7263 Read command-line once, instead of multiple times. Check read status a
ab9980cd
PE
7264 bit more carefully.
7265
1396ac86
PE
7266 Fix obscure porting bug with varargs functions.
7267 The code assumed that int is treated like ptrdiff_t in a vararg
7268 function, which is not a portable assumption. There was a similar
7269 -- though these days less likely -- porting problem with various
7270 assumptions that pointers of different types all smell the same as
7271 far as vararg functions is conserved. To make this problem less
7272 likely in the future, redo the API to use varargs functions.
7273 * alloc.c (make_save_value): Remove this vararg function.
7274 All uses changed to ...
7275 (make_save_int_int_int, make_save_obj_obj_obj_obj)
7276 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
7277 New functions.
7278 (make_save_ptr): Rename from make_save_pointer, for consistency with
7279 the above. Define only on platforms that need it. All uses changed.
7280
4d19d194
PE
72812013-07-18 Paul Eggert <eggert@cs.ucla.edu>
7282
7283 * keyboard.c: Try to fix typos in previous change.
7284 (DISPLAY_LIST_INFO): New macro.
7285 (kbd_buffer_get_event): Do not access members that are not present
c7064f05 7286 in X11. Revert inadvertent change of "!=" to "=".
4d19d194 7287
945c5bb1
JB
72882013-07-18 Juanma Barranquero <lekktu@gmail.com>
7289
7290 * keyboard.c (kbd_buffer_get_event):
7291 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
7292 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
7293
f4b1eb36
PE
72942013-07-18 Paul Eggert <eggert@cs.ucla.edu>
7295
5e679a2c
PE
7296 * filelock.c: Fix unlikely file descriptor leaks.
7297 (get_boot_time_1): Rework to avoid using emacs_open.
7298 This doesn't actually fix a leak, but is better anyway.
7299 (read_lock_data): Use read, not emacs_read.
7300
a8cd4836
PE
7301 * doc.c: Fix minor memory and file descriptor leaks.
7302 * doc.c (get_doc_string): Fix memory leak when doc file absent.
7303 (get_doc_string, Fsnarf_documentation):
7304 Fix file descriptor leak on error.
7305
ef30e638
PE
7306 * term.c: Fix minor fdopen-related file descriptor leaks.
7307 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
7308 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
7309
f4b1eb36
PE
7310 * charset.c: Fix file descriptor leaks and errno issues.
7311 Include <errno.h>.
7312 (load_charset_map_from_file): Don't leak file descriptor on error.
7313 Use plain record_xmalloc since the allocation is larger than
7314 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
7315 of entries.
7316 * eval.c (record_unwind_protect_nothing):
7317 * fileio.c (fclose_unwind):
7318 New functions.
7319 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
7320 The replacement doesn't block input, but that no longer seems
7321 necessary.
7322
b648c163
PE
73232013-07-17 Paul Eggert <eggert@cs.ucla.edu>
7324
a0931322
PE
7325 * lread.c: Fix file descriptor leaks and errno issues.
7326 (Fload): Close some races that leaked fds or streams when 'load'
7327 was interrupted.
7328 (Fload, openp): Report error number of last nontrivial failure to open.
7329 ENOENT counts as trivial.
7330 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
7331 New functions.
7332 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
7333 now that the function is always called with a nonnegative arg.
7334 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
7335 All uses replaced with ...
7336 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
7337
b648c163
PE
7338 A few more minor file errno-reporting bugs.
7339 * callproc.c (Fcall_process):
7340 * doc.c (Fsnarf_documentation):
7341 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
7342 * process.c (set_socket_option):
7343 Don't let a constructor trash errno.
7344 * doc.c: Include <errno.h>.
7345
b1dc4084
JB
73462013-07-16 Juanma Barranquero <lekktu@gmail.com>
7347
7348 * w32fns.c (unwind_create_tip_frame): Fix declaration.
7349
c43843aa
PE
73502013-07-16 Paul Eggert <eggert@cs.ucla.edu>
7351
50a30cce
PE
7352 Fix w32 bug with call-process-region (Bug#14885).
7353 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
7354 to Fcall_process when the input is empty. This simplifies the
7355 code a bit. It makes no difference on POSIXish platforms but
7356 apparently it fixes a bug on w32.
7357
44e18199 7358 Fix bug where insert-file-contents closes a file twice (Bug#14839).
41d48a42
PE
7359 * fileio.c (close_file_unwind): Don't close if FD is negative;
7360 this can happen when unwinding a zapped file descriptor.
7361 (Finsert_file_contents): Unwind-protect the fd before the point marker,
7362 in case Emacs runs out of memory between the two unwind-protects.
7363 Don't trash errno when closing FD.
7364 Zap the FD in the specpdl when closing it, instead of deferring
7365 the removal of the unwind-protect; this fixes a bug where a child
7366 function unwinds the stack past us.
7367
27e498e6
PE
7368 New unwind-protect flavors to better type-check C callbacks.
7369 This also lessens the need to write wrappers for callbacks,
7370 and the need for make_save_pointer.
a12bf61e 7371 * alloc.c (free_save_value):
27e498e6
PE
7372 * atimer.c (run_all_atimers):
7373 Now extern.
7374 * alloc.c (safe_alloca_unwind):
7375 * atimer.c (unwind_stop_other_atimers):
7376 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
7377 * menu.c (cleanup_popup_menu) [HAVE_NS]:
7378 * minibuf.c (choose_minibuf_frame_1):
7379 * process.c (make_serial_process_unwind):
a12bf61e 7380 * xdisp.c (pop_message_unwind):
27e498e6
PE
7381 * xselect.c (queue_selection_requests_unwind):
7382 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
a12bf61e 7383 * alloc.c (record_xmalloc):
27e498e6
PE
7384 Prefer record_unwind_protect_ptr to record_unwind_protect with
7385 make_save_pointer.
a12bf61e 7386 * alloc.c (Fgarbage_collect):
27e498e6
PE
7387 Prefer record_unwind_protect_void to passing a dummy.
7388 * buffer.c (restore_buffer):
7389 * window.c (restore_window_configuration):
7390 * xfns.c, w32fns.c (do_unwind_create_frame)
7391 New wrapper. All record-unwind uses of wrappee changed.
7392 * buffer.c (set_buffer_if_live):
7393 * callproc.c (call_process_cleanup, delete_temp_file):
7394 * coding.c (code_conversion_restore):
7395 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
7396 * editfns.c (save_excursion_restore)
7397 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
7398 (save_restriction_restore):
7399 * eval.c (restore_stack_limits, un_autoload):
7400 * fns.c (require_unwind):
7401 * keyboard.c (recursive_edit_unwind, tracking_off):
7402 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
7403 * macros.c (pop_kbd_macro, restore_menu_items):
7404 * nsfns.m (unwind_create_frame):
7405 * print.c (print_unwind):
7406 * process.c (start_process_unwind):
7407 * search.c (unwind_set_match_data):
7408 * window.c (select_window_norecord, select_frame_norecord):
7409 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
7410 (fast_set_selected_frame):
7411 * xfns.c, w32fns.c (unwind_create_tip_frame):
7412 Return void, not a dummy Lisp_Object. All uses changed.
7413 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
7414 * callproc.c (call_process_kill):
7415 * fileio.c (restore_point_unwind, decide_coding_unwind)
7416 (build_annotations_unwind):
7417 * insdel.c (Fcombine_after_change_execute_1):
7418 * keyboard.c (read_char_help_form_unwind):
7419 * menu.c (unuse_menu_items):
7420 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
7421 * sound.c (sound_cleanup):
7422 * xdisp.c (unwind_redisplay):
7423 * xfns.c (clean_up_dialog):
7424 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
7425 Accept no args and return void, instead of accepting and returning
7426 a dummy Lisp_Object. All uses changed.
7427 * cygw32.c (fchdir_unwind):
7428 * fileio.c (close_file_unwind):
7429 * keyboard.c (restore_kboard_configuration):
7430 * lread.c (readevalllop_1):
7431 * process.c (wait_reading_process_output_unwind):
7432 Accept int and return void, rather than accepting an Emacs integer
7433 and returning a dummy object. In some cases this fixes an
7434 unlikely bug when the corresponding int is outside Emacs integer
7435 range. All uses changed.
7436 * dired.c (directory_files_internal_unwind):
7437 * fileio.c (do_auto_save_unwind):
7438 * gtkutil.c (pop_down_dialog):
7439 * insdel.c (reset_var_on_error):
7440 * lread.c (load_unwind):
7441 * xfns.c (clean_up_file_dialog):
7442 * xmenu.c, nsmenu.m (pop_down_menu):
7443 * xmenu.c (cleanup_widget_value_tree):
7444 * xselect.c (wait_for_property_change_unwind):
7445 Accept pointer and return void, rather than accepting an Emacs
7446 save value encapsulating the pointer and returning a dummy object.
7447 All uses changed.
7448 * editfns.c (Fformat): Update the saved pointer directly via
7449 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
7450 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
7451 (unwind_body): New function.
7452 (record_unwind_protect): First arg is now a function returning void,
7453 not a dummy Lisp_Object.
7454 (record_unwind_protect_ptr, record_unwind_protect_int)
7455 (record_unwind_protect_void): New functions.
7456 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
7457 * fileio.c (struct auto_save_unwind): New type.
7458 (do_auto_save_unwind): Use it.
7459 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
7460 * insdel.c (struct rvoe_arg): New type.
7461 (reset_var_on_error): Use it.
7462 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
7463 New constants.
7464 (specbinding_func): Remove; there are now several such functions.
7465 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
7466 (set_unwind_protect_ptr): New function.
7467 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
7468
4e604a5d
PE
7469 Be simpler and more consistent about reporting I/O errors.
7470 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
7471 Say "Read error" and "Write error", rather than "I/O error", or
7472 "IO error reading", or "IO error writing", when a read or write
7473 error occurs.
7474 * process.c (Fmake_network_process, wait_reading_process_output)
7475 (send_process, Fprocess_send_eof, wait_reading_process_output):
7476 Capitalize diagnostics consistently. Put "failed foo" at the
7477 start of the diagnostic, so that we don't capitalize the
7478 function name "foo". Consistently say "failed" for such
7479 diagnostics.
7480 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
7481 All callers changed. This is so it can use report_file_error.
7482 * sysdep.c (serial_open, serial_configure): Capitalize I/O
7483 diagnostics consistently as above.
7484
a9757f6a
PE
7485 * fileio.c (report_file_errno): Fix errno reporting bug.
7486 If the file name is neither null nor a pair, package it up as a
7487 singleton list. All callers changed, both to this function and to
7488 report_file_error. This fixes a bug where the memory allocator
7489 invoked by list1 set errno so that the immediately following
7490 report_file_error reported the wrong errno value.
7491
c43843aa
PE
7492 Fix minor problems found by --enable-gcc-warnings.
7493 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
7494 * keyboard.c (kbd_buffer_get_event): Remove unused local.
7495
18c26d81
JD
74962013-07-16 Jan Djärv <jan.h.d@swipnet.se>
7497
7498 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
7499 Set event->arg to Qt if switch-event shall be generated.
7500 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
7501
7502 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
7503
7504 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
7505 FOCUS_OUT_EVENT.
7506
7507 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
7508 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
7509 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
7510 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
44e18199 7511 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
18c26d81
JD
7512 and there is a focused frame.
7513 (head_table): Add focus-in and focus-out.
7514 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
7515 bind to handle-focus-in/out.
7516
7517 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
7518 (Fhandle_switch_frame): Call Fhandle_focus_in.
7519 (syms_of_frame): defsubr handle-focus-in/out.
7520
6c6f1994
PE
75212013-07-16 Paul Eggert <eggert@cs.ucla.edu>
7522
c7ddc792
PE
7523 Fix porting bug to older POSIXish platforms (Bug#14862).
7524 * sysdep.c (emacs_pipe): New function, that implements
7525 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
7526 This should port better to CentOS 5 and to Mac OS X 10.6.
7527 All calls to pipe2 changed.
7528
6c6f1994
PE
7529 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
7530 This makes the code easier to read and the executable a bit smaller.
7531 Do not replace all calls to Fcons that happen to create lists,
7532 just calls that are intended to create lists. For example, when
7533 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
7534 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
7535 Similarly for list2 through list5.
7536 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
7537 * bytecode.c (exec_byte_code):
7538 * callint.c (quotify_arg, Fcall_interactively):
7539 * callproc.c (Fcall_process, create_temp_file):
7540 * charset.c (load_charset_map_from_file)
7541 (Fdefine_charset_internal, init_charset):
7542 * coding.c (get_translation_table, detect_coding_system)
7543 (Fcheck_coding_systems_region)
7544 (Fset_terminal_coding_system_internal)
7545 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
7546 * composite.c (update_compositions, Ffind_composition_internal):
7547 * dired.c (directory_files_internal, file_name_completion)
7548 (Fsystem_users):
7549 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
7550 * doc.c (Fsnarf_documentation):
7551 * editfns.c (Fmessage_box):
7552 * emacs.c (main):
7553 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
7554 (Feval, eval_sub, Ffuncall, apply_lambda):
7555 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
7556 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
7557 (Fset_file_times, Finsert_file_contents)
7558 (Fchoose_write_coding_system, Fwrite_region):
7559 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
7560 * font.c (font_registry_charsets, font_parse_fcname)
7561 (font_prepare_cache, font_update_drivers, Flist_fonts):
7562 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
7563 * frame.c (make_frame, Fmake_terminal_frame)
7564 (x_set_frame_parameters, x_report_frame_params)
7565 (x_default_parameter, Fx_parse_geometry):
7566 * ftfont.c (syms_of_ftfont):
7567 * image.c (gif_load):
7568 * keyboard.c (command_loop_1):
7569 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
7570 (Fcopy_keymap, append_key, Fcurrent_active_maps)
7571 (Fminor_mode_key_binding, accessible_keymaps_1)
7572 (Faccessible_keymaps, Fwhere_is_internal):
7573 * lread.c (read_emacs_mule_char):
7574 * menu.c (find_and_return_menu_selection):
7575 * minibuf.c (get_minibuffer):
7576 * nsfns.m (Fns_perform_service):
7577 * nsfont.m (ns_script_to_charset):
7578 * nsmenu.m (ns_popup_dialog):
7579 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
7580 (Fx_own_selection_internal):
7581 * nsterm.m (append2):
7582 * print.c (Fredirect_debugging_output)
7583 (print_prune_string_charset):
7584 * process.c (Fdelete_process, Fprocess_contact)
7585 (Fformat_network_address, set_socket_option)
7586 (read_and_dispose_of_process_output, write_queue_push)
7587 (send_process, exec_sentinel):
7588 * sound.c (Fplay_sound_internal):
7589 * textprop.c (validate_plist, add_properties)
7590 (Fput_text_property, Fadd_face_text_property)
7591 (copy_text_properties, text_property_list, syms_of_textprop):
7592 * unexaix.c (report_error):
7593 * unexcoff.c (report_error):
7594 * unexsol.c (unexec):
7595 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
7596 (Fformat_mode_line, syms_of_xdisp):
7597 * xfaces.c (set_font_frame_param)
7598 (Finternal_lisp_face_attribute_values)
7599 (Finternal_merge_in_global_face, syms_of_xfaces):
7600 * xfns.c (x_default_scroll_bar_color_parameter)
7601 (x_default_font_parameter, x_create_tip_frame):
7602 * xfont.c (xfont_supported_scripts):
7603 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
7604 (menu_help_callback, xmenu_show):
7605 * xml.c (make_dom):
7606 * xterm.c (set_wm_state):
7607 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
7608 and similarly for list2 through list5.
7609
bafe80ce
PE
76102013-07-15 Paul Eggert <eggert@cs.ucla.edu>
7611
7612 * callproc.c (Fcall_process_region): Fix minor race and tune.
7613 (create_temp_file): New function, with the temp-file-creation part
7614 of the old Fcall_process_region. Use Fcopy_sequence to create the
7615 temp file name, rather than alloca + build_string, for simplicity.
7616 Don't bother to block input around the temp file creation;
068f9124
SM
7617 shouldn't be needed. Simplify use of mktemp.
7618 Use record_unwind_protect immediately after creating the temp file;
bafe80ce
PE
7619 this closes an unlikely race where the temp file was not removed.
7620 Use memcpy rather than an open-coded loop.
7621 (Fcall_process_region): Use the new function. If the input is
7622 empty, redirect from /dev/null rather than from a newly created
7623 empty temp file; this avoids unnecessary file system traffic.
7624
4700b5a5
PE
76252013-07-14 Paul Eggert <eggert@cs.ucla.edu>
7626
5c97beae
PE
7627 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
7628 Simplify by making this case like the other two. This is a bit
7629 slower on obsolete hosts, but the extra complexity isn't worth it.
7630
4700b5a5
PE
7631 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
7632 * process.c (create_process) [!DOS_NT]:
7633 Remove now-unnecessary calls to emacs_close.
7634
f9a74c4c
EZ
76352013-07-13 Eli Zaretskii <eliz@gnu.org>
7636
922ae7ee
EZ
7637 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
7638 returning early. (Bug#14850)
7639
f9a74c4c
EZ
7640 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
7641 and inhibit-iso-escape-detection attributes of 'undecided'.
7642 (Bug#14822)
7643
5e301d76
PE
76442013-07-13 Paul Eggert <eggert@cs.ucla.edu>
7645
69e0e5ee
PE
7646 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
7647 Reported by Herbert J. Skuhra in
7648 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
7649
5e301d76
PE
7650 Don't lose top specpdl entry when memory is exhausted.
7651 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
7652 specpdl overflow here, to simplify callers; all callers changed.
7653 Always reserve an unused entry at the stack top; this avoids
7654 losing the top entry's information when memory is exhausted.
7655
7e649856
PE
76562013-07-12 Paul Eggert <eggert@cs.ucla.edu>
7657
a773ed9a
PE
7658 Clean up errno reporting and fix some errno-reporting bugs.
7659 * callproc.c (Fcall_process):
7660 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
7661 * process.c (create_process, Fmake_network_process):
7662 * unexaix.c (report_error):
7663 * unexcoff.c (report_error):
7664 Be more careful about reporting the errno of failed operations.
7665 The code previously reported the wrong errno sometimes.
7666 Also, prefer report_file_errno to setting errno + report_file_error.
7667 (Fcall_process): Look at openp return value rather than at path,
7668 as that's a bit faster and clearer when there's a numeric predicate.
7669 * fileio.c (report_file_errno): New function, with most of the
7670 old contents of report_file_error.
7671 (report_file_error): Use it.
7672 (Ffile_exists_p, Ffile_accessible_directory_p):
7673 Set errno to 0 when it is junk.
7674 * fileio.c (Faccess_file):
7675 * image.c (x_create_bitmap_from_file):
7676 Use faccessat rather than opening the file, to avoid the hassle of
7677 having a file descriptor open.
7678 * lisp.h (report_file_errno): New decl.
7679 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
7680
7e649856
PE
7681 Minor EBADF fixes.
7682 * process.c (create_process, wait_reading_process_output) [AIX]:
7683 Remove obsolete SIGHUP-related code, as Emacs no longer disables
7684 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
7685 a multithreaded environment anyway).
7686 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
7687
f6774c1a
AS
76882013-07-12 Andreas Schwab <schwab@linux-m68k.org>
7689
7690 * image.c (x_find_image_file): Don't close a remote file handle.
7691
bacba3c2
PE
76922013-07-12 Paul Eggert <eggert@cs.ucla.edu>
7693
7694 Fix races with threads and file descriptors.
7695 * callproc.c (Fcall_process_region):
7696 * dired.c (open_directory):
7697 * emacs.c (main, Fdaemon_initialized):
7698 * image.c (x_find_image_file):
7699 * inotify.c (Finotify_rm_watch):
7700 * lread.c (Flocate_file_internal):
7701 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
7702 * term.c (term_mouse_moveto, init_tty):
7703 * termcap.c (tgetent):
7704 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
7705 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
7706 * unexhp9k800.c, unexmacosx.c (unexec):
7707 * callproc.c (Fcall_process_region):
7708 Use emacs_close, not close.
7709 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
7710 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
7711 and posix_close function on current platforms (which all lack them).
7712 (emacs_close): Use it. This should fix the races on GNU/Linux and
7713 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
7714 and it should avoid closing random victim file descriptors on
7715 other platforms.
7716
653d4f43
PE
77172013-07-11 Paul Eggert <eggert@cs.ucla.edu>
7718
c8536ec4
PE
7719 * inotify.c (uninitialized): Remove. All uses replaced by -1.
7720 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
7721 Touch up doc a bit.
7722
9c203066
PE
7723 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
7724 This is for .gdbinit xbacktrace.
7725
653d4f43
PE
7726 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
7727 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
7728 (emacs_set_tty): Now static.
7729 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
7730 * term.c (tty_capable_p, tty_default_color_capabilities)
7731 (get_tty_terminal, term_mouse_movement)
7732 (handle_one_term_event, init_tty, maybe_fatal):
7733 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
7734 (tgetent, scan_file, name_match, compare_contin):
7735 * terminal.c (get_terminal):
7736 Use bool for boolean.
7737 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
7738 Prefer char to unsigned char if either will do.
7739 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
7740 (tty_write_glyphs): Prefer int to unsigned.
7741 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
7742 All callers changed.
7743 * termcap.c (tprint, main) [TEST]: Remove non-working test.
7744
45b683a1
PE
77452013-07-10 Paul Eggert <eggert@cs.ucla.edu>
7746
29abe551
PE
7747 Port to C89.
7748 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
7749 (B__dummy__): New dummy symbol, to pacify C89.
7750 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
7751 they can't grok varargs macros.
7752 * dispnew.c (add_window_display_history)
7753 (add_frame_display_history):
7754 * print.c (print_object):
7755 * xdisp.c (debug_method_add):
7756 Use %p printf format only for void pointers.
7757 * emacs.c (usage_message): New constant, replacing ...
7758 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
7759 (main): Adjust to usage reorg.
7760 * fns.c (syms_of_fns):
7761 * profiler.c (syms_of_profiler):
7762 Don't use non-constant struct initializers.
7763 * gnutls.h (gnutls_initstage_t):
7764 * lisp.h (enum Lisp_Fwd_Type):
7765 * lread.c (lisp_file_lexically_bound_p):
7766 * xsettings.c (anonymous enum):
7767 Remove trailing comma.
7768 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
7769 * lisp.h (ENUM_BF): Use unsigned if pedantic.
7770 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
7771 (DEFUN): Use it.
7772 * regex.c (const_re_char): New type, to pacify strict C89.
7773 All uses of 'const re_char' replaced to use it.
7774 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
7775 with glibc when strict C89. This change is imported from gnulib.
7776 All uses changed.
7777 (_Restrict_arr_): Rename from __restrict_arr, similarly.
7778 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
7779 Omit GNU_LINUX implementation, since it requires long long.
7780 * xterm.c (x_draw_underwave):
7781 Do not assume the traditional order of struct's members.
7782 (x_term_init): Rewrite to avoid the need for non-constant structure
7783 initializers.
7784
45b683a1 7785 Syntax cleanup, mostly replacing macros with functions.
763a086d 7786 This removes the need for the syntax_temp hack.
45b683a1
PE
7787 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
7788 * syntax.c (SYNTAX_INLINE): New macro.
7789 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
7790 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
7791 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
7792 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
7793 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
7794 (SYNTAX_COMEND_FIRST): Now functions, not macros.
7795 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
7796 Now constants, not macros.
7797 (syntax_temp) [!__GNUC__]: Remove.
7798 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
7799 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
7800 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
7801 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
7802 Move here from syntax.h; now functions, not macros. Except for the
7803 last function, these are static since only syntax.c uses them.
7804 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
7805 All uses changed. Now a function, not a macro; use this fact
7806 to simplify the code.
7807 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
7808 compiler bugs; no longer relevant.
7809 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7810 (SYNTAX_INLINE): New macro.
7811 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
7812 for the new functions. Use bool for boolean member.
7813 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
7814 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
7815 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
7816 (SETUP_BUFFER_SYNTAX_TABLE):
7817 Now extern inline functions, not macros.
7818 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
7819 Remove; all uses replaced by implementation.
7820 (syntax_temp) [!__GNUC__]: Remove decl.
7821 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
7822
29be4a50
JD
78232013-07-10 Jan Djärv <jan.h.d@swipnet.se>
7824
7825 * emacs.c (main): Fix syntax error.
7826
954b166e
PE
78272013-07-10 Paul Eggert <eggert@cs.ucla.edu>
7828
7829 Timestamp fixes for undo (Bug#14824).
7830 * atimer.c (schedule_atimer):
7831 * fileio.c (Ffile_newer_than_file_p):
7832 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
7833 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
7834 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
7835 (syms_of_fileio): Remove Sclear_visited_file_name.
7836 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
7837 file doesn't exist; this avoids an ambiguity with negative timestamps.
7838 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
7839 * systime.h (make_emacs_time, invalid_emacs_time):
7840 Don't assume struct timespec layout; POSIX doesn't guarantee it.
7841 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
7842 * undo.c (record_first_change): Push (visited-file-modtime) onto
7843 undo list rather than reimplementing it by hand, incorrectly.
7844
d74647c3
KB
78452013-07-09 Ken Brown <kbrown@cornell.edu>
7846
7847 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
7848
3c51b96b
JB
78492013-07-09 Juanma Barranquero <lekktu@gmail.com>
7850
7851 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
7852
4ebbdd67
PE
78532013-07-09 Paul Eggert <eggert@cs.ucla.edu>
7854
7855 Handle errno and exit status a bit more carefully.
7856 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
7857 number into an exit status. Instead, use EXIT_CANCELED.
7858 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
7859 * callproc.c (relocate_fd):
7860 * emacs.c (close_output_streams, main):
7861 * process.c (create_process):
7862 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
7863 Use emacs_perror for simplicity.
7864 * callproc.c (relocate_fd, main):
7865 * sysdep.c (sys_subshell):
7866 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
7867 (shut_down_emacs): Use emacs_write, not write.
7868 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
7869 * fileio.c (Fcopy_file, e_write):
7870 * nsterm.m (ns_select):
7871 * process.c (send_process):
7872 * sound.c (vox_write):
7873 Use emacs_write_sig, not emacs_write.
7874 * lisp.h (emacs_write_sig, emacs_perror): New decls.
7875 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
7876 New constants.
7877 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
7878 of write.
7879 (emacs_full_write): New function.
7880 (emacs_write): Rewrite to use it.
7881 (emacswrite_sig, emacs_perror): New functions.
7882 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
7883
44e18199 78842013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
e4b1e5af
JD
7885
7886 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
7887 on NS even if it is present. Pixmap on NS is a void*.
7888
9caab067
PE
78892013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7890
7891 Port to Ubuntu 10 (Bug#14803).
7892 Problem reported by T.V. Raman.
7893 * process.c (close_on_exec, accept4, process_socket):
7894 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
7895
1d442672
EZ
78962013-07-07 Eli Zaretskii <eliz@gnu.org>
7897
7898 * w32.c (sys_dup): Declare prototype.
7899
7900 * filelock.c:
7901 * emacs.c:
7902 * callproc.c [WINDOWSNT]: Include sys/socket.h.
7903
067428c1
PE
79042013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7905
7906 Make file descriptors close-on-exec when possible (Bug#14803).
7907 This simplifies Emacs a bit, since it no longer needs to worry
7908 about closing file descriptors by hand in some cases.
7909 It also fixes some unlikely races. Not all such races, as
7910 libraries often open files internally without setting
7911 close-on-exec, but it's an improvement.
7912 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
7913 * callproc.c (Fcall_process) [!MSDOS]:
7914 * emacs.c (main) [!DOS_NT]:
7915 * nsterm.m (ns_term_init):
7916 * process.c (create_process):
7917 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
7918 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
7919 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
7920 Prefer mkostemp with O_CLOEXEC to mkstemp.
7921 * callproc.c (relocate_fd) [!WINDOWSNT]:
7922 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
7923 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
7924 now using pipe2.
7925 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
7926 Make the resulting file descriptor close-on-exec.
7927 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
7928 * lread.c (load_descriptor_list, load_descriptor_unwind):
7929 Remove; no longer needed. All uses removed.
7930 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
7931 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
7932 New functions.
7933 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
35e951cd 7934 (Fmake_network_process, Fnetwork_interface_list)
067428c1
PE
7935 (Fnetwork_interface_info, server_accept_connection):
7936 Make newly-created socket close-on-exec.
7937 * sysdep.c (emacs_open, emacs_fopen):
7938 Make new-created descriptor close-on-exec.
7939 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
7940 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
7941
0da857dd
JD
79422013-07-07 Jan Djärv <jan.h.d@swipnet.se>
7943
7944 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
7945 for NS_IMPL_GNUSTEP.
7946
5f86adcd
PE
79472013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7948
7949 Fix openp errno handling.
7950 * callproc.c (Fcall_process): Preserve openp errno around close.
7951 * lread.c (openp): Set errno when returning -1, as some callers
7952 expect this.
7953
1afb1d07
JD
79542013-07-06 Jan Djärv <jan.h.d@swipnet.se>
7955
7956 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
7957
7958 * nsterm.h (NSSavePanel): Update comment.
7959 (NSAPP_DATA2_RUNFILEDIALOG): Define.
7960 (ns_run_file_dialog): Declare.
7961
7962 * nsfns.m: Remove panelOK.
7963 (ns_fd_data): New.
7964 (ns_run_file_dialog): New function.
7965 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
7966 event loop, so file dialog is popped up by ns_run_file_dialog, called
7967 by sendEvent (Bug#14578).
7968 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
7969
3323c263
EZ
79702013-07-06 Eli Zaretskii <eliz@gnu.org>
7971
fdda0220
EZ
7972 * xdisp.c (default_line_pixel_height): New function.
7973 (pos_visible_p, move_it_vertically_backward, try_scrolling)
7974 (try_cursor_movement, redisplay_window, try_window)
7975 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
7976
068f9124
SM
7977 * window.c (window_scroll_pixel_based):
7978 use default_line_pixel_height.
fdda0220
EZ
7979
7980 * dispextern.h (default_line_pixel_height): Add prototype.
7981
7982 * frame.c (x_set_line_spacing): Accept a float value for
7983 line-spacing parameter, per the documentation.
7984
3323c263
EZ
7985 * data.c (Fmultibyte_string_p): Doc fix.
7986
47ba6d43
PE
79872013-07-05 Paul Eggert <eggert@cs.ucla.edu>
7988
406af475
PE
7989 Use emacs_open more consistently when opening files.
7990 This handles EINTR more consistently now, and makes it easier
7991 to introduce other uniform changes to file descriptor handling.
a12bf61e
GM
7992 * sysstdio.h: New file.
7993 * buffer.c (mmap_init):
406af475
PE
7994 * cygw32.c (chdir_to_default_directory):
7995 * dispnew.c (Fopen_termscript):
7996 * emacs.c (Fdaemon_initialized):
7997 * fileio.c (Fdo_auto_save):
7998 * image.c (slurp_file, png_load_body, jpeg_load_body):
7999 * keyboard.c (Fopen_dribble_file):
8000 * lread.c (Fload):
8001 * print.c (Fredirect_debugging_output):
8002 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
8003 * termcap.c (tgetent):
8004 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
8005 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
8006 * w32term.c (w32_initialize) [CYGWIN]:
8007 * xfaces.c (Fx_load_color_file):
8008 Use emacs_open instead of plain open, and emacs_fopen instead of
8009 plain fopen.
8010 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
8011 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
8012 * callproc.c (default_output_mode): New constant.
8013 (Fcall_process): Use it to call emacs_open instead of plain creat.
8014 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
8015 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
8016 (emacs_fopen): New function.
8017 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
8018 Include <lisp.h>, for emacs_open.
8019 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
8020
47ba6d43
PE
8021 Remove duplicate #include directives.
8022 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
8023 * xfaces.c:
8024 Don't include stdio.h twice.
8025 * buffer.c [USE_MMAP_FOR_BUFFERS]:
8026 Don't include sys/types.h or stdio.h twice.
8027 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
8028 * lread.c: Don't include coding.h twice.
8029 * nsfont.m: Don't include frame.h twice.
8030 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
8031 * ralloc.c: Don't include <unistd.h> twice.
8032 * xdisp.c: Don't include font.h twice.
8033 * xterm.c: Don't include fontset.h twice.
8034 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
8035
b9ed53d5
PE
80362013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8037
8038 Scale ImageMagick images more carefully.
8039 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
8040 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
8041 Be more careful about avoiding undefined behavior after
8042 integer overflow and division by zero.
8043
cf13177e
YM
80442013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8045
8046 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
8047 (syms_of_w32fns): DEFSYM them.
8048 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
8049 (CCHDEVICENAME): Define macros if not defined.
8050 (struct MONITOR_INFO_EX): New struct.
8051 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
8052 (enum_display_monitors_fn): New variable.
8053 (globals_of_w32fns): Initialize it.
8054 (Fx_display_pixel_width, Fx_display_pixel_height)
8055 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
8056 multi-monitor setups in docstrings.
8057 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
8058 screen size by primary monitor's millimeter per pixel.
8059 (w32_monitor_enum, w32_display_monitor_attributes_list)
8060 (w32_display_monitor_attributes_list_fallback)
8061 (Fw32_display_monitor_attributes_list): New functions.
8062 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
8063
8064 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
8065 if not defined.
8066 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
8067
86dfb7a8
MA
80682013-07-04 Michael Albinus <michael.albinus@gmx.de>
8069
8070 * fileio.c (Qfile_notify_error): New error symbol.
8071
8072 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
8073 * inotify.c (inotify_callback, symbol_to_inotifymask)
8074 (Finotify_add_watch, Finotify_rm_watch): Use it.
8075 (inotifyevent_to_event): Exchange order of cookie and file name.
8076 (Finotify_add_watch): Adapt docstring.
8077
8078 * lisp.h (Qfile_notify_error): Declare.
8079
2c1c974b
PE
80802013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8081
8082 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
8083 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8084 Do not clear _malloc_thread_enabled_p, undoing the previous change,
8085 which did not work (see <http://bugs.gnu.org/14569#307>).
8086 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
8087 && (!noninteractive || initialized)). This attempts to thread
8088 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
8089
7a35b20f
JB
80902013-07-04 Juanma Barranquero <lekktu@gmail.com>
8091
8092 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
8093 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
8094
1ce5cd04
PE
80952013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8096
8097 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
8098 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8099 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
8100 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
8101
57f8c490
PE
81022013-07-02 Paul Eggert <eggert@cs.ucla.edu>
8103
8104 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
8105 Define to __sys_siglist.
8106
bcffb5ca
EZ
81072013-07-02 Eli Zaretskii <eliz@gnu.org>
8108
8109 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
8110 word-wrap, so that overflow-newline-into-fringe would work in
8111 visual-line-mode. (Bug#2749)
8112 (move_it_in_display_line_to): When the last scanned display
8113 element fits exactly on the display line, and
8114 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
8115 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
8116 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
8117 finding buffer position that corresponds to pixel coordinates,
8118 e.g. in buffer_posn_from_coords.
8119
2c41e781
JD
81202013-07-02 Jan Djärv <jan.h.d@swipnet.se>
8121
8122 * process.c (handle_child_signal): Call catch_child_signal if
8123 NS_IMPL_GNUSTEP.
8124
c2418359
PE
81252013-07-02 Paul Eggert <eggert@cs.ucla.edu>
8126
52a9bcae
PE
8127 Don't convert function pointers to void * and back.
8128 It isn't portable C, and it's easy enough to avoid.
8129 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
8130 (make_save_value): Add support for SAVE_FUNCPOINTER.
8131 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
8132 * print.c (print_object):
8133 Distinguish function from object pointers.
8134 * lisp.h (SAVE_FUNCPOINTER): New constant.
8135 (SAVE_SLOT_BITS): Adjust to it.
8136 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
8137 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
8138 (voidfuncptr): New typedef.
8139 (struct Lisp_Save_Value): New member data[0].funcpointer.
8140 (XSAVE_FUNCPOINTER): New function.
8141
c2418359
PE
8142 Simplify buildobj processing.
8143 * Makefile.in (buildobj.h): Make it a sequence of strings each
8144 followed by comma, rather than a single string. Put it into a
8145 .tmp file in case there's an error while generating it.
8146 (gl-stamp): Use .tmp for temp files.
8147 (mostlyclean): Clean .tmp files.
8148 * doc.c (buildobj): Move to just the routine that needs it.
8149 It's now an array of strings, so processing is simpler.
8150
8f43ce49
PE
81512013-07-01 Paul Eggert <eggert@cs.ucla.edu>
8152
8153 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
8154 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
8155 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8156 Invoke malloc_enable_thread even when not interactive.
8157 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
8158 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
8159 in this case, since the underlying bug has now been fixed.
8160
24827db9
JB
81612013-07-01 Juanma Barranquero <lekktu@gmail.com>
8162
8163 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
8164 unlinking it (bug#14691).
8165
ef099a94
MN
81662013-06-30 Michal Nazarewicz <mina86@mina86.com>
8167
8168 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
8169 before checking whether buffer is modified. This lets
8170 `kill-buffer-query-functions' cancel killing of the buffer or save
8171 its content before `kill-buffer' asks user the "Buffer %s
8172 modified; kill anyway?" question.
8173
9d3f2fc2
JD
81742013-06-30 Jan Djärv <jan.h.d@swipnet.se>
8175
8176 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
8177 Let the super performKeyEquivalent deal with them (Bug#14747).
8178
e6c6c8c7
PE
81792013-06-30 Paul Eggert <eggert@cs.ucla.edu>
8180
1d71c1d9
PE
8181 * widget.c (resize_cb): Remove unused local.
8182
8f5f35cc
PE
8183 Do not use GTK 3 if it exists but cannot be compiled.
8184 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
8185 * xterm.c (x_error_handler) [!USE_GTK]:
8186 Do not use GTK 3.
8187
e6c6c8c7
PE
8188 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
8189
0ba54312
EZ
81902013-06-30 Eli Zaretskii <eliz@gnu.org>
8191
5d1c3286
EZ
8192 * intervals.c (get_local_map): Instead of aborting, clip POSITION
8193 to the valid range of values. (Bug#14753)
8194
0ba54312
EZ
8195 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
8196 when moving point by using the current glyph matrix. This avoids
8197 the need to force redisplay when this function is called in a
8198 loop.
8199
9c90cc06
PE
82002013-06-29 Paul Eggert <eggert@cs.ucla.edu>
8201
8202 Fix minor problems found by static checking.
8203 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
8204 Redo the latter's body to sidestep GCC parenthesization warnings.
8205 (setup_coding_system, detect_coding, detect_coding_system): Use them.
8206 * coding.c (detect_coding, detect_coding_system):
8207 * coding.h (struct undecided_spec):
8208 Use bool for boolean.
8209 * image.c (QCmax_width, QCmax_height): Now static.
8210 * xdisp.c (Fmove_point_visually): Remove unused local.
8211
4c672a0f
EZ
82122013-06-29 Eli Zaretskii <eliz@gnu.org>
8213
8214 * xdisp.c (Fmove_point_visually): New function.
8215
c1ea3abf
JB
82162013-06-28 Kenichi Handa <handa@gnu.org>
8217
8218 * coding.h (define_coding_undecided_arg_index): New enum.
8219 (coding_attr_index): New members
8220 coding_attr_undecided_inhibit_null_byte_detection,
8221 coding_attr_undecided_inhibit_iso_escape_detection,
8222 coding_attr_undecided_prefer_utf_8.
8223 (undecided_spec): New struct.
8224 (struct coding_system): New member `undecided' of the member
8225 `spec'.
8226
8227 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
8228 (detect_coding): Likewise.
8229 (detect_coding_system): Likewise.
8230 (Fdefine_coding_system_internal): New coding system properties
8231 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
8232 :prefer-utf-8.
8233 (syms_of_coding): Adjust for coding_arg_undecided_max.
8234
ba3de9e6
PE
82352013-06-28 Paul Eggert <eggert@cs.ucla.edu>
8236
8237 * image.c (x_from_xcolors): Remove unused local.
8238
547c9269
YM
82392013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8240
8241 Defer image data transfer between X client and server until actual
8242 display happens.
8243
8244 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
8245 and `mask_img'.
8246
8247 * image.c (Destroy_Image): Remove.
8248 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
8249 `mask_p', and `colors_p'. All uses changed.
8250 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
ef099a94
MN
8251 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
8252 New macros for `flags' arg to x_clear_image_1.
547c9269
YM
8253 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
8254 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
04b66ce7 8255 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
547c9269
YM
8256 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
8257 (image_get_x_image, image_unget_x_image): New functions or macros.
8258 (image_background, image_background_transparent, x_to_xcolors)
8259 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
8260 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
8261 instead of Destroy_Image.
8262 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
8263 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
8264 (png_load_body, jpeg_load_body, tiff_load, gif_load)
8265 (imagemagick_load_image, svg_load_image): Use them instead of
8266 x_create_x_image_and_pixmap, and x_put_x_image followed by
8267 x_destroy_x_image, respectively.
8268 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
8269 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
8270 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
8271 background_transparent fields.
8272 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
8273 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
8274
dae2f5ef
PE
82752013-06-27 Paul Eggert <eggert@cs.ucla.edu>
8276
8277 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
8278 This mostly consists of undoing recent changes.
8279 * callproc.c (Fcall_process):
8280 * process.c (create_process):
8281 Do not worry about catching SIGCHLD here, undoing previous change.
8282 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
8283 * process.c, process.h (catch_child_signal):
8284 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
8285 * process.c (catch_child_handler): Don't worry about being called
8286 lazily and do not assume caller has blocked SIGCHLD, undoing
8287 previous change. Move first-time stuff back to
8288 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
8289 tickle glib, as that causes Cygwin bootstrap to fail. Do not
8290 set lib_child_handler if it's already initialized, which may
a6c4680a 8291 help avoid problems on GNUstep.
dae2f5ef 8292
fa55d2aa
PE
82932013-06-23 Paul Eggert <eggert@cs.ucla.edu>
8294
8295 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
8296 * callproc.c (Fcall_process):
8297 * process.c (create_process):
8298 Make sure SIGCHLD is caught before we fork,
8299 since Emacs startup no arranges to catch SIGCHLD.
8300 * process.c (lib_child_handler): Initialize to null, not to
8301 dummy_handler.
8302 (catch_child_signal): Allow self to be called lazily.
8303 Do nothing if it's already been called.
8304 Assume caller has blocked SIGCHLD (all callers do now).
8305 * emacs.c (main): Do not catch SIGCHLD here; defer it until
8306 just before it's really needed.
8307 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
8308 since it hasn't been caught yet.
8309
f3f9606c
LMI
83102013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
8311
8312 * image.c (compute_image_size): New function to implement
8313 :max-width and :max-height.
8314 (imagemagick_load_image): Use it.
8315
c7041908
PE
83162013-06-23 Paul Eggert <eggert@cs.ucla.edu>
8317
8318 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
8319 * callproc.c, process.h (block_child_signal, unblock_child_signal):
8320 Now extern.
8321 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
8322 * process.c (catch_child_signal): Block SIGCHLD while futzing with
8323 the SIGCHLD handler, since the code is not atomic and (due to glib)
8324 signals may be arriving now.
8325 * sysdep.c (init_signals): Do not catch child signals here;
8326 'main' now does that later, at a safer time.
8327
f86852b4
PE
83282013-06-22 Paul Eggert <eggert@cs.ucla.edu>
8329
0dfeed58
PE
8330 Clean up SIGCHLD handling a bit (Bug#14569).
8331 * process.c, process.h (catch_child_signal):
8332 Now always extern, even if !NS_IMPL_GNUSTEP.
8333 * process.c (catch_child_signal): Move glib tickler here from
8334 init_process_emacs, so that it's done earlier in Emacs
8335 initialization. Also move the noninteractive && !initialized
8336 check here from init_process_emacs. This is all a bit cleaner for
8337 GNUish platforms, and I hope it works around the Cygwin bug.
8338 * sysdep.c (init_signals): Invoke catch_child_signal here, so
8339 that glib signal handling is tickled before glib creates threads.
8340
f86852b4
PE
8341 * process.c (wait_reading_process_output): Avoid int overflow
8342 when reading more than 2 GiB total from a process.
8343
cbd6509c
PE
83442013-06-21 Paul Eggert <eggert@cs.ucla.edu>
8345
8346 * process.c (create_process): Handle a couple more cases,
8347 i.e., work even if new_argv and wait_child_setup[i] are cached.
8348 Use Fcall_process's style for volatile vars.
8349
9de1114a
AS
83502013-06-21 Andreas Schwab <schwab@linux-m68k.org>
8351
8352 * process.c (create_process): Mark PROCESS volatile.
8353
fbe9e0b9
PE
83542013-06-21 Paul Eggert <eggert@cs.ucla.edu>
8355
8356 Use C99-style flexible array members if available.
8357 This avoids some subtle aliasing issues, which typically
8358 aren't a problem with GCC but may be a problem elsewhere.
8359 * alloc.c (sdata): New typedef, replacing the old struct sdata.
8360 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
8361 In either case, it uses a flexible array member rather than
8362 the old struct hack. All uses changed.
8363 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
8364 Adjust to sdata reorganization.
8365 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
8366 Use offsetof (struct, flex_array_member), not sizeof (struct), as
8367 that ports better to pre-C99 non-GCC.
8368 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
8369 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
8370 as the latter has changed.
8371 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
8372 and port better to pre-C99 GCC.
8373 * image.c (struct xpm_cached_color):
8374 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
8375 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
8376 Use FLEXIBLE_ARRAY_MEMBER.
8377 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
8378 Move decl to top level so it gets checked against implementation.
8379 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
8380 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
8381
1fc71008
PE
83822013-06-20 Paul Eggert <eggert@cs.ucla.edu>
8383
8384 * syntax.c: Integer cleanups.
8385 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
8386 All uses that need 0-or-2 changed to:
8387 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
8388 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
8389 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
8390 (char_quoted, prev_char_comend_first, back_comment)
8391 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
8392 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
8393 Use bool for boolean.
8394 (update_syntax_table, skip_chars, skip_syntaxes):
8395 Prefer int to unsigned when either will do.
8396 (back_comment): Return boolean success flag, like forw_comment,
8397 instead of positive-or-minus-1 (which might have overflowed int anyway).
8398 Don't stuff ptrdiff_t into int.
8399 (syntax_spec_code, syntax_code_spec): Now const.
8400 (Fmatching_paren, scan_lists, scan_sexps_forward):
8401 Use enum syntaxcode for syntax code.
8402 (Fmatching_paren): Check that arg is a character, not just an integer.
8403 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
8404 (Finternal_describe_syntax_value): Omit no-longer-needed
8405 comparison to 0.
8406 (skip_chars): Use char, not unsigned char, when the distinction
8407 doesn't matter.
8408 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
8409 * bytecode.c (exec_byte_code):
8410 * syntax.c (syntax_spec_code, Fchar_syntax)
8411 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
8412 (init_syntax_once):
8413 * syntax.h (SYNTAX_WITH_FLAGS):
8414 Omit unnecessary casts.
8415
b932cad7
EZ
84162013-06-20 Eli Zaretskii <eliz@gnu.org>
8417
8418 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
8419 line dimensions here, to avoid race conditions with the main
8420 thread. (Bug#14062, bug#14630, bug#14669)
8421
8422 * w32term.c (w32_draw_window_cursor): Compute the header line and
8423 mode line dimensions here.
8424 <w32_system_caret_window, w32_system_caret_hdr_height>:
8425 <w32_system_caret_mode_height>: New variables.
8426
8427 * w32term.h: Declare them.
8428
89561f72
PE
84292013-06-20 Paul Eggert <eggert@cs.ucla.edu>
8430
5013fc08
PE
8431 * alloc.c (die): Move "assertion failed" string here ...
8432 * lisp.h (eassert): ... from here. Also, suppress evaluation of
8433 COND when SUPPRESS_CHECKING. This shrinks the executable text
8434 size by 0.8% to 2.2% when configured with --enable-checking,
8435 depending on optimization flags (GCC 4.8.1 x86-64).
8436
89561f72
PE
8437 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
8438
763a086d 84392013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
89561f72
PE
8440
8441 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
8442 base is 2; this is more accurate.
8443
983aeb9a
JB
84442013-06-19 Juanma Barranquero <lekktu@gmail.com>
8445
8446 * sound.c (string_default): Move to !WINDOWSNT section.
8447 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
8448
178ba3e6
PE
84492013-06-19 Paul Eggert <eggert@cs.ucla.edu>
8450
bbc51b15
PE
8451 * sound.c: Integer cleanups.
8452 Remove unnecessary forward decls.
8453 (struct sound_device): The 'file' member is now a Lisp_Object, not
8454 a char *, so that we needn't invoke alloca on a huge size.
8455 (Fplay_sound_internal): Adjust to this.
8456 (string_default): New function.
8457 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
8458 Use it to adjust to the struct sound_device change.
8459 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
8460 (be2hs) [0]: Remove.
8461
178ba3e6
PE
8462 * syntax.c (skip_chars): Don't use uninitialized storage
8463 when searching a multibyte buffer for characters that are not in a
8464 unibyte string that contains non-ASCII characters.
8465
69f60cdc
JD
84662013-06-18 Jan Djärv <jan.h.d@swipnet.se>
8467
8468 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
8469 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
8470
0d6224d4
PE
84712013-06-18 Paul Eggert <eggert@cs.ucla.edu>
8472
8473 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
8474
3c542890
KH
84752013-06-18 Kenichi Handa <handa@gnu.org>
8476
f7e3f7cd
KH
8477 * font.c (Ffont_spec): Signal an error for an invalid font name
8478 (Bug#14648).
3c542890 8479
9349e5f7
PE
84802013-06-18 Paul Eggert <eggert@cs.ucla.edu>
8481
8482 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
8483 In particular this ports to 32-bit sparc Sun cc.
8484 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
8485 array with a dummy element at specpdl[-1], so that its address can
8486 be taken portably.
8487 (unbind_to): Do not copy the binding; not needed, now that we
8488 copy old_value in the one place where the copy is needed.
8489 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
8490 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
8491 (union specbinding): Rename from struct specbinding. Redo layout
8492 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
8493 which is not portable. With Sun C 5.12 32-bit sparc, the
8494 declaration causes nargs to be an unsigned bitfield, a behavior
8495 that the C standard allows; but Emacs wants nargs to be signed.
8496 The overall type is now a union of structures rather than a
8497 structure of union of structures, and the 'kind' member is now a
8498 bitfield, so that the overall type doesn't grow. All uses changed.
8499 * process.c (Fmake_serial_process): Remove unnecessary initialization.
8500
0a4df6a5
PE
85012013-06-17 Paul Eggert <eggert@cs.ucla.edu>
8502
ec6ecaad
PE
8503 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
8504 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
8505
0a4df6a5
PE
8506 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
8507
7bfe8dbc
EZ
85082013-06-17 Eli Zaretskii <eliz@gnu.org>
8509
8510 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
8511 unless we know that the window w's frame is a frame object.
8512 Another attempt at solving bug#14062 and bug#14630.
8513
708e05f6
LMI
85142013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
8515
8516 * textprop.c (property_set_type): New enum.
8517 (add_properties): Allow appending/prepending text properties.
8518 (add_text_properties_1): Factored out of Fadd_text_properties.
ef099a94 8519 (Fadd_text_properties): Move all the code into
708e05f6
LMI
8520 add_text_properties_1.
8521 (Fadd_face_text_property): New function that calls
8522 add_text_properties_1.
8523
84575e67
PE
85242013-06-17 Paul Eggert <eggert@cs.ucla.edu>
8525
8526 Move functions from lisp.h to individual modules when possible.
8527 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
8528 * alloc.c (XFLOAT_INIT, set_symbol_name):
8529 * buffer.c (CHECK_OVERLAY):
8530 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
8531 (set_char_table_parent):
8532 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
8533 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
8534 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
8535 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
8536 (set_blv_valcell):
8537 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
8538 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
8539 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
8540 (backtrace_args, backtrace_debug_on_exit):
8541 * floatfns.c (CHECK_FLOAT):
8542 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
8543 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
8544 (set_hash_hash, set_hash_hash_slot, set_hash_index)
8545 (set_hash_index_slot):
8546 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
8547 * marker.c (CHECK_MARKER):
8548 * textprop.c (CHECK_STRING_OR_BUFFER):
8549 * window.c (CHECK_WINDOW_CONFIGURATION):
8550 Move here from lisp.h, and make these functions static rather than
8551 extern inline.
8552 * buffer.c (Qoverlayp):
8553 * data.c (Qsubrp):
8554 * fns.c (Qhash_table_p):
8555 * window.c (Qwindow_configuration_p):
8556 Now static.
8557 * lisp.h: Remove the abovementioned defns and decls.
8558
44e18199 8559 Use functions, not macros, for XINT etc (Bug#11935).
84575e67
PE
8560 In lisp.h, prefer functions to function-like macros, and
8561 constants to object-like macros, when either will do. This:
8562 . simplifies use, as there's no more need to worry about
8563 arguments' side effects being evaluated multiple times.
8564 . makes the code easier to debug on some platforms.
8565 However, when using gcc -O0, keep using function-like macros
8566 for a few critical operations, for performance reasons.
8567 This sort of thing isn't needed with gcc -Og, but -Og
8568 is a GCC 4.8 feature and isn't widely-enough available yet.
8569 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
8570 Remove enum lsb_bits; no longer needed.
8571 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
8572 * buffer.c (Qoverlap):
8573 * data.c (Qsubrp):
8574 * fns.c (Qhash_table_p):
8575 Now extern, so lisp.h can use these symbols.
8576 * dispextern.h: Include character.h, for MAX_CHAR etc.
8577 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
8578 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8579 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
8580 (GLYPH_CODE_P): Move here from lisp.h.
8581 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8582 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
8583 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
8584 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
8585 XUNTAG now returns void *.
8586 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
8587 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
8588 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
8589 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
8590 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
8591 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
8592 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
8593 (lisp_h_XPNTR, lisp_h_XSYMBOL):
8594 New macros, renamed from their sans-lisp_h_ counterparts.
8595 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
8596 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
8597 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
8598 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
8599 If compiling via GCC without optimization, define these as macros
8600 in addition to inline functions.
8601 To disable this, compile with -DINLINING=0.
8602 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
8603 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
8604 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
8605 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
8606 (INTMASK, VALMASK): Now macros, since static values cannot be
8607 accessed from extern inline functions.
8608 (VALMASK): Also a constant, for benefit of old GDB.
8609 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
8610 is INTEGERP, which can fold it in.
5165d44a 8611 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
84575e67
PE
8612 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
8613 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
8614 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
8615 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
8616 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
8617 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
8618 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
8619 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
8620 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
8621 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
8622 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
8623 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
8624 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
8625 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
8626 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
8627 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
8628 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
8629 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
8630 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
8631 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
8632 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
8633 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
8634 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
8635 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
8636 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
8637 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
8638 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
8639 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
8640 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
8641 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
8642 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
8643 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
8644 Now functions.
8645 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
8646 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
8647 (VALMASK): Define in one place rather than in two, merging the
8648 USE_LSB_TAG parts; this is simpler.
8649 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
8650 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
8651 Move up, to avoid use before definition.
8652 Also include "globals.h" earlier, for the same reason.
8653 (make_natnum): New function.
8654 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
8655 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
8656 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
8657 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
8658 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
8659 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
8660 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
8661 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
8662 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
8663 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
8664 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
8665 (Qwindow_configuration_p, Qimage): New forward declarations.
8666 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
8667 (STRING_COPYIN): Remove; unused.
8668 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
8669 (xcar_addr, xcdr_addr): New functions. All uses changed.
8670 (IEEE_FLOATING_POINT): Now a constant, not a macro.
8671 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
8672 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8673 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
8674 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
8675 (TYPE_RANGED_INTEGERP): Simplify.
8676 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
8677 (setlocale, fixup_locale, synchronize_system_messages_locale)
8678 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
8679 Now empty functions, not macros.
8680 (functionp): Return bool, not int.
8681 * window.c (Qwindow_configuration_p): Now extern,
8682 so window.h can use it.
8683 * window.h (Qwindowp): Move decl back to lisp.h.
8684
9583ec36
EZ
86852013-06-15 Eli Zaretskii <eliz@gnu.org>
8686
8687 * xdisp.c (Fline_pixel_height): New function, required for solving
8688 bug #14567.
8689
210272ce
PE
86902013-06-15 Paul Eggert <eggert@cs.ucla.edu>
8691
8692 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
8693
de0503df
SM
86942013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
8695
8696 * lread.c (syms_of_lread):
8697 * fns.c (Fprovide): Adjust to new format of after-load-alist.
8698
afbfe143
KD
86992013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
8700
8701 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
8702
d177e213
XF
87032013-06-12 Xue Fuqiao <xfq.free@gmail.com>
8704
8705 * fileio.c (expand_file_name): Doc fix.
8706
05e3e412
PE
87072013-06-11 Paul Eggert <eggert@cs.ucla.edu>
8708
f7394b12
PE
8709 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
8710 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
8711 Wait for self, not for 0. This can't hurt on GNU or similar
8712 system, and may help with Cygwin.
8713
05e3e412
PE
8714 * keyboard.c: Don't use PROP (...) as an lvalue.
8715 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
8716 Use set_prop (A, B), not PROP (A) = B.
8717
17dd3097
EZ
87182013-06-10 Eli Zaretskii <eliz@gnu.org>
8719
8720 * xdisp.c (get_it_property): Use it->window instead of generating
8721 a Lisp object from it->w.
8722
52fab9c9
EZ
87232013-06-09 Eli Zaretskii <eliz@gnu.org>
8724
8725 * xdisp.c (get_it_property): If it->object is a buffer, pass to
8726 get-char-property the window that is being rendered, instead of
8727 the buffer, to support window-specific overlays. (Bug#14575)
ad257d4f
EZ
8728 (compute_display_string_pos): When W is NULL, use the current
8729 buffer as the object to pass to get-char-property.
8730 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
8731 pointer member of the bidi iterator, since no window is pertinent
8732 to this function.
52fab9c9 8733
5bf97bfc
EZ
87342013-06-08 Eli Zaretskii <eliz@gnu.org>
8735
8736 * bidi.c (bidi_fetch_char): Accept additional argument, the window
8737 being displayed, and pass it to compute_display_string_pos.
8738 (bidi_level_of_next_char, bidi_resolve_explicit_1)
8739 (bidi_paragraph_init): All callers changed.
8740
8741 * xdisp.c (init_from_display_pos, init_iterator)
8742 (handle_single_display_spec, next_overlay_string)
8743 (get_overlay_strings_1, reseat_1, reseat_to_string)
e7b41c4c
JB
8744 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
8745 Set bidi_it.w member from it->w.
5bf97bfc
EZ
8746 (compute_display_string_pos): Accept additional argument, the
8747 window being displayed, and pass it to Fget_char_property.
8748 (Bug#14575)
8749
8750 * dispextern.h (struct bidi_it): New member w, the window being
8751 displayed.
8752 (compute_display_string_pos): Adjust prototype.
8753
5de0e011
JD
87542013-06-08 Jan Djärv <jan.h.d@swipnet.se>
8755
e7b41c4c 8756 * xgselect.c: Remove unneeded include xterm.h.
b33f93ee
JD
8757
8758 * process.c (wait_reading_process_output): Check for NS before GLIB.
8759 GLIB may be linked in due to rsvg, but ns_select must be called.
8760
5de0e011
JD
8761 * xgselect.c (xg_select): Remove call to window_system_available
8762 and g_main_context_pending at the top, so Gdk events (i.e. file
8763 notify) are processed when Emacs is started with -nw.
8764
a822acff
EZ
87652013-06-07 Eli Zaretskii <eliz@gnu.org>
8766
8767 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
8768 (ctagsfiles3): New variable, includes only *.m files.
8769 (TAGS): Use an explicit language name in the regular expressions,
8770 to avoid transformation of '/SOMETHING' by MSYS to
8771 'c:\MSYS\SOMETHING'.
8772
6c0a9ed1
RC
87732013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
8774
8775 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
8776
9ef6111b
EZ
87772013-06-06 Eli Zaretskii <eliz@gnu.org>
8778
8779 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
8780 still need to set the mouse pointer shape and activate help-echo.
8781 (Bug#14558)
8782
7d300d64
PE
87832013-06-06 Paul Eggert <eggert@cs.ucla.edu>
8784
8785 A few porting etc. fixes for the new file monitor code.
8786 See the thread containing
8787 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
8788 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
8789 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
8790 (dir_monitor_callback, Fgfile_rm_watch):
8791 Use assq_no_quit instead of Fassoc, for speed.
8792 (dir_monitor_callback, Fgfile_rm_watch):
8793 eassert that the monitor is a fixnum.
8794 (dir_monitor_callback): No need for CDR_SAFE.
8795 Simplify building of lisp with alternative tails.
8796 (Fgfile_add_watch, Fgfile_rm_watch):
8797 Do not assume glib functions set errno reliably on failure.
8798 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
8799 and signal an error otherwise.
8800 (Fgfile_rm_watch): Prefer CONSP to !NILP.
8801 Use Fdelq instead of Fdelete, for speed.
8802
817ebfcf
EZ
88032013-06-05 Eli Zaretskii <eliz@gnu.org>
8804
8805 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
8806 don't insist on being invoked on a highlighted tool-bar button.
8807 Avoids losing tool-bar functionality when mouse-highlight is nil.
8808 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
8809 Don't highlight when mouse-highlight is nil.
8810 (note_mouse_highlight): When mouse-highlight is nil, don't return
8811 right away; instead, run tool-bar and mode-line highlight
8812 subroutine, clear any existing highlight, and revert the mouse
8813 pointer to its default shape. (Bug#14558)
8814
55577e7c
SM
88152013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
8816
8817 * lisp.mk (lisp): Add prog-mode.el.
8818
f019a684
PE
88192013-06-05 Paul Eggert <eggert@cs.ucla.edu>
8820
8821 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
8822 * process.c (dummy_handler): New function.
8823 (lib_child_handler): New static var.
8824 (handle_child_signal): Invoke it.
8825 (catch_child_signal): If a library has set up a signal handler,
8826 save it into lib_child_handler.
8827 (init_process_emacs): If using glib and not on Windows, tickle glib's
8828 child-handling code so that it initializes its private SIGCHLD handler.
8829 * syssignal.h (SA_SIGINFO): Default to 0.
8830 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
8831 31; it should no longer be needed now.
8832
90db8702
MA
88332013-06-05 Michael Albinus <michael.albinus@gmx.de>
8834
8835 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
8836
8837 * gfilenotify.c (globals_of_gfilenotify): New function.
8838 (syms_of_gfilenotify): Move global initialization there.
8839
8840 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
8841
bfa3acd6
SM
88422013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
8843
8844 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
8845 * keyboard.c (menu_bar_items, tool_bar_items):
8846 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
8847 not override local keymaps any more.
8848
ba59bd80
EZ
88492013-06-04 Eli Zaretskii <eliz@gnu.org>
8850
8851 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
8852
7f203aa1
EZ
88532013-06-03 Eli Zaretskii <eliz@gnu.org>
8854
9337e206
EZ
8855 * w32console.c (initialize_w32_display): Return the dimensions of
8856 the console window via 2 additional arguments, not via the current
8857 frame. This avoids crashes due to overrunning the bounds of
8858 frame's decode_mode_spec_buffer, which is not resized following
8859 the change of the frame dimensions from the initial 10x10.
8860
8861 * w32term.h (w32_initialize_display_info): Adjust prototype.
8862
8863 * term.c (init_tty): Take dimensions of the frame from the values
8864 returned by initialize_w32_display.
8865
7f203aa1
EZ
8866 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
8867 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
8868 (LIBES): Add $(GFILENOTIFY_LIBS).
8869
8870 * w32inevt.c (handle_file_notifications): Add dummy implementation
8871 for !HAVE_W32NOTIFY.
8872
8873 * w32term.c: Wrap code with HAVE_W32NOTIFY.
8874
55a87246
JD
88752013-06-03 Jan Djärv <jan.h.d@swipnet.se>
8876
8877 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
8878
8879 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
8880
8881 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
8882
3d5ee10a
PE
88832013-06-03 Paul Eggert <eggert@cs.ucla.edu>
8884
8885 Fix minor problems found by static checking.
8886 * data.c (pure_write_error):
8887 Use xsignal2, not Fsignal, as Fsignal might return.
8888 * eval.c (set_backtrace_debug_on_exit): Now static.
8889 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
8890 No longer inline. EXTERN_INLINE is needed only for functions
8891 defined in .h files. Reindent function header as per GNU style.
8892 (backtrace_p, backtrace_top, backtrace_next):
8893 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
8894 compiler or linker. Add extern decls to pacify gcc -Wall.
8895 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
8896 Now static.
8897 * frame.c (free_monitors): Define only on platforms that need it.
8898 * nsterm.m (ns_term_init):
8899 * process.c (catch_child_signal):
8900 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
8901 defined on all porting targets these days.
8902 * process.c, process.h (catch_child_signal):
8903 Make it extern only if NS_IMPL_GNUSTEP is defined.
8904
e2d8a6f0
EZ
89052013-06-03 Eli Zaretskii <eliz@gnu.org>
8906
8907 * w32.c (gettimeofday): Make the signature identical to prototype
8908 in nt/inc/sys/time.h.
8909
a8a7c5f6
SM
89102013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
8911
8912 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
8913 .gdbinit.
8914
8915 * keyboard.c (safe_run_hooks_error): Improve error message.
8916
8917 * data.c (pure_write_error): Add `object' argument.
8918 * puresize.h (CHECK_IMPURE): Use it.
8919
c9628c79
MA
89202013-06-03 Michael Albinus <michael.albinus@gmx.de>
8921
8922 * Makefile.in (NOTIFY_OBJ): New variable.
8923 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
8924
8925 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
8926 Call syms_of_gfilenotify.
8927
8928 * gfilenotify.c: New file.
8929
8930 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
8931 and Qfile_w32notify.
8932 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
8933 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
8934
8935 * lisp.h: Declare syms_of_gfilenotify.
8936
8937 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
8938
2f592f95
SM
89392013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
8940
8941 Merge the specpdl and backtrace stacks. Make the structure of the
8942 specpdl entries more obvious via a tagged union of structs.
8943 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
8944 (enum specbind_tag): New enum.
8945 (struct specbinding): Make it a tagged union of structs.
8946 Add a case for backtrace records.
8947 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
8948 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
8949 (backtrace_debug_on_exit): New accessors.
8950 (struct backtrace): Remove.
8951 (struct catchtag): Remove backlist field.
8952 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8953 Move to eval.c.
8954 (Flocal_variable_p): Speed up the common case where the binding is
8955 already loaded.
8956 * eval.c (backtrace_list): Remove.
8957 (set_specpdl_symbol, set_specpdl_old_value): Remove.
8958 (set_backtrace_args, set_backtrace_nargs)
8959 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
8960 (backtrace_next): New functions.
8961 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
8962 (unwind_to_catch, internal_lisp_condition_case)
8963 (internal_condition_case, internal_condition_case_1)
8964 (internal_condition_case_2, internal_condition_case_n): Don't bother
8965 with backtrace_list any more.
8966 (Fsignal): Adjust to new backtrace format.
8967 (grow_specpdl): Move up.
8968 (record_in_backtrace): New function.
8969 (eval_sub, Ffuncall): Use it.
8970 (apply_lambda): Adjust to new backtrace format.
8971 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
8972 data.c.
8973 (specbind): Adjust to new specpdl format. Simplify.
8974 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
8975 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
8976 backtrace format.
8977 (mark_backtrace): Remove.
8978 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
8979 * xdisp.c (redisplay_internal): Use record_in_backtrace.
8980 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
8981 Use mark_specpdl.
8982 * profiler.c (record_backtrace): Use get_backtrace.
8983 (handle_profiler_signal): Use backtrace_top_function.
8984 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
8985 accessor functions.
8986
c0342369
JD
89872013-06-02 Jan Djärv <jan.h.d@swipnet.se>
8988
8989 * process.h (catch_child_signal): Declare.
8990
8991 * process.c (catch_child_signal): New function.
8992 (init_process_emacs): Call it.
8993
8994 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
8995 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
8996 NS_IMPL_COCOA.
8997 (x_set_cursor_type): Remove declaration.
8998 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
a6c4680a 8999 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
c0342369
JD
9000 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
9001 (ns_get_color): Use F suffix on float.
9002 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
9003 (ns_get_rgb_color): Remove.
9004 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
9005 (note_mouse_movement): x and y are CGFloat.
9006 (ns_draw_fringe_bitmap): Remove unused rowY.
9007 Change #if to COCOA && >= 10_6.
9008 (ns_draw_window_cursor): Remove unused overspill.
9009 (ns_draw_underwave): width and x are EamcsCGFloat.
9010 (ns_draw_box): thickness is CGFloat.
9011 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
9012 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
9013 if not in main thread.
9014 (ns_get_pending_menu_title, ns_check_menu_open)
9015 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
9016 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
9017 (sendFromMainThread:): New method.
9018 (changeFont:): size is CGFloat.
9019 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
9020 Disable warning about permanent text.
a6c4680a 9021 (characterIndexForPoint:): Adjust return type depending on GNUstep
c0342369
JD
9022 version.
9023 (mouseDown:): delta is CGFloat.
9024 (updateFrameSize): Remove unised variable f.
9025 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
9026 Cast float to EmacsCGFloat.
9027 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
9028 also to -1 when restoring.
9029 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
9030 inside NS_IMPL_COCOA.
9031 (toggleFullScreen:): Put call to toggleFullScreen inside
9032 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
9033 (setPosition:portion:whole:): por is CGFloat.
9034 (getMouseMotionPart:window:x:y:): Add F suffix to float.
9035 (mouseDown:): Use CGFloat.
9036 (mouseDragged:): Remove unised variable edge.
9037 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
9038
a6c4680a 9039 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
c0342369
JD
9040 of CGFloat differs.
9041 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
9042 when NS_IMPL_GNUSTEP.
9043 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
9044 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
9045 (EmacsToolbar): Add clearAll. Add tag argument to
9046 addDisplayItemWithImage.
9047 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
9048
9049 * nsselect.m (ns_get_local_selection): Remove unused variable type.
9050
9051 * nsmenu.m (ns_update_menubar): Make static.
9052 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
9053 (fillWithWidgetValue:): Add cast to SEL for setAction.
9054 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
a6c4680a 9055 (update_frame_tool_bar): Update code for GNUstep.
c0342369
JD
9056 (clearAll): New method.
9057 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
4f405069 9058 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
e7b41c4c 9059 Move identifierToItem setObject and activeIdentifiers addObject before
c0342369
JD
9060 call to insertItemWithItemIdentifier.
9061 (validateVisibleItems): Fix indentation.
9062 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
9063 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
9064 UtilityWindow to aStyle, remove call to setStyleMask.
9065
9066 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
9067
9068 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
9069 (ns_charset_covers, ns_get_covering_families, nsfont_open):
9070 Use F suffix on floats.
9071 (ns_char_width): Returns CGFloat.
9072 (ns_ascii_average_width): w is CGFloat instead of float.
e7b41c4c 9073 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
c0342369
JD
9074 DPSxshow.
9075 (ns_glyph_metrics): CGFloat instead of float.
9076
a0eb10b3
JB
9077 * nsfns.m (x_set_foreground_color, x_set_background_color):
9078 Use EmacsCGFloat.
9079 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
9080 remove unused variables.
9081 (Fns_read_file_name): Keep track if panel is for save.
9082 Use ns_filename_from_panel/ns_directory_from_panel.
c0342369 9083 (Fns_list_services): delegate only used for COCOA.
a6c4680a
GM
9084 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
9085 Just return the input if GNUstep.
c0342369
JD
9086 (x_screen_planes): Remove.
9087 (Fxw_color_values): Use EmacsCGFloat
9088 (Fns_display_monitor_attributes_list): Only get screen number for
9089 Cocoa.
ef099a94 9090 (getDirectory, getFilename): Remove from EmacsOpenPanel and
c0342369
JD
9091 EmacsSavePanel.
9092 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
9093 ns_directory_from_panel.
9094
da9aff11
PE
90952013-06-01 Paul Eggert <eggert@cs.ucla.edu>
9096
9097 * process.c (handle_child_signal): Also use WCONTINUED.
9098 This is so that list-processes doesn't mistakenly list the process
9099 as stopped, when the process has actually been continued and is
9100 now running.
9101
0e64479a
PE
91022013-05-31 Paul Eggert <eggert@cs.ucla.edu>
9103
fc186a96
PE
9104 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
9105 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
9106 not already configured.
9107
0e64479a
PE
9108 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
9109
38b787fa
EZ
91102013-05-29 Eli Zaretskii <eliz@gnu.org>
9111
9112 * Makefile.in (mostlyclean): Remove *.res files.
9113
22513e52
SM
91142013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
9115
9116 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
9117 a buffer (bug#8447).
9118
6ef3db10
EZ
91192013-05-27 Eli Zaretskii <eliz@gnu.org>
9120
9121 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
9122 display vector, and we backtrack, handle the case that the
9123 previous character position is also displayed from a display
9124 vector or covered by a display string or image. (Bug#14476)
9125
6799bb26
JD
91262013-05-25 Jan Djärv <jan.h.d@swipnet.se>
9127
9128 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
9129 (struct MonitorInfo, free_monitors): Remove.
9130 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
9131 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
9132 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
9133 Qframes, Qsource.
9134
9135 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
9136 (struct MonitorInfo, free_monitors): Remove.
9137 (ns_screen_name): Make static.
9138 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
9139 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
9140 Qframes, Qsource.
9141
9142 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
9143 (struct MonitorInfo): New struct.
9144 (free_monitors, make_monitor_attribute_list): Declare.
9145
22513e52
SM
9146 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
9147 New Lisp_Object:s.
6799bb26
JD
9148 (free_monitors, make_monitor_attribute_list): New functions.
9149 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
9150 Qsource.
9151
38cd43eb
XF
91522013-05-25 Xue Fuqiao <xfq.free@gmail.com>
9153
9154 * callproc.c (call_process): Refine the doc string. (Bug#14045)
9155
2af0948d
SM
91562013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
9157
a7eb9b0f
SM
9158 * keyboard.c: Apply keyboard decoding only to events that come directly
9159 from the tty, not from unread-command-events (bug#14368).
0f1d2934 9160 (read_event_from_main_queue): New function, extracted from read_char.
a7eb9b0f
SM
9161 (read_decoded_char): Remove.
9162 (read_decoded_event_from_main_queue): New function to replace it.
9163 (read_char): Use it.
9164 (read_key_sequence): Use read_char rather than read_decoded_char.
9165
2af0948d
SM
9166 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
9167
9698f11c 91682013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
1413e9a5
BR
9169
9170 * casetab.c (init_casetab_once): Fix last change (bug#14424).
9171
e6d2f155
KH
91722013-05-22 Kenichi Handa <handa@gnu.org>
9173
9174 The following changes are to fix the setting of
9175 buffer-file-coding-system on, for instance, C-x RET c unix RET
9176 _FILE_OF_DOS_EOL_TYPE_ RET.
9177
9178 * coding.h (struct coding_system): New member detected_utf8_chars.
9179
9180 * coding.c (detect_coding_utf_8): Count characters and check EOL
9181 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
9182 BOM is there.
9183 (setup_coding_system): Do not initialize coding->head_ascii.
9184 (check_ascii): Do not set coding->eol_seen but update it. Do not
9185 call adjust_coding_eol_type here.
1413e9a5
BR
9186 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
9187 If the eol-type of CODING is already specified, adjust the eol type
e6d2f155
KH
9188 of the found coding-system.
9189 (decode_coding_gap): Cancel previous change. Utilize the
9190 character numbers counted by detect_coding_utf_8. Fix detection
9191 of BOM for utf-8.
9192
9698f11c 91932013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
fc30d803
SM
9194
9195 * search.c (looking_at_1): Only set last_thing_searched if the match
9196 changed the match-data (bug#14281).
9197
ecc3c6ed
DA
91982013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
9199
9200 * xdisp.c (reseat_at_previous_visible_line_start):
a0eb10b3 9201 Already declared in dispextern.h, so remove it here.
ecc3c6ed
DA
9202 (move_it_vertically_backward): Likewise.
9203
5ba8bf35
YM
92042013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9205
9206 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
d6635ba2 9207 (Fx_display_pixel_width, Fx_display_pixel_height)
fc30d803
SM
9208 (Fx_display_mm_width, Fx_display_mm_height):
9209 Mention `display-monitor-attributes-list' in docstrings.
5ba8bf35 9210
91e8418b 9211 * nsfns.m (ns_get_screen): Remove function. All uses removed.
a0eb10b3 9212 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
91e8418b
YM
9213 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
9214 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
9215 (Fx_display_backing_store, Fx_display_visual_class)
9216 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
9217 (Fx_display_grayscale_p, Fx_display_pixel_width)
9218 (Fx_display_pixel_height, Fx_display_planes)
9219 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
9220 (Fx_display_screens): Don't confuse X11 screens with NS screens.
9221 (Fx_display_mm_width, Fx_display_mm_height)
9222 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
9223 height for all physical monitors as in X11.
9224
fc30d803
SM
9225 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
9226 Return pixel width or height for all physical monitors as in X11.
91e8418b 9227
31ff141c
PE
92282013-05-18 Paul Eggert <eggert@cs.ucla.edu>
9229
9230 Port --enable-gcc-warnings to clang.
9231 * bytecode.c (exec_byte_code):
9232 * regex.c:
9233 Redo diagnostic pragmas to pacify clang, too.
9234 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
9235 * editfns.c (Fencode_time):
9236 * fileio.c (file_accessible_directory_p):
9237 * font.c (font_unparse_xlfd):
9238 Use '&"string"[index]' instead of '"string" + (index)'.
9239 * undo.c (user_error): Remove; unused.
9240
df065a0b
EZ
92412013-05-16 Eli Zaretskii <eliz@gnu.org>
9242
04d360e7
EZ
9243 * insdel.c (insert_1_both): Document the arguments, instead of
9244 referring to insert_1, which no longer exists.
9245
5bb98290
EZ
9246 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
9247 some window, increment windows_or_buffers_changed, so that
9248 *Messages* display in that window is updated. (Bug#14408)
9249
df065a0b
EZ
9250 * w32.c: Include epaths.h.
9251 (init_environment): Use cmdproxy.exe without leading directories.
9252 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
9253 case.
9254 (gettimeofday): Adjust signature and return value to Posix
9255 expectations.
9256
9257 * unexw32.c (open_output_file): Delete the existing emacs.exe
9258 before creating it, to break the hard link to the versioned
9259 executable.
9260
9261 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
9262 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
9263 (FIRSTFILE_OBJ): New variables.
9264 (W32_RES): Rename to EMACSRES. All users changed.
9265 (base_obj): Use $(CM_OBJ).
9266 (ALLOBJS): Use $(FIRSTFILE_OBJ).
9267 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
9268 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
9269 $(W32_RES_LINK) before $(LIBES).
9270 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
9271
1aa8d505
SM
92722013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9273
6e911150
SM
9274 * makefile.w32-in (DOC): Use just "DOC".
9275
9276 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
9277
1aa8d505
SM
9278 * process.c: Export default filters and sentinels to Elisp.
9279 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
9280 New constants.
9281 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
9282 (Fset_process_sentinel, Fformat_network_address):
9283 Default to them instead of nil.
9284 (server_accept_connection): Sentinels can't be nil any more.
9285 (read_and_dispose_of_process_output): New function, extracted from
9286 read_process_output.
9287 (read_process_output): Use it; filters can't be nil.
9288 (Finternal_default_process_filter): New function, extracted from
9289 read_process_output.
9290 (exec_sentinel_unwind): Remove function.
9291 (exec_sentinel): Don't zilch sentinel while running.
9292 (status_notify): Sentinels can't be nil.
9293 (Finternal_default_process_sentinel): New function extracted from
9294 status_notify.
9295 (setup_process_coding_systems): Default filter is not nil any more.
9296 (syms_of_process): Export new Elisp functions and initialize
9297 new constants.
9298 * lisp.h (make_lisp_proc): New function.
9299
5ac2eb34
SM
93002013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9301
9302 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
9303
eda9c7d7
EZ
93042013-05-14 Eli Zaretskii <eliz@gnu.org>
9305
9306 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
5ac2eb34
SM
9307 unless we know that the window w is a leaf window.
9308 Another attempt at solving bug#14062.
eda9c7d7 9309
8fdeaad5
JD
93102013-05-14 Jan Djärv <jan.h.d@swipnet.se>
9311
9312 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
9313 fdesc (Bug#14375).
9314
44aa9ee6
PE
93152013-05-12 Paul Eggert <eggert@cs.ucla.edu>
9316
9317 * image.c (gif_load): Check that subimages fit (Bug#14345).
9318
759fd763
SM
93192013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
9320
9321 * lread.c (skip_dyn_eof): New function.
9322 (read1): Use it to skip the end of a file in response to #@00.
9323
9324 * doc.c (get_doc_string): Slightly relax the sanity checking.
9325
4465bfb4
JD
93262013-05-09 Jan Djärv <jan.h.d@swipnet.se>
9327
9328 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
9329 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
9330 (MonitorInfo): New struct.
9331 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
9332 (Fns_display_monitor_attributes_list): New functions.
9333 (display-usable-bounds): Remove.
9334 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
9335 Qsource.
9336
7583e2a0
PE
93372013-05-09 Paul Eggert <eggert@cs.ucla.edu>
9338
9339 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
9340 (GTK_CHECK_VERSION): New macro, if not already defined.
9341 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
9342 replaced by GTK_CHECK_VERSION.
9343
ad75d77e
PE
93442013-05-08 Paul Eggert <eggert@cs.ucla.edu>
9345
9346 * xterm.h (GTK_PREREQ): New macro.
9347 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
9348 to use this macro instead, for consistency and clarity.
9349
07525f77
EZ
93502013-05-08 Eli Zaretskii <eliz@gnu.org>
9351
9352 * xdisp.c (row_for_charpos_p): New function, with code of
9353 cursor_row_p, but accepts an additional argument CHARPOS instead
9354 of using a hardcoded PT.
9355 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
9356 (row_containing_pos): Call row_for_charpos_p instead of partially
9357 doing the same. Fixes cursor positioning under longlines-mode
9358 when longlines-show-effect includes more than one newline, when
9359 moving the cursor vertically up.
9360
d901fc8d
JB
93612013-05-08 Juanma Barranquero <lekktu@gmail.com>
9362
9363 * makefile.w32-in (ACL_H): New macro.
9364 ($(BLD)/fileio.$(O)): Update dependencies.
9365
f269bc61
PE
93662013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9367
e7b41c4c 9368 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
ffdc270a
PE
9369 * Makefile.in (LIB_ACL): New macro.
9370 (LIBACL_LIBS): Remove.
9371 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
9372 * fileio.c: Include <acl.h>.
9373 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
9374 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
9375 !acl_errno_valid.
9376 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
9377 it ourselves.
9378
f269bc61
PE
9379 * unexelf.c: Don't assume ElfW (Half) fits in int.
9380 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
9381 when dealing with ElfW (Half) values, since they can exceed 2**31
9382 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
9383 (entry_address): Omit unused NUM arg. All uses changed.
9384
a261c53e
JL
93852013-05-07 Juri Linkov <juri@jurta.org>
9386
9387 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
9388 to the string converted from number with `Fnumber_to_string'.
9389 (Bug#14254)
9390
2b66427d
PE
93912013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9392
9393 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
9394 This fixes a problem introduced by my previous change.
9395
15acfe41
GM
93962013-05-07 Glenn Morris <rgm@gnu.org>
9397
9398 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
9399
5ea03bf5
JD
94002013-05-07 Jan Djärv <jan.h.d@swipnet.se>
9401
9402 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
9403
e0c9d565
PE
94042013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9405
9406 Static checking by GCC 4.8.0.
9407 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
9408 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
9409 (x_get_monitor_attributes_fallback)
9410 (x_get_monitor_attributes_xinerama)
9411 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
9412 Define only if USE_GTK.
9413 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
9414 (x_get_monitor_attributes_fallback): Omit unused locals.
9415 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
9416 Use double, not float, to avoid mixed-mode floating point arithmetic.
9417
4e3f9230
YM
94182013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9419 Jan Djärv <jan.h.d@swipnet.se>
9420
9421 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
9422 (XINERAMA_CFLAGS): New macros.
9423 (ALL_CFLAGS, LIBES): Use them.
9424
9425 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
9426 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
9427 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
9428 (syms_of_xfns): DEFSYM them.
9429 (struct MonitorInfo): New struct.
9430 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
9431 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
9432 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
9433 (x_get_monitor_attributes_xinerama): New functions.
9434 (Fx_display_monitor_attributes_list): New primitive.
9435 (syms_of_xfns): Defsubr it.
9436
9437 * xterm.h (x_display_info): Add Xatom_net_workarea and
9438 Xatom_net_current_desktop.
9439
9440 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
9441 and dpyinfo->Xatom_net_current_desktop.
9442
05839b6a
EZ
94432013-05-06 Eli Zaretskii <eliz@gnu.org>
9444
9445 * xdisp.c (pos_visible_p): Use the special code for finding the
9446 beginning of a display property or overlay for any "replacing"
9447 display property, not just for display strings. This solves
9448 incorrect reporting of position by posn-at-point. (Bug#14241)
9449
dc4a2ee0
PE
94502013-05-06 Paul Eggert <eggert@cs.ucla.edu>
9451
5ee94506
PE
9452 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
9453 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
9454 Verify that ElfW (Half) fits in int.
9455 (fatal): Use same signature as lisp.h.
9456 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
9457 configure and build with -DUNEXELF_DEBUG without worrying about
9458 other modules that use DEBUG.
9459 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
9460 possibly-wide integers now uses it instead of plain fprintf.
9461 (entry_address): New function, which avoids problems with 32-bit
9462 overflow on 64-bit hosts.
9463 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
9464 (round_up): Don't assume the remainder fits in int.
9465 (find_section): Use bool for boolean. Simplify debug code.
9466 (unexec): Don't assume file sizes fit in int or size_t.
9467 Omit unnecessary trailing newline in 'fatal' format.
9468 Use strerror rather than outputting decimal error number.
9469 Remove unused code when emacs is not defined;
9470 this file relies on Emacs now.
9471 Don't assume e_phnum and e_shnum are positive.
9472
dc4a2ee0
PE
9473 * regex.c: Fix problems when DEBUG is defined.
9474 (extract_number, extract_number_and_incr): Define regardless of
9475 whether DEBUG is defined; that's simpler and makes the code less
9476 likely to go stale in the normal case when DEBUG is not defined.
9477 Return int rather than taking an int * arg. All callers changed.
9478 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
9479 Remove, replacing with ...
9480 (DEBUG_PRINT): New macro. All callers changed.
9481 (DEBUG_COMPILES_ARGUMENTS): New macro.
9482 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
9483 (print_compiled_pattern, print_double_string) [DEBUG]:
9484 Use prototype rather than old-style definition.
9485 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
9486 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
9487 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
9488 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
9489 Don't assume ptrdiff_t, size_t, and long are the same width as int.
9490 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
9491 This matters only when DEBUG is defined.
9492
14c7ed05
EZ
94932013-05-05 Eli Zaretskii <eliz@gnu.org>
9494
9495 * xdisp.c (set_iterator_to_next): Set the
9496 ignore_overlay_strings_at_pos_p flag only if we are _really_
9497 iterating over an overlay string, as indicated by the
9498 current.overlay_string_index member. (Bug#14306)
9499
e6076b1b
JD
95002013-05-05 Jan Djärv <jan.h.d@swipnet.se>
9501
9502 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
9503 to where it is used, to avoid autorelease issues (Bug#14050).
9504
cbee2131
PE
95052013-05-05 Paul Eggert <eggert@cs.ucla.edu>
9506
9507 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
9508 * fileio.c (syms_of_fileio): Implement this.
9509 * filelock.c (create_lock_file): If symbolic links don't work, so
9510 we use a regular file as a lock file, do not fsync the lock file;
9511 it's not needed.
9512
30c7e542
SM
95132013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9514
9515 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
9516 (syms_of_minibuf): Adjust accodingly.
9517 * lread.c (Fread):
9518 * callint.c (Fcall_interactively): Adjust calls accordingly.
9519
5bebd186
EZ
95202013-05-04 Eli Zaretskii <eliz@gnu.org>
9521
9522 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
30c7e542
SM
9523 w->contents is a buffer before computing everything else.
9524 Use parentheses to disambiguate last part of the condition.
5bebd186
EZ
9525
9526 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
9527 assertion violations. (Bug#14062)
9528
0fb0a4f3
DR
95292013-05-01 David Reitter <david.reitter@gmail.com>
9530
9531 * nsfns.m (ns_tooltip): Initialize.
9532
9e63b4a5
EZ
95332013-04-28 Eli Zaretskii <eliz@gnu.org>
9534
9535 * coding.c (decode_coding_gap): Don't remove the character before
9536 a newline unless it's a CR character. (Bug#14287)
9537
ad60824e
DN
95382013-04-28 Dan Nicolaescu <dann@gnu.org>
9539
9540 * dispextern.h (struct face): Move enum face_underline_type
9541 earlier so that bitfields can be in the same word.
9542
edbdcec0
JD
95432013-04-28 Jan Djärv <jan.h.d@swipnet.se>
9544
9545 * nsfns.m (handlePanelKeys): New function.
9546 (EmacsOpenPanel:performKeyEquivalent:)
9547 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
9548 arrows/function/control and copy/paste keys (Bug#14296).
9549
0208ede7
JL
95502013-04-27 Juri Linkov <juri@jurta.org>
9551
9552 * callint.c (Fcall_interactively): Call `Qread_number' for
9553 interactive code letter `n' instead of using duplicate code.
9554 (Bug#14254)
9555
b8dd59f7
PE
95562013-04-27 Paul Eggert <eggert@cs.ucla.edu>
9557
9558 * systime.h (make_timeval): Declare as 'const'.
9559
8bd722db
KH
95602013-04-27 Kenichi Handa <handa@gnu.org>
9561
9562 * font.c (font_open_entity): Always open a font of manageable
9563 size.
9564
13d0e56f 95652013-04-26 Paul Eggert <eggert@cs.ucla.edu>
cbee2131 9566
f780d632
PE
9567 Port better to AIX (Bug#14258).
9568 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
9569 to pacify AIX xlc.
9570
ec509856
KH
95712013-04-24 Kenichi Handa <handa@gnu.org>
9572
9573 * coding.c (decode_coding_iso_2022): When an invalid escape
9574 sequence is encountered, reset the invocation and designation
9575 status to the safest one.
9576
84fc48e5
PE
95772013-04-22 Paul Eggert <eggert@cs.ucla.edu>
9578
9579 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
9580 Without this fix, "make distclean" leaves stamp-h1 behind.
9581
806bda47
EC
95822013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
9583
9584 * w32fns.c (w32_fullscreen_rect): New function to compute the
9585 window rectangle for the given fullscreen mode.
9586 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
9587 longer tunes the window size. This keeps the window's edges flush
9588 with the screen and allows the taskbar to hide itself in fullboth.
9589
9590 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
9591 window decorations and uses the entire screen.
9592
9593 * w32term.h (w32_fullscreen_rect) Add prototype.
9594 (struct w32_output): Replace normal_width, normal_height,
9595 normal_top, and normal_left members with a single normal_placement
9596 struct.
9597 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
9598 Remove macros.
9599 (FRAME_NORMAL_PLACEMENT): New macro.
9600
9cc2810b
JB
96012013-04-16 Juanma Barranquero <lekktu@gmail.com>
9602
9603 * minibuf.c (Ftest_completion): Silence compiler warning.
9604
fd16b54c
EZ
96052013-04-15 Eli Zaretskii <eliz@gnu.org>
9606
9607 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
5fbcd237 9608 bug#14062.
fd16b54c
EZ
9609
9610 * frame.h (WINDOW_FRAME): Protect macro and its argument with
9611 parentheses.
9612
9613 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
9614 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
9615 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
9616 parentheses where appropriate.
9617
9e3379a0
PE
96182013-04-14 Paul Eggert <eggert@cs.ucla.edu>
9619
9620 * keyboard.c (timer_start_idle): Remove no-longer-used local.
9621
ddd6b685
EZ
96222013-04-14 Eli Zaretskii <eliz@gnu.org>
9623
a544fbe1 9624 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
ddd6b685
EZ
9625 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
9626 Mention in the doc string that setting these variables takes
9627 effect only after a call to set-window-buffer. (Bug#14200)
9628
29b79ba1
EZ
96292013-04-13 Eli Zaretskii <eliz@gnu.org>
9630
9631 * indent.c (Fvertical_motion): Don't consider display strings on
9632 overlay strings as display strings on the buffer position we
9633 started from. This prevents vertical cursor motion from jumping
9634 more than one line when there's an overlay string with a display
9635 property at end of line.
9636 Reported by Karl Chen <Karl.Chen@quarl.org> in
9637 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
9638
562c6ee9
SM
96392013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
9640
9641 * window.c (select_window): `record_buffer' even if window is
9642 already selected (bug#14191).
9643
fcc1fe85
EZ
96442013-04-11 Eli Zaretskii <eliz@gnu.org>
9645
9646 * window.c (Fwindow_end): Test more flags, including the buffer's
9647 last_overlay_modified flag, to determine whether the window's
9648 display is really up-to-date. Prevents the function from
9649 returning a stale value. (Bug#14170)
9650 (Fwindow_line_height): Fix the test for up-to-date-ness of the
9651 current matrix.
9652
f009190a
EZ
96532013-04-10 Eli Zaretskii <eliz@gnu.org>
9654
9655 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
562c6ee9
SM
9656 garbaged only if it is not already the top frame on its TTY.
9657 This prevents flickering due to constant redrawing of TTY frames when
f009190a
EZ
9658 there are GUI frames open in the same session. (Bug#13864)
9659
78ce603d
SM
96602013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
9661
9662 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
9663 of marking the idle timers directly.
9664
a8036e40
SM
96652013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
9666
9667 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
9668 tables (bug#14054).
9669
7ffe7ef6
SM
96702013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
9671
9672 * window.c (select_window): Don't record_buffer while the invariant is
9673 temporarily broken (bug#14161).
9674
9675 * fns.c (Fdelq): Don't assume !NILP => CONSP.
9676
7d9f6883
EZ
96772013-04-07 Eli Zaretskii <eliz@gnu.org>
9678
9679 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
9680
5406cfd9
RF
96812013-04-07 Romain Francoise <romain@orebokech.com>
9682
9683 Ignore additional platform-specific ACL errors (Bug#13702).
9684 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
9685 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
9686
95c0e83b
JD
96872013-03-31 Jan Djärv <jan.h.d@swipnet.se>
9688
9689 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
9690 f->output_data.ns.
9691
876da980
PE
96922013-04-07 Paul Eggert <eggert@cs.ucla.edu>
9693
9694 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
9695 This bug was introduced by my 2013-02-25 change that simplified
9696 data_start configuration. Without this change, on GNU/Linux
9697 an Emacs configured with --enable-profiling fails immediately
9698 due to a profiler signal.
9699 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
9700 with these flags. On platforms where special flags are needed
9701 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
9702 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
9703 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
9704
7452b7bd
DA
97052013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
9706
9707 Get rid of some platform-specific functions examining window
9708 system and its capabilities. This is a partial rework of the
9709 2013-04-05 change.
9710 * lisp.h (have_menus_p): Remove prototype. This function is
9711 replaced with platform-independent window_system_available.
9712 (check_window_system): Move to...
9713 * frame.h (decode_window_system_frame, window_system_available):
9714 ...here, add new prototypes.
9715 * frame.c (window_system_available, decode_window_system_frame):
9716 New functions.
9717 (check_window_system): Platform-independent now.
9718 * xterm.h (x_in_use): Remove declaration.
9719 (check_x_frame):
9720 * w32term.h (check_x_frame):
9721 * nsterm.h (check_x_frame): Remove prototypes. This function
9722 is replaced with platform-independent decode_window_system_frame.
9723 * msdos.c (have_menus_p): Remove.
9724 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
9725 Remove platform-specific functions. Use check_window_system,
9726 decode_window_system_frame and check_ns_display_info where
9727 appropriate. Minor style and comment tweaks.
9728 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
9729 (check_x_frame): Likewise.
9730 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
9731 Likewise.
9732 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
9733 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
9734 * xmenu.c, xselect.c: All related users changed.
9735
251e9147
KH
97362013-04-03 Kenichi Handa <handa@gnu.org>
9737
9738 The following changes is to optimize the code for reading UTF-8
9739 files.
9740
562c6ee9 9741 * coding.c (check_ascii): Rename from detect_ascii. Return value
251e9147
KH
9742 changed. Check EOL format. Do not call adjust_coding_eol_type
9743 here.
9744 (check_utf_8): New function.
9745 (adjust_coding_eol_type): Do nothing if already adjusted.
9746 (detect_coding): Compare the return value of check_ascii with
9747 coding->src_bytes. Call adjust_coding_eol_type if necessary.
9748 (decode_coding_gap): Optimize for valid UTF-8.
9749
8bc369d4
KH
97502013-03-21 Kenichi Handa <handa@gnu.org>
9751
9752 * coding.c (syms_of_coding): Cancel previous change.
9753
9754 * insdel.c (insert_from_gap): Fix previous change.
9755
73931ad1
DA
97562013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
9757
9758 Consistently use platform-specific function to detect window system.
9759 * lisp.h (check_window_system): New prototype. This function is
9760 going to replace check_x, check_w32 and check_ns.
9761 (have_menus_p): Mention msdos.c in comment.
9762 * fontset.c (check_window_system_func): Remove. Adjust all users.
9763 * fontset.h (check_window_system_func): Remove prototype.
9764 * nsterm.h (check_ns):
9765 * xterm.h (check_x):
9766 * w32term.h (check_w32): Likewise.
9767 * menu.c (Fx_popup_menu): Use check_window_system.
9768 * msdos.c (check_window_system): Define for MS-DOS.
9769 * nsfns.m (check_window_system): Define for NS. Adjust all users.
9770 * w32fns.c (check_window_system): Likewise for MS-Windows.
9771 * xfns.c (check_window_system): Likewise for X.
9772 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
9773 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
9774
7216e43b
PE
97752013-04-02 Paul Eggert <eggert@cs.ucla.edu>
9776
9777 Prefer < to > in range checks such as 0 <= i && i < N.
9778 This makes it easier to visualize quantities on a number line.
9779 This patch doesn't apply to all such range checks,
9780 only to the range checks affected by the 2013-03-24 change.
9781 This patch reverts most of the 2013-03-24 change.
9782 * alloc.c (xpalloc, Fgarbage_collect):
9783 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
9784 * character.c (string_escape_byte8):
9785 * charset.c (read_hex):
9786 * data.c (cons_to_unsigned):
9787 * dispnew.c (update_frame_1):
9788 * doc.c (Fsubstitute_command_keys):
9789 * doprnt.c (doprnt):
9790 * editfns.c (hi_time, decode_time_components):
9791 * fileio.c (file_offset):
9792 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
9793 * font.c (font_intern_prop):
9794 * frame.c (x_set_alpha):
9795 * gtkutil.c (get_utf8_string):
9796 * indent.c (check_display_width):
9797 * keymap.c (Fkey_description):
9798 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
9799 * lread.c (read1):
9800 * minibuf.c (read_minibuf_noninteractive):
9801 * process.c (wait_reading_process_output):
9802 * search.c (Freplace_match):
9803 * window.c (get_phys_cursor_glyph):
9804 * xdisp.c (redisplay_internal):
9805 * xsmfns.c (smc_save_yourself_CB):
9806 Prefer < to > for range checks.
9807 * dispnew.c (sit_for): Don't mishandle NaNs.
9808 This fixes a bug introduced in the 2013-03-24 change.
9809 * editfns.c (decode_time_components): Don't hoist comparison.
9810 This fixes another bug introduced in the 2013-03-24 change.
9811
92759988
DA
98122013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
9813
9814 * frame.h (struct frame): Drop scroll_bottom_vpos
9815 member becaue all real users are dead long ago.
9816 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
9817 * xdisp.c (redisplay_internal): Adjust user.
9818
812a0930 98192013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
9a1971bb 9820
f38ab167
JD
9821 * nsmenu.m (showAtX:Y:for:): setLevel to
9822 NSPopUpMenuWindowLevel (Bug#13998).
9823
6d01f1fe
JD
98242013-03-30 Jan Djärv <jan.h.d@swipnet.se>
9825
9826 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
9827 (ns_check_pending_open_menu): Declare.
9828
9829 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
9830 (x_activate_menubar): Update the menu with title that matches
9831 ns_get_pending_menu_title, and call
9832 ns_check_pending_openmenu (Bug#12698).
9833 (menuWillOpen:): New method.
9834 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
9835
9836 * nsterm.m (menu_will_open_state, menu_mouse_point)
9837 (menu_pending_title): New varaibles.
9838 (ns_get_pending_menu_title, ns_check_menu_open)
9839 (ns_check_pending_open_menu): New functions.
9840
781f4782
DA
98412013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
9842
9843 * indent.c (current_column_bol_cache): Remove leftover which is not
9844 used in Fmove_to_column any more.
9845 (current_column, scan_for_column): Adjust users.
9846 * keyboard.c (last_point_position_buffer, last_point_position_window):
9847 Remove leftovers which are not used for recording undo any more.
9848 (command_loop_1, syms_of_keyboard): Adjust users.
9849 * xdisp.c (last_max_ascent): Remove leftover which is not used in
9850 redisplay_window any more.
9851 (move_it_to): Adjust user.
9852
1921c31b
JB
98532013-03-29 Juanma Barranquero <lekktu@gmail.com>
9854
9855 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
9856 Update dependencies.
9857
717b8bcd
SM
98582013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9859
9860 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
9861 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
9862 forward references.
9863
e74aeda8
DA
98642013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
9865
9866 * window.h (struct window): Replace hchild, vchild and buffer slots
fa9daa28 9867 with a single slot 'contents'. This is possible because each valid
e74aeda8
DA
9868 window may have either the child window (in vertical or horizontal
9869 combination) or buffer to display (for the leaf window). Using that,
fa9daa28 9870 a lot of operations to traverse and/or change window hierarchies may
e74aeda8
DA
9871 be simplified. New member horizontal is used to distinguish between
9872 horizontal and vertical combinations of internal windows.
9873 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
9874 (WINDOW_VERTICAL_COMBINATION_P): New macros.
9875 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
9876 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
9877 Use contents slot, not buffer, where appropriate.
9878 (wset_combination): New function.
9879 (wset_buffer): Add eassert.
9880 (Fframe_first_window): Simplify the loop reaching first window.
9881 (Fwindow_buffer): Use WINDOW_LEAF_P.
9882 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
9883 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
9884 (unshow_buffer): Convert initial debugging check to eassert.
9885 (replace_window, recombine_windows, Fdelete_other_windows_internal)
9886 (make_parent_window, window_resize_check, window_resize_apply)
9887 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
9888 (Fset_window_configuration, delete_all_child_windows, save_window_save):
9889 Adjust to match struct window changes.
9890 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
9891 (mark_window_cursors_off, count_windows, get_leaf_windows)
9892 (foreach_window_1): Simplify the loop.
9893 * alloc.c (mark_object): Do not check for the leaf window because
9894 internal windows has no glyph matrices anyway.
9895 * dispnew.c (clear_window_matrices, showing_window_margins_p)
9896 (allocate_matrices_for_window_redisplay, fake_current_matrices)
9897 (allocate_matrices_for_frame_redisplay, free_window_matrices)
9898 (build_frame_matrix_from_window_tree, mirror_make_current)
9899 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
9900 (update_window_tree, set_window_update_flags): Simplify the loop.
9901 (sync_window_with_frame_matrix_rows): Enforce live window.
9902 Use contents slot, not buffer, where appropriate.
9903 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
9904 and WINDOW_HORIZONTAL_COMBINATION_P.
9905 (make_frame_visible_1): Simplify the loop.
9906 Use contents slot, not buffer, where appropriate.
9907 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
9908 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
9909 (expose_window_tree): Likewise.
9910 Use contents slot, not buffer, where appropriate.
9911 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
9912 to avoid deleted windows. Use contents slot instead of buffer.
9913 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
9914 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
9915 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
9916 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
9917
121ab1cd
EZ
99182013-03-28 Eli Zaretskii <eliz@gnu.org>
9919
ef454cf7
EZ
9920 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
9921 identify the reasons for assertion violations in bug#14062 and
9922 similar ones.
21e930f8
EZ
9923 (Fx_show_tip): Fix compilation error under
9924 "--enable-check-lisp-object-type". (Bug#14073)
ef454cf7 9925
121ab1cd
EZ
9926 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
9927 Reported by <rzl24ozi@gmail.com>.
9928
5c89ca24
DA
99292013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
9930
9931 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
9932 start marker...
562c6ee9
SM
9933 (unwind_with_echo_area_buffer): ...to restore it here.
9934 This is needed to ensure that...
5c89ca24
DA
9935 (redisplay_window): ...both window markers are valid here,
9936 which is verified by eassert.
9937 * editfns.c (save_excursion_save): Do not assume that
9938 selected_window always displays the buffer.
c7f53895
DA
9939 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
9940 Fix comment.
5c89ca24 9941
f557c1b1
SM
99422013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
9943
9944 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
9945 the upcase table.
9946
40693bba 99472013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
9948
9949 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
9950
c86f791f
EZ
99512013-03-27 Eli Zaretskii <eliz@gnu.org>
9952
9953 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
9954 since MinGW's w32api headers do. This avoids compiler warnings.
9955
9956 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
9957 if already defined.
9958
c6e72e17
EZ
99592013-03-26 Eli Zaretskii <eliz@gnu.org>
9960
9961 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
9962
54e95010
JD
99632013-03-26 Jan Djärv <jan.h.d@swipnet.se>
9964
9965 * gtkutil.c (style_changed_cb): Check if frame is live and an
9966 X frame (Bug#14038).
9967
b88b62de
EZ
99682013-03-26 Eli Zaretskii <eliz@gnu.org>
9969
a18d7de6
EZ
9970 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
9971 Define only for _WIN32_WINNT less than 0x0500.
da9dcbb8
EZ
9972 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
9973 MinGW64.
8f5e14c8
EZ
9974 Move inclusion of time.h before sys/time.h, so that MinGW64 could
9975 see its own definitions of 'struct timeval' and 'struct timezone'.
a18d7de6 9976
b88b62de
EZ
9977 Fix incompatibilities between MinGW.org and MinGW64 headers.
9978 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
9979
9980 * w32.c (REPARSE_DATA_BUFFER): Guard with
9981 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
9982
c074e458
JD
99832013-03-25 Jan Djärv <jan.h.d@swipnet.se>
9984
9985 * xterm.c: Include X11/XKBlib.h
9986 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
9987
908589fd
AS
99882013-03-24 Andreas Schwab <schwab@linux-m68k.org>
9989
9990 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
9991 written backwards.
9992 * blockinput.h (input_blocked_p): Likewise.
9993 * bytecode.c (exec_byte_code): Likewise.
9994 * callproc.c (call_process_kill, call_process_cleanup)
9995 (Fcall_process): Likewise.
9996 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
9997 (Fccl_execute_on_string): Likewise.
9998 * character.c (string_escape_byte8): Likewise.
9999 * charset.c (read_hex): Likewise.
10000 * cm.c (calccost): Likewise.
10001 * data.c (cons_to_unsigned): Likewise.
10002 * dired.c (directory_files_internal, file_name_completion):
10003 Likewise.
10004 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
10005 (sit_for): Likewise.
10006 * doc.c (Fsubstitute_command_keys): Likewise.
10007 * doprnt.c (doprnt): Likewise.
10008 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
10009 * emacsgtkfixed.c: Likewise.
10010 * fileio.c (file_offset, Fwrite_region): Likewise.
10011 * floatfns.c (Fexpt, fmod_float): Likewise.
10012 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
10013 Likewise.
10014 * font.c (font_intern_prop): Likewise.
10015 * frame.c (x_set_alpha): Likewise.
10016 * gtkutil.c (get_utf8_string): Likewise.
10017 * indent.c (check_display_width): Likewise.
10018 * intervals.c (create_root_interval, rotate_right, rotate_left)
10019 (split_interval_right, split_interval_left)
10020 (adjust_intervals_for_insertion, delete_node)
10021 (interval_deletion_adjustment, adjust_intervals_for_deletion)
10022 (merge_interval_right, merge_interval_left, copy_intervals)
10023 (set_intervals_multibyte_1): Likewise.
10024 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
10025 * keymap.c (Fkey_description): Likewise.
10026 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
10027 * lread.c (openp, read_integer, read1, string_to_number):
10028 Likewise.
10029 * menu.c (ensure_menu_items): Likewise.
10030 * minibuf.c (read_minibuf_noninteractive): Likewise.
10031 * print.c (printchar, strout): Likewise.
10032 * process.c (create_process, Faccept_process_output)
10033 (wait_reading_process_output, read_process_output, send_process)
10034 (wait_reading_process_output): Likewise.
10035 * profiler.c (make_log, handle_profiler_signal): Likewise.
10036 * regex.c (re_exec): Likewise.
10037 * regex.h: Likewise.
10038 * search.c (looking_at_1, Freplace_match): Likewise.
10039 * sysdep.c (get_child_status, procfs_ttyname)
10040 (procfs_get_total_memory): Likewise.
10041 * systime.h (EMACS_TIME_VALID_P): Likewise.
10042 * term.c (dissociate_if_controlling_tty): Likewise.
10043 * window.c (get_phys_cursor_glyph): Likewise.
10044 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
10045 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
10046 Likewise.
10047 * xfns.c (Fx_window_property): Likewise.
10048 * xmenu.c (set_frame_menubar): Likewise.
10049 * xselect.c (x_get_window_property, x_handle_dnd_message):
10050 Likewise.
10051 * xsmfns.c (smc_save_yourself_CB): Likewise.
10052 * xterm.c (x_scroll_bar_set_handle): Likewise.
10053
2bf7d27a
DA
100542013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
10055
10056 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
10057 to be optional or nil. Adjust comment and convert it to docstring.
10058 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
10059 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
10060
a9ebfa0b
PE
100612013-03-24 Paul Eggert <eggert@cs.ucla.edu>
10062
10063 Static checking by GCC 4.8-20130319.
10064 * image.c (gif_load): Assume pass < 3 to pacify GCC.
10065 * process.c (Fset_process_datagram_address)
10066 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
35e951cd 10067 * xdisp.c (get_char_face_and_encoding)
a9ebfa0b
PE
10068 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
10069 (get_glyph_face_and_encoding): Prepare face before possibly using it.
10070 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
10071
4f3576ee
KB
100722013-03-24 Ken Brown <kbrown@cornell.edu>
10073
789b5e9a
KB
10074 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
10075 fix compilation on 64-bit Cygwin, where underscores are not
10076 automatically prepended.
10077
4f3576ee
KB
10078 * w32term.c (w32_initialize): Silence compiler warning.
10079
b5b7745f
EZ
100802013-03-23 Eli Zaretskii <eliz@gnu.org>
10081
cdc0d0bd
EZ
10082 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
10083 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
562c6ee9
SM
10084 variables, to save and restore frame dimensions.
10085 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
10086 after returning from a 'fullscreen' configuration.
10087 use SendMessage instead of PostMessage to send the SC_RESTORE message,
cdc0d0bd
EZ
10088 to avoid races between the main thread and the input thread.
10089
10090 * w32term.h (struct w32_output): New members normal_width,
10091 normal_height, normal_top, normal_left, and prev_fsmode.
10092 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
10093 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
10094 members of a frame.
10095
b5b7745f
EZ
10096 * w32term.c (w32fullscreen_hook): Record last value of the frame's
10097 'fullscreen' parameter. Always record previous width and height
10098 of the frame, except when switching out of maximized modes, so
10099 that they could be restored correctly, instead of resetting to the
10100 default frame dimensions. Send SC_RESTORE command to the frame,
10101 unless we are going to send SC_MAXIMIZE, to restore the frame
10102 resize hints in the mouse pointer shown by the window manager.
10103 (Bug#14032)
10104
10105 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
10106
10107 * lisp.h (get_frame_param): Adjust conditions for prototype
10108 declaration.
10109
a3454eed
KB
101102013-03-22 Ken Brown <kbrown@cornell.edu>
10111
10112 * unexcw.c: Drop unneeded inclusion of w32common.h.
10113 (report_sheap_usage): Declare.
10114 (read_exe_header): Add magic numbers for x86_64.
10115 (fixup_executable): Fix printf format specifier for unsigned long
10116 argument.
10117
5a49b79c
DA
101182013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
10119
10120 * frame.h (struct frame): Put menu_bar_window under #ifdef
10121 because this member is not needed when X toolkit is in use.
10122 (fset_menu_bar_window):
10123 * dispnew.c (clear_current_matrices, clear_desired_matrices)
10124 (free_glyphs, update_frame):
10125 * xdisp.c (expose_frame): Likewise.
10126 (display_menu_bar): Likewise. Remove redundant eassert.
10127 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
10128 toolkit is in use.
10129
d6723bf7
PE
101302013-03-21 Paul Eggert <eggert@cs.ucla.edu>
10131
7b1123d8
PE
10132 Use functions and constants to manipulate Lisp_Save_Value objects.
10133 This replaces code that used macros and strings and token-pasting.
10134 The change makes the C source a bit easier to follow,
10135 and shrinks the Emacs executable a bit.
10136 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
10137 (make_save_value): Change 1st arg from string to enum. All callers
10138 changed.
10139 (INTX): Remove.
10140 (mark_object): Use if, not #if, for GC_MARK_STACK.
10141 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
10142 (XSAVE_OBJECT): Now functions, not macros.
10143 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
10144 the constant was never used.
10145 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
10146 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
10147 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
10148 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
10149 New constants.
10150 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
10151 type3 with a single member save_type. All uses changed.
10152 (save_type, set_save_pointer, set_save_integer): New functions.
10153 * print.c (PRINTX): Remove.
10154
d6723bf7
PE
10155 * alloc.c: Remove redundant static declarations.
10156
5f24fa51
DA
101572013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
10158
10159 * window.h (struct window): Convert left_col, top_line, total_lines
10160 and total_cols from Lisp_Objects to integers. Adjust comments.
10161 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
10162 Remove.
10163 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
10164 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
10165 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
10166 Adjust users where appropriate.
10167
42143acd
DA
101682013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
10169
10170 * frame.h (struct frame): Drop resx and resy because the same data is
10171 available from window system-specific output context. Adjust users.
562c6ee9
SM
10172 (default_pixels_per_inch_x, default_pixels_per_inch_y):
10173 New functions to provide defaults when no window system available.
42143acd 10174 (FRAME_RES_X, FRAME_RES_Y): New macros.
562c6ee9 10175 (NUMVAL): Move from xdisp.c.
42143acd
DA
10176 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
10177 (Ffont_face_attributes, Fopen_font):
10178 * image.c (gs_load):
10179 * w32font.c (fill_in_logfont):
10180 * xdisp.c (calc_pixel_width_or_height):
10181 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
10182 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
10183
c0a17406
KH
101842013-03-20 Kenichi Handa <handa@gnu.org>
10185
10186 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
10187 to 1 (temporary workaround until a bug related to ASCII
10188 optimization is fixed).
10189
095d384d
DA
101902013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
10191
10192 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
10193 Signal error if window is not internal. Adjust docstring.
10194 (delete_all_child_windows): Use combination_limit to save the buffer.
10195 (Fset_window_configuration): Adjust accordingly.
cf4bb06d
DA
10196 * print.c (syms_of_print): Initialize debugging output not here...
10197 (init_print_once): ...but in a new function here.
10198 * lisp.h (init_print_once): Add prototype.
10199 * emacs.c (main): Add call to init_print_once. Adjust comments.
095d384d 10200
748fa866
DA
102012013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
10202
10203 * window.c (window_resize_check, window_resize_apply)
10204 (window_from_coordinates, recombine_windows, set_window_buffer)
10205 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
10206 (Fsplit_window_internal, Fdelete_window_internal)
10207 (freeze_window_starts): Use bool for booleans.
10208 * window.h (window_frame_coordinates, resize_frame_windows)
10209 (freeze_window_starts, set_window_buffer): Adjust prototypes.
10210
81519fd2
SM
102112013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
10212
10213 * dispnew.c (bitch_at_user): Use `user-error'.
10214
6db423a9
KB
102152013-03-17 Ken Brown <kbrown@cornell.edu>
10216
10217 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
10218 as return type of image_background. (Bug#13981)
10219 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
10220
8f2906f5
JD
102212013-03-16 Jan Djärv <jan.h.d@swipnet.se>
10222
960ce480 10223 * nsterm.m (updateFrameSize:): Change resize increments if needed.
6615748a 10224 (ns_select): Don't return with result uninitialized.
960ce480 10225
8f2906f5
JD
10226 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
10227 and getDirectory.
10228
81519fd2
SM
10229 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
10230 New functions.
8f2906f5
JD
10231 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
10232 directories. If filename is nil, get directory name (Bug#13932).
10233 Use getFilename and getDirectory.
10234 (getFilename, getDirectory): New methods for EmacsSavePanel and
10235 EmacsOpenPanel.
10236 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
10237
cded56c1
PE
102382013-03-15 Paul Eggert <eggert@cs.ucla.edu>
10239
10240 * coding.c (decode_coding_gap): Fix typo caught by static checking.
10241
251e9147 102422013-03-15 Kenichi Handa <handa@gnu.org>
8a44e6d1
KH
10243
10244 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
10245 (adjust_after_replace): Make it back to static. Delete the third
10246 arg text_at_gap_tail. Cancel the code for handling it.
10247
10248 * coding.h (struct coding_system): New member eol_seen.
10249
10250 * coding.c (detect_ascii): New function.
10251 (detect_coding): Set coding->head_ascii and coding->eol_seen only
10252 when the source bytes are actually scanned. On detecting for
10253 coding_category_utf_8_auto, call detect_ascii instead of scanning
10254 source bytes directly.
10255 (produce_chars): Call insert_from_gap with the new arg 0.
10256 (encode_coding): Likewise.
10257 (decode_coding_gap): Control ASCII optimization by the variable
10258 disable_ascii_optimization instead of #ifndef .. #endif.
10259 Deccode EOL format according to coding->eol_seen.
10260 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
10261 variable.
10262
8a44e6d1
KH
10263 * lisp.h (adjust_after_replace): Cancel externing it.
10264 (insert_from_gap): Adjust prototype.
10265
5f795e34
EZ
102662013-03-15 Eli Zaretskii <eliz@gnu.org>
10267
10268 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
10269 FULLSCREEN_MAXIMIZED. (Bug#13935)
10270
f258b4be
DA
102712013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
10272
10273 * region-cache.c (find_cache_boundary, move_cache_gap)
10274 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
10275 Simplify debugging check and convert to eassert. Adjust comment.
10276 (pp_cache): Put under ENABLE_CHECKING.
10277
a5cc4dde
EZ
102782013-03-14 Eli Zaretskii <eliz@gnu.org>
10279
10280 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
10281 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
10282 and WM_ACTIVATEAPP.
10283 (w32fullscreen_hook): If the frame is visible, reset
10284 f->want_fullscreen flag after changing the frame size. If the
10285 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
10286 (Bug#13953)
10287
3fc5e44a
DC
102882013-03-13 Daniel Colascione <dancol@dancol.org>
10289
10290 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
10291 too so that these builds can use Cygwin's file conversion
10292 functions. (We've been building and linking cygw32.o all along
10293 and just not using it.)
10294
47d7532e
PE
102952013-03-13 Paul Eggert <eggert@cs.ucla.edu>
10296
10297 File synchronization fixes (Bug#13944).
10298 * Makefile.in (LIB_FDATASYNC): New macro.
10299 (LIBES): Use it.
10300 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
10301 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
10302 Don't worry about HAVE_FSYNC, since a substitute fsync is
10303 available if the system lacks one.
10304 (Fwrite_regin): Retry fsync if interrupted.
10305
c7ffccaf
EZ
103062013-03-13 Eli Zaretskii <eliz@gnu.org>
10307
4e2df81d 10308 * w32term.c (w32_read_socket): If the Emacs frame is being
c7ffccaf
EZ
10309 activated, call w32fullscreen_hook, to make sure the new frame
10310 dimensions are in effect. (Bug#13937)
10311
8a7debc1
DA
103122013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
10313
10314 * xdisp.c (init_iterator): Simplify because both character and byte
10315 positions are either specified or -1. Add eassert. Adjust comment.
ffcd945e
DA
10316 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
10317 character and byte positions can be obtained from marker.
8a7debc1 10318
7fd8c501
PE
103192013-03-13 Paul Eggert <eggert@cs.ucla.edu>
10320
d9df6f40
PE
10321 Static checking by Sun C 5.12.
10322 * alloc.c (buffer_memory_full) [REL_ALLOC]:
10323 * bytecode.c (exec_byte_code):
10324 * dispnew.c (init_display):
10325 * eval.c (error):
10326 * fileio.c (Fsubstitute_in_file_name):
10327 * keyboard.c (Fevent_convert_list):
10328 * keymap.c (Fsingle_key_description):
10329 * term.c (maybe_fatal, fatal):
10330 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
10331 * xsmfns.c (Fhandle_save_session):
10332 Omit unreachable code.
10333 * keymap.c (map_keymap_char_table_item): Cast void * to
10334 a function pointer type; the C Standard requires this.
10335
7fd8c501
PE
10336 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
10337 Include <sys/param.h> unconditionally, as that works elsewhere and
10338 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
10339 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
10340 and FreeBSD now.
10341
a020afb9 10342See ChangeLog.12 for earlier changes.
aac0c6e3
MR
10343
10344;; Local Variables:
10345;; coding: utf-8
aac0c6e3
MR
10346;; End:
10347
ba318903 10348 Copyright (C) 2011-2014 Free Software Foundation, Inc.
aac0c6e3
MR
10349
10350 This file is part of GNU Emacs.
10351
10352 GNU Emacs is free software: you can redistribute it and/or modify
10353 it under the terms of the GNU General Public License as published by
10354 the Free Software Foundation, either version 3 of the License, or
10355 (at your option) any later version.
10356
10357 GNU Emacs is distributed in the hope that it will be useful,
10358 but WITHOUT ANY WARRANTY; without even the implied warranty of
10359 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10360 GNU General Public License for more details.
10361
10362 You should have received a copy of the GNU General Public License
10363 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.