etc/TODO: add note about using undo-tree for persistent undo
[bpt/emacs.git] / src / ChangeLog
CommitLineData
632fd57c
DA
12014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
2
3 On X, always make pointer visible when deleting frame (Bug#17609).
4 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
5 Pass frame as arg.
6 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
7 Adjust prototypes.
8 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
9 * keyboard.c (gobble_input): If there is no terminal input error,
10 make sure the pointer is visible for all frames on this terminal.
df384736
DA
11 * xterm.c (x_free_frame_resources): Enable pointer visibility if
12 it was previously disabled.
632fd57c 13
4c539a7b
SM
142014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
15
16 * data.c (Fzerop): Move to Elisp.
17 (syms_of_data): Don't defsubr it.
18 * keyboard.c (echo_keystrokes_p): New function.
19 (read_char, record_menu_key, read_key_sequence): Use it.
20
21 * callint.c (Qfuncall_interactively): New var.
22 (Qcall_interactively): Remove.
23 (Ffuncall_interactively): New function.
24 (Fcall_interactively): Use it.
25 (syms_of_callint): Defsubr it.
26
9da43ddc
SM
272014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
28
29 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
30 relocated from under us.
31
587fd086
FP
322014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
33
34 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
35 configure.
36 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
37
38 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
39 for MinGW, since it no longer uses gmalloc.
40
41 * buffer.c: Do not define mmap allocations functions for Windows.
42 Remove mmap_find which is unused. Remove mmap_set_vars which does
43 nothing useful.
44 [WINDOWSNT]: Include w32heap.h.
45 (init_buffer): Always allocate new memory for buffers.
46
47 * emacs.c: Remove mmap_set_vars calls.
48
49 * image.c (free_image): Undef free for Windows because it is
50 redirected to our private version.
51
52 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits
53 compatibility.
54 (copy_executable_and_dump_data): Remove dumping the heap section.
55 (unexec): Restore using_dynamic_heap after dumping.
56
57 * w32heap.c (dumped_data_commit, malloc_after_dump)
58 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
59 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
60 (mmap_free): New functions.
61
62 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
63
ca0279be
PE
642014-05-27 Paul Eggert <eggert@cs.ucla.edu>
65
c24163d4
PE
66 * image.c (imagemagick_load_image): Use MagickRealType for local
67 'color_scale', instead of double, to avoid a GCC warning about
68 double promotion.
69
1ad913a1
PE
70 * xfns.c (Fx_window_property): Remove unused local.
71
ca0279be
PE
72 Don't kill already-reaped process (Bug#17561).
73 * process.c (process_send_signal): Fix race condition where a
74 subprocess was reaped by a signal handler between the check for
75 liveness and calling 'kill', which meant that Emacs could in
76 theory kill an innocent bystander process. Do the fix by blocking
77 SIGCHLD in a critical section that checks liveness before killing.
78
9aecbeb3
EZ
792014-05-26 Eli Zaretskii <eliz@gnu.org>
80
81 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if
82 undefined.
83
48e64ea6
KB
842014-05-26 Ken Brown <kbrown@cornell.edu>
85
86 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
87 even if !CYGWIN (see bug#17510).
88
6cf4e5d6
JD
892014-05-26 Jan Djärv <jan.h.d@swipnet.se>
90
858e55f4
JD
91 * nsfns.m (Fns_do_applescript): Surround NSApp run
92 with calls to ns_init_events, ns_finish_events (Bug#17424).
93
6cf4e5d6
JD
94 * nsterm.h (ns_init_events, ns_finish_events): Declare.
95
96 * nsterm.m (ns_init_events, ns_finish_events): New functions.
97 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
98
99 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
100 with calls to ns_init_events, ns_finish_events (Bug#17424).
101
015936fb 1022014-05-26 Eli Zaretskii <eliz@gnu.org>
285c68bc
EZ
103
104 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
105 if we are iterating over an object that generates glyphs for
106 marginal areas. (Bug#17585)
107
015936fb 1082014-05-26 Paul Eggert <eggert@cs.ucla.edu>
2082742e
PE
109
110 * xdisp.c (safe__call1, safe__eval): Now static.
111
015936fb 1122014-05-26 Eli Zaretskii <eliz@gnu.org>
376f53c5
EZ
113
114 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
115 (safe_call, safe__call1): Construct a va_list argument for safe_call.
116 (safe_call1): Call safe_call instead of safe__call directly.
117
015936fb 1182014-05-26 Ken Brown <kbrown@cornell.edu>
791dd8e7
KB
119
120 * w32term.c (x_delete_display) [CYGWIN]: Don't free
121 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
122 once. (Bug#17510)
123
015936fb 1242014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
3b1c4207
SM
125
126 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
127 (safe__call, safe__call1, safe__eval): New functions.
128 (safe_call): Use it.
129 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
130 (display_mode_element): Same for `:eval'.
131
015936fb 1322014-05-26 Paul Eggert <eggert@cs.ucla.edu>
4f4ec76f
PE
133
134 Fix port to 32-bit AIX (Bug#17540).
135 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
136 twice. _text already includes this offset.
137 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
138
015936fb 1392014-05-26 Eli Zaretskii <eliz@gnu.org>
5e2e0fa4
EZ
140
141 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
142 when closest_pos is identical to to_charpos, don't recurse, since
143 we already tried that, and failed. (Bug#17539)
144
ebdc8031
EZ
145 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
146 unwinding when frame's faces were not initialized yet, increment
147 the frame's image-cache reference count before calling
148 x_free_frame_resources. Don't dereference
149 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
150
d6e8093a
JD
1512014-05-25 Jan Djärv <jan.h.d@swipnet.se>
152
153 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
154 nsterm.m now.
155
156 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
157 macfont.m, call draw with adjusted arguments so font drivers
158 don't need to do that.
159
160 * macfont.m (macfont_draw): Merge changes from Macport.
161
c94e3311
EZ
1622014-05-24 Eli Zaretskii <eliz@gnu.org>
163
164 * alloc.c (garbage_collect_1): New function, with all of the guts
165 of Fgarbage_collect.
166 (mark_stack): Accept an argument END and don't mark Lisp objects
167 on the stack beyond the address given by END. Calculation of END
168 was moved to Fgarbage_collect.
169 (Fgarbage_collect): Calculate the end address of the stack portion
170 that needs to be examined by mark_stack, and pass that address to
171 garbage_collect_1, which will pass it to mark_stack. See
172 http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
173 for more details about the underlying problems. In particular,
174 this avoids dumping Emacs with the large hash-table whose value is
175 held in purify-flag for most of the time loadup.el runs.
176
a235163a
JD
1772014-05-24 Jan Djärv <jan.h.d@swipnet.se>
178
179 * xfns.c (x_window_property_intern): New function (code from
180 x_window_property).
181 (Fx_window_property): Call x_window_property_intern. If property
182 not found and NILP (source) and outer window != inner window,
183 check outer window for property (Bug#17537).
184
74fde0f4
PE
1852014-05-22 Paul Eggert <eggert@cs.ucla.edu>
186
187 Supply malloc and alloc_size attributes for extern allocators.
188 This documents the C API, and helps GCC generate a bit better code.
189 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
190 (ATTRIBUTE_MALLOC_SIZE): New macros.
191 * gmalloc.c (malloc, realloc, calloc):
192 * gtkutil.h (malloc_widget_value):
193 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
194 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
195 Use them.
196
6c596cb2
PE
1972014-05-21 Paul Eggert <eggert@cs.ucla.edu>
198
199 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
200 * image.c (imagemagick_load_image): Port to hosts that do not use
201 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
202
254b7645
LL
2032014-05-21 Leo Liu <sdl.web@gmail.com>
204
205 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
206
a05affb2
MA
2072014-05-20 Michael Albinus <michael.albinus@gmx.de>
208
209 * dbusbind.c (xd_signature): Revert last 2 patches.
210
2f1205e0
PE
2112014-05-19 Paul Eggert <eggert@cs.ucla.edu>
212
213 Allow any non-nil value to count as true in bool-vector.
214 Likewise for xd_signature in dbusbind.c.
215 This is more consistent with the usual practice in Emacs, which is
216 that any non-nil value counts as true.
217 * alloc.c (Fbool_vector): Don't require args to be t or nil.
218 * dbusbind.c (xd_signature): Likewise, for booleans.
219 * data.c, lisp.h (Qbooleanp):
220 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
221
2bcf0551
DA
2222014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
223
224 * lisp.h (CHECK_BOOLEAN): New function.
225 * alloc.c (Fbool_vector): New function.
226 (syms_of_alloc): Defsubr it.
227 * data.c (Qbooleanp): New symbol.
228 (syms_of_data): DEFSYM it.
229 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
230
8bb59716
DA
231 * font.c (font_matching_entity): Extract font-entity object
232 from the vector of matching entities (Bug#17486).
233
8208d2bf
PE
2342014-05-17 Paul Eggert <eggert@cs.ucla.edu>
235
236 Assume C99 or later (Bug#17487).
237 * bytecode.c (B__dummy__): Remove.
238 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
239 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
240 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
241 * regex.c (DEBUG_PRINT): Assume varargs macros.
242 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
243
f63fc858
FP
2442014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
245
246 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
247 memory for every buffer that was dumped.
248
c269148b
DA
2492014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
250
251 * fns.c (Freverse): Allow vectors, bool vectors and strings.
ddc30c99 252 (Fnreverse): Allow vectors and bool vectors.
c269148b 253
6f1d9822
DA
2542014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
255
256 Minor cleanup for terminal setup.
257 * termhooks.h (create_terminal): Adjust prototype.
258 * terminal.c (create_terminal): Pass output method and RIF as args.
259 (init_initial_terminal):
260 * nsterm.m (ns_create_terminal):
261 * term.c (init_tty):
262 * w32term.c (w32_create_terminal):
263 * xterm.c (x_create_terminal): Adjust users.
264 Avoid redundant NULL initializers and add comments.
265
3246c8b1
PE
2662014-05-13 Paul Eggert <eggert@cs.ucla.edu>
267
268 * keyboard.c (Qdeactivate_mark): Now static.
269
d3e5c0ea
DA
2702014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
271
272 If available, use Xfixes extension to do pointer blanking.
273 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
274 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
275 (make_invisible_cursor): Move to...
276 * xterm.c (make_invisible_cursor): ...here.
277 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
278 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
279 (x_term_init): Call to x_setup_pointer_blanking.
280 (XTtoggle_invisible_pointer): Use blanking specific to this display.
281 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
282
9ce28d80
YM
2832014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
284
285 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
286
bbbabffe 2872014-05-12 Glenn Morris <rgm@gnu.org>
970fd401
GM
288
289 * fileio.c (Ffile_executable_p): Doc tweak.
290
bbbabffe 2912014-05-12 Jan Djärv <jan.h.d@swipnet.se>
4a5c71d7
JD
292
293 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
294 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
295
fb3f83f5 2962014-05-08 Paul Eggert <eggert@cs.ucla.edu>
d1ff9ee4
PE
297
298 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
299
fb3f83f5 3002014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
73b60c4a
JC
301
302 Fix initialization of minibuffer history variable (Bug#17430).
303 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
304 Move the initialization up to prevent any "value void" message.
305
fb3f83f5 3062014-05-08 Samuel Bronson <naesten@gmail.com>
8e102bcc
SB
307
308 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
309 are matched (bug#17413).
310
fb3f83f5 3112014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
863f07de
JC
312
313 Stop tooltips pulling Emacs window to front (Bug#17408).
314 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
315 SetWindowPos invocations.
316
fb3f83f5 3172014-05-08 Jan Djärv <jan.h.d@swipnet.se>
879e3628
JD
318
319 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
320 not initialized (Bug#17398).
321
1ba38c42
PE
3222014-05-07 Paul Eggert <eggert@cs.ucla.edu>
323
324 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
325
f62bc934
PE
3262014-05-06 Paul Eggert <eggert@cs.ucla.edu>
327
328 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
329 [HAVE_NS]: Do not include png.h.
330 (x_query_frame_background_color): New function.
331 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
332 (png_load_body): Coalesce duplicate code.
333
61febcb6
PE
3342014-05-04 Paul Eggert <eggert@cs.ucla.edu>
335
f8c2cef5
PE
336 Consult libpng-config more consistently (Bug#17339).
337 * Makefile.in (PNG_CFLAGS): New var.
338 (ALL_CFLAGS): Use it.
339 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
340 CFLAGS now handles this.
61febcb6 341
d355cad6
PE
3422014-05-03 Paul Eggert <eggert@cs.ucla.edu>
343
344 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
345 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
346 because WCONTINUED is always defined now.
347 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
348
74a9022a
EZ
3492014-05-03 Eli Zaretskii <eliz@gnu.org>
350
351 * buffer.c (overlay_strings): Fix the wording of the commentary.
352
d136f184
GM
3532014-05-01 Glenn Morris <rgm@gnu.org>
354
355 * floatfns.c (Fisnan):
356 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
357
28c05b69
EZ
3582014-05-01 Eli Zaretskii <eliz@gnu.org>
359
360 * term.c (tty_menu_activate): A better initialization for cursor
361 coordinates.
362
23c931aa
SM
3632014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
364
365 * intervals.c: Tighten assertions.
366 (create_root_interval): Make sure the interval is not empty.
367 (intervals_equal): Use booleans.
368 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
369 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
370 (balance_possible_root_interval): Simplify and use booleans.
371 (split_interval_right, split_interval_left): Check LENGTH, and remove
372 now redundant assertion.
373 (adjust_intervals_for_insertion): Remove now redundant assertions.
374 (delete_node, interval_deletion_adjustment)
375 (adjust_intervals_for_deletion, merge_interval_right)
376 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
377 (reproduce_interval): Make sure the interval is not empty.
378
bc6cb3ef
PE
3792014-04-30 Paul Eggert <eggert@cs.ucla.edu>
380
381 * term.c (tty_menu_activate): Don't assume row and col are initialized.
382 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
383 satisfaction that they would always be initialized.
384
09b911ad 3852014-04-30 Eli Zaretskii <eliz@gnu.org>
a55ea27f 386
09b911ad 387 * term.c (tty_menu_display): Move the cursor to the active menu item.
a55ea27f 388 (tty_menu_activate): Return the cursor to the active menu item
4c539a7b
SM
389 after displaying the menu and after displaying help-echo.
390 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
a55ea27f
EZ
391 for the details of why this is needed by screen readers and
392 Braille displays.
393
09b911ad 3942014-04-30 Glenn Morris <rgm@gnu.org>
4a25c1cb
GM
395
396 * process.c (handle_child_signal):
397 Handle systems without WCONTINUED. (Bug#15110, 17339)
398
4d89ee37
SM
3992014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
400
401 * window.c (struct saved_window): Remove mark.
402 (Fset_window_configuration, save_window_save)
403 (compare_window_configurations): Don't touch marks any more.
404
6ab1b16c
PE
4052014-04-28 Paul Eggert <eggert@cs.ucla.edu>
406
9c23779a
PE
407 Use bits_word for gcmarkbits.
408 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
409 bits_word is typically a tad more efficient for mark bits than
410 unsigned is, so use bits_word. All uses changed.
411 * lisp.h (BITS_PER_INT): Remove; no longer used.
412
6ab1b16c
PE
413 Avoid undefined behavior in signed left shift.
414 This ports to GCC 4.9.0 with -fsanitize=undefined.
415 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
416 * data.c (Fash):
417 * regex.c (extract_number):
418 * lisp.h (make_number, XINT):
419 Do not shift a 1 bit left into a sign bit.
420 * alloc.c (struct cons_block, struct float_block): Use unsigned,
421 not int, for gcmarkbits. All uses changed.
422
dff4a9f6 4232014-04-25 Eli Zaretskii <eliz@gnu.org>
80d982d7
EZ
424
425 * search.c (Fnewline_cache_check): Don't try to count newlines
4d89ee37 426 outside the buffer's restriction, as find_newline doesn't support that.
80d982d7 427
8917710e
SM
4282014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
429
430 * window.c (Fset_window_configuration): Deactivate the mark before
431 unsetting the mark.
432 (set_window_buffer): Ignore window_initialized.
433 (window_initialized): Remove.
434 * keyboard.c (Qdeactivate_mark): Not static any more.
435 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
436 Update all callers.
437
417c9bcb
PE
4382014-04-23 Paul Eggert <eggert@cs.ucla.edu>
439
440 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
441 and to clang 3.4, which have fixed the bug. This should let us
442 run a bit faster on these platforms when address sanitization is
443 in effect.
444
0fae5004
PE
4452014-04-22 Paul Eggert <eggert@cs.ucla.edu>
446
34e856d5
PE
447 Port to GCC 4.9.0 with --enable-gcc-warnings.
448 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
449 All uses removed.
450 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
451 a way that also works with GCC 4.9.0.
452
0fae5004
PE
453 * search.c (Fnewline_cache_check): Remove unused locals.
454
2f999d52
EZ
4552014-04-22 Eli Zaretskii <eliz@gnu.org>
456
457 * search.c (find_newline1): New subroutine.
458 (Fnewline_cache_check): New function.
459 (syms_of_search): Defsubr it.
460
42e91034 4612014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
6709d4da
JC
462
463 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
464 * keyboard.c (unblock_input): Add comment.
465 * xgselect.c (xg_select): Prevent Glib main loop recursion.
466
12b1389c
DC
4672014-04-22 Daniel Colascione <dancol@dancol.org>
468
469 * lread.c (readevalloop_eager_expand_eval): New function
470 that can recurse into toplevel forms.
471 (readevalloop): Call it.
472 * lisp.h: Declare Qprogn.
473 * callint.c (Qprogn): No longer static.
474
d7b659bb
SM
4752014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
476
477 * intervals.c (rotate_right, rotate_left): Fix up length computation.
478 Also change identifiers to match the comments, and add more assertions
479 (bug#16234).
480
31559517
PE
4812014-04-18 Paul Eggert <eggert@cs.ucla.edu>
482
483 * emacs.c (close_output_streams): Don't clear and restore errno.
484
bba63379 4852014-04-18 Jan Djärv <jan.h.d@swipnet.se>
53e46f3a
JD
486
487 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
488 never becomes visible, i.e. using XMonad (Bug#17237).
489
bba63379 4902014-04-18 Eli Zaretskii <eliz@gnu.org>
f76da67d 491
bba63379
JB
492 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
493 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
494 (Fline_pixel_height): Don't assume that the current buffer and the
495 selected window's buffer are one and the same. (Bug#17281)
8915b842 496
f76da67d
EZ
497 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
498 paragraph-start cache before the newline cache. (Bug#17269)
499
f0496348
PE
5002014-04-17 Paul Eggert <eggert@cs.ucla.edu>
501
502 * term.c (tty_send_additional_strings): No need to fflush here,
503 as callers fflush.
504 (tty_set_terminal_modes): fflush after sending additional strings,
505 not before.
506
bfc30790
DC
5072014-04-17 Daniel Colascione <dancol@dancol.org>
508
4c539a7b
SM
509 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
510 New symbols.
bfc30790
DC
511 (tty_send_additional_strings): New function.
512 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
513 (syms_of_term): Intern tty-mode-set-strings and
514 tty-mode-reset-strings.
515
63032a0e
SM
5162014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
517
518 * window.c (save_window_save): Lookup window_point_insertion_type in
519 the right buffer (bug#15457).
520 (Qwindow_point_insertion_type): New var.
521 (syms_of_window): Initialize it.
522
bf6b4923
EZ
5232014-04-16 Eli Zaretskii <eliz@gnu.org>
524
ad62a115 525 Fix the MSDOS build.
bf6b4923
EZ
526 * unexcoff.c [MSDOS]: Include libc/atexit.h.
527 (copy_text_and_data): Zero out the atexit chain pointer before
528 dumping Emacs.
529
530 * termhooks.h (encode_terminal_code): Update prototype.
531
532 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
533 visible for all DOS_NT ports, not just WINDOWSNT.
534 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
535
536 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
537 unless it is defined.
538 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
539
540 * process.c (close_on_exec, accept4, process_socket): Move into
541 the "ifdef subprocesses" part.
542 (catch_child_signal): Condition by "ifdef subprocesses".
543 (syms_of_process) <Qinternal_default_process_sentinel>
544 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
545
546 * msdos.h: Add prototypes for new functions.
547 (EINPROGRESS): Define.
548 (O_CLOEXEC): Define to zero.
549
550 * msdos.c (check_window_system): Remove unnecessary an
551 incompatible duplicate function.
63032a0e
SM
552 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
553 New functions in support of new functionality.
bf6b4923
EZ
554
555 * menu.c (single_menu_item): Add visual indication of submenu
556 also for menus on MSDOS frames.
557 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
558
559 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
560 when async subprocesses aren't supported.
561
562 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
563
564 * emacs.c (close_output_streams): Zero out errno before calling
565 close_stream.
566
567 * dired.c [MSDOS]: Include msdos.h.
568
569 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
570 (DATA_START) [MSDOS]: Define.
571 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
572
573 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
574 Ifdef away for MSDOS.
575 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
576 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
577 for MSDOS.
578 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
579 Use temporary file template that is compatible with mkostemp.
580 Move vfork-related portions under #ifndef MSDOS.
581 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
582
290d7ac2 5832014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
ad0dfd98
EZ
584
585 * buffer.c (Foverlays_at): Add argument `sorted'.
586
290d7ac2 5872014-04-16 Eli Zaretskii <eliz@gnu.org>
ad0dfd98
EZ
588
589 * insdel.c (invalidate_buffer_caches): When deleting or replacing
590 text, invalidate the bidi_paragraph_cache upto and including the
591 preceding newline.
592
290d7ac2 5932014-04-16 Paul Eggert <eggert@cs.ucla.edu>
13a5993b
PE
594
595 Port to IRIX 6.5 (Bug#9684).
13a5993b
PE
596 * conf_post.h (INET6) [IRIX6_5]: Define.
597 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
598 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
13a5993b 599
290d7ac2 6002014-04-16 Eli Zaretskii <eliz@gnu.org>
ff252be0 601
ced78c5a
EZ
602 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
603 before passing it to system APIs.
604
290d7ac2 6052014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
285d6d5d
SM
606
607 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
608 make sure stack.byte_string_start is not de-adjusted by pushhandler.
609
290d7ac2 6102014-04-16 Paul Eggert <eggert@cs.ucla.edu>
a9108bf1
PE
611
612 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
613
5403b2d3
PE
6142014-04-15 Paul Eggert <eggert@cs.ucla.edu>
615
616 Remove DATA_SEG_BITS.
617 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
618 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
619 cc, but that platform is so old that SGI itself stopped supporting
620 it in December 2013. If you still need Emacs on IRIX, please
621 either compile with GCC and port the undumping code, or run
622 './configure --with-wide-int'.
623 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
624 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
625 DEFINE_GDB_SYMBOL_START way to define it.
626 (NONPOINTER_BITS): New macro.
627 (EMACS_INT): Use it.
628 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
629 the problem and/or configuring --with-wide-int.
630 (USE_LSB_TAG): Simplify, based on above changes.
631 (gdb_DATA_SEG_BITS): Remove. All uses removed.
632 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
633
180c8ce0
EZ
6342014-04-12 Eli Zaretskii <eliz@gnu.org>
635
636 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
637 covered by a display string that ends in a newline, and that cases
638 going back by DVPOS lines to hit the search limit, lift the limit
639 and go back until DVPOS is reached. (Bug#17244)
640
641 * indent.c (Fvertical_motion): Handle correctly the case when the
642 display string is preceded by an empty line.
643
95765a6a
EZ
644 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
645 use S_IWRITE instead.
646
34e083e3
GM
6472014-04-11 Glenn Morris <rgm@gnu.org>
648
649 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
650
536aa466 6512014-04-11 Ken Brown <kbrown@cornell.edu>
0cccc183
KB
652
653 * Makefile.in (EMACS_MANIFEST): Revert last change.
654
fb2dcc35
DC
6552014-04-10 Daniel Colascione <dancol@dancol.org>
656
657 * puresize.h (BASE_PURESIZE): Increase.
658
6bc76cee
SM
6592014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
660
5f6378ee
SM
661 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
662
6bc76cee
SM
663 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
664 region handling (and don't call signal_before_change) if
665 inhibit_modification_hooks is set.
666 (signal_before_change): Don't check inhibit_modification_hooks any more.
667
fd9c746d 6682014-04-08 Daniel Colascione <dancol@dancol.org>
1b85074c 669
a237d879
DC
670 * alloc.c (sweep_symbols, mark_object): Assert that symbol
671 function cells contain valid lisp objects. (Modified version of
672 patch from Dmitry).
1b85074c
DC
673
674 * alloc.c (detect_suspicious_free): Split actual stack capturing
675 out into new function for easier breakpoint setting.
676 (note_suspicious_free): New function.
677
e3b83880
SM
6782014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
679
680 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
681
682 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
683 (symbol_block_pinned): New var.
684 (Fmake_symbol): Initialize `pinned'.
685 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
686 pinned and signal an error for un-purifiable objects.
687 (pure_cons): Use it.
688 (Fpurecopy): Use it, except for objects that can't be purified.
689 (mark_pinned_symbols): New function.
690 (Fgarbage_collect): Use it.
691 (gc_sweep): Remove hack made unnecessary.
692
6f287c89 6932014-04-07 Glenn Morris <rgm@gnu.org>
50ea0f87
GM
694
695 * keyboard.c (Fopen_dribble_file): Doc tweak.
696
6f287c89 6972014-04-07 Ken Brown <kbrown@cornell.edu>
ebe8e076
KB
698
699 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
700
608a4502
PE
7012014-04-07 Paul Eggert <eggert@cs.ucla.edu>
702
703 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
704 We have a substitute execinfo.h on hosts that lack it.
705 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
706 isn't optimized away.
707
faa52174
PE
7082014-04-05 Paul Eggert <eggert@cs.ucla.edu>
709
710 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
711 * alloc.c (memory_full):
712 * charset.c (syms_of_charset):
713 * doc.c (Fsnarf_documentation):
714 * emacs.c (main):
715 * font.c (BUILD_STYLE_TABLE):
716 * keyboard.c (make_lispy_event):
717 * profiler.c (setup_cpu_timer):
718 * xgselect.c (xg_select):
719 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
720 Use ARRAYELTS.
721 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
722 Replace the only use with ARRAYELTS (font_property_table).
723 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
724
01ae0fbf
DC
7252014-04-03 Daniel Colascione <dancol@dancol.org>
726
1b058e42
GM
727 * xterm.c (x_term_init):
728 * xfns.c (best_xim_style):
729 * xfaces.c (Fdump_colors):
730 * w32fns.c (w32_default_color_map):
731 * w32.c (init_environment, N_ENV_VARS):
732 * unexcw.c (read_exe_header):
733 * term.c (term_get_fkeys_1):
734 * sysdep.c (init_baud_rate):
735 * nsterm.m (ns_convert_key):
736 * nsfns.m (get_geometry_from_preferences):
737 * msdos.c (dos_set_window_size, init_environment):
738 * macfont.m (mac_font_get_glyph_for_cid)
739 (macfont_store_descriptor_attributes)
740 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
741 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
742 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
743 (syms_of_keyboard):
744 * image.c (xpm_str_to_color_key):
745 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
746 * frame.c (x_set_frame_parameters):
747 * fileio.c (Ffile_selinux_context):
748 * emacs.c (sort_args):
749 * dosfns.c (msdos_stdcolor_name):
750 * dired.c (file_attributes):
751 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
752 Change expressions of the form sizeof(arr) / sizeof(arr[0])
9b017563 753 to ARRAYELTS (arr).
705cf384
DC
754
7552014-04-02 Daniel Colascione <dancol@dancol.org>
756
01ae0fbf
DC
757 * data.c (Ffset): Abort if we're trying to set a function call to
758 a dead lisp object.
759
c72d972c 760 * lisp.h (ARRAYELTS): New macro.
01ae0fbf 761
170c12e0
DC
762 * alloc.c: Include execinfo.h if available.
763 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
764 (suspicious_free_record): New structure.
9b017563
JB
765 (suspicious_objects, suspicious_object_index)
766 (suspicious_free_history, suspicious_free_history_index):
767 New variables.
768 (find_suspicious_object_in_range, detect_suspicious_free)
170c12e0
DC
769 (Fsuspicious_object): New functions.
770 (cleanup_vector): Call find_suspicious_object_in_range.
771
ffcd5669
MR
7722014-04-02 Martin Rudalics <rudalics@gmx.at>
773
774 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
775 width from font width (Bug#17163).
776
632e91a6
MR
777 * frame.c (x_set_frame_parameters): Calculate default values of
778 new frame sizes only after all other frame parameters have been
779 processed (Bug#17142).
780
09aba815 7812014-04-02 Ken Brown <kbrown@cornell.edu>
9c67d3ba
KB
782
783 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
784 (Bug#17112)
785
09aba815 7862014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
08be62f4
YM
787
788 * xterm.c (x_draw_image_glyph_string): Adjust image background
789 width accordingly when its x position is adjusted. (Bug#17115)
790
af1a69f4
DA
7912014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
792
793 * font.c (font_list_entities): Do not add empty vector to font cache.
794 (font_matching_entity): Likewise. If matching entity is found, insert
795 1-item vector with this entity instead of entity itself (Bug#17125).
796
ed859c7a
DA
797 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
798
8ec49c53
PE
7992014-04-01 Paul Eggert <eggert@cs.ucla.edu>
800
801 * fns.c (validate_subarray): Rename from validate_substring,
802 since it works for vectors too. New arg ARRAY. Optimize for the
803 non-nil case. Instead of returning bool, throw an error if out of
804 range, so that the caller needn't do that. All uses changed.
805 Report original values if out of range.
806 (Fsubstring, Fsubstring_no_properties, secure_hash):
807 Also optimize the case where FROM is 0 or TO is the size.
808
68712e08
DA
8092014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
810
811 * search.c (Freplace_match): Use make_specified_string.
812 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
813 to catch bogus override face of glyph strings.
fbc87aea
DA
814 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
815 Move common substring range checking code to...
816 (validate_substring): ...this function.
68712e08 817
abe13366
JD
8182014-03-31 Jan Djärv <jan.h.d@swipnet.se>
819
820 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
821
f9d45267
JD
8222014-03-30 Jan Djärv <jan.h.d@swipnet.se>
823
824 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
825 bar is zero height, just return (Bug#16976).
826 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
827
828 * nsterm.h (EmacsView): Add wait_for_tool_bar.
829
830 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
831 is nil. If waiting for toolbar to complete, force a redraw.
832
c3153003
GM
8332014-03-28 Glenn Morris <rgm@gnu.org>
834
7b207d6d
GM
835 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
836 (emacs_bugreport): New variable.
837 (usage_message): Use PACKAGE_BUGREPORT.
838 (syms_of_emacs) <report-emacs-bug-address>: New variable.
839
c3153003
GM
840 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
841
4e74624d
PE
8422014-03-27 Paul Eggert <eggert@cs.ucla.edu>
843
844 Port recent signal-related changes to FreeBSD.
845 Problem reported by Herbert J. Skuhra.
846 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
847 Move decls from here ...
848 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
849
0c4e715c
YM
8502014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
851
852 * w32term.c (x_draw_image_glyph_string): Fix computation of height
853 and width of image background when it is displayed with a 'box'
854 face. (Bug#17115)
855
1e757eb0 8562014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
3fd3e736
PE
857
858 More backward-compatible fix to char-equal core dump (Bug#17011).
859 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
860 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
b18d7820 861
b9b37dd0
JB
8622014-03-27 Juanma Barranquero <lekktu@gmail.com>
863
864 * image.c (init_svg_functions): When loading SVG-related libraries,
865 free already loaded libraries if the initialization fails.
866 (rsvg_handle_set_size_callback): Remove declaration, unused.
867
b18d7820
PE
8682014-03-26 Paul Eggert <eggert@cs.ucla.edu>
869
05b250c2
PE
870 Fix core dump in char-equal (Bug#17011).
871 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
872 unibyte buffers, as we can't tell whether the characters are
873 actually unibyte.
874
b18d7820
PE
875 * insdel.c (adjust_markers_for_delete): Remove unused local.
876
16adf2e6 8772014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
37ea8275
BR
878
879 Have (MARKER . ADJUSTMENT) undo records always be immediately
880 after their corresponding (TEXT . POS) record in undo list.
881 (Bug#16818)
882 * lisp.h (record-delete): New arg record_markers.
883 (record_marker_adjustment): No longer needed outside undo.c.
884 * insdel.c (adjust_markers_for_delete): Move calculation of marker
885 adjustments to undo.c's record_marker_adjustments. Note that
886 fileio.c's decide_coding_unwind is another caller to
887 adjust_markers_for_delete. Because it has undo list bound to t,
888 it does not rely on adjust_markers_for_delete to record marker
889 adjustments.
890 (del_range_2): Swap call to record_delete and
891 adjust_markers_for_delete so as undo marker adjustments are
892 recorded before current deletion's adjustments, as before.
893 (adjust_after_replace):
894 (replace_range): Pass value for new record_markers arg to
895 delete_record.
63032a0e 896 * undo.c (record_marker_adjustment): Rename to
37ea8275
BR
897 record_marker_adjustments and made static.
898 (record_delete): Check record_markers arg and call
899 record_marker_adjustments.
900 (record_change): Pass value for new record_markers arg to
901 delete_record.
902 (record_point): at_boundary calculation no longer needs to account
903 for marker adjustments.
904
16adf2e6 9052014-03-26 Martin Rudalics <rudalics@gmx.at>
f2999a33
MR
906
907 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
908 (Bug#17077).
909
16adf2e6 9102014-03-26 Glenn Morris <rgm@gnu.org>
33f0ba7e
GM
911
912 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
913
16adf2e6 9142014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
f6614a47
SM
915
916 * buffer.c (struct sortvec): Add field `spriority'.
917 (compare_overlays): Use it.
918 (sort_overlays): Set it.
919
16adf2e6 9202014-03-26 Eli Zaretskii <eliz@gnu.org>
88c569ef
EZ
921
922 * xdisp.c (redisplay_window): If all previous attempts to find the
923 cursor row failed, try a few alternatives before falling back to
9729c262 924 the top-most row of the window. Use row_containing_pos. (Bug#17047)
88c569ef 925
5af73b0f
JB
9262014-03-26 Juanma Barranquero <lekktu@gmail.com>
927
928 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
929 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
930
931 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
932 variables on Windows.
933
934 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
935
936 * w32.c (unsetenv): Remove unused var `retval'.
937 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
938
939 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
940 (start_watching): Remove unused var `thr'.
941
942 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
943 (find_child_console): Remove unnecesary var `thread_id'.
944
945 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
946 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
947
11ee65af
GM
9482014-03-26 Glenn Morris <rgm@gnu.org>
949
0b4fe078
GM
950 * filelock.c (Flock_buffer): Doc tweak.
951
11ee65af
GM
952 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
953 * emacs.c (shut_down_emacs):
954 * fileio.c (Finsert_file_contents, write_region):
955 * filelock.c (top-level, syms_of_filelock):
956 * insdel.c (prepare_to_modify_buffer_1):
957 CLASH_DETECTION is always defined now.
958
defd53bd
EZ
9592014-03-25 Eli Zaretskii <eliz@gnu.org>
960
961 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
962 DLL handle, to speed up thread startup.
963
1e952f0a
PE
9642014-03-25 Paul Eggert <eggert@cs.ucla.edu>
965
966 Handle sigmask better with nested signal handlers (Bug#15561).
967 * atimer.c (sigmask_atimers): Remove.
968 Remaining use rewritten to use body of this function.
969 * atimer.c (block_atimers, unblock_atimers):
970 * callproc.c (block_child_signal, unblock_child_signal):
971 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
972 New arg OLDSET. All callers changed.
973 * atimer.c (block_atimers, unblock_atimers):
974 * callproc.c (block_child_signal, unblock_child_signal):
975 * keyboard.c (handle_interrupt):
976 * sound.c (vox_configure, vox_close):
977 Restore the old signal mask rather than unilaterally clearing bits
978 from the mask, in case a handler is running within another
979 handler. All callers changed.
980 * lisp.h, process.c, process.h, term.c:
981 Adjust decls and callers to match new API.
982 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
983 signal handlers aren't supposed to use floating point anyway.
984 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
985
b029599f
DC
9862014-03-23 Daniel Colascione <dancol@dancol.org>
987
988 Split gc_sweep into discrete functions for legibility and better
989 stack traces.
990
9b017563 991 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
b029599f 992 (sweep_vectors): Fix typo in comment.
9b017563
JB
993 (sweep_conses, sweep_floats, sweep_intervals)
994 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
b029599f
DC
995 (gc_sweep): Call new functions, to which existing functionality is
996 moved.
997 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
998
17bf44f8
JB
9992014-03-23 Juanma Barranquero <lekktu@gmail.com>
1000
1001 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
1002
b27a4043
DC
10032014-03-23 Daniel Colascione <dancol@dancol.org>
1004
df3964ce
DC
1005 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
1006 only if xic_style calls for it. This change allows Emacs to work
d2933655
DC
1007 with ibus. Also, don't leak resources if create_frame_xic fails,
1008 and stop caching xic_style across different displays.
577b2ffd
DC
1009 (supported_xim_styles): Make const.
1010 (best_xim_style): Remove first parameter: it's always just
1011 supported_xim_styles. Change to look at supported_xim_styles
1012 directly.
b27a4043 1013
a3116188
DC
10142014-03-23 Daniel Colascione <dancol@dancol.org>
1015
1016 * term.c (init_tty): Rearrange condition for clarity; print
1017 appropriate diagnostic.
1018
3768a869
DC
10192014-03-23 Daniel Colascione <dancol@dancol.org>
1020
1021 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
1022 array. (ASAN caught.)
1023
00156f95
GM
10242014-03-22 Glenn Morris <rgm@gnu.org>
1025
1026 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
1027
ea64063f
DC
10282014-03-22 Daniel Colascione <dancol@dancol.org>
1029
1030 * process.c (conv_sockaddr_to_lisp): When extracting the string
00156f95 1031 names of AF_LOCAL sockets, stop before reading uninitialized memory.
ea64063f 1032
fef27dc1
YM
10332014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1034
1035 Fix regression introduced by patch for Bug#10500.
1036 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
1037 * w32term.c (x_draw_image_relief): Likewise.
1038
21e18b30
MR
10392014-03-21 Martin Rudalics <rudalics@gmx.at>
1040
1041 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
1042 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
1043 maximize a frame for odd default fonts.
1044
26e91130
GM
10452014-03-21 Glenn Morris <rgm@gnu.org>
1046
1047 * minibuf.c (history-length): Increase default from 30 to 100.
1048
f20b8315
DC
10492014-03-21 Daniel Colascione <dancol@dancol.org>
1050
c4beb8da
DC
1051 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
1052 every time we switch to minibuffer.
1053
f20b8315
DC
1054 * alloc.c (lisp_align_malloc, allocate_string_data)
1055 (allocate_vectorlike): Allow mmap allocation of lisp objects.
9b017563 1056 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
f20b8315 1057
6d731d41
EZ
10582014-03-21 Eli Zaretskii <eliz@gnu.org>
1059
1060 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
1061 support more "verbs".
1062
f58269c4
DC
10632014-03-21 Daniel Colascione <dancol@dancol.org>
1064
1065 Always prohibit dumping a dumped Emacs.
1066
1067 * emacs.c (might_dump): New variable.
1068 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
1069 * lisp.h (might_dump): Declare.
1070 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
1071
0df098bf
PE
10722014-03-20 Paul Eggert <eggert@cs.ucla.edu>
1073
1074 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
1075
caecb91c
SM
10762014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
1077
049fac7c
SM
1078 * doc.c (store_function_docstring): Warn when we don't know where to
1079 put a docstring.
1080 (Fsubstitute_command_keys): Don't advertise the fact that
1081 text-properties are dropped, since we think it's a bug that we'll fix
1082 in 24.5.
1083
caecb91c
SM
1084 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
1085 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
1086 * frame.c (frame_garbaged): Make "docstring" more precise.
1087
7b9cb544
GM
10882014-03-20 Glenn Morris <rgm@gnu.org>
1089
1090 * charset.c (init_charset): When we cannot find the charsets directory,
1091 mention if EMACSDATA is set.
1092
37ca9077
PE
10932014-03-19 Paul Eggert <eggert@cs.ucla.edu>
1094
d16ae622
PE
1095 * fns.c (Frandom): Fix rare bug where the result isn't random.
1096
37ca9077
PE
1097 Fix porting inconsistency about rounding to even.
1098 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
1099 This way, the unusual !HAVE_RINT case acts like the usual
1100 HAVE_RINT case, and we can fix the documentation accordingly.
1101
722493d7
EZ
11022014-03-19 Eli Zaretskii <eliz@gnu.org>
1103
1104 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
1105 (w32_wnd_proc): Initialize the dwHoverTime member of
1106 TRACKMOUSEEVENT structure.
1107
525d9a3c
TZ
11082014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
1109
1110 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
1111
2a3d9a06
EZ
11122014-03-16 Eli Zaretskii <eliz@gnu.org>
1113
1114 * search.c (find_newline): Speed up the function when using the
5f0da6ce 1115 newline cache, by halving the number of calls to
2a3d9a06
EZ
1116 region_cache_forward and region_cache_backward. (Bug#16830)
1117
b6d8543c
JB
11182014-03-15 Juanma Barranquero <lekktu@gmail.com>
1119
1120 * buffer.c (Fset_buffer): Document return value (bug#17015).
1121
cfd5e825
MR
11222014-03-14 Martin Rudalics <rudalics@gmx.at>
1123
1124 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
1125 nil, always resize character wise to avoid potential loss of the
1126 mode line (Bug#16923 related).
1127
8960529e
MR
11282014-03-12 Martin Rudalics <rudalics@gmx.at>
1129
1130 * frame.c (x_set_frame_parameters): Always calculate new sizes
1131 pixelwise to avoid potential loss when rounding.
1132
b0b486db
DA
11332014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
1134
1135 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
1136 * xterm.c (x_free_frame_resources): Free all allocated cursors.
1137
70db0db7
EZ
11382014-03-10 Eli Zaretskii <eliz@gnu.org>
1139
1140 * w32.c (fstatat): Don't add an extra slash if the argument ends
1141 with a slash: this fails the subsequent call to stat_worker on
1142 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
1143
7e940b65
MR
11442014-03-09 Martin Rudalics <rudalics@gmx.at>
1145
1146 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
1147
e61a31bf
JD
11482014-03-08 Jan Djärv <jan.h.d@swipnet.se>
1149
1150 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
1151
7e940b65
MR
1152 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
1153 when frame is only on one screen (Bug#14713).
e61a31bf 1154
2c65ad21
EZ
11552014-03-08 Eli Zaretskii <eliz@gnu.org>
1156
1157 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
1158 there's a valid wrap point in the display line, the last glyph
1159 cannot "just barely fit" on this row, because display_line doesn't
1160 let it. Instead, proceed as if the last glyph didn't fit, so that
1161 we eventually back up the iterator to the wrap point. This avoids
1162 delusional behavior of move_it_to, whereby it proceeds to the next
1163 display line, but sets current_x to zero for all the glyphs that
caecb91c
SM
1164 without word-wrap would fit on the previous display line.
1165 One result was that visual-order cursor movement behaved erratically
2c65ad21
EZ
1166 under word-wrap.
1167 (Fmove_point_visually): Add code to find the x coordinate of the
1168 last character before wrap point, under word-wrap on a TTY.
1169
b646ea12
EZ
11702014-03-07 Eli Zaretskii <eliz@gnu.org>
1171
1172 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
1173 also return value of MOVE_POS_MATCH_OR_ZV from
1174 move_it_in_display_line_to, when moving from beginning of line to
1175 point's position. (Bug#16961)
1176
2c6053e8
MR
11772014-03-07 Martin Rudalics <rudalics@gmx.at>
1178
1179 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
1180 * window.c (Fselect_window): Explain NORECORD and
1181 `buffer-list-update-hook' in doc-string.
1182
cac0a1d6
MR
11832014-03-06 Martin Rudalics <rudalics@gmx.at>
1184
1185 * window.c (Fother_window_for_scrolling): Check that
1186 Vother_window_scroll_buffer is a buffer.
1187
12e852a2
DA
11882014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
1189
1190 * xterm.c (xim_initialize): Always pass a copy of resource name
1191 to XRegisterIMInstantiateCallback and eassert whether return
1192 value is True. Passing copy is important because Xlib doesn't
1193 make its own copy and resource name argument usually points to
1194 SSDATA (Vx_resource_name), which may be changed from Lisp.
1195 (xim_close_display): For XUnregisterIMInstantiateCallback,
1196 always eassert return value and pass exactly the same values
caecb91c
SM
1197 as were used for XRegisterIMInstantiateCallback.
1198 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
12e852a2
DA
1199 sources to check why if you are interested.
1200
e1a2cb1c
MR
12012014-03-05 Martin Rudalics <rudalics@gmx.at>
1202
1203 * dispnew.c (change_frame_size_1): Add new_lines instead of
1204 new_height, the latter may be still zero if passed as such.
1205 * window.c (Fwindow_pixel_height): Mention bottom divider in
1206 doc-string.
1207
d2f720ac
PE
12082014-03-05 Paul Eggert <eggert@cs.ucla.edu>
1209
e1a2cb1c
MR
1210 Fix "resource temporarily unavailable" with xgselect
1211 (Bug#16925).
e6e8a5eb
PE
1212 * xgselect.c: Include <stdbool.h>.
1213 (xg_select) [!USE_GTK]: Don't lose track of errno.
1214
d2f720ac
PE
1215 Fix minor --enable-gcc-warnings issues.
1216 * widget.c (update_various_frame_slots, EmacsFrameResize):
1217 Avoid unused locals. Prefer 'if' to '#if' when either will do.
1218
94a089b5
KB
12192014-03-04 Ken Brown <kbrown@cornell.edu>
1220
1221 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
1222 represent the actual adjustment needed for alignment.
1223
201572ec
EZ
12242014-03-04 Eli Zaretskii <eliz@gnu.org>
1225
1226 * gmalloc.c (aligned_alloc): Don't allocate more memory than
1227 needed, and don't reallocate if the initial allocation already
1228 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
1229
a55130ca
YM
12302014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1231
1232 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
1233 (Bug#16932)
1234
5b87d0d9
MN
12352014-03-04 Michal Nazarewicz <mina86@mina86.com>
1236
1237 * cmds.c (delete-char): Update docstring pointing out that the
1238 function ignores `delete-active-region' and `overwrite-mode'.
1239
bd650c24
EZ
12402014-03-03 Eli Zaretskii <eliz@gnu.org>
1241
757c70af
EZ
1242 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
1243
bd650c24
EZ
1244 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
1245 allocated buffer due to alignment.
1246 (freehook): If the block to be freed was allocated by
1247 'aligned_alloc', find its real pointer before calling 'free'.
1248 (Bug#16901)
1249 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
1250 backtrace.
1251
8c1c7611
DA
12522014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
1253
1254 * font.c (toplevel): Adjust comment about font cache layout.
1255 (font_clear_cache): Fix to match real font cache layout.
1256 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
1257 (Fframe_font_cache) [FONT_DEBUG]: New function.
1258 (syms_of_font) [FONT_DEBUG]: Defsubr it.
1259
19dae293
DA
1260 Avoid crashes when X fonts are erroneously freed on reused X
1261 'Display *' connection data (Bug#16069). Note that X font
1262 resources still may be leaked, but currently there is no way
1263 to completely avoid it.
1264 * xterm.h (struct x_display_info): New member x_id. Add comments.
1265 * xterm.c (x_display_id): New variable.
1266 (x_term_init): Assign identifier to each opened X connection.
1267 * xfont.c (struct xfont): New member x_display_id.
1268 (xfont_open): Initialize it with frame's display id.
1269 (xfont_close): Check whether font's display id matches the one
1270 recorded for the given display. Adjust comment.
1271 * xftfont.c (struct xftfont_info):
1272 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
1273
2907acd4
MR
12742014-03-01 Martin Rudalics <rudalics@gmx.at>
1275
1276 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
1277 * window.c (Fother_window_for_scrolling): Don't try to scroll a
1278 killed Vother_window_scroll_buffer.
1279 (Vother_window_scroll_buffer): Fix doc-string accordingly.
1280
cb8b26b4
EZ
12812014-03-01 Eli Zaretskii <eliz@gnu.org>
1282
1283 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
1284 that start with more than 2 slashes as UNCs. (Bug#16751)
1285
8268febf
PE
12862014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
1287
1288 Fix a few crashes and leaks when cloning C strings.
1289 * alloc.c, lisp.h (dupstring): New function.
1290 * gtkutil.c (xg_get_font):
1291 * term.c (tty_default_color_capabilities):
1292 * xsettings.c (store_monospaced_changed)
1293 (store_font_name_changed, parse_settings)
1294 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
1295 This avoids some unlikely crashes due to accessing freed storage,
1296 and avoids some minor memory leaks in the more-typical case.
1297
5c809195
MR
12982014-02-28 Martin Rudalics <rudalics@gmx.at>
1299
1300 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
1301 cursor when modeline can't be dragged (Bug#16647).
1302
2241d76e
GM
13032014-02-28 Glenn Morris <rgm@gnu.org>
1304
1305 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
1306 from custom-delayed-init-variables. (Bug#11565)
1307
653b6ea3
MR
13082014-02-27 Martin Rudalics <rudalics@gmx.at>
1309
1310 More fixes for mouse glyph calculations (Bug#16647).
1311 * window.c (coordinates_in_window): In intersection of
1312 horizontal and vertical window dividers prefer the horizontal
1313 one. Add some extra parens to last fix.
1314 (window_relative_x_coord): Return x-coordinate for header and
1315 mode line too.
1316 * xdisp.c (remember_mouse_glyph): In text area don't extend
1317 glyph into mode line to show the vertical drag cursor there
1318 immediately. Subdivide mouse glyphs in right fringes to show a
1319 horizontal drag cursor as soon as we enter the "grabbable width"
1320 portion. Handle vertical border case separately. Do not
1321 subdivide window divider areas.
1322 (note_mouse_highlight): On bottom divider of bottommost windows
1323 show vertical drag cursor only when the minibuffer window can be
1324 resized.
1325
11de63ed
EZ
13262014-02-27 Eli Zaretskii <eliz@gnu.org>
1327
1328 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
1329 reset by the face of the object just displayed. See also bug#76.
1330 (get_next_display_element): If the string came from a display
1331 property, examine the box face attribute at it->position, not at
1332 it->current.pos, since the latter was not updated yet. (Bug#16870)
1333 (handle_face_prop): Improve commentary.
1334
d8c25f59
MA
13352014-02-27 Michael Albinus <michael.albinus@gmx.de>
1336
1337 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
1338 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
1339
aea124c4
MR
13402014-02-26 Martin Rudalics <rudalics@gmx.at>
1341
1342 Fixes around Bug#16647.
1343 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
1344 ON_BOTTOM_DIVIDER cases.
1345 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
1346 only if the window has no right divider.
1347 (Fcoordinates_in_window_p): Fix doc-string.
1348
0e46275b
JB
13492014-02-25 Juanma Barranquero <lekktu@gmail.com>
1350
1351 * lread.c (Funintern): Fix doc to match advertised calling convention.
1352
7c56ecf5
DC
13532014-02-24 Daniel Colascione <dancol@dancol.org>
1354
1355 * keyboard.c (read_char): Close race that resulted in lost events.
1356
f33095ed
GM
13572014-02-22 Glenn Morris <rgm@gnu.org>
1358
ca58fa73
GM
1359 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
1360 * window.c (window-resize-pixelwise): Doc fixes.
1361
f33095ed
GM
1362 * process.c (Finternal_default_process_filter)
1363 (Finternal_default_process_sentinel): Doc tweaks.
1364
458e643b
GM
13652014-02-21 Glenn Morris <rgm@gnu.org>
1366
1367 * process.c (Fprocess_buffer, Faccept_process_output)
1368 (Finternal_default_process_filter, Finternal_default_process_sentinel):
1369 Doc fixes.
1370
8dd3e94f
MR
13712014-02-21 Martin Rudalics <rudalics@gmx.at>
1372
1373 * window.c (Fwindow_scroll_bar_width): New function.
1374
9901fa1a
PE
13752014-02-21 Paul Eggert <eggert@cs.ucla.edu>
1376
1377 Pacify GCC when configuring with --enable-gcc-warnings.
1378 * xdisp.c (move_it_in_display_line_to) [lint]:
1379 Initialize recently-added local.
1380
48198420
DC
13812014-02-21 Daniel Colascione <dancol@dancol.org>
1382
1383 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
1384
44a2be2d
EZ
13852014-02-20 Eli Zaretskii <eliz@gnu.org>
1386
1387 * xdisp.c (init_iterator): Don't dereference a bogus face
1388 pointer. (Bug#16819)
dba8296c
EZ
1389 (try_cursor_movement): Don't use cursor position if
1390 set_cursor_from_row failed to compute it. This avoids assertion
1391 violations in MATRIX_ROW.
679f7827
EZ
1392 (move_it_in_display_line_to): Save the iterator state in ppos_it
1393 only once per call. Reimplement the method used to return to the
1394 best candidate position if all the positions found in display line
1395 are beyond TO_CHARPOS. This cuts down the number of calls to
1396 bidi_shelve_cache, which moves a lot of stuff when lines are long
1397 and include bidirectional text. (Bug#15555)
44a2be2d 1398
189e7007
GM
13992014-02-20 Glenn Morris <rgm@gnu.org>
1400
1401 * data.c (Fdefalias): Doc fix.
1402
c0213820
EZ
14032014-02-19 Eli Zaretskii <eliz@gnu.org>
1404
d34f67da
EZ
1405 * xdisp.c (display_line): Fix horizontal scrolling of large images
1406 when fringes are turned off. This comes at a price of not
1407 displaying the truncation/continuation glyphs in this case.
1408 (Bug#16806)
1409
c0213820
EZ
1410 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
1411 CreateDIBSection returns an error indication, zero out *ximg after
1412 destroying the image. This avoids crashes in memory allocations
1413 due to the fact that some of the callers also call
1414 x_destroy_x_image, which will attempt to free an already free'd
1415 block of memory.
1416
5185f8ed
MR
14172014-02-18 Martin Rudalics <rudalics@gmx.at>
1418
1419 * widget.c (update_various_frame_slots): Don't set
1420 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
1421
1825653e
MA
14222014-02-18 Michael Albinus <michael.albinus@gmx.de>
1423
1424 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
1425
3cb98721
PE
14262014-02-17 Paul Eggert <eggert@cs.ucla.edu>
1427
1428 temacs --daemon fix (Bug#16599).
1429 * emacs.c (main): Initialize daemon_pipe[1] here ...
1430 (syms_of_emacs): ... instead of here.
1431
35e951cd 14322014-02-16 Anders Lindgern <andlind@gmail.com>
62901354
AL
1433
1434 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
1435 is set (Bug#16505).
1436
fa8ac13c
DC
14372014-02-16 Daniel Colascione <dancol@dancol.org>
1438
1439 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
1440 (xd_get_connection_address): Use it.
1441 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
1442 xd_get_connection_address because the latter signals if the bus
1443 we're trying to close is already disconnected.
1444
e2607667
EZ
14452014-02-13 Eli Zaretskii <eliz@gnu.org>
1446
1447 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
1448 argument to CreateThread. This avoids segfaults on Windows 9X.
1449 Reported by oslsachem <oslsachem@gmail.com>.
1450
d51c175a
PE
14512014-02-13 Paul Eggert <eggert@cs.ucla.edu>
1452
1453 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
1454 * unexhp9k800.c (unexec_error): New function, to simplify the code.
1455 (check_lseek): New function, to report lseek errors.
1456 (save_data_space, update_file_ptrs, read_header, write_header)
1457 (copy_file, copy_rest, unexec): Use these news functions.
1458 (update_file_ptrs): Don't assume wraparound behavior when
1459 converting a large size_t value to off_t.
1460
28c16c40
DA
14612014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
1462
1463 * composite.c (fill_gstring_header): Pass positions as C integers
1464 and move parameters checking to...
ccd5d23b
DA
1465 (Fcomposition_get_gstring): ...this function. Handle case when
1466 buffer positions are in reversed order and avoid crash (Bug#16739).
1467 Adjust docstring.
28c16c40
DA
1468 * buffer.c (validate_region): Mention current buffer in error message.
1469
c295fc18 14702014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
a9a61c77
JD
1471
1472 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
1473
81bf5420
LI
14742014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
1475
1476 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
1477
9a84bfd6
GM
14782014-02-11 Glenn Morris <rgm@gnu.org>
1479
1480 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
1481 Replace refs to "OpenStep" in messages.
1482
e41fe0d3
PE
14832014-02-10 Paul Eggert <eggert@cs.ucla.edu>
1484
1485 Avoid "." at end of error diagnostics.
1486 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
1487 * font.c (Ffont_at):
1488 * nsfns.m (ns_display_info_for_name):
1489 * nsselect.m (Fx_own_selection_internal):
1490 * nsterm.m (performDragOperation:):
1491 Remove "." from end of diagnostic.
1492
a3a8a7da
LI
14932014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
1494
1495 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
1496 unintuitive (bug#15824).
8cd86d04 1497 (Fyes_or_no_p): Doc fix (bug#15456).
a3a8a7da 1498
c6795590
DA
14992014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
1500
1501 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
1502 and avoid warning.
575593db
DA
1503 * eval.c (call_debugger): When exiting the debugger, do not allow
1504 max_specpdl_size less than actual binding depth (Bug#16603).
1505 (syms_of_eval): Adjust docstring.
c6795590 1506
fe461220
LI
15072014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
1508
c838bca9
LI
1509 * cmds.c (Fself_insert_command): Output a clearer error message on
1510 negative repetitions (bug#9476).
1511
fe461220
LI
1512 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
1513
af3e68a0
LI
15142014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
1515
8acaaad7
LI
1516 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
1517
aa60235a
LI
1518 * minibuf.c (Fread_string): Doc clarification (bug#15422).
1519
af3e68a0
LI
1520 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
1521
85ade7ee
JB
15222014-02-08 Juanma Barranquero <lekktu@gmail.com>
1523
1524 * keyboard.c (Frecursive_edit): Fix typo in docstring.
1525
bb01d7bb
LI
15262014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
1527
fff711ee
LI
1528 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
1529
bb01d7bb
LI
1530 * keyboard.c (Frecursive_edit): Say more precicely how throwing
1531 `exit' works (bug#15865).
1532
99f10a5d
MR
15332014-02-07 Martin Rudalics <rudalics@gmx.at>
1534
9be95071 1535 Constrain window box/body sizes and margin widths (Bug#16649).
99f10a5d
MR
1536 * xdisp.c (window_box_width): Don't return less than zero.
1537 (window_box_left_offset, window_box_right_offset): Don't return
1538 more than the window's pixel width.
dc0e4c48
MR
1539 * window.c (window_body_height, window_body_width): Don't return
1540 negative value.
9be95071 1541 (window_resize_apply): Adjust margin width, if necessary.
99f10a5d 1542
a0baf35f
GM
15432014-02-07 Glenn Morris <rgm@gnu.org>
1544
1545 * nsterm.m (syms_of_nsterm): Doc fix.
1546
829f4f22
EZ
15472014-02-06 Eli Zaretskii <eliz@gnu.org>
1548
5b87d0d9
MN
1549 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
1550 New variables: pointers through which to call the respective APIs.
829f4f22 1551 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
5b87d0d9
MN
1552 (filename_from_ansi, sys_link, check_windows_init_file):
1553 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
829f4f22
EZ
1554 This is required on Windows 9X, where we dynamically load
1555 UNICOWS.DLL which has their non-stub implementations.
1556 (maybe_load_unicows_dll): Assign addresses to these 2 function
1557 pointers after loading UNICOWS.DLL.
1558
1559 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
1560 MultiByteToWideChar and WideCharToMultiByte through function
1561 pointers.
1562
5b87d0d9
MN
1563 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
1564 New declarations.
829f4f22 1565
029788c7
JD
15662014-02-06 Jan Djärv <jan.h.d@swipnet.se>
1567
1568 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
1569 for OSX >= 10.9 if separate spaces are used.
1570 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
1571
314ffdb1
GM
15722014-02-06 Glenn Morris <rgm@gnu.org>
1573
1574 * buffer.c (cache-long-scans): Doc fix.
1575
6d48053b
EZ
15762014-02-05 Eli Zaretskii <eliz@gnu.org>
1577
1578 * w32fns.c (Fw32_shell_execute): Doc fix.
1579
bfdd79d3
BG
15802014-02-05 Bastien Guerry <bzg@gnu.org>
1581
1582 * syntax.c (Fforward_word): Call Fconstrain_to_field with
1583 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
1584
fa49abf8
MR
15852014-02-05 Martin Rudalics <rudalics@gmx.at>
1586
415e3810
MR
1587 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
1588 outside the window (Bug#16649).
1589
fa49abf8
MR
1590 * xdisp.c (note_mouse_highlight): When entering a margin area show
1591 a non-text cursor (Bug#16647).
1592
8e5917ec
PE
15932014-02-04 Paul Eggert <eggert@cs.ucla.edu>
1594
1595 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
1596 It prompted a compile-time diagnostic on GNU/Linux.
1597 Simplify to remove the need for the label.
1598
e139a33c
EZ
15992014-02-04 Eli Zaretskii <eliz@gnu.org>
1600
1601 * w32menu.c (w32_popup_dialog): Don't condition the whole function
1602 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
1603 to show it; otherwise return 'unsupported--w32-dialog' to signal
5b87d0d9
MN
1604 to the caller that emulation with menus is necessary.
1605 This resurrects code inadvertently deleted by the 2013-10-08 commit.
e139a33c
EZ
1606 (Bug#16636)
1607 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
1608
1609 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
1610 by HAVE_DIALOGS.
1611
1612 * menu.c (Fx_popup_dialog): Don't condition the call to
1613 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
1614 special symbol 'unsupported--w32-dialog', emulate the dialog with
1615 a menu by calling x-popup-menu.
1616
1617 * menu.h (Qunsupported__w32_dialog): New extern variable.
1618
86d2bf49
MA
16192014-02-04 Michael Albinus <michael.albinus@gmx.de>
1620
1621 * keyboard.c (kbd_buffer_get_event): Read file notification events
1622 also in batch mode.
1623
1624 * xgselect.c (xg_select): Read glib events in any case, even if
1625 there are no file descriptors to watch for. (Bug#16519)
1626
764ec9e5
MR
16272014-02-03 Martin Rudalics <rudalics@gmx.at>
1628
1629 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
1630 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
1631 * w32term.c (w32_draw_window_divider): Handle first and last
1632 pixels specially.
1633 * w32term.h (w32_fill_area_abs): New function.
1634 * xdisp.c (x_draw_right_divider): Don't draw over bottom
1635 divider.
1636 * xfaces.c (realize_basic_faces): Handle new face ids.
1637 * xfns.c (Fx_create_frame): Call x_default_parameter for right
1638 and bottom divider width.
1639 * xterm.c (x_draw_window_divider): Handle first and last pixels
1640 specially.
1641
34baf96c
DA
16422014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
1643
1644 * print.c (Fexternal_debugging_output): Add cast to pacify
1645 --enable-gcc-warnings.
9cad4576
DA
1646 * eval.c (call_debugger): Grow specpdl if the debugger was
1647 entered due to specpdl overflow (Bug#16603) and allow more
1648 specpdl space for the debugger itself.
34baf96c 1649
b4168649
MR
16502014-02-02 Martin Rudalics <rudalics@gmx.at>
1651
1652 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
1653 (Bug#16619)
1654
cb13e9a8
EZ
16552014-02-01 Eli Zaretskii <eliz@gnu.org>
1656
28e6cee8
EZ
1657 * w32fns.c (Ffile_system_info): Use WINAPI in the function
1658 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
1659
9ef58a52
EZ
1660 * print.c (Fexternal_debugging_output): If the argument character
1661 is non-ASCII, encode it with the current locale's encoding before
1662 writing the result to the terminal. (Bug#16448)
1663
cb13e9a8
EZ
1664 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
1665 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
1666 for it. (Bug#16558)
1667
507a173f
AS
16682014-01-30 Andreas Schwab <schwab@linux-m68k.org>
1669
1670 * process.c (create_process): Reset SIGPROF handler in the child.
1671 * callproc.c (call_process): Likewise.
1672
e9abb8a8
PE
16732014-01-29 Paul Eggert <eggert@cs.ucla.edu>
1674
1675 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
1676
198af6df
EZ
16772014-01-29 Eli Zaretskii <eliz@gnu.org>
1678
824a51e6
EZ
1679 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
1680 of zero to print strings, GDB doesn't like it.
1681
198af6df
EZ
1682 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
1683 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
1684 we still use correct addresses. (Bug#16576)
1685
52840a9c
KH
16862014-01-27 K. Handa <handa@gnu.org>
1687
f2726fa2
GM
1688 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
1689 to preserve the code detection behavior of 24.3.
52840a9c 1690 * coding.h (struct coding_system): New member detected_utf8_bytes.
52840a9c
KH
1691 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
1692 (decode_coding_gap): Use short cut for UTF-8 file reading only
1693 when coding->detected_utf8_bytes equals to coding->src_bytes.
52840a9c
KH
1694 * fileio.c (Finsert_file_contents): Cancel the previous change.
1695
5442c6ce
MR
16962014-01-29 Martin Rudalics <rudalics@gmx.at>
1697
1698 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
1699 that are not visible.
1700
61c2b0b3
JD
17012014-01-29 Jan Djärv <jan.h.d@swipnet.se>
1702
1703 * xmenu.c (create_and_show_popup_menu): Handle case when no key
1704 is grabbed (Bug#16565).
1705
1dcb169c
MR
17062014-01-28 Martin Rudalics <rudalics@gmx.at>
1707
1708 * xdisp.c (last_max_ascent): Re-remove after erroneously
1709 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
1710 from 2013-03-29.
1711 (move_it_to): Re-remove reference to last_max_ascent.
1712 (Fwindow_text_pixel_size): Add iterator's max_ascent and
5b87d0d9
MN
1713 max_descent here instead of calling line_bottom_y.
1714 Fix doc-string.
1dcb169c 1715
6affb4a8
DA
17162014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
1717
1718 * terminal.c (initial_free_frame_resources): New function.
1719 (init_initial_terminal): Install new hook to free face cache
1720 on initial frame and avoid memory leak. For details, see
1721 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
2275de87 1722 * xfaces.c (free_frame_faces): Adjust comment.
6affb4a8 1723
12cb2b06
PE
17242014-01-26 Paul Eggert <eggert@cs.ucla.edu>
1725
1726 * data.c (Fstring_to_number): Document results if unparsable
1727 (Bug#16551).
1728
4988180d
JD
17292014-01-26 Jan Djärv <jan.h.d@swipnet.se>
1730
1731 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
1732
4f8c23b1
PE
17332014-01-26 Paul Eggert <eggert@cs.ucla.edu>
1734
e6f29a68
PE
1735 When decoding, prefer ptrdiff_t to int for buffer positions etc.
1736 * coding.c (detect_coding_utf_8, emacs_mule_char)
1737 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
1738 (check_utf_8, decode_coding):
1739 * coding.h (struct coding_system.errors):
1740 Use ptrdiff_t, not int, for integer values derived from buffer and
1741 string positions.
1742
4f8c23b1
PE
1743 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
1744 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
1745 before invoking decode_coding_gap, since there's just one block.
1746
45ccd909
MR
17472014-01-25 Martin Rudalics <rudalics@gmx.at>
1748
1749 Fix handling of face attributes in Fx_create_frame (Bug#16529).
1750 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
1751 too early. Again run change_frame_size before assigning menu-
1752 and tool-bar-lines.
1753
83682f3e
FP
17542014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
1755
1756 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
1757 arrives, call x_check_fullscreen, in case the new display has a
1758 different resolution. (Bug#16517)
1759
e96f7bf1
EZ
17602014-01-25 Eli Zaretskii <eliz@gnu.org>
1761
1762 * term.c (read_menu_input): If the selected frame changes, exit
1763 the menu.
1764 (tty_menu_show): If the selected frame changes while we displayed
1765 a menu, throw to top level. (Bug#16479)
1766
afd4479f
SM
17672014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
1768
1769 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
1770
0fadc0b0
PE
17712014-01-24 Paul Eggert <eggert@cs.ucla.edu>
1772
1773 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
1774 * data.c (count_one_bits_word): Fix bug (negated comparison)
1775 when BITS_PER_ULL < BITS_PER_BITS_WORD.
1776
aac1f8dd
DA
17772014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1778
5b87d0d9
MN
1779 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
1780 Avoid undefined behavior by initializing display property bit of a
aac1f8dd
DA
1781 string processed by the bidirectional iterator. For details, see
1782 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
1783
ed44be70
PE
17842014-01-23 Paul Eggert <eggert@cs.ucla.edu>
1785
1786 Minor cleanup of previous change.
1787 * image.c (imagemagick_error, Fimagemagick_types):
1788 Omit some recently-introduced and unnecessary casts and assignments.
1789
565935c8
DA
17902014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
1791
1792 Fix two memory leaks discovered with Valgrind.
1793 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
1794 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
1795
6cb4da45
MR
17962014-01-22 Martin Rudalics <rudalics@gmx.at>
1797
1798 Fixes in window size functions around Bug#16430 and Bug#16470.
1799 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
1800 (Fwindow_mode_line_height, Fwindow_header_line_height)
1801 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
1802 Minor doc-string adjustments.
1803 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
1804 Rewrite doc-strings.
1805 (window_body_height, window_body_width): Do not count partially
1806 visible lines/columns when PIXELWISE is nil (Bug#16470).
1807 (Qfloor, Qceiling): New symbols.
1808
f7551c6c
EZ
18092014-01-21 Eli Zaretskii <eliz@gnu.org>
1810
1811 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
1812 when the image cache is not yet allocated. (Bug#16509)
1813
5004c3bf
DA
18142014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
1815
1816 * buffer.c (Fkill_buffer): When killing an indirect buffer,
1817 re-attach intervals to its base buffer (Bug#16502).
1818 * intervals.c (set_interval_object): Move from here...
1819 * intervals.h (set_interval_object): ... to here. Fix comments.
1820
f952002e
PE
18212014-01-20 Paul Eggert <eggert@cs.ucla.edu>
1822
009581fa 1823 Avoid undefined behavior by initializing buffer redisplay bit.
3c35702f
PE
1824 Problem reported by Dmitry Antipov in
1825 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
009581fa 1826 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
3c35702f 1827
f952002e
PE
1828 Revert some of the CANNOT_DUMP fix (Bug#16494).
1829 * lread.c (init_lread): Fix typo: NILP, not !NILP.
1830
21f95411
EZ
18312014-01-19 Eli Zaretskii <eliz@gnu.org>
1832
1833 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
1834 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
1835 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
1836 they are replaced by macros that expand into direct calls to the
1837 corresponding functions from GDI32.DLL.
1838 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
1839 variables in the Cygwin build, they are unused.
1840
d25f735b
KH
18412014-01-19 K. Handa <handa@gnu.org>
1842
1843 * composite.c (composition_update_it): Fix previous change.
1844
5197f0c2
EZ
18452014-01-18 Eli Zaretskii <eliz@gnu.org>
1846
1847 Fix file name handling on MS-Windows 9X.
1848 * w32.c (maybe_load_unicows_dll): New function.
1849
1850 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
1851 on, to make sure we can convert file names to and from UTF-8 on
1852 Windows 9X. This fixes a failure to start up because Emacs cannot
1853 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
1854
1855 * w32font.c [WINDOWSNT]: Include w32.h.
1856 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
1857 of implementing the same stuff.
1858 Remove now unused g_b_init_is_windows_9x.
1859
1860 * w32.h (maybe_load_unicows_dll): Add prototype.
1861
20adfbd8
EZ
18622014-01-17 Eli Zaretskii <eliz@gnu.org>
1863
1864 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
1865 switch to single keyboard. Prevents daemon crashes when a new
1866 client connects while we show a TTY menu in an existing client.
1867 (Bug#16479)
1868
d1eaf34b
PE
18692014-01-14 Paul Eggert <eggert@cs.ucla.edu>
1870
1871 Fix MinGW64 porting problem with _setjmp.
1872 Reported by Eli Zaretskii in:
1873 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
1874 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
1875 the old _setjmp and _longjmp. All uses changed.
1876
1b49bd5d
DC
18772014-01-13 Daniel Colascione <dancol@dancol.org>
1878
5b87d0d9
MN
1879 * textprop.c (Fremove_list_of_text_properties):
1880 Correctly handle reaching the end of the interval tree. (Bug#15344)
1b49bd5d 1881
a3f2bf1b
MR
18822014-01-13 Martin Rudalics <rudalics@gmx.at>
1883
1884 * xdisp.c (resize_mini_window): Round height to a multiple of
1885 frame's line height. Fix bug in calculation of window start
1886 position (Bug#16424).
1887
6c21e306
JD
18882014-01-13 Jan Djärv <jan.h.d@swipnet.se>
1889
1890 * macfont.m: Include termchar.h.
1891 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
1892 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
5b87d0d9 1893 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
6c21e306
JD
1894 *_WITH_GC_* to take face and f as parameters.
1895 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
1896 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
1897
7a1b473c
DC
18982014-01-13 Daniel Colascione <dancol@dancol.org>
1899
1900 Fix menu item updating in the presence of the Unity global menu
1901 GTK+ module.
1902
1903 * gtkutil.h (xg_have_tear_offs): Add frame parameter
1904 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
1905 tear-off.
c295fc18 1906 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
7a1b473c 1907 updating menus; explain why.
a787d37a
DC
1908 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
1909 problem it's supposed to solve and it interferes with detecting
1910 the presence of a global menu.
7a1b473c
DC
1911 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
1912 parameter.
1913
67671fb1
KH
19142014-01-11 K. Handa <handa@gnu.org>
1915
1916 * composite.c (composition_update_it): Fix indexing of
1917 LGSTRING_CHAR (Bug#15984).
1918
e05d3a05
FP
19192014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
1920
1921 * unexw32.c (_start) [__MINGW64__]: Define to __start.
1922
02013850
EZ
19232014-01-11 Eli Zaretskii <eliz@gnu.org>
1924
1925 * xdisp.c (try_window_id): Don't use this function's optimizations
1926 if overlays in the buffer displayed by the window have changed
1927 since last redisplay. (Bug#16347)
1928 (message_dolog): Fix indentation.
1929
f96d0a6b
MR
19302014-01-11 Martin Rudalics <rudalics@gmx.at>
1931
1932 * frame.c (frame_resize_pixelwise): Fix doc-string.
1933
7d7ccb88
MR
19342014-01-10 Martin Rudalics <rudalics@gmx.at>
1935
1936 Fix handling of internal borders (Bug#16348).
5b87d0d9
MN
1937 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
1938 Remove internal border width from pixel width of windows.
7d7ccb88
MR
1939 (change_frame_size_1): Don't return early when frame's pixel
1940 size changes - we still have to record the new sizes in the
1941 frame structure.
1942 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
1943 also when toolbar gets larger.
1944 * window.c (check_frame_size): Include internal_border_width in
1945 check.
1946 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
5b87d0d9
MN
1947 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
1948 In non-toolkit/non-GTK version clear internal border.
7d7ccb88
MR
1949 * xterm.c (x_clear_under_internal_border): New function for
1950 non-toolkit/non-GTK version.
1951 (x_after_update_window_line): In non-toolkit/non-GTK version
1952 don't do that.
5b87d0d9
MN
1953 (handle_one_xevent, x_set_window_size):
1954 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
7d7ccb88
MR
1955 * xterm.h (x_clear_under_internal_border): Extern it.
1956
be316ede
PE
19572014-01-07 Paul Eggert <eggert@cs.ucla.edu>
1958
1959 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
1960 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
1961 it again.
1962
9f4e49e9
EZ
19632014-01-06 Eli Zaretskii <eliz@gnu.org>
1964
1965 * xdisp.c (redisplay_window): Don't skip window redisplay if the
1966 last value of point is not equal to buffer's point. (Bug#16129)
1967
81da295e
PE
19682014-01-05 Paul Eggert <eggert@cs.ucla.edu>
1969
da5ecfa9
PE
1970 Spelling fixes.
1971 * nsterm.h (updateCollectionBehavior): Rename from
1972 updateCollectionBehaviour. All uses changed.
1973
81da295e
PE
1974 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
1975 * Makefile.in (SETFATTR): New macro.
1976 (temacs$(EXEEXT)): Use it.
1977
5159d590
MR
19782014-01-04 Martin Rudalics <rudalics@gmx.at>
1979
1980 Fix maximization behavior on Windows (Bug#16300).
1981 * w32fns.c (w32_fullscreen_rect): Don't handle
1982 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
1983 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
1984 of SetWindowPos. Restore last placement also when leaving
1985 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
1986 but the FULLSCREEN_BOTH case.
1987
56a0e352
PE
19882014-01-03 Paul Eggert <eggert@cs.ucla.edu>
1989
1990 Port to C89.
1991 * data.c (arithcompare_driver):
1992 * fileio.c (Fcar_less_than_car):
1993 * fns.c (internal_equal):
1994 * frame.c (delete_frame):
1995 * lisp.h (enum More_Lisp_Bits):
1996 * lread.c (read1):
1997 Avoid C99 constructs that don't work in C89.
1998 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
1999 to port to C89, which doesn't have 'long long'.
2000 (count_trailing_zero_bits): Use them.
2001
0d53f628
CY
20022014-01-03 Chong Yidong <cyd@gnu.org>
2003
2004 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
2005
44c5e192
MR
20062014-01-02 Martin Rudalics <rudalics@gmx.at>
2007
2008 Further adjust frame/window scrollbar width calculations.
5b87d0d9
MN
2009 * window.c (apply_window_adjustment):
2010 Set windows_or_buffers_changed.
44c5e192
MR
2011 (Fwindow_scroll_bars): Return actual scrollbar width.
2012 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
2013 For non-toolkit builds again use 14 as minimum width and set
2014 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
2015 * xterm.c (XTset_vertical_scroll_bar): Take width from
2016 WINDOW_SCROLL_BAR_AREA_WIDTH.
2017 (x_new_font): Rename wid to unit. Base calculation of new
2018 scrollbar width on toolkit used and make it analogous to that of
2019 x_set_scroll_bar_default_width.
2020 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
2021 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
2022 of GetSystemMetrics.
2023 * w32term.c (w32_set_vertical_scroll_bar): Take width from
2024 WINDOW_SCROLL_BAR_AREA_WIDTH.
2025 (x_new_font): Make it correspond to changes in xterm.c.
2026
b00cdd96
PE
20272014-01-01 Paul Eggert <eggert@cs.ucla.edu>
2028
2029 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
2030 This is a cleaner way to fix the MinGW-w64 porting problem.
2031 Check for INTPTR_MAX misconfiguration.
2032
c10e9ece
EZ
20332014-01-01 Eli Zaretskii <eliz@gnu.org>
2034
2035 * search.c (newline_cache_on_off, find_newline): In indirect
2036 buffers, use the newline cache of the base buffer.
2037
2038 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
2039 buffer, invalidate the caches of its base buffer. (Bug#16265)
2040
2041 * indent.c (width_run_cache_on_off, compute_motion): In indirect
2042 buffers, use the width-run cache of the base buffer.
2043
2044 * xdisp.c (redisplay_window): When the window displays an indirect
2045 buffer, and the character widths in the display table have
2046 changed, invalidate the width-run cache of the corresponding base
2047 buffer.
2048
2049 * fileio.c (Finsert_file_contents): When invalidating the newline
2050 cache, consider the case of inserting into indirect buffer.
2051
2052 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
2053 In indirect buffers, use the paragraph cache of the base buffer.
2054
91415fb1
MR
20552013-12-31 Martin Rudalics <rudalics@gmx.at>
2056
2057 * window.c (grow_mini_window): Fix last change.
2058
a2301006
JD
20592013-12-31 Jan Djärv <jan.h.d@swipnet.se>
2060
2061 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
2062
0bbd0e0b
FP
20632013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
2064
bd717ca4
FP
2065 * w32term.c (w32_initialize): Use LCID and LOWORD.
2066
2067 * w32proc.c (create_child): Use pid_t for 5th argument.
2068 (IsValidLocale): Don't provide prototype for MinGW64.
2069 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
2070 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
2071
2072 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
2073 MinGW64 doesn't support.
2074
2075 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
2076
0bbd0e0b
FP
2077 * w32.c (set_named_security_info): New function.
2078 (acl_set_file): Fall back on set_named_security_info if
2079 set_file_security fails.
2080 (g_b_init_set_named_security_info_w)
2081 (g_b_init_set_named_security_info_a): New static variables.
2082 (globals_of_w32): Initialize them to zero.
2083 (set_named_security_info): Set them to non-zero if the
2084 corresponding API is available.
5b87d0d9
MN
2085 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
2086 New function typedefs.
0bbd0e0b 2087
9b3c0a16
MR
20882013-12-31 Martin Rudalics <rudalics@gmx.at>
2089
2090 Some more fixes following pixelwise resize changes including one
2091 for Bug#16306.
2092 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
2093 of frame_resize_pixelwise.
2094 * widget.c (pixel_to_text_size): New function.
2095 (update_wm_hints): Have size hints respect value of
2096 frame_resize_pixelwise.
2097 (EmacsFrameResize): Alway process resize requests pixelwise.
2098 * window.c (grow_mini_window): Make sure mini window is at least
2099 one line tall.
2100 * xdisp.c (display_menu_bar): Make sure menubar extends till
2101 right end of frame.
2102 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
2103 (x_set_tool_bar_lines): Calculate pixelwise.
2104 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
2105 frame_resize_pixelwise.
2106
2db9da01
JB
21072013-12-30 Juanma Barranquero <lekktu@gmail.com>
2108
2109 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
2110 variables not used there.
2111
1b7259fc
EZ
21122013-12-30 Eli Zaretskii <eliz@gnu.org>
2113
2114 * w32.c (sys_umask): New function. (Bug#16299)
2115
564eb533
MR
21162013-12-30 Martin Rudalics <rudalics@gmx.at>
2117
2118 * dispnew.c (change_frame_size_1): Take old width of root window
9b3c0a16 2119 from that window's pixel width. (Bug#16284)
564eb533 2120
a560b856
PE
21212013-12-29 Paul Eggert <eggert@cs.ucla.edu>
2122
2123 Plain copy-file no longer chmods an existing destination (Bug#16133).
2124 * fileio.c (realmask): Now a static var, not a local.
2125 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
2126 Remove arg STATPTR. All uses changed.
2127 (Fcopy_file): Do not alter permissions of existing destinations,
2128 unless PRESERVE-PERMISSIONS (renamed from
2129 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
2130 Avoid race when testing for existing destinations and for
2131 when input and output files are the same.
2132 If changing the group fails, adjust both default and
2133 preserved permissions so that access is not granted to the
2134 wrong group.
2135 (Fset_default_file_modes, init_fileio): Update realmask.
2136 (Fdefault_file_modes): Use realmask instead of calling umask.
2137
411bf4a4
PE
21382013-12-28 Paul Eggert <eggert@cs.ucla.edu>
2139
2140 Fix pipe bug with OS X emacs --daemon (Bug#16262).
2141 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
2142 flags on the daemon pipe ends before execing.
2143
bf7bea5d
EZ
21442013-12-28 Eli Zaretskii <eliz@gnu.org>
2145
2146 * w32fns.c (Fx_create_frame): Error out if called from a TTY
2147 session. (Bug#14739)
2148
fdadeb49
JC
21492013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
2150
2151 * callproc.c (Vexec_path): Document that exec-directory is in it.
2152
765fe182
JD
21532013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
2154
2155 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
2156 default.
2157
0f1d2934
CY
21582013-12-27 Chong Yidong <cyd@gnu.org>
2159
2160 * data.c (Fsymbol_function): Doc fix.
2161
0cbab19e
MR
21622013-12-26 Martin Rudalics <rudalics@gmx.at>
2163
2164 Some more tinkering with Bug#16051.
2165 * window.c (resize_frame_windows): Don't let the size of the
2166 root window drop below the frame's default character size.
2167 Never ever delete any subwindows - let the window manager do the
2168 clipping.
2169
2170 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
2171 of toolbar lines needed when they exceed the height of the root
2172 window.
2173 (unwind_create_frame_1): New function.
2174 (Fx_create_frame): Generally inhibit calling the window
2175 configuration change hook here. Remove extra call to
2176 change_frame_size - it's not needed when we don't run the
2177 configuration change hook.
2178
e76119d7
PE
21792013-12-26 Paul Eggert <eggert@cs.ucla.edu>
2180
2181 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
2182 On my Fedora 19 platform the core dumps were so big that
2183 my desktop became nearly catatonic.
2184 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
2185 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
2186 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
2187 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
2188 a clang-only syntax.
2189 * conf_post.h (__has_feature): New macro, if not already defined.
2190 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
2191 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
2192
9ab3ce4d
EZ
21932013-12-25 Eli Zaretskii <eliz@gnu.org>
2194
2195 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
2196 is a file name. (Bug#16252)
2197
c9352587
CY
21982013-12-25 Chong Yidong <cyd@gnu.org>
2199
35e951cd 2200 * keyboard.c (Voverriding_terminal_local_map)
c9352587
CY
2201 (Voverriding_local_map): Doc fix.
2202
2203 * keymap.c (Vemulation_mode_map_alists): Doc fix.
2204
ec6e26b8
EZ
22052013-12-24 Eli Zaretskii <eliz@gnu.org>
2206
2207 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
2208 file name when it is submitted to ShellExecute. Simplify code.
2209 Don't test DOCUMENT for being a string, as that is enforced by
2210 CHECK_STRING. Doc fix.
2211
0db7548b
EZ
22122013-12-23 Eli Zaretskii <eliz@gnu.org>
2213
2214 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
2215 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
2216 redisplay_tool_bar does. Improve and fix commentary.
2217 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
2218 limits of the glyph matrices. (Bug#16051)
cdcec259
EZ
2219 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
2220 only when the new size is different from the old one, and the new
2221 size can be achieved given the frame height.
0db7548b 2222
30143e3d
JD
22232013-12-23 Jan Djärv <jan.h.d@swipnet.se>
2224
2225 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
2226
aec3bf9f
GM
22272013-12-23 Glenn Morris <rgm@gnu.org>
2228
2229 * lread.c (Fload): Mention load-prefer-newer in doc.
2230
a2b89a51
MR
22312013-12-22 Martin Rudalics <rudalics@gmx.at>
2232
2233 Handle Bug#16207 by being more restrictive when running hooks.
2234 * window.c (unwind_change_frame): New function.
2235 (Fset_window_configuration): Don't run configuration change hook
2236 while the frame configuration is unsafe. Call select_window
2237 twice.
2238
2dc383bc
XF
22392013-12-22 Xue Fuqiao <xfq.free@gmail.com>
2240
2241 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
2242
df8b4c35
JD
22432013-12-21 Jan Djärv <jan.h.d@swipnet.se>
2244
2245 * nsterm.h: Declare EmacsColor category.
2246
2247 * nsterm.m (NSColor): Implement EmacsColor category.
2248 (ns_get_color): Use colorUsingDefaultColorSpace.
2249 (ns_get_color, ns_term_init): Use colorForEmacsRed.
2250
2251 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
2252
7667eeb9
EZ
22532013-12-21 Eli Zaretskii <eliz@gnu.org>
2254
2255 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
2256 having the PNG_NORETURN attribute, to avoid compiler warning in
2257 my_png_error.
2258
5b2b60f0
YM
22592013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2260
2261 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
2262
2263 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
2264 fringe background extension.
2265 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
2266 because they are now always the same as `left' and `width',
2267 respectively. Remove code for the case that `width' and
2268 `sb_width' are different.
2269
c44de18d
MR
22702013-12-20 Martin Rudalics <rudalics@gmx.at>
2271
2272 Remove scroll_bar_actual_width from frames.
2273 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
2274 * frame.c (Fscroll_bar_width): Return scroll bar area width.
2275 (x_figure_window_size):
2276 * nsterm.m (x_set_window_size):
2277 * widget.c (set_frame_size):
2278 * w32term.c (x_set_window_size):
2279 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
2280 scroll_bar_actual_width.
2281
2282 Convert scroll_bar members to integers on Windows.
2283 * w32term.h (struct scroll_bar): Convert top, left, width,
2284 height, start, end and dragging to integers.
2285 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
2286 scroll_bar members.
2287 * w32term.c (w32_set_scroll_bar_thumb)
2288 (w32_scroll_bar_handle_click): Remove XINT conversions for
2289 scroll_bar members. Treat bar->dragging as integer.
2290 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
2291 first element. Remove XINT conversions for scroll_bar members.
2292 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
2293 Remove XINT conversions for scroll_bar members.
2294
2295 Fix assignment for new window total sizes.
2296 * window.c (Fwindow_resize_apply_total): Assign values for
2297 minibuffer window.
2298
f5df4ceb
CY
22992013-12-20 Chong Yidong <cyd@gnu.org>
2300
2301 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
2302 argument to `append'.
2303
79f7284f
EZ
23042013-12-19 Eli Zaretskii <eliz@gnu.org>
2305
5df389f5
EZ
2306 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
2307 current text face, for extending the face of the display margins.
2308 (Bug#16192)
2309
79f7284f
EZ
2310 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
2311 Doc fix. (Bug#16190)
2312
1269a680
JD
23132013-12-19 Jan Djärv <jan.h.d@swipnet.se>
2314
2315 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
2316 Remove.
2317
2318 * nsterm.m (Qfile, Qurl): New.
2319 (EV_MODIFIERS2): New macro.
2320 (EV_MODIFIERS): Use EV_MODIFIERS2.
2321 (ns_term_init): Remove font and color from DND, does not work on
2322 newer OSX, and other ports don't have them.
2323 (performDragOperation:): Handle modifiers used during drag.
2324 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
2325 Remove global Lisp variables used to communicate with ns-win.el.
2326 Remove font and color handling.
2327 (syms_of_nsterm): Defsym Qfile and Qurl.
2328
e9dc713d 23292013-12-19 Anders Lindgren <andlind@gmail.com>
680e6b8c
JD
2330
2331 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
2332 (ns_constrain_all_frames, x_set_offset): Remove assignment to
2333 dont_constrain.
2334 (updateFrameSize:, windowWillResize:toSize:): Add trace.
2335 (constrainFrameRect): Remove special case nr_screens == 1.
2336 Don't constrain size to size of view.
2337
2338 * nsterm.h (ns_output): Remove dont_constrain.
2339
e9dc713d 23402013-12-19 Anders Lindgren <andlind@gmail.com>
570c054a
JD
2341
2342 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
2343
518c40a2
PE
23442013-12-18 Paul Eggert <eggert@cs.ucla.edu>
2345
2346 Minor fixes for recent openp changes.
2347 * lisp.h (GCPRO7): New macro.
2348 * lread.c (openp): Use bool for boolean; all callers changed.
2349 Protect save_string from GC. Don't assume that file descriptors
2350 are nonzero. Redo save_mtime comparison to avoid bogus GCC
2351 warning about uninitialized variable.
2352
39e896c1
EZ
23532013-12-18 Eli Zaretskii <eliz@gnu.org>
2354
2355 * w32fns.c (emacs_abort): Use intptr_t as argument of
2356 INT_BUFSIZE_BOUND, to avoid compiler warnings.
2357
9cdb8d85
GM
23582013-12-18 Glenn Morris <rgm@gnu.org>
2359
1f41ee56
GM
2360 * lread.c (Fload): Pass load_prefer_newer to openp.
2361 Don't bother checking mtime if openp already did it.
2362 (openp): Add `newer' argument, to check all suffixes
2363 and find the newest file.
2364 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
2365 * callproc.c (call_process):
2366 * charset.c (load_charset_map_from_file):
2367 * emacs.c (init_cmdargs):
2368 * image.c (x_create_bitmap_from_file, x_find_image_file):
2369 * lisp.h (openp):
2370 * lread.c (Flocate_file_internal):
2371 * process.c (Fformat_network_address):
2372 * sound.c (Fplay_sound_internal):
2373 * w32.c (check_windows_init_file):
2374 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
2375
9cdb8d85
GM
2376 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
2377
af025ae8
EZ
23782013-12-17 Eli Zaretskii <eliz@gnu.org>
2379
60e62dc5
EZ
2380 * w32.c (getloadavg): Don't index samples[] array with negative
2381 indices. Recover from wall-clock time being set backwards.
2382
af025ae8
EZ
2383 * w32term.c (w32_initialize): Declare the argument of
2384 set_user_model as const.
2385
2386 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
2387 (w32_menu_show): Constify some arguments passed to MessageBox.
2388
2389 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
2390 to initialize Lisp objects.
2391
2392 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
2393 initialize Lisp objects.
2394
2395 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
2396 use variables used only on X under that condition.
2397
2398 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
2399 variables not used there.
2400
8fb8c4f3
PE
24012013-12-16 Paul Eggert <eggert@cs.ucla.edu>
2402
2403 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
2404 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
2405
397e886f
EZ
24062013-12-16 Eli Zaretskii <eliz@gnu.org>
2407
2408 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
2409 code, revealed in presence of R2L characters, character
2410 compositions, and display vectors. A better fix for Bug#16148.
5e6d03b2
EZ
2411 (extend_face_to_end_of_line): Don't reference tool_bar_window in
2412 GTK and NS builds, they don't have this member of struct frame.
397e886f
EZ
2413
2414 * dispextern.h (struct composition_it): Correct a comment for the
2415 'width' member.
2416
32779713
PE
24172013-12-16 Paul Eggert <eggert@cs.ucla.edu>
2418
2419 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
2420 This prevents a compilation error on C compilers that do not
2421 default functions to return 'int' if not declared. Also, add
2422 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
2423 since it now uses inline functions.
2424
d865f6b5
EZ
24252013-12-16 Eli Zaretskii <eliz@gnu.org>
2426
2427 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
2428 display margins on mode line, header line, and in the frame's
2429 tool-bar window. (Bug#16165)
2430
0fa30f33
AS
24312013-12-16 Andreas Schwab <schwab@suse.de>
2432
2433 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
2434
82cf20e4
TZ
24352013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
2436
2437 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
c295fc18 2438 `CHECK_LIST_CONS'.
82cf20e4 2439
d144ef06
MR
24402013-12-16 Martin Rudalics <rudalics@gmx.at>
2441
2442 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
2443
5ae356d9
DA
24442013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
2445
2446 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
2447 intended to find bogus pointers in font objects (Bug#16140).
2448 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
2449 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
2450 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
2451 Disable for MS-Windows due to Bug#15876; apparently this
2452 requires more or less substantial changes in fontset code.
2453 * xfont.c (xfont_close):
2454 * xftfont.c (xftfont_close): Call x_display_info_for_display
2455 to check whether 'Display *' is valid (Bug#16093 and probably
2456 Bug#16069).
2457
e088f894
EZ
24582013-12-15 Eli Zaretskii <eliz@gnu.org>
2459
db50ad5f
EZ
2460 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
2461 Reported by Juanma Barranquero <lekktu@gmail.com>.
2462
1014b1dc
EZ
2463 * process.c (Fprocess_send_eof): Don't crash if someone tries to
2464 open a pty on MS-Windows. (Bug#16152)
2465
e088f894
EZ
2466 * emacs.c (decode_env_path): Fix bogus comparison against
2467 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
2468
119f64db
JB
24692013-12-15 Juanma Barranquero <lekktu@gmail.com>
2470
2471 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
2472 (Fx_file_dialog): Add parentheses around && to silence warning.
2473
2474 * w32term.c (construct_drag_n_drop): Remove unused local variable.
2475
dd1fb8cb
EZ
24762013-12-15 Eli Zaretskii <eliz@gnu.org>
2477
cdeb10ce
EZ
2478 * xdisp.c (extend_face_to_end_of_line): Extend background of
2479 non-default face in margin areas as well. (Bug#16151)
2480 (display_line): Call extend_face_to_end_of_line for continued
2481 lines as well, if the display margins have non-zero width.
2482 (set_glyph_string_background_width): When needed, set the
2483 extends_to_end_of_line_p flag on glyph strings to be drawn in
2484 margin areas, not only in the text area.
2485
dd1fb8cb
EZ
2486 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
2487 startup.
2488
27c1b043
PE
24892013-12-15 Paul Eggert <eggert@cs.ucla.edu>
2490
2491 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
2492 Don't worry about verify_error being t, since it has to be a list.
2493
96c06863
PE
24942013-12-14 Paul Eggert <eggert@cs.ucla.edu>
2495
2496 Use bool for boolean, focusing on headers.
2497 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
2498 No need to include <stdbool.h>, since conf_post.h does it now.
2499 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
2500 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
2501 (SET_PER_BUFFER_VALUE_P):
2502 * ccl.c, ccl.h (setup_ccl_program):
2503 * ccl.h (CHECK_CCL_PROGRAM):
2504 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
2505 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
2506 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
2507 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
2508 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
2509 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
2510 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
2511 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
2512 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
2513 (CHARSET_FAST_MAP_SET):
2514 * coding.c (decode_coding_ccl, encode_coding_ccl):
2515 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
2516 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
2517 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
2518 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
2519 (decode_coding_c_string):
2520 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
2521 * conf_post.h (has_attribute):
35e951cd 2522 * dispextern.h (trace_redisplay_p)
96c06863
PE
2523 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
2524 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
35e951cd 2525 (SET_GLYPH_FROM_CHAR_GLYPH)
96c06863
PE
2526 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
2527 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
2528 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
2529 (cursor_in_mouse_face_p):
2530 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
2531 (blank_row, prepare_desired_row)
2532 (build_frame_matrix_from_leaf_window, make_current)
2533 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
2534 (update_window, scrolling_window, update_frame_line):
2535 * disptab.h (GLYPH_FOLLOW_ALIASES):
2536 * editfns.c (Fformat):
2537 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
2538 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
2539 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
2540 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
2541 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
2542 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
2543 (FONT_DEFERRED_LOG):
35e951cd 2544 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
96c06863
PE
2545 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
2546 (FRAME_MOUSE_UPDATE):
2547 * fringe.c (Fdefine_fringe_bitmap):
2548 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
2549 (x_create_bitmap_from_xpm_data, xpm_load_image):
2550 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
2551 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
2552 (MERGE_INTERVAL_CACHE):
2553 * keymap.h (KEYMAPP):
2554 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
2555 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
2556 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
2557 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
2558 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
2559 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
2560 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
2561 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
2562 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
2563 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
2564 (SETUP_BUFFER_SYNTAX_TABLE):
2565 * systime.h (timespec_valid_p):
2566 * term.c (save_and_enable_current_matrix):
2567 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
2568 * xdisp.c (in_display_vector_p, display_tool_bar_line)
2569 (redisplay_internal, try_window_reusing_current_matrix)
2570 (sync_frame_with_window_matrix_rows, try_window_id)
2571 (display_menu_bar, display_tty_menu_item, display_mode_line)
2572 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
b4dd49e0 2573 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
96c06863
PE
2574 * xmenu.c (xmenu_show):
2575 * xterm.c (use_xim, x_term_init):
2576 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
2577 (struct x_bitmap_record):
2578 Use bool for booleans.
2579 * ccl.c (struct buffer_text):
2580 * ccl.h (struct ccl_program):
2581 * charset.h (struct charset):
2582 * cm.h (struct cm):
2583 * coding.h (struct iso_2022_spec, struct coding_system):
2584 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
2585 (struct glyph_string, struct face, struct face_cache)
2586 (struct bidi_string_data, struct bidi_it)
2587 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
2588 (struct image):
2589 * editfns.c (Fformat):
2590 * frame.h (struct frame):
2591 * fringe.c (struct fringe_bitmap):
2592 * intervals.h (struct interval):
2593 * keyboard.h (struct kboard):
2594 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
2595 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
2596 (struct Lisp_Buffer_Local_Value, union specbinding):
2597 * macfont.m (struct macfont_info):
2598 * process.h (struct Lisp_Process):
2599 * termchar.h (struct tty_display_info):
2600 * window.h (struct window):
2601 * xterm.h (struct x_output):
2602 Use bool_bf for boolean bit-fields.
2603 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
2604 All callers changed.
2605 * ccl.h (struct ccl_program): Remove unused members private_state,
2606 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
2607 eight_bit_control.
2608 (struct ccl_spec): Remove unused members cr_carryover,
2609 eight_bit_carryover.
2610 * conf_post.h: Include <stdbool.h>.
2611 (bool_bf): New type.
2612 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
35e951cd
JB
2613 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
2614 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
2615 'do { ... } while (false)' brackets.
b4dd49e0
PE
2616 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
2617 Args must now be expressions; all callers changed.
96c06863
PE
2618 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
2619 (PRODUCE_GLYPHS): Simplify use of boolean.
2620 * fileio.c (Fcopy_file):
2621 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
2622 * lisp.h (UNGCPRO): Return void, not int.
2623 (FOR_EACH_TAIL): Use void expression, not int expression.
2624 * region-cache.c: Reindent.
2625 * region-cache.h: Copy comments from region-cache.c, to fix
2626 incorrect remarks about booleans.
2627
2897da4d
EZ
26282013-12-14 Eli Zaretskii <eliz@gnu.org>
2629
2630 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
2631 when character at point is displayed from a display vector.
2632 (Bug#16148)
2633
31b4827e
TZ
26342013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
2635
2636 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
2637 now a list of certificate validation checks that will abort a
2638 connection with an error.
2639 (Fgnutls_boot): Document it and use it.
2640
5645852c
MR
26412013-12-14 Martin Rudalics <rudalics@gmx.at>
2642
2643 * w32term.c (w32_enable_frame_resize_hack): New variable.
2644 (x_set_window_size): Use it to hack frame resizing on Windows
2645 (Bug#16028).
2646
ec4440cf
EZ
26472013-12-14 Eli Zaretskii <eliz@gnu.org>
2648
2649 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
2650 Windows-specific code to w32.c. Change error message text to
2651 match that of Posix platforms.
2652
2653 * w32.c (w32_copy_file): New function, most of the code copied and
2654 reworked from Fcopy_file. Improve error handling. Plug memory
2655 leak when errors are thrown. Support file names outside of the
2656 current codepage. (Bug#7100)
2657
dc7909c4
PE
26582013-12-13 Paul Eggert <eggert@cs.ucla.edu>
2659
2660 * lread.c (load_path_default): Prototype.
2661
06a4f110
GM
26622013-12-13 Glenn Morris <rgm@gnu.org>
2663
2664 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
2665 (dump_path): Remove.
2666 (load-path-default): Remove `changed' argument.
2667 Do not set dump_path permanently. Simplify.
2668 (init_lread): Simplify.
2669 (syms_of_lread): Remove dump_path.
2670
5035fbc1
DA
26712013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
2672
2673 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
2674 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
2675 2013-12-12 font-related change to avoid Bug#16128, which
2676 is quite hard to fix without even more substantial changes.
2677
b6c888cc
DA
26782013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
2679
2680 * font.c (font_close_object): Check for live frame (Bug#16128).
2681
11dde529
PE
26822013-12-13 Paul Eggert <eggert@cs.ucla.edu>
2683
2684 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
2685 Return ptrdiff_t, not int, since it's a buffer size.
2686 Reindent/reparen some macros to a more Gnuish style.
2687
4618713a
PE
26882013-12-12 Paul Eggert <eggert@cs.ucla.edu>
2689
2690 Avoid undefined behavior with huge regexp interval counts.
2691 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
e9dc713d 2692 since it's now specialized to interval counts. All uses changed.
4618713a
PE
2693 Do not assume wrapraound on signed integer overflow.
2694 (regex_compile): Simplify based on the above changes.
2695
01633a17
EZ
26962013-12-12 Eli Zaretskii <eliz@gnu.org>
2697
2698 Support file names on MS-Windows that use characters outside of
2699 the current system codepage. (Bug#7100)
2700
2701 * w32.c (get_file_security, set_file_security)
2702 (create_symbolic_link): Separate pointers and boolean flags for
2703 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
2704 non-zero, else the former.
2705 (codepage_for_filenames, filename_to_utf16, )
5b87d0d9
MN
2706 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
2707 New functions.
01633a17
EZ
2708 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
2709 characters.
2710 (normalize_filename): Lose the DBCS code, now works on UTF-8.
2711 Accept only one argument; all callers changed.
2712 (dostounix_filename): Remove the second argument, now works in
2713 UTF-8. All callers changed.
2714 (parse_root): Lose DBCS code.
2715 (get_long_basename, w32_get_short_filename, init_environment)
2716 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
2717 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
2718 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
2719 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
2720 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
2721 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
2722 otherwise.
2723 (ansi_encode_filename): New function.
2724 (get_emacs_configuration, get_emacs_configuration_options):
2725 Functions deleted.
2726 (add_volume_info, GetCachedVolumeInformation): Run the input file
2727 name through unixtodos_filename, to ensure it is stored and
2728 referenced in canonical form.
2729 (get_volume_info): Lose the DBCS code, now works in UTF-8.
2730 (logon_network_drive, sys_link, utime): Improve error handling.
2731 (sys_access): New function.
2732 (hashval, generate_inode_val): Unused functions deleted.
2733 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
2734 (check_windows_init_file): Convert error message from UTF-8 to
2735 ANSI codepage, for display in the message box.
2736 (globals_of_w32): Set w32_unicode_filenames according to the OS
2737 version.
2738
2739 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
2740 w32_unicode_filenames is non-zero, ANSI mode otherwise.
2741 (syms_of_w32term): Declare w32-unicode-filenames.
2742
2743 * w32proc.c (new_child, delete_child): Remove code that handled
2744 unused pending_deletion and input_file members of the child struct.
2745 (create_child, sys_spawnve): Convert all file names to ANSI
2746 codepage. Use ANSI APIs explicitly; forcibly fail if any file
2747 name cannot be encoded in ANSI codepage. Don't use
2748 unixtodos_filename, mirror slashes by hand.
2749 (record_infile, record_pending_deletion): Functions deleted.
2750 (Fw32_short_file_name): Call w32_get_short_filename instead of
2751 GetShortPathName.
2752
2753 * w32notify.c (add_watch): Work in Unicode mode when
2754 w32_unicode_filenames is non-zero, ANSI mode otherwise.
2755 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
2756 instead, do the same with Lisp primitives.
2757
2758 * w32fns.c (file_dialog_callback, Fx_file_dialog)
2759 (Fsystem_move_file_to_trash, Fw32_shell_execute)
2760 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
2761 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
2762 (Fw32_shell_execute): Improve error reporting.
2763 (Fdefault_printer_name): Ifdef away for Cygwin.
2764
2765 * w32.h (struct _child_process): Remove input_file and
2766 pending_deletion members that are no longer used.
2767 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
2768 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
2769 (ansi_encode_filename): New and updated prototypes.
2770
2771 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
2772 APIs explicitly.
2773 (unexec): Don't use dostounix_filename, it expects a file name in
2774 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
2775 ANSI encoding.
2776
2777 * fileio.c (Ffile_name_directory, file_name_as_directory)
2778 (directory_file_name, Fexpand_file_name)
2779 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
2780 arguments of dostounix_filename.
2781 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
2782 use MAX_UTF8_PATH for size of file-name strings.
2783 (emacs_readlinkat): Build an explicitly unibyte string for file
2784 names.
a544fbe1
GM
2785 (syms_of_fileio) <file-name-coding-system>:
2786 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
01633a17
EZ
2787
2788 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
2789 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
2790 directories to UTF-8.
2791 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
2792 environment, and each element of the input PATH, to UTF-8.
2793
2794 * dired.c (file_attributes): Use build_unibyte_string explicitly
2795 to make Lisp strings from user and group names.
2796
2797 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
2798 decode_file.
2799
2800 * coding.c (decode_file_name, encode_file_name): New functions.
2801
2802 * termcap.c (tgetent): Adapt to the change in arguments of
2803 dostounix_filename.
2804
2805 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
2806 names.
2807
2808 * msdos.c (dostounix_filename, init_environment): Adapt to the
2809 change in arguments of dostounix_filename.
2810
2811 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
2812 [WINDOWSNT]: Encode file names passed to the image libraries in
2813 ANSI codepage.
2814
2815 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
2816 [WINDOWSNT]: Convert file names to the current ANSI codepage.
2817
2818 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
2819 arguments of dostounix_filename.
2820
cf86e18b
DA
28212013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
2822
2823 * font.h (struct font_entity) [HAVE_NS]: New field to record
2824 font driver which was used to create this entity.
2825 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
2826 frame where the font was opened.
2827 (font_close_object): Add prototype.
2828 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
2829 (font_close_object): Not static any more. Lost frame arg.
2830 Adjust comment and users.
2831 * alloc.c (cleanup_vector): Call font_close_object to adjust
2832 per-frame font counters correctly. If HAVE_NS, also call
2833 driver-specific cleanup for font-entity objects.
2834 * ftfont.c (ftfont_open):
2835 * nsfont.m (nsfont_open):
2836 * w32font.c (w32font_open_internal):
2837 * xfont.c (xfont_open):
2838 * xftfont.c (xftfont_open): Save frame pointer in font object.
2839 * macfont.m (macfont_open): Likewise.
2840 (macfont_descriptor_entity): Save driver pointer to be able
2841 to call its free_entity routine when font-entity is swept.
2842 * ftxfont.c (ftxfont_open): Add eassert because frame
2843 pointer should be saved by ftfont_driver.open.
2844
96542302
DA
28452013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
2846
2847 * xterm.c (x_make_frame_visible): Restore hack which is needed when
2848 input polling is used. This is still meaningful for Cygwin, see
2849 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
5b87d0d9
MN
2850 * keyboard.c (poll_for_input_1, input_polling_used):
2851 Define unconditionally.
397a32c1
DA
2852 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
2853 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
2854 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
2855 (font_for_char): Prefer ptrdiff_t to int for buffer position.
2856 (face_for_char): Likewise. Rearrange eassert and return ASCII
2857 face for CHAR_BYTE8_P.
2858 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
96542302 2859
1421be84
KB
28602013-12-11 Ken Brown <kbrown@cornell.edu>
2861
2862 * dispextern.h (erase_phys_cursor):
2863 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
2864
5a80236f
DA
28652013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
2866
2867 * nsterm.m (x_free_frame_resources):
2868 * term.c (tty_free_frame_resources):
2869 * xterm.c (x_free_frame_resources): Do not check for non-NULL
2870 face cache because it's implied by free_frame_faces anyway.
2871 * w32term.c (x_free_frame_resources): Likewise. Do not call
2872 free_frame_faces twice.
2873
4ec52e2f
RS
28742013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2875
2876 * editfns.c (Fformat_time_string): Mention %F in the doc.
2877
d94c40c1
MR
28782013-12-11 Martin Rudalics <rudalics@gmx.at>
2879
2880 * window.c (resize_frame_windows): Don't return immediately when
2881 the root window's size doesn't change - the minibuffer window
2882 may still have to be repositioned/resized.
2883 * xfns.c (Fx_create_frame): Always change the frame size after
2884 initializing the frame's faces.
2885 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
2886 change_frame_size should already have done it.
2887 (x_new_font): Assign new tool- and menu-bar heights.
2888 (x_set_window_size_1): Account for tool- and menu-bar heights
e9dc713d 2889 (Bug#16013). Don't set pixel sizes since change_frame_size
d94c40c1
MR
2890 should already have done it.
2891
a8f9bc05
PE
28922013-12-11 Paul Eggert <eggert@cs.ucla.edu>
2893
2894 Remove the option of using libcrypto.
2895 * Makefile.in (LIB_CRYPTO): Remove.
2896 (LIBES): Don't use it.
2897
26ec2ce9
JL
28982013-12-11 Juri Linkov <juri@jurta.org>
2899
2900 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
2901 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
2902
a71cfa02
DA
29032013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
2904
2905 * xdisp.c (display_tool_bar_line): Don't extend on a previously
2906 drawn tool bar items (Bug#16058).
e8374b39 2907 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
a71cfa02 2908
336fe071
KB
29092013-12-09 Ken Brown <kbrown@cornell.edu>
2910
2911 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
2912
2913 * lisp.h (get_frame_param): Adjust conditions for prototype
2914 declaration.
2915
ad8a47b8
DA
29162013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
2917
2918 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
2919 Avoid unused macro warning if configured --without-xft.
2920
5e48429a
JD
29212013-12-09 Jan Djärv <jan.h.d@swipnet.se>
2922
2923 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
2924
40f18bf3
JD
29252013-12-08 Jan Djärv <jan.h.d@swipnet.se>
2926
a6c4680a 2927 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
b3e42b70 2928
a6c4680a 2929 * emacs.c (main): Call fixup_locale a second time for GNUstep.
40f18bf3 2930
acfe4602
MR
29312013-12-08 Martin Rudalics <rudalics@gmx.at>
2932
2933 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
2934
95b3d095
PE
29352013-12-08 Paul Eggert <eggert@cs.ucla.edu>
2936
e9551b12
PE
2937 Use libcrypto's checksum implementations if available, for speed.
2938 * Makefile.in (LIB_CRYPTO): New macro.
2939 (LIBES): Use it.
2940
95b3d095
PE
2941 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
2942 The macro didn't conform to C99 due to type mismatch,
2943 which caused compilation failure with Sun C 5.12,
2944 and it was confusing anyway. Include window.h to declare
2945 redisplay_other_windows.
2946
0d9cba29
SM
29472013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
2948
2949 * window.c (set_window_buffer): Update mode line (bug#16084).
2950
67840e66
PE
29512013-12-07 Paul Eggert <eggert@cs.ucla.edu>
2952
2953 Fix minor problems found by static checking.
2954 * keyboard.c (poll_for_input_1, input_polling_used):
2955 Define only if HAVE_NTGUI.
2956 * xmenu.c (popup_activate_callback): Omit unnecessary
2957 check against USE_X_TOOLKIT, which must be defined here anyway.
2958 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
2959 Now static.
2960
947003b5
MR
29612013-12-07 Martin Rudalics <rudalics@gmx.at>
2962
2963 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
2964
7def8cbd
JD
29652013-12-07 Jan Djärv <jan.h.d@swipnet.se>
2966
c4142a83
JD
2967 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
2968
1bb2debd
JD
2969 * nsterm.m (x_set_window_size): Remove fprintf.
2970 (init): Define always. Set applicationDidFinishLaunchingCalled
a6c4680a 2971 for GNUstep.
0d9cba29
SM
2972 (applicationDidFinishLaunching:):
2973 Set applicationDidFinishLaunchingCalled.
1bb2debd
JD
2974 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
2975 not called.
2976
2977 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
2978
fa6fa1a1 2979 Pixel resize changes for NS (Bug#16049).
7def8cbd
JD
2980 * nsterm.m (x_set_window_size): Change parameters rows/cols to
2981 height/width. row/cols are locals.
2982 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
2983 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
2984 (windowWillResize): Remove gsextra. Calculate extra as in
2985 updateFrameSize.
0d9cba29
SM
2986 (x_new_font): Don't change frame size if fullscreen.
2987 Change size pixelwise.
7def8cbd
JD
2988
2989 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
2990 comment in xfns.c. Change to pixelwise call.
2991
6d6aa291
EZ
29922013-12-06 Eli Zaretskii <eliz@gnu.org>
2993
2994 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
2995 (Bug#16070)
2996
64ed4306
DA
29972013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
2998
2999 * xterm.c (input_signal_count): Remove.
3000 (x_dispatch_event): Define unconditionally.
3001 (x_make_frame_visible): Process X events until the frame
3002 is really visible (Bug#16027).
3003 * xterm.h (x_dispatch_event): Declare unconditionally.
3004
c619527c
JD
30052013-12-05 Jan Djärv <jan.h.d@swipnet.se>
3006
3007 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
3008
3009 * nsterm.m (x_set_window_size): Handle pixelwise.
3010
8bea269d
MR
30112013-12-05 Martin Rudalics <rudalics@gmx.at>
3012
3013 * w32term.c (x_new_font):
3014 * xterm.c (x_new_font): Calculate new frame size from new font
3015 size (Bug#16028).
3016
22800ae9
SM
30172013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
3018
105324ce
SM
3019 * lisp.h (FOR_EACH_TAIL): New macro.
3020 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
3021
22800ae9
SM
3022 * window.c (select_window): Call second wset_redisplay before we change
3023 selected_window (bug#16034).
3024
c521fe29
PE
30252013-12-04 Paul Eggert <eggert@cs.ucla.edu>
3026
3027 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
3028
913250cf
EZ
30292013-12-04 Eli Zaretskii <eliz@gnu.org>
3030
3031 * w32xfns.c: Include window.h, to avoid a compiler warning.
3032
5961ad6c
SM
30332013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
3034
3035 * window.c (window_scroll): Mark window for redisplay (bug#16034).
3036 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
3037 window_scroll takes care of it.
3038 (Fset_window_point, Fdelete_other_windows_internal)
3039 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
3040 (Fsplit_window_internal, Fdelete_window_internal)
3041 (Fresize_mini_window_internal, Fset_window_configuration)
3042 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
3043 cause redisplay instead of forcing a complete redisplay.
3044 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
3045 we're only affecting the selected_window.
3046
ad826124
EZ
30472013-12-04 Eli Zaretskii <eliz@gnu.org>
3048
3049 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
3050 directional control characters. Update type and category
3051 determination according to the UBA from Unicode v6.3.
3052 (bidi_category_t): New category EXPLICIT_FORMATTING.
3053
3054 * dispextern.h (bidi_type_t): Update to include new bidirectional
3055 properties introduced with Unicode v6.3. (Bug#16043)
3056
2db4a1b6
MR
30572013-12-04 Martin Rudalics <rudalics@gmx.at>
3058
3059 * xterm.c (XTflash): Fix coordinate of bottom area to flash
3060 (Bug#16044).
3061
a378aa9d
DA
30622013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
3063
3064 * font.c (font_list_entities): Remove dummy assignment.
3065 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
3066 used on graphic displays only. Remove unused 'font_encoder' member.
a84c9950 3067 (struct font_bitmap): Remove unused 'extra' member.
a378aa9d 3068 * nsfont.m (nsfont_open):
a84c9950
DA
3069 * w32font.c (w32font_open_internal):
3070 * ftfont.c (ftfont_get_bitmap): Adjust users.
a378aa9d 3071
2654ac09
PE
30722013-12-03 Paul Eggert <eggert@cs.ucla.edu>
3073
5df474aa
PE
3074 Use bool for boolean.
3075 * tparam.c (tparam1):
3076 * undo.c (record_point, record_property_change):
3077 Use bool for boolean, for local vars that are always true or false.
3078
2654ac09
PE
3079 Minor integer overflow fixes (Bug#16033).
3080 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
3081 This improves on the previous fix to this function.
3082 (window_resize_check): When summing up pixel counts, don't rely on
3083 undefined behavior if the sum overflows.
3084
7303a0ae
MR
30852013-12-03 Martin Rudalics <rudalics@gmx.at>
3086
3087 * window.c (Fset_window_new_pixel): Don't choke at negative
3088 argument value (Bug#16033).
3089
3090 * xfns.c (Fx_create_frame): Add another call to change_frame_size
3091 to avoid crash in window_box_height.
3092
3093 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
3094 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
3095 calculation.
3096 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
3097
25636e13
PE
30982013-12-03 Paul Eggert <eggert@cs.ucla.edu>
3099
3100 Minor integer overflow fixes.
3101 * window.c (Fset_window_new_pixel, grow_mini_window):
3102 * xdisp.c (Fwindow_text_pixel_size):
3103 Avoid undefined behavior on signed integer overflow.
3104 * xfns.c (x_set_mouse_color):
3105 Check that drag shape fits in 'unsigned', since that's what X wants.
3106
21bf394d
EZ
31072013-12-02 Eli Zaretskii <eliz@gnu.org>
3108
3109 Improve reporting of fatal exception on MS-Windows.
3110 * w32fns.c (my_exception_handler): New function.
3111 (globals_of_w32fns): Set it up as the unhandled exception
3112 handler. Initialize exception code and address to zeros.
3113 (emacs_abort): If the exception code and address are available,
3114 print them at the beginning of the backtrace. Fix the format of
3115 printing addresses (was producing 0x0x12345678 on XP).
3116 (Bug#15994)
3117
f345395c
HE
31182013-12-02 Helmut Eller <eller.helmut@gmail.com>
3119
3120 * eval.c (Fbacktrace__locals): New function.
3121 (syms_of_eval): Defsubr it.
3122
dacc9715
DA
31232013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
3124
3125 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
3126 Define here to unify between...
3127 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
3128 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
3129
e0e0af3b
YM
31302013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3131
3132 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
3133
3134 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
3135 fringe background extension.
3136 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
3137 because they are now always the same as `left' and `width',
3138 respectively. Remove code for the case that `width' and
3139 `sb_width' are different.
3140
75b09539
PE
31412013-12-01 Paul Eggert <eggert@cs.ucla.edu>
3142
3143 Fix minor problems found by static checking.
3144 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
3145 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
3146 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
3147
5f9aee6f
LMI
31482013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
3149
3150 * image.c (imagemagick_compute_animated_image): Don't crash if we
3151 have an animation with different-sized images (bug#15313).
3152
90caab3f
MR
31532013-11-30 Martin Rudalics <rudalics@gmx.at>
3154
3155 Remove some unused items introduced during pixelwise change.
3156 * window.c (window_resize_total_check): Remove unused function.
3157 * xdisp.c (remember_mouse_glyph): Remove unused label.
3158 (Ftool_bar_height): Move declaration inside #if.
3159 * xterm.c (x_set_window_size): Don't use r and c.
3160
6ae87264
JB
31612013-11-30 Juanma Barranquero <lekktu@gmail.com>
3162
3163 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
3164 `value' and `endp'.
3165
3166 * window.c (Fset_window_configuration): Comment out unused variables.
3167
3168 * w32term.c (w32_read_socket): Remove unused variable `buf'.
3169
f80e1bb6
JD
31702013-11-30 Jan Djärv <jan.h.d@swipnet.se>
3171
eb6f376d
JD
3172 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
3173
8e2d7ef2
JD
3174 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
3175
3176 * gnutls.c (gnutls_audit_log_function): Only declare and define if
3177 HAVE_GNUTLS3 (Bug#16001).
3178
f80e1bb6
JD
3179 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
3180 if interrupts are deferred (Bug#15801).
3181
10634b40 31822013-11-30 Martin Rudalics <rudalics@gmx.at>
880e6158
MR
3183
3184 Support resizing frames and windows pixelwise.
3185 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
3186 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
3187 (struct glyph_matrix): Replace window_left_col and
3188 window_top_line by window_pixel_left and window_pixel_top.
0d9cba29
SM
3189 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
3190 Minor rewrite.
880e6158
MR
3191 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
3192 (draw_window_divider, move_it_to, x_draw_right_divider)
3193 (x_draw_bottom_divider, change_frame_size): Add or fix
3194 declarations.
3195 * dispnew.c (change_frame_size_1): Change prototype.
3196 (adjust_glyph_matrix, required_matrix_width)
3197 (adjust_frame_glyphs_for_window_redisplay): Use pixel
3198 values instead of lines and columns.
3199 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
3200 WINDOW_TOTAL_FRINGE_WIDTH.
3201 (handle_window_change_signal, do_pending_window_change)
3202 (init_display): Adjusts calls of change_frame_size.
3203 (change_frame_size, change_frame_size_1): Handle pixelwise
3204 changes.
0d9cba29
SM
3205 * frame.c (Qright_divider_width, Qbottom_divider_width):
3206 New Lisp objects.
880e6158
MR
3207 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
3208 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
3209 (x_set_internal_border_width, x_set_vertical_scroll_bars)
3210 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
3211 values.
3212 (set_frame_param): New function.
3213 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
3214 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
3215 (Ffringe_width, Fborder_width, Fright_divider_width)
3216 (Fbottom_divider_width): New functions, defsubr them.
0d9cba29
SM
3217 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
3218 New argument pixelwise.
880e6158
MR
3219 (struct frame_parm_table): New members Qright_divider_width and
3220 Qbottom_divider_width.
3221 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
3222 (x_report_frame_params): Handle Qright_divider_width and
3223 Qbottom_divider_width.
0d9cba29
SM
3224 (x_set_right_divider_width, x_set_bottom_divider_width):
3225 New functions.
880e6158
MR
3226 (frame_resize_pixelwise): New option.
3227 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
3228 new_pixelwise, right_divider_width and bottom_divider_width;
3229 remove total_lines; rename text_lines, text_cols, new_text_lines
3230 and new_text_cols to text_height, text_width, new_height and
3231 new_width respectively.
3232 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
3233 FRAME_TEXT_WIDTH respectively.
3234 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
3235 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
0d9cba29
SM
3236 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
3237 New macros.
880e6158
MR
3238 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
3239 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
3240 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
3241 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
3242 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
3243 (FRAME_TOTAL_COLS_ARG): Remove macro.
3244 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
3245 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
3246 (x_wm_set_size_hint): Handle frame pixel sizes.
0d9cba29
SM
3247 * indent.c (compute_motion, Fcompute_motion):
3248 Call window_body_width instead of window_body_cols.
880e6158
MR
3249 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
3250 (make_lispy_position): Handle right and bottom dividers.
3251 (Fsuspend_emacs): Pixelize call of change_frame_size.
3252 * keyboard.h: Extern Qright_divider, Qbottom_divider.
3253 * lisp.h: Extern set_frame_param.
3254 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
3255 x_set_window_size.
0d9cba29
SM
3256 (Fx_create_frame): Add entry for vertical_drag_cursor.
3257 Pixelize call of change_frame_size.
880e6158
MR
3258 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
3259 * nsterm.m (ns_update_window_end): Optionally draw right
3260 divider.
0d9cba29
SM
3261 (x_set_window_size): Add argument pixelwise.
3262 Call check_frame_size and change_frame_size with pixelwise zero.
880e6158
MR
3263 (ns_draw_window_divider): New function.
3264 (ns_redisplay_interface): Add ns_draw_window_divider.
3265 (updateFrameSize:): Call change_frame_size with pixelwise zero.
3266 (x_new_font): Call x_set_window_size with pixelwise zero.
3267 * print.c (print_object): For a window print its sequence
3268 number again.
3269 * term.c (Fresume_tty): Pixelize call of change_frame_size.
3270 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
3271 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
3272 (w32_createwindow): Use scroll bar area width.
0d9cba29
SM
3273 (w32_wnd_proc): Handle bottom divider width.
3274 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
3275 (Fx_create_frame): Default divider width parameters.
3276 Caclulate sizes pixelwise. Add vertical drag cursor support.
3277 (x_create_tip_frame): Default divider widths to zero.
3278 Pixelize call to change_frame_size.
880e6158
MR
3279 (Fx_show_tip): Add handling of divider widths. Pixelize window
3280 position and sizes.
3281 (Fw32_frame_rect): New function.
3282 (frame_parm_handler w32_frame_parm_handlers): Add divider
3283 widths.
3284 (Vx_window_vertical_drag_shape): Add variable.
3285 * w32inevt.c (resize_event, maybe_generate_resize_event):
3286 Pixelize change_frame_size calls.
3287 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
3288 call.
3289 * w32term.c (w32_draw_window_divider): New function.
3290 (x_update_window_end): Handle right divider.
3291 (w32_draw_fringe_bitmap, x_scroll_run)
3292 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
0d9cba29
SM
3293 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
3294 Calculate new frame sizes pixelwise.
880e6158
MR
3295 (x_new_font): Pixelize call to x_set_window_size.
3296 (x_check_fullscreen): Pixelize call to change_frame_size.
3297 (x_set_window_size_1, x_set_window_size): New argument
3298 pixelwise. Calculate pixelwise.
3299 (x_wm_set_size_hint): Use scroll bar area width.
3300 (w32_redisplay_interface): Add w32_draw_window_divider.
3301 * w32term.h (struct w32_output): Add vertical drag cursor.
3302 * widget.c (set_frame_size, update_wm_hints)
3303 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
3304 change_frame_size.
3305 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
3306 * window.c (sequence_number): Restore.
3307 (Fwindow_pixel_width, Fwindow_pixel_height)
3308 (Fwindow_mode_line_height, Fwindow_header_line_height)
3309 (window_pixel_to_total, Frun_window_scroll_functions)
3310 (Fset_window_new_pixel, window_resize_apply_total)
3311 (Fwindow_resize_apply_total): New functions.
3312 (window_body_height, window_body_width): Rename from
0d9cba29
SM
3313 window_body_lines. New argument PIXELWISE.
3314 Calculate pixelwise.
880e6158
MR
3315 (Fwindow_body_height, Fwindow_body_width): New argument
3316 PIXELWISE.
3317 (coordinates_in_window, window_relative_x_coord): Use window's
3318 pixel width instead of total width.
3319 (replace_window, recombine_windows): Initialize pixel values.
3320 (resize_root_window, resize_frame_windows, grow_mini_window)
0d9cba29
SM
3321 (shrink_mini_window): New argument PIXELWISE.
3322 Calculate pixelwise.
880e6158
MR
3323 (Fdelete_other_windows_internal, adjust_window_margins)
3324 (window_resize_check, window_resize_apply)
3325 (Fdelete_window_internal, Fresize_mini_window_internal)
3326 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
3327 (check_frame_size): Rename arguments. New argument PIXELWISE.
3328 Calculate pixelwise.
3329 (set_window_buffer): Make samebuf bool. Run configuration change
3330 hook only if buffer changed.
3331 (Fset_window_buffer): Rewrite doc-string.
3332 (make_window): Initialize new_pixel slot.
3333 (Fwindow_resize_apply): Check pixel size of root window.
3334 (Fsplit_window_internal): Call 2nd argument pixel_size.
3335 Calculate pixelwise.
3336 (Fscroll_left, Fscroll_right): Call window_body_width instead of
3337 window_body_cols.
3338 (save_window_data): New slots frame_text_width,
3339 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
3340 (saved_window): New slots pixel_left, pixel_top, pixel_height,
3341 pixel_width.
3342 (Fcurrent_window_configuration, Fset_window_configuration)
3343 (save_window_save, compare_window_configurations): Handle new
3344 slots in save_window_data and saved_window.
3345 (Fset_window_scroll_bars): Fix doc-string.
3346 (window_resize_pixelwise): New variable.
0d9cba29
SM
3347 (coordinates_in_window, Fcoordinates_in_window_p):
3348 Handle dividers.
880e6158 3349 (make_parent_window): Adjust sequence_number.
0d9cba29
SM
3350 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
3351 New functions.
880e6158
MR
3352 * window.h (struct window): New members new_pixel, pixel_left,
3353 pixel_top, pixel_width, pixel_height. Restore sequence_number.
3354 (wset_new_pixel): New function.
3355 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
3356 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
3357 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
3358 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
3359 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
3360 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
3361 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
3362 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
3363 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
3364 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
3365 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
3366 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
3367 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
3368 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
3369 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
3370 Rewrite.
3371 (resize_frame_windows, grow_mini_window, shrink_mini_window)
3372 (window_body_width, check_frame_size): Adapt external declarations.
3373 * xdisp.c (last_max_ascent): New integer.
3374 (window_text_bottom_y): Handle bottom divider.
3375 (window_box_width, window_box_height): Calculate pixelwise.
3376 (get_glyph_string_clip_rects): Handle right divider.
3377 (remember_mouse_glyph): When windows are resized pixelwise
3378 proceed with width and height set to 1.
3379 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
3380 WINDOW_TOTAL_WIDTH.
3381 (move_it_to): Calculate and return maximum x position
3382 encountered.
3383 (Fwindow_text_pixel_size): New function.
3384 (resize_mini_window, update_tool_bar): Calculate pixelwise.
0d9cba29
SM
3385 (tool_bar_lines_needed): Rename to tool_bar_height.
3386 Calculate pixelwise.
3387 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
3388 Calculate pixelwise.
880e6158
MR
3389 (redisplay_tool_bar): Calculate pixelwise.
3390 (redisplay_window): Calculate pixelwise. Handle dividers.
3391 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
3392 (x_draw_vertical_border): Handle dividers.
3393 (define_frame_cursor1): Handle vertical drag cursor.
3394 (x_draw_right_divider, x_draw_bottom_divider): New functions.
3395 (expose_window): Calculate pixelwise. Handle dividers.
3396 (init_xdisp): Initialize pixel values.
3397 * xfaces.c (Qwindow_divider): New face.
3398 (realize_basic_faces): Realize it.
3399 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
3400 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
3401 (x_set_scroll_bar_default_width): Default actual width to 16.
3402 (Fx_create_frame): Set sizes pixelwise.
0d9cba29
SM
3403 (x_create_tip_frame): Default divider widths to zero.
3404 Pixelize call of change_frame_size.
880e6158
MR
3405 (Fx_show_tip): Handle divider widths. Initial pixel position
3406 and sizes.
3407 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
3408 (Vx_window_vertical_drag_shape): New option.
3409 * xmenu.c (free_frame_menubar): Pixelize call of
3410 x_set_window_size.
3411 * xterm.c (x_draw_window_divider): New function.
3412 (x_update_window_end): Optionally draw right divider.
3413 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
3414 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
3415 (handle_one_xevent, x_new_font): Calculate pixelwise.
3416 (x_set_window_size_1, x_set_window_size): New argument
3417 pixelwise. Calculate pixelwise.
3418 (x_wm_set_size_hint): Pixelize call of check_frame_size.
3419 (struct x_redisplay_interface): Add x_draw_window_divider.
3420 * xterm.h (struct x_output): Add vertical_drag_cursor.
3421
44ad1cf7
SM
34222013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
3423
3424 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
3425 Set invisible frames's `redisplay' when a full redisplay is requested.
3426 (redisplay_window): Set must_be_updated_p instead (bug#15999).
3427 (redisplay_mode_lines): Don't set must_be_updated_p any more.
3428 (display_mode_lines): Set it here instead.
3429
3430 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
3431
3432 * dispextern.h (set_window_update_flags): Remove.
3433
da048127
SM
34342013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
3435
9f4ffeee
SM
3436 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
3437
a8253776
SM
3438 * xdisp.c (REDISPLAY_SOME_P): New macro.
3439 (redisplay_internal): Use it (bug#15999).
3440 (prepare_menu_bars, redisplay_window): Use it as well.
3441
4e36a6a6 3442 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
da048127 3443
579ca67b
TS
34442013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
3445
3446 * w32font.c (g_b_init_get_char_width_32_w): New static var.
3447 (globals_of_w32font): Zero it out.
3448 (GetCharWidth32W_Proc): New function pointer.
3449 (get_char_width_32_w): New function.
3450 (compute_metrics): If get_glyph_outline_w returns an error, try
3451 get_char_width_32_w before declaring a failure. This avoids
3452 punishing raster (a.k.a. "bitmap") fonts by slowing down
3453 redisplay. (Bug#6364).
b7f79a5c 3454
da048127
SM
34552013-11-29 Eli Zaretskii <eliz@gnu.org>
3456
b7f79a5c
EZ
3457 * xdisp.c (clear_mouse_face): Don't invalidate the entire
3458 mouse-highlight info, just signal frame_up_to_date_hook that mouse
3459 highlight needs to be redisplayed. (Bug#15913)
3460
49faeaaf
PE
34612013-11-29 Paul Eggert <eggert@cs.ucla.edu>
3462
3463 Fix minor problems found by static checking.
3464 * buffer.h (struct buffer_text, struct buffer):
3465 * frame.h (struct frame):
3466 * window.h (struct window):
3467 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
3468 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
3469 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
3470 no-longer-valid use of HAVE_MENUS.
3471 * xdisp.c (propagate_buffer_redisplay): Now static.
3472
ef869611
SM
34732013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
3474
7cdf484b
SM
3475 * xmenu.c (Fmenu_or_popup_active_p):
3476 * window.c (Fset_window_configuration):
3477 * menu.c (Fx_popup_menu, Fx_popup_dialog):
3478 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
3479 * fns.c (Fyes_or_no_p):
3480 * editfns.c (Fmessage_box, Fmessage_or_box):
3481 * alloc.c (make_save_ptr_ptr):
3482 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
3483
ef869611
SM
3484 * window.c (Fset_window_configuration): Move select_window later.
3485
655ab9a3
SM
34862013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
3487
3488 Refine redisplay optimizations to only redisplay *some* frames/windows
3489 rather than all of them.
3490 * xdisp.c (REDISPLAY_SOME): New constant.
3491 (redisplay_other_windows, wset_redisplay, fset_redisplay)
3492 (bset_redisplay, bset_update_mode_line): New functions.
3493 (message_dolog): Use bset_redisplay.
3494 (clear_garbaged_frames): Use fset_redisplay.
3495 (echo_area_display): Use wset_redisplay.
3496 (buffer_shared_and_changed): Remove.
3497 (prepare_menu_bars): Call Vpre_redisplay_function before updating
3498 frame titles. Compute the actual set of windows redisplayed.
3499 Don't update frame titles and menu bars for frames that don't need to
3500 be redisplayed.
3501 (propagate_buffer_redisplay): New function.
3502 (AINC): New macro.
3503 (redisplay_internal): Use it. Be more selective in the set of windows
3504 we redisplay. Propagate windows_or_buffers_changed to
3505 update_mode_lines a bit later to simplify the code.
3506 (mark_window_display_accurate_1): Reset window and buffer's
3507 `redisplay' flag.
3508 (redisplay_window): Do nothing if neither the window nor the buffer nor
3509 the frame needs redisplay.
3510 * window.h (struct window): Add `redisplay' field.
3511 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
3512 (redisplay_other_windows, window_list): New declarations.
3513 * window.c (select_window, Fset_window_start): Use wset_redisplay.
3514 (window_list): Not static any more.
3515 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
3516 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
3517 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
3518 * frame.c (Fmake_frame_visible): Don't redisplay everything.
3519 * frame.h (struct frame): Add `redisplay' field.
3520 Move `external_menu_bar' bitfield next to other bit-fields.
3521 (SET_FRAME_GARBAGED): Use fset_redisplay.
3522 (SET_FRAME_VISIBLE): Don't garbage the frame;
3523 Use redisplay_other_windows.
3524 * buffer.h (struct buffer): Add `redisplay' field.
3525 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
3526 (modify_overlay): Use bset_redisplay.
3527 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
3528
9c099ca7
EZ
35292013-11-28 Eli Zaretskii <eliz@gnu.org>
3530
3531 Support w32 file notifications in batch mode.
3532 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
3533 invalid (which happens in batch mode). If non-interactive, call
3534 handle_file_notifications to store file notification events in the
3535 input queue. (Bug#15933)
3536
655ab9a3 3537 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
9c099ca7 3538
655ab9a3 3539 * w32inevt.c (handle_file_notifications): Now external, not static.
9c099ca7
EZ
3540
3541 * w32term.h (handle_file_notifications): Provide prototype.
3542
3543 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
3544 init_crit, since init_display, which does that otherwise, is not
3545 called.
3546
7e3bf78c
GM
35472013-11-27 Glenn Morris <rgm@gnu.org>
3548
3549 * Makefile.in ($(lispsource)/international/charprop.el): New.
3550 (emacs$(EXEEXT)): Depend on charprop.el.
3551
fb6a5d68
EZ
35522013-11-27 Eli Zaretskii <eliz@gnu.org>
3553
de1e0d91
EZ
3554 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
3555 deleting portions of the buffer under non-nil REPLACE argument.
3556 (Bug#15973)
3557
fb6a5d68
EZ
3558 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
3559 directory, watch it and not its parent.
3560 (add_watch): Allow empty string in FILE.
3561
72fdd473
MR
35622013-11-27 Martin Rudalics <rudalics@gmx.at>
3563
3564 * window.c (Fset_window_start, window_resize_apply)
3565 (window_scroll): Reset window_end_valid (Bug#15957).
3566
cb6c95a3
GM
35672013-11-27 Glenn Morris <rgm@gnu.org>
3568
3569 * Makefile.in (leimdir): Now in lisp source directory.
3570 ($(leimdir)/leim-list.el): Just use ../leim .
3571 * epaths.in (PATH_DUMPLOADSEARCH):
3572 * lread.c (load_path_default):
3573 * nsterm.m (ns_load_path): No more leim directory.
3574
ed87760c
AS
35752013-11-26 Andreas Schwab <schwab@suse.de>
3576
3577 * .gdbinit (xgettype): Add cast.
3578
624780f0
GM
35792013-11-26 Glenn Morris <rgm@gnu.org>
3580
3581 Preload leim-list.el.
3582 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
3583 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
3584 is a single directory.
3585
4aaf6b61
PE
35862013-11-25 Paul Eggert <eggert@cs.ucla.edu>
3587
3f73284a
PE
3588 bool-vector-subsetp is now the normal direction (Bug#15912).
3589 * data.c (Fbool_vector_subsetp): Test whether the first argument
3590 is a subset of the second one, not the reverse. Add doc string.
3591
4aaf6b61
PE
3592 Fix minor problems found by static checking.
3593 * lread.c (load_path_default): Now static.
3594 * textprop.c (text_property_stickiness): Be consistent about the
3595 test used when deciding whether to consider the previous character.
3596 This simplifies the code a bit.
3597
511fa0d3
SM
35982013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
3599
a5fa8eb4
SM
3600 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
3601
511fa0d3
SM
3602 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
3603 (syms_of_frame): Don't defsubr them.
3604
97bacf8c
GM
36052013-11-25 Glenn Morris <rgm@gnu.org>
3606
310294a3
GM
3607 * lread.c (load_path_default): Change the sense of the argument.
3608 (init_lread): When EMACSLOADPATH is set, do not ignore changes
3609 from dump_path. When it is not, avoid checking dump_path twice.
3610
97bacf8c
GM
3611 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
3612 uninstalled dump_path against installed Vload_path. (Bug#15964)
3613
450533b0
SM
36142013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
3615
740bcff0
SM
3616 Export get_pos_property to Elisp.
3617 * editfns.c (Fget_pos_property): Rename from get_pos_property.
3618 (syms_of_editfns): Export it to Elisp.
3619
450533b0
SM
3620 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
3621
1db72ad3
RF
36222013-11-23 Romain Francoise <romain@orebokech.com>
3623
3624 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
3625 initialization here ...
3626 (syms_of_fileio): ... from here.
3627
2c98e669
SM
36282013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
3629
3630 * lread.c (init_lread): Fix int/Lisp_Object mixup.
3631 Please use --enable-check-lisp-object-type.
3632
50dca5df
GM
36332013-11-23 Glenn Morris <rgm@gnu.org>
3634
3635 * process.c (get_process): Explicit error for dead buffers.
3636
d7aff0d6
GM
36372013-11-23 Andreas Schwab <schwab@linux-m68k.org>
3638
3639 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
3640
17e0445b
GM
36412013-11-23 Glenn Morris <rgm@gnu.org>
3642
3643 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
3644 * lread.c (load_path_check): Take path to check as argument.
3645 (load_path_default): New, split from init_lread.
3646 (init_lread): Move calc of default load-path to load_path_default.
3647 Empty elements in EMACSLOADPATH now stand for the default.
3648 (load-path): Doc fix.
3649 * emacs.c (decode_env_path): Add option to treat empty elements
3650 as nil rather than ".".
3651 * callproc.c (init_callproc_1, init_callproc):
3652 * image.c (Vx_bitmap_file_path):
3653 * lisp.h (decode_env_path):
3654 * lread.c (Vsource_directory):
3655 Update for new argument spec of decode_env_path.
3656
cd88d682
EZ
36572013-11-22 Eli Zaretskii <eliz@gnu.org>
3658
3659 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
3660 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
3661
75360f19
PE
36622013-11-21 Paul Eggert <eggert@cs.ucla.edu>
3663
7e8ed4f7
PE
3664 Fix some dependency problems that cause unnecessary recompiles.
3665 Problem reported by RMS in
3666 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
3667 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
3668 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
3669 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
7e8ed4f7
PE
3670 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
3671 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
3672 (boostrap-clean): No need to remove stamp-oldxmenu.
3673
75360f19
PE
3674 Fix recently introduced bool vector overrun.
3675 This was due to an optimization that went awry.
3676 Reported by Glenn Morris in
3677 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
3678 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
3679 for empty vectors, undoing the 2013-11-18 change.
3680 * data.c (bool_vector_binop_driver): Rely on this.
3681 Fix bug that occasionally overran the destination.
3682 * lisp.h (struct Lisp_Bool_vector): Document this.
3683
f03f7d3d
JD
36842013-11-20 Jan Djärv <jan.h.d@swipnet.se>
3685
e9dc713d 3686 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
cab0d91d
JD
3687 to handle dialogs.
3688
f03f7d3d
JD
3689 * nsterm.m (init, run, stop:): Comment out for now, does not work
3690 with dialogs.
3691
12455b2f
PE
36922013-11-19 Paul Eggert <eggert@cs.ucla.edu>
3693
3694 * charset.c (syms_of_charset): Don't read past end of string.
3695
8d1c3af9
GM
36962013-11-19 Glenn Morris <rgm@gnu.org>
3697
3698 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
3699
8e015705
BJ
37002013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
3701
3702 Add hooks to run on gaining/losing focus. (Bug#15029)
3703 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
3704 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
3705 (syms_of_frame): Add focus-in-hook, focus-out-hook.
3706
87d86601
PE
37072013-11-18 Paul Eggert <eggert@cs.ucla.edu>
3708
23e79746
PE
3709 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
3710 The old names predated the API change that put destination at end.
3711
ec2c4ee6
PE
3712 Improve API of recently-added bool vector functions (Bug#15912).
3713 The old API had (bool-vector-count-matches A B)
3714 and (bool-vector-count-matches-at A B I), which gave the
3715 misleading impression that the two functions were variants, one
3716 with a location I. The new API has (bool-vector-count-population A)
3717 and (bool-vector-count-consecutive A B I) to make the distinction
3718 clearer. The first function no longer has a B argument, since the
3719 caller can easily determine the number of nils if the length and
3720 number of ts is known.
3721 * data.c (Fbool_vector_count_population): Rename from
3722 bool_vector_count_matches, and accept just 1 argument.
3723 (Fbool_vector_count_consecutive): Rename from
3724 Fbool_vector_count_matches_at.
3725
87d86601
PE
3726 Always allocate at least one bits_word per bool vector.
3727 See Daniel Colascione in:
3728 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
3729 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
3730 * data.c (bool_vector_binop_driver): Rely on this. Tune.
3731 * lisp.h (struct Lisp_Bool_vector): Document this.
3732
37c790b3
EZ
37332013-11-18 Eli Zaretskii <eliz@gnu.org>
3734
3735 * insdel.c (invalidate_buffer_caches): New function, consolidated
3736 from part of prepare_to_modify_buffer.
3737 (insert_from_gap, prepare_to_modify_buffer):
655ab9a3
SM
3738 * coding.c (code_convert_region, code_convert_string):
3739 Call invalidate_buffer_caches. (Bug#15841)
37c790b3
EZ
3740
3741 * lisp.h (invalidate_buffer_caches): Add prototype.
3742
96e78d1f
EZ
37432013-11-17 Eli Zaretskii <eliz@gnu.org>
3744
3745 * w32term.c (x_update_window_end): Don't invalidate the entire
3746 mouse-highlight info, just signal frame_up_to_date_hook that mouse
3747 highlight needs to be redisplayed. (Bug#15913)
3748
0f679e86
PE
37492013-11-17 Paul Eggert <eggert@cs.ucla.edu>
3750
3751 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
3752
3d6dec8d
EZ
37532013-11-16 Eli Zaretskii <eliz@gnu.org>
3754
d17f4dba
EZ
3755 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
3756 while we are using Vprin1_to_string_buffer.
3757
3d6dec8d
EZ
3758 * keymap.c (describe_map): Don't crash if PT is 1 both before and
3759 after inserting the description string. (Bug#15907)
3760
2fcc742f
PE
37612013-11-15 Paul Eggert <eggert@cs.ucla.edu>
3762
3763 * data.c: Work around bogus GCC diagnostic about shift count.
3764 Reported by Eli Zaretskii in
3765 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
3766 (pre_value): New function.
3767 (count_trailing_zero_bits): Use it.
3768
73583a99
EZ
37692013-11-15 Eli Zaretskii <eliz@gnu.org>
3770
3771 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
3772 assume C macros are not supported even under -g3 in these old GCC
3773 versions.
3774
a1f03e89
LL
37752013-11-15 Leo Liu <sdl.web@gmail.com>
3776
3777 * minibuf.c (Ftry_completion, Fall_completions)
3778 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
3779
1a191e5c
PE
37802013-11-15 Paul Eggert <eggert@cs.ucla.edu>
3781
3782 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
3783 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
3784 This avoids placing unnecessary constants into the Emacs code.
3785
c9f63070
KI
37862013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
3787
3788 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
3789 for Cygwin w32 build.
3790
3791 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
3792 for Cygwin w32 build. (Bug#15892)
3793
d672ac3c
PE
37942013-11-14 Paul Eggert <eggert@cs.ucla.edu>
3795
2cf00efc
PE
3796 Simplify, port and tune bool vector implementation.
3797 * alloc.c (bool_vector_exact_payload_bytes)
3798 (bool_vector_payload_bytes): Remove.
3799 (bool_vector_fill): Return its argument.
3800 * alloc.c (bool_vector_fill):
3801 * lread.c (read1):
3802 * print.c (print_object):
3803 Simplify by using bool_vector_bytes.
3804 * alloc.c (make_uninit_bool_vector):
3805 New function, broken out from Fmake_bool_vector.
3806 (Fmake_bool_vector): Use it. Use tail call.
3807 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
3808 * data.c (BITS_PER_ULL): New constant.
3809 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
3810 if long long versions don't exist.
3811 (shift_right_ull): New function.
3812 (count_one_bits_word): New function, replacing popcount_bits_word
3813 macro. Don't assume that bits_word is no wider than long long.
3814 (count_one_bits_word, count_trailing_zero_bits):
3815 Don't assume that bits_word is no wider than long long.
3816 * data.c (bool_vector_binop_driver, bool_vector_not):
3817 * fns.c (Fcopy_sequence):
3818 * lread.c (read1):
3819 Create an uninitialized destination, to avoid needless work.
3820 (internal_equal): Simplify.
3821 (Ffillarray): Prefer tail call.
3822 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
3823 contain at least one word.
3824 (bits_word_to_host_endian): Prefer if to #if. Don't assume
3825 chars are narrower than ints.
3826 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
3827 * fns.c (Fcopy_sequence):
3828 Simplify and tune.
3829 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
3830 Don't try to port to hosts where bits_word values have holes; the
3831 code wouldn't work there anyway. Verify this assumption, though.
3832 (bool_vector_bytes): New function.
3833 (make_uninit_bool_vector): New decl.
3834 (bool_vector_fill): Now returns Lisp_Object.
3835
d672ac3c
PE
3836 * xfns.c (xic_create_fontsetname):
3837 * xrdb.c (gethomedir): Prefer tail calls.
3838
bd7cd30a
PE
38392013-11-12 Paul Eggert <eggert@cs.ucla.edu>
3840
b3671617
PE
3841 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
3842 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
e3ac17b6 3843
bd7cd30a
PE
3844 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
3845 that requires a return value.
3846 (Fset_buffer_modified_p): Take advantage of this change to do
3847 a tail call.
3848
ecda65d4
SM
38492013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
3850
3851 * buffer.c (Frestore_buffer_modified_p): Sync it with
3852 Fset_buffer_modified_p.
3853 (Fforce_mode_line_update): New function, moved from subr.el.
3854 (Fset_buffer_modified_p): Use them.
3855 (syms_of_buffer): Defsubr Fforce_mode_line_update.
3856
5389db9e
PE
38572013-11-11 Paul Eggert <eggert@cs.ucla.edu>
3858
3859 * search.c (find_newline): Rewrite to prefer offsets to pointers.
3860 This avoids undefined behavior when subtracting pointers into
3861 different aways. On my platform it also makes the code a tad
3862 smaller and presumably faster.
3863
7818df11
SM
38642013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
3865
3866 * keyboard.c (command_loop_1): Use region-extract-function.
3867 * insdel.c (Qregion_extract_function): Not static any more (can we
3868 stop pretending that these vars can benefit from being marked static?).
3869
85f37d10
EZ
38702013-11-09 Eli Zaretskii <eliz@gnu.org>
3871
3872 * search.c (find_newline): If buffer text is relocated during the
3873 "dumb loop", adjust C pointers into buffer text to follow suit.
3874 (Bug#15841)
3875
0449d6cd 38762013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
b24ac90f
JD
3877
3878 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
3879 for conversion (Bug#15837).
3880
addccbd0
EZ
38812013-11-09 Eli Zaretskii <eliz@gnu.org>
3882
3883 * fileio.c (Finsert_file_contents): Invalidate the newline cache
3884 for the entire range of inserted characters. (Bug#15841)
3885
5b97b4c0
JD
38862013-11-08 Jan Djärv <jan.h.d@swipnet.se>
3887
3888 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
3889 unspecified.
3890 (realize_default_face): Remove assignment to distant-foreground if
3891 unspecified (Bug#15815).
3892
080db47f
EZ
38932013-11-08 Eli Zaretskii <eliz@gnu.org>
3894
3895 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
3896 cache-long-scans disabled, since we don't want to call
3897 prepare_to_modify_buffer (in insert_1_both) for each message we
3898 display.
3899
3900 * buffer.h (bset_cache_long_scans): New INLINE function, moved
3901 from buffer.c. Improve commentary to the buffer field setter
3902 functions.
3903
3904 * buffer.c (bset_cache_long_scans): Static function deleted.
3905 Improve commentary to the buffer field setter functions.
3906 (init_buffer_once): Default for cache-long-scans changed to t.
3907 (Bug#15797)
3908
7f1913b2
PE
39092013-11-08 Paul Eggert <eggert@cs.ucla.edu>
3910
220a304a
PE
3911 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
3912
7f1913b2
PE
3913 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
3914 This bug was introduced in my 2013-06-21 change, and caused
3915 struct Lisp_Sub_Char_Table objects to be given too many slots,
3916 which broke 'make -C admin/unidata'.
3917
5ee29210
JD
39182013-11-07 Jan Djärv <jan.h.d@swipnet.se>
3919
3920 Import changes from mac-port 4.5.
3921 * macfont.m (mac_font_copy_default_descriptors_for_language)
3922 (mac_font_copy_default_name_for_charset_and_languages): Declare.
3923 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
3924 (macfont_language_default_font_names): New.
3925 (macfont_list): Rearrange language/charset code.
3926 (macfont_close): Don't check for macfont_info->cache.
3927 (mac_ctfont_create_preferred_family_for_attributes): New font
3928 selection code, call
3929 mac_font_copy_default_name_for_charset_and_languages.
3930 (mac_font_copy_default_descriptors_for_language)
3931 (mac_font_copy_default_name_for_charset_and_languages): New functions.
3932
3933 * macfont.h (kCTVersionNumber10_9): Define if not defined.
3934
aea07e2c
PE
39352013-11-07 Paul Eggert <eggert@cs.ucla.edu>
3936
3937 Port to C11 aligned_alloc, and fix some integer overflows.
3938 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
3939 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
3940 and use of posix_memalign replaced with aligned_alloc.
3941 (aligned_alloc): New function, defined or declared as needed.
3942 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
3943 Don't undef; configure.ac now does this.
3944 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
3945 (calloc, aligned_alloc): Check for integer overflow.
3946 (aligned_alloc): Rename from memalign. All uses changed.
3947 (memalign): New function, an alias for aligned_alloc.
3948
e2e894cf
SM
39492013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3950
3951 * xdisp.c (redisplay_internal): Fix typo in last change.
3952
a5d376b0
PE
39532013-11-06 Paul Eggert <eggert@cs.ucla.edu>
3954
3955 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
3956
2ec9db5d
SM
39572013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3958
3959 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
3960 redisplay--mode-lines-cause.
3961 (redisplay_internal): Keep them uptodate. Remove redundant check of
3962 buffer_shared_and_changed.
3963 * *.[chm]: Number every assignment to update_mode_lines so we
3964 can track why it is set.
3965
d7ac0815
EZ
39662013-11-06 Eli Zaretskii <eliz@gnu.org>
3967
3968 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
3969
94ae2ad4
SM
39702013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
3971
3972 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
3973 can track why it is set.
3974
798aef02
PE
39752013-11-06 Paul Eggert <eggert@cs.ucla.edu>
3976
3977 Integer-related fixes for term.c etc.
3978 * dispextern.h (face_tty_specified_color): New function.
3979 * term.c (turn_on_face): Don't rely on undefined behavior when
94ae2ad4
SM
3980 assigning an out-of-range value to 'long'.
3981 Simplify test for toggling highlight.
798aef02
PE
3982 (tty_capable_p): Omit last two (unused) args. All callers changed.
3983 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
3984 (read_menu_input, tty_menu_activate, tty_menu_show):
3985 * xfaces.c (x_supports_face_attributes_p)
3986 (tty_supports_face_attributes_p):
3987 Use bool for boolean. All callers changed.
3988 (tty_supports_face_attributes_p): Omit defaults for color indices;
3989 no longer needed. Simplify tail call.
3990
9e6e9826
SM
39912013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
3992
3993 * xdisp.c (prepare_menu_bars): Mark static.
3994 * lisp.h (prepare_menu_bars): Don't declare.
3995 * xselect.c (x_handle_selection_clear):
3996 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
3997
7544a9d3
PE
39982013-11-05 Paul Eggert <eggert@cs.ucla.edu>
3999
4000 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
4001 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
4002
2e670b95
SM
40032013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
4004
4005 * keyboard.c (Fcommand_error_default_function): Rename from
4006 Fdefault_error_output.
4007
2ea0d614
JC
40082013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
4009
2e670b95
SM
4010 * keyboard.c (Fdefault_error_output): New function, extracted from
4011 cmd_error_internal.
4012 (syms_of_keyboard): Use it for Vcommand_error_function.
2ea0d614 4013
70de5e86
SM
40142013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
4015
4016 * eval.c (handlerlist_sentinel): New variable (bug#15802).
4017 (init_eval): Use it to ensure handlerlist is non-NULL.
4018 (unwind_to_catch): Make sure we never set handlerlist to NULL.
4019 (Fsignal): Adjust NULLness test of handlerlist.
70de5e86
SM
4020 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
4021
d57f4dde
EZ
40222013-11-05 Eli Zaretskii <eliz@gnu.org>
4023
4024 * callproc.c (call_process): Call prepare_to_modify_buffer before
4025 decoding text read from the sub-process, as the decoded stuff will
4026 be inserted into the buffer. This will invalidate the various
4027 caches maintained for the buffer. (Bug#15148)
4028
29aa2b71
XF
40292013-11-05 Xue Fuqiao <xfq.free@gmail.com>
4030
4031 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
4032 string of glyphless-char-display.
4033
ceb486d4
JD
40342013-11-05 Jan Djärv <jan.h.d@swipnet.se>
4035
4036 * nsfns.m (ns_get_name_from_ioreg): New function.
4037 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
4038 OSX >= 10.9. Use ns_get_name_from_ioreg.
4039
69369809
PE
40402013-11-05 Paul Eggert <eggert@cs.ucla.edu>
4041
df5b4930
PE
4042 Simplify and port recent bool vector changes.
4043 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
4044 only in this file. Use a more-efficient implementation if the
4045 second argument is a power of 2.
4046 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
4047 Remove no-longer-necessary compile-time checks.
4048 (bool_vector_exact_payload_bytes): New function.
4049 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
4050 exact payload changed to call the new function. Do not assume
4051 that the arg or result fits in ptrdiff_t.
4052 (bool_vector_fill): New function.
4053 (Fmake_bool_vector): Use it. Don't assume bit counts fit
4054 in ptrdiff_t.
4055 (vroundup_ct): Don't assume arg fits in size_t.
4056 * category.c (SET_CATEGORY_SET): Remove. All callers now just
4057 invoke set_category_set.
4058 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
4059 All callers changed. Use bool_vector_set.
4060 * category.h (XCATEGORY_SET): Remove; no longer needed.
4061 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
4062 bool_vector_bitref.
4063 * data.c (Faref): Use bool_vector_ref.
4064 (Faset): Use bool_vector_set.
4065 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
4066 (Fbool_vector_not, Fbool_vector_count_matches)
4067 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
4068 * fns.c (concat): Use bool_vector_ref.
4069 (Ffillarray): Use bool_vector_fill.
4070 (mapcar1): Use bool_vector_ref.
4071 (sxhash_bool_vector): Hash words, not bytes.
4072 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
4073 a constant, since it's now used in #if.
4074 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
4075 unsigned char on unusual architectures, so that we no longer
4076 assume that the number of bits per bits_word is a power of two or
4077 is a multiple of 8 or of CHAR_BIT.
4078 (Qt): Add forward decl.
4079 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
4080 at least as strictly as bits_word.
4081 (bool_vector_data, bool_vector_uchar_data): New accessors.
4082 All data structure accesses changed to use them.
4083 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
4084 (bool_vector_set): New functions.
4085 (bool_vector_fill): New decl.
4086 (ROUNDUP): Move to alloc.c as described above.
4087
69369809
PE
4088 Fix recent gnutls changes.
4089 * gnutls.c (Fgnutls_boot): Don't assume C99.
4090 * process.c (wait_reading_process_output): Fix typo in recent change.
4091
194b4d9f
TZ
40922013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
4093
4094 * process.c (wait_reading_process_output, read_process_output)
4095 (send_process): Check gnutls_state is not NULL.
4096
4097 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
4098 (Fgnutls_boot): Set process gnutls_p later, after initialization.
4099
c8b09927
JD
41002013-11-04 Jan Djärv <jan.h.d@swipnet.se>
4101
4102 * nsterm.m (init, run, stop:): New methods in EmacsApp for
4103 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
4104
4105 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
4106 OSX >= 10.9.
4107
4108 * nsfns.m (Fx_create_frame): Fix memory leak.
4109
4110 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
4111 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
4112 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
4113
d0065ff1
EZ
41142013-11-04 Eli Zaretskii <eliz@gnu.org>
4115
4116 * xdisp.c (message3_nolog, message_with_string): Encode the string
4117 before writing it to the terminal in a non-interactive session.
4118
4119 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
4120 sure we concatenate them into a unibyte string.
4121
4122 * fileio.c (make_temp_name): Encode PREFIX, and decode the
4123 resulting temporary name before returning it to the caller.
4124 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
4125 is a unibyte string, convert NAME to a unibyte string to ensure
4126 that the result is also a unibyte string.
4127
4128 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
4129 create unibyte strings from default paths and directory/file
4130 names.
4131
4132 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
4133 string.
4134
4135 * callproc.c (init_callproc): Use build_unibyte_string to make
4136 sure we create unibyte strings from default paths and
4137 directory/file names.
4138
4139 * buffer.c (init_buffer): Don't store default-directory of
be80645a 4140 *scratch* in multibyte form. The original problem which led to
d0065ff1
EZ
4141 that is described in
4142 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
4143 but it was solved long ago. (Bug#15260)
4144
91f2d272
PE
41452013-11-04 Paul Eggert <eggert@cs.ucla.edu>
4146
4147 Port to stricter C99 platforms.
4148 Especially, C99 prohibits nesting a struct X inside struct Y if
4149 struct X has a flexible array member.
4150 * alloc.c (struct sdata): New type.
4151 (sdata): Implement in terms of struct sdata.
4152 Remove u member; all uses replaced by next_vector, set_next_vector.
4153 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
4154 (SDATA_DATA_OFFSET): Now a constant, not a macro.
4155 (struct sblock): Rename first_data member to data, which is now
4156 a flexible array member. All uses changed.
4157 (next_vector, set_next_vector, large_vector_vec): New functions.
4158 (vector_alignment): New constant.
4159 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
4160 (struct large-vector): Now merely a NEXT member, since the old approach
4161 ran afoul of stricter C99. All uses changed to use
4162 large_vector_vec or large_vector_offset.
4163 (large_vector_offset): New constant.
4164 * dispnew.c: Include tparam.h, for tgetent.
4165 Do not include term.h; no longer needed.
4166 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
4167 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
4168 (struct Lisp_Vector): Use a flexible array member for contents,
4169 instead of a union with a member that is an array of size 1.
4170 All uses changed.
4171 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
4172 fact that the struct no longer contains a union.
4173 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
4174 (struct Lisp_Save_Value, struct Lisp_Free):
4175 Use unsigned, not int, for spacers, to avoid c99 warning.
4176 (union specbinding): Use unsigned, not bool, for bitfield, as
4177 bool is not portable to pre-C99 hosts.
4178
6dc6d301
GM
41792013-11-04 Glenn Morris <rgm@gnu.org>
4180
4181 * emacs.c (usage_message): Mention that `-L :...' appends.
4182
b0b9e592
GM
41832013-11-02 Glenn Morris <rgm@gnu.org>
4184
fca2fccb
GM
4185 * Makefile.in (abs_builddir): Remove.
4186 (bootstrap_exe): Use relative filename.
4187
c617f3d0
GM
4188 Use relative filenames in TAGS files.
4189 * Makefile.in (abs_srcdir): Remove it again.
4190 (.PHONY): Remove frc.
4191 (maintainer-clean): No more TAGS-LISP file.
4192 (TAGS): Pass relative file names to etags.
4193 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
4194
b0b9e592 4195 * Makefile.in (abs_srcdir): New, set by configure.
739f57cd 4196 (lispdir): Remove.
b0b9e592
GM
4197 (maintainer-clean): Remove pointless echo. That should be in the
4198 top-level Makefile, if anywhere. Delete TAGS-LISP.
4199 (extraclean): No s/ and m/ directories for some time.
739f57cd
GM
4200 (TAGS): Also depend on ctagsfiles3.
4201 Remove no-longer-defined S_FILE.
b0b9e592 4202 Pass absolute filenames to etags once more.
739f57cd 4203 (TAGS-LISP): Replace lispdir with its expansion.
b0b9e592
GM
4204 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
4205 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
4206
0c21fa44
JD
42072013-11-02 Jan Djärv <jan.h.d@swipnet.se>
4208
94ae2ad4
SM
4209 * xfaces.c (check_lface_attrs, realize_default_face):
4210 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
39dd7bb2 4211 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
0c21fa44 4212
a90e5a33
PE
42132013-11-02 Paul Eggert <eggert@cs.ucla.edu>
4214
4215 * emacs.c (original_pwd): Remove global var by making it local.
4216 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
4217
3c334c14
JD
42182013-11-01 Jan Djärv <jan.h.d@swipnet.se>
4219
4220 * xfaces.c: Declare color_distance.
4221 (QCdistant_foreground): New variable.
4222 (NEAR_SAME_COLOR_THRESHOLD): New define.
4223 (load_color2): New function.
4224 (load_color): Call load_color2.
4225 (load_face_colors): Call load_color2 and if distant-color is specified
4226 calculate distant and use distant-color if colors are near.
4227 (LFACE_DISTANT_FOREGROUND): New define.
4228 (merge_face_ref, Finternal_set_lisp_face_attribute)
4229 (Finternal_get_lisp_face_attribute)
4230 (x_supports_face_attributes_p): Handle distant-foreground similar to
4231 foreground.
4232 (syms_of_xfaces): DEFSYM QCdistant_foreground.
4233
94ae2ad4
SM
4234 * dispextern.h (lface_attribute_index):
4235 Add LFACE_DISTANT_FOREGROUND_INDEX.
3c334c14 4236
d14c81ee
CB
42372013-11-01 Claudio Bley <claudio.bley@googlemail.com>
4238
94ae2ad4
SM
4239 * image.c (pbm_next_char): New function.
4240 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
0e7690de
CB
4241 (pbm_scan_number): Use it.
4242 (Qlibjpeg_version): New variable.
d14c81ee
CB
4243 (syms_of_image): DEFSYM and initialize it.
4244
26ca8870
JD
42452013-10-31 Jan Djärv <jan.h.d@swipnet.se>
4246
4247 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
4248
8fd07417
GM
42492013-10-31 Glenn Morris <rgm@gnu.org>
4250
4251 * emacs.c (original_pwd): New char.
4252 (main): If using --chdir, store original_pwd.
4253 (init_cmdargs): When setting Vinvocation_directory based on a
4254 relative argv[0], use original_pwd if set. (Bug#15768)
4255
4c9797cb
SM
42562013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
4257
4258 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
4259
dcd163ac
PE
42602013-10-29 Paul Eggert <eggert@cs.ucla.edu>
4261
4262 * insdel.c: Fix minor problems found by static checking.
4263 (Qregion_extract_function): Now static.
4264 (prepare_to_modify_buffer_1): Remove unused locals.
4265
3472b6c6
SM
42662013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
4267
4268 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
4269 (syms_of_xdisp): Declare pre-redisplay-function.
4270 (markpos_of_region): Remove function.
4271 (init_iterator, compute_stop_pos, handle_face_prop)
4272 (face_before_or_after_it_pos, reseat_to_string)
4273 (get_next_display_element, window_buffer_changed)
4274 (redisplay_internal, try_cursor_movement, redisplay_window)
4275 (try_window_reusing_current_matrix, try_window_id, display_line)
4276 (note_mode_line_or_margin_highlight, note_mouse_highlight)
4277 (display_string, mouse_face_from_buffer_pos): Remove region handling.
4278 * window.h (struct window): Remove field `region_showing'.
4279 * dispextern.h (struct it): Remove region_beg/end_charpos.
4280 (face_at_buffer_position, face_for_overlay_string)
4281 (face_at_string_position): Update prototypes.
4282 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
4283 (face_at_string_position): Remove `region_beg' and `region_end' args.
4284 * fontset.c (Finternal_char_font):
4285 * font.c (font_at, font_range): Adjust calls accordingly.
4286 * insdel.c (Qregion_extract_function): New var.
4287 (syms_of_insdel): Initialize it.
4288 (prepare_to_modify_buffer_1): Use it.
4289
2d9783e0
DA
42902013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
4291
4292 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
4293 * ftxfont.c (ftxfont_get_gcs):
4294 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
4295 * xfaces.c (x_free_colors, x_free_dpy_colors)
4296 (x_create_gc, unload_color):
4297 * xselect.c (x_property_data_to_lisp):
4298 * xsettings.c (parse_settings):
4299 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
4300 (get_bits_and_offset): Adjust definition.
4301 * frame.c (XParseGeometry): Adjust locals.
4302 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
4303 * regex.h (toplevel): Likewise for reg_syntax_t.
4304
dee4ba59
SM
43052013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
4306
4307 * eval.c (run_hook_with_args): Use FUNCTIONP.
4308
0085b9be
DA
43092013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
4310
4311 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
4312 fields, drop 'allocated_p' member and use -1 for uninitialized value.
4313 * w32term.h (struct w32_output): Similarly but do not use -1 because...
4314 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
4315 on MS-Windows anyway.
4316 (free_face_colors): Define only if HAVE_X_WINDOWS and...
4317 (free_realized_face): ...adjust user.
4318 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
4319 white relief pixels to -1.
4320 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
4321 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
4322 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
4323
b7e0ef72
PE
43242013-10-28 Paul Eggert <eggert@cs.ucla.edu>
4325
4326 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
4327 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
4328 in practice now. All callers changed.
4329
5d3311e5
DA
43302013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
4331
4332 * dispextern.h (struct face): Use bitfields for 'underline_type'
4333 and 'box' members. Remove set-but-unused members 'pixmap_w' and
4334 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
4335 'stipple' member. Move 'lface' member up to help...
4336 * xfaces.c (make_realized_face): ...this function to find and
4337 clear just the members that need clearing.
4338 (load_face_colors, realize_x_face):
4339 * xdisp.c (extend_face_to_end_of_line): Adjust user.
4340
0f771d26
DA
43412013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
4342
4343 * xftfont.c (struct xftfont_info): Remove set-but-unused
4344 'screen' member.
4345 (xftfont_open): Adjust user.
4346 (xftfont_get_colors): Remove useless prototype.
4347
c556b44b
EZ
43482013-10-26 Eli Zaretskii <eliz@gnu.org>
4349
4350 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
4351 before passing them to 'unexec'. (Bug#15260)
4352
2a03e2bc
XF
43532013-10-26 Xue Fuqiao <xfq.free@gmail.com>
4354
4355 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
4356
6702c559
EZ
43572013-10-25 Eli Zaretskii <eliz@gnu.org>
4358
f67599d5
EZ
4359 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
4360 the changed signature of the font driver's 'close' method.
4361
6702c559
EZ
4362 * w32font.h (w32font_close): Adjust the prototype to the change in
4363 function definition.
4364
4365 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
4366
4367 * w32uniscribe.c (uniscribe_close): Adapt the call to
4368 w32font_close to its new prototype.
4369
78e0b35c
DA
43702013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
4371
4372 Omit unused frame argument of font API's close function.
4373 * font.h (struct font): Drop frame argument. Adjust comment.
4374 * font.c (font_clear_cache, font_close_object): Adjust users.
4375 * ftfont.c (ftfont_close):
4376 * ftxfont.c (ftxfont_close):
4377 * macfont.m (macfont_close):
4378 * nsfont.m (nsfont_close):
4379 * w32font.c (w32font_close):
4380 * xfont.c (xfont_close):
86bd985e
DA
4381 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
4382 tweak comments and make functions safe if called more than once for
4383 the same font object.
4384
4385 Perform font-specific cleanup when font object is swept by GC. See
4386 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
4387 * alloc.c (cleanup_vector): New function.
4388 (sweep_vector): Call it for each reclaimed vector object.
4389 * font.h (struct font): Adjust comment.
78e0b35c 4390
eb9a3661
GM
43912013-10-24 Glenn Morris <rgm@gnu.org>
4392
4393 * Makefile.in (abs_top_srcdir): New, set by configure.
4394
df24a230
DA
43952013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
4396
66b238df 4397 Adjust recent font-related changes to fix bug#15686.
df24a230 4398 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
66b238df 4399 is a live window system frame, mark its default font too.
df24a230 4400
b8e3b0a9
GM
44012013-10-23 Glenn Morris <rgm@gnu.org>
4402
4403 * Makefile.in (RUN_TEMACS): Make relative (again).
4404 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
4405 (bootstrap-emacs$(EXEEXT)):
4406 Quote entities that might contain whitespace.
4407
e4ea223d
PE
44082013-10-23 Paul Eggert <eggert@cs.ucla.edu>
4409
4410 Port to Solaris 10 and its bundled GCC.
4411 Problem reported by Timothy C. Burt.
4412 * floatfns.c (isfinite, isnan): Redefine unconditionally.
4413
fc54bdd5
DA
44142013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
4415
4416 Do not allow font caches to grow too large.
4417 * alloc.c (compact_font_cache_entry, compact_font_caches):
4418 New functions or stub if not HAVE_WINDOW_SYSTEM.
4419 (compact_undo_list): Factor out from Fgarbage_collect.
4420 Add comment.
4421 (mark_face_cache): Mark face font. Move down to avoid
4422 extra prototypes.
4423 (mark_terminals): Do not mark font cache here.
4424 (Fgarbage_collect): Call compaction functions described
4425 above. Adjust comment.
4426
aca5fcdc
JD
44272013-10-20 Jan Djärv <jan.h.d@swipnet.se>
4428
a9f8deec
JD
4429 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
4430 chdir to HOME (bug#15607).
4431
aca5fcdc
JD
4432 * nsterm.m (Qcocoa, Qgnustep): New variables.
4433 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
a6c4680a 4434 (ns_get_color): Make selection color work for GNUstep also.
aca5fcdc 4435
c4e3099f
EZ
44362013-10-18 Eli Zaretskii <eliz@gnu.org>
4437
4438 * keyboard.c (make_lispy_event): Remove GPM-specific code that
4439 handles mouse clicks. Instead, let GPM use the same code as all
4440 the other mice use. See the discussion starting at
4441 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
4442 for the details of the problem with the menu bar this fixes.
4443
d141d701
DA
44442013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
4445
4446 Remove port-specific display name lists to avoid extra
4447 complexity and data duplication with display info lists.
4448 * xterm.h (x_display_name_list): Remove declaration.
4449 * xterm.c (x_display_name_list): Remove.
4450 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
4451 * xfns.c (x_display_info_for_name, Fx_display_list):
4452 Likewise. Use x_display_list where appropriate.
4453 * w32term.h (w32_display_name_list): Remove declaration.
4454 * w32term.c (w32_display_name_list): Remove.
4455 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
4456 Adjust users.
4457 * w32fns.c (x_display_info_for_name, Fx_display_list):
4458 Likewise. Use x_display_list where appropriate.
4459 * nsterm.h (ns_display_name_list): Remove declaration.
4460 * nsterm.m (ns_display_name_list): Remove.
4461 (ns_term_init, syms_of_nsterm): Adjust users.
4462 * nsfns.m (ns_display_info_for_name, Fx_display_list):
4463 Likewise. Use x_display_list where appropriate.
4464 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
4465 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
4466 (mark_terminals): Mark per-terminal font cache.
4467
ef566920
BR
44682013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
4469
4470 Don't run timers in input-pending-p. Its new check-timers param
e9dc713d 4471 provides the prior behavior. (Bug#15045).
39c87140 4472 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
ef566920 4473
f2752e01
PE
44742013-10-17 Paul Eggert <eggert@cs.ucla.edu>
4475
3d798ba7
PE
4476 Make some functions static in non-Microsoft builds.
4477 On my platform (Fedora 19 x86-64), this shrinks the
4478 Emacs executable (text+data) by 0.25%.
4479 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
4480 (load_color) [!MSDOS]:
4481 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
4482 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
4483 * lisp.h (check_existing):
4484 * process.h (conv_sockaddr_to_lisp, network_interface_list)
4485 (network_interface_info) [!WINDOWSNT]:
4486 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
4487 Remove extern decls.
4488 * fileio.c (check_existing):
4489 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
4490 * process.c (conv_sockaddr_to_lisp, network_interface_list)
4491 (network_interface_info) [!WINDOWSNT]:
4492 * term.c (encode_terminal_code) [!WINDOWSNT]:
4493 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
4494 * xfaces.c (load_color) [!MSDOS]:
4495 Now static.
4496 * fileio.c (check_existing, check_executable, check_writable):
4497 * process.c (network_interface_list, network_interface_info):
4498 Move earlier, so that we don't need forward decls.
4499 * gnutls.c (fn_gnutls_transport_set_errno)
4500 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
4501 Remove; unused.
4502 * w32.c (init_environment): Use faccessat rather than
4503 check_existing, partly for consistency with the rest of the code
4504 in this file, partly so that check_existing can be static.
4505
bb9937df
PE
4506 Make VALMASK visible to GDB even if clang is used (Bug#15574).
4507 * emacs.c (MAIN_PROGRAM): New macro.
4508 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
4509 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
4510
f2752e01
PE
4511 bool vector int width fixes
4512 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
4513 (Fbool_vector_count_matches_at):
4514 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
4515 can exceed PTRDIFF_MAX, at least in theory.
4516 (Fbool_vector_count_matches_at):
4517 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
4518
0a2b8e3c
PE
45192013-10-16 Paul Eggert <eggert@cs.ucla.edu>
4520
4521 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
4522 (struct sockaddr): Add forward decl, for platforms that lack it.
4523
2318fcca
JD
45242013-10-16 Jan Djärv <jan.h.d@swipnet.se>
4525
4526 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
4527 Qnil (Bug#15628).
4528
b911a94d
EZ
45292013-10-16 Eli Zaretskii <eliz@gnu.org>
4530
3dffe395
EZ
4531 * w32.c (network_interface_get_info, network_interface_list)
4532 (network_interface_info): New functions. (Bug#15610)
4533 (GetAdaptersInfo_Proc): New typedef.
4534 (get_adapters_info): New wrapper function.
4535 (globals_of_w32): Initialize g_b_init_get_adapters_info.
4536
dee4ba59
SM
4537 * process.h (network_interface_list, network_interface_info):
4538 New prototypes.
3dffe395
EZ
4539
4540 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
4541 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
4542 all systems. Return non-nil for systems that HAVE_NET_IF_H and
4543 for WINDOWSNT. Doc fix.
4544 (syms_of_process): Defsubr Snetwork_interface_list and
4545 Snetwork_interface_info unconditionally.
4546
b911a94d
EZ
4547 * menu.c (have_boxes): Fix redundant simulation of radio buttons
4548 in NS GUI sessions. (Bug#15629)
4549
04d47595
DA
45502013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
4551
4552 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
4553
5e15c624
PE
45542013-10-15 Paul Eggert <eggert@cs.ucla.edu>
4555
4556 * print.c (print_object): Print " ..." when truncating bool vectors.
4557
5d64d770
EZ
45582013-10-15 Eli Zaretskii <eliz@gnu.org>
4559
4560 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
4561 standard mouse buttons.
4562
4563 * termhooks.h (struct input_event): Remove incorrect commentary.
4564
c911772e
PE
45652013-10-15 Paul Eggert <eggert@cs.ucla.edu>
4566
454e2fb9
PE
4567 Disallow bool vector operations on mixed-length operands.
4568 The old behavior left garbage in the result vector sometimes,
4569 and didn't seem to be useful.
4570 * data.c (Qwrong_length_argument): New static var.
4571 (wrong_length_argument): New function.
4572 (bool_vector_binop_driver): Check that args agree in length.
4573
c911772e
PE
4574 * keyboard.c, keyboard.h (all_kboards): Now static.
4575
57f623e2
XF
45762013-10-15 Xue Fuqiao <xfq.free@gmail.com>
4577
4578 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
4579 note from the lispref.
4580
47c4d1e9
DA
45812013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
4582
4583 * nsterm.h (struct ns_display_info): Remove set-but-unused
4584 member image_cache (image caches are per-terminal anyway).
4585 (FRAME_X_IMAGE_CACHE): Remove.
4586 * nsterm.m (ns_initialize_display_info): Adjust user.
4587
ccd4a783
EZ
45882013-10-14 Eli Zaretskii <eliz@gnu.org>
4589
279066b2
EZ
4590 * w32proc.c: Include mingw_time.h.
4591
4592 * w32.c: Include mingw_time.h.
4593
ccd4a783
EZ
4594 Implement scrolling of TTY menus when the screen is too short.
4595
4596 * term.c (tty_menu_display): Accept an additional argument, the
4597 menu item from which to start displaying the menu. Account for
4598 the value of Y when limiting the menu to the number of available
4599 screen lines.
4600 (mi_result): New enumeration.
4601 (read_menu_input): Return enumerated value. When the y coordinate
4602 hits min_y or max_y, return scroll indication instead of wrapping
4603 around the menu.
4604 (tty_menu_activate): Handle the scrolling indications from
4605 read_menu_input. Compute the first menu item to display and pass
4606 it to tty_menu_display.
4607
77e3b1b7
DA
46082013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
4609
4610 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
4611 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
4612 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
4613 Adjust to match the change described below.
4614 (struct terminal): Move must_write_spaces, line_ins_del_ok,
4615 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
4616 memory_below_frame members to...
4617 * termchar.h (struct tty_display_info): ...here because they're
4618 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
4619 * term.c (init_tty):
4620 * nsterm.m (ns_create_terminal):
4621 * w32term.c (w32_create_terminal):
4622 * xterm.c (x_create_terminal): Adjust users.
4623 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
4624 to filter out non-TTY frames. Adjust comment.
4625 (scrolling): Adjust user. Prefer eassert for debugging check.
4626
e558436b
DA
46272013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
4628
4629 * xfaces.c (PT_PER_INCH): Remove unused macro.
4630 * termhooks.h (struct terminal): Remove set-but-unused
4631 member fast_clear_end_of_line.
4632 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
4633 * nsterm.m (ns_create_terminal):
4634 * term.c (init_tty):
4635 * w32term.c (w32_create_terminal):
4636 * xterm.c (x_create_terminal): Adjust users.
4637
1c0a7493
PE
46382013-10-14 Paul Eggert <eggert@cs.ucla.edu>
4639
4640 * lisp.h (bool_vector_size): New function.
4641 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
4642 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
4643 (Fbool_vector_not, Fbool_vector_count_matches_at):
4644 Remove uses of 'eassume' that should no longer be needed,
4645 because they are subsumed by the 'eassume' in bool_vector_size.
4646
567f95ec
EZ
46472013-10-12 Eli Zaretskii <eliz@gnu.org>
4648
4649 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
4650 after inclusion of gif_lib.h, thus fixing compiler warnings caused
4651 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
4652
abe02020
EZ
46532013-10-11 Eli Zaretskii <eliz@gnu.org>
4654
4655 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
4656 have different dimensions. (Bug#15575)
4657
4658 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
4659 visibility.
4660
4661 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
4662
9428abbf
DA
46632013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4664
4665 * term.c (tty_menu_show): Never return with unbalanced
4666 specpdl. Use eassert for debugging check. Adjust style.
4667
052bac0b
EZ
46682013-10-11 Eli Zaretskii <eliz@gnu.org>
4669
4670 * term.c (read_menu_input): Make selection of menu items
4671 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
4672 (tty_menu_activate): Fix off-by-one error when computing max_y.
4673
e1f9f9e3
TZ
46742013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
4675
4676 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
4677 audit logging (only used with GnuTLS 3.x) and enable it.
4678
7d563e36
DA
46792013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4680
4681 * dispnew.c (redraw_frame): Remove useless #ifdef because
4682 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
4683 Also, move TTY fflush to...
4684 * term.c (tty_update_end): ...this function.
4685
48621e69
EZ
46862013-10-11 Eli Zaretskii <eliz@gnu.org>
4687
4688 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
4689 the end of the frame's glyph matrix. (Bug#15575)
4690
4691 * term.c (tty_menu_display): Don't move cursor while overwriting
4692 frame's glyphs with menu items. Limit the number of items
4693 displayed to what can be shown on the available screen lines,
4694 excluding the echo area.
4695 (tty_menu_activate): Limit the Y coordinate allowed by
4696 read_menu_input to the last screen line used for menu display.
4697
b9ff995e
PE
46982013-10-11 Paul Eggert <eggert@cs.ucla.edu>
4699
4700 * lisp.h (eassume): New macro.
4701 Also, include <verify.h>, for 'assume'.
4702 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
4703 (vroundup, vector_nbytes):
4704 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
4705 (Fbool_vector_not, Fbool_vector_count_matches)
4706 (Fbool_vector_count_matches_at):
4707 Use eassume, not eassert.
4708 * casetab.c (set_identity, shuffle):
4709 * composite.c (composition_gstring_put_cache):
4710 * dispnew.c (update_frame_1):
4711 * ftfont.c (ftfont_shape_by_flt):
4712 * image.c (gif_load):
4713 * intervals.c (offset_intervals):
4714 * macfont.m (macfont_shape):
4715 Remove calls to 'assume' that are no longer needed, because
4716 --enable-gcc-warnings no longer generates bogus warnings
4717 when these calls are removed.
4718
33ac0265
DA
47192013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4720
4721 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
4722
ee041f2d
SM
47232013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
4724
4725 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
4726 (Qsubstitute_env_in_file_name): New var.
4727 (syms_of_fileio): Define it.
4728
00036e1d
EZ
47292013-10-10 Eli Zaretskii <eliz@gnu.org>
4730
4731 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
4732 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
4733 (Bug#15575)
4734
4735 * term.c (save_and_enable_current_matrix): Don't allocate and
4736 don't save margin areas.
4737 (restore_desired_matrix): Don't restore margin areas.
4738 (free_saved_screen): Don't free margin areas.
4739
99149625
PE
47402013-10-10 Paul Eggert <eggert@cs.ucla.edu>
4741
4742 * image.c: Pacify --enable-gcc-warnings.
4743 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
4744 #define only if used.
4745
a5dab159
EZ
47462013-10-10 Eli Zaretskii <eliz@gnu.org>
4747
4748 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
4749 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
4750 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
4751 (gif_load): For giflib v5.x and later, display the error message
4752 produced by giflib when its functions fail.
4753 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
4754 (Bug#15531)
4755
6bbe6da8
DA
47562013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4757
4758 * keyboard.c (last_event_timestamp): Remove. For X selection and
4759 GTK popup menus, it may be obtained from per-frame X display info.
4760 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
4761 (process_special_events): Adjust users.
4762 * keyboard.h (last_event_timestamp): Remove declaration.
4763 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
4764 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
4765 * menu.h (xmenu_show): Adjust prototype.
4766 * menu.c (Fx_popup_menu): Adjust user.
4767 * xselect.c (x_own_selection, x_get_foreign_selection)
4768 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
4769
1afcba63
DA
47702013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4771
4772 * keyboard.c (init_kboard): Now static. Add arg
4773 to denote window system. Adjust comment.
4774 (init_keyboard): Adjust user.
4775 (allocate_kboard): New function.
4776 (syms_of_keyboard):
4777 * nsterm.m (ns_term_init):
4778 * term.c (init_tty):
4779 * w32term.c (w32_create_terminal):
4780 * xterm.c (x_term_init): Use it.
4781 * keyboard.h (init_kboard): Remove prototype.
4782 (allocate_kboard): Add prototype.
4783
f3606ef7
BF
47842013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
4785
4786 * image.c (GIFLIB_MAJOR): Ensure it's defined.
4787 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
4788
e20bb249
PE
47892013-10-09 Paul Eggert <eggert@cs.ucla.edu>
4790
4791 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
4792
9f6a18d2
EZ
47932013-10-09 Eli Zaretskii <eliz@gnu.org>
4794
4795 * term.c (tty_menu_activate): Flush the output stream after
4796 showing the cursor, and don't mark the frame garbaged at exit from
4797 the function. Fixes redisplay glitches when moving from one menu
4798 to another.
4799
0486beac
JD
48002013-10-09 Jan Djärv <jan.h.d@swipnet.se>
4801
4802 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
4803 or throw error (Bug#15570).
4804
0d5d3029
PE
48052013-10-09 Paul Eggert <eggert@cs.ucla.edu>
4806
ab7ce978
PE
4807 * intervals.c (temp_set_point_both): Move test into 'eassert',
4808 for speed.
4809
0d5d3029
PE
4810 * lisp.h (eassert): Don't use 'assume'.
4811 Sometimes 'assume' wins in performance, and sometimes it loses,
4812 so it shouldn't be used all the time. Perhaps we need two
4813 flavors of 'eassert', one for where 'assume' is far more likely
4814 to help or to hurt; but that can be done later.
1afcba63 4815 Problem reported by Dmitry Antipov in
0d5d3029
PE
4816 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
4817 Also, don't include <verify.h>; no longer needed.
4818
fa022909
GM
48192013-10-09 Glenn Morris <rgm@gnu.org>
4820
4821 * eval.c (Fcond): Doc tweak.
4822
051277bf
EZ
48232013-10-09 Eli Zaretskii <eliz@gnu.org>
4824
4825 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
4826 expressions with side effects to eassert. (Bug#15565)
4827
79804536
SM
48282013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
4829
4830 * fns.c (hashfn_user_defined): Allow hash functions to return any
4831 Lisp_Object.
4832
3b158d11
PE
48332013-10-08 Paul Eggert <eggert@cs.ucla.edu>
4834
4835 Fix minor problems found by static checking.
4836 * dispnew.c (save_current_matrix): Omit unnecessary casts.
4837 * dispnew.c (update_frame_with_menu): Mark debug local as used.
4838 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
4839 * keyboard.c (read_menu_command): Remove unused local.
4840 * lisp.h (read_menu_command): New decl.
4841 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
4842 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
4843 Return ptrdiff_t, not int.
4844 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
4845 not int, for benefit of xpalloc.
4846 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
4847 and xpalloc.
4848 (have_menus_p): Remove; unused.
4849 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
4850 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
4851 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
4852 Now static.
4853 (save_and_enable_current_matrix): Omit unnecessary casts.
4854 (read_menu_input): Omit local extern decl (now in lisp.h).
4855 Don't access uninitialized storage if mouse_get_xy fails.
4856 (tty_menu_activate): Mark local as initialized, for lint.
4857 (tty_menu_activate, tty_meny_show): Remove unused locals.
4858
4ed77415
EZ
48592013-10-08 Eli Zaretskii <eliz@gnu.org>
4860
4861 Support menus on text-mode terminals.
4862 * xterm.h (xw_popup_dialog): Add prototype.
4863
4864 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
4865 (xmenu_show): Block input here, instead in Fx_popup_menu.
4866 (xw_popup_dialog): New function, with X-specific bits of popup
4867 dialogs.
4868
dee4ba59
SM
4869 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
4870 New functions.
4ed77415
EZ
4871
4872 * window.c (Fset_window_configuration): Use run-time tests of the
4873 frame type instead of compile-time conditionals, when menu-bar
4874 lines are considered.
4875
4876 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
4877 (w32_popup_dialog): New prototypes.
4878
4879 * w32menu.c (Fx_popup_dialog): Function deleted.
4880 (w32_popup_dialog): New function, with w32 specific bits of popup
4881 dialogs. Block input here.
4882
4883 * w32inevt.c (w32_console_read_socket): Minor change to add
4884 debugging TTY events.
4885
4886 * w32fns.c (show_hourglass): If returning early because the frame
4887 is not a GUI frame, unblock input.
4888
4889 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
4890 (cursorY): New functions.
4891
4892 * termhooks.h (cursorX, cursorY): Prototypes of functions on
4893 WINDOWSNT, macros that call curX and curY elsewhere.
4894
4895 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
4896
4897 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
4898 specific function to hide and show cursor on a text-mode terminal.
4899 (tty_menu_struct, struct tty_menu_state): New structures.
4900 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
4901 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
4902 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
4903 (tty_menu_locate, save_and_enable_current_matrix)
4904 (restore_desired_matrix, screen_update, read_menu_input)
4905 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
4906 (tty_pop_down_menu, tty_menu_last_menubar_item)
4907 (tty_menu_new_item_coords, tty_menu_show): New functions.
4908 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
4909
4910 * nsterm.h (ns_popup_dialog): Adjust prototype.
4911
4912 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
4913 of in x-popup-menu.
4914 (ns_popup_dialog): Adapt order of arguments to the other
4915 *_menu_show implementations.
4916 (Fx_popup_dialog): Function deleted.
4917
4918 * msdos.c (x_set_menu_bar_lines): Delete unused function.
4919
c295fc18 4920 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
4ed77415
EZ
4921
4922 * menu.c (have_boxes): New function.
4923 (single_keymap_panes): Use it instead of a compile-time
4924 conditional.
4925 (single_menu_item): Use run-time tests of the frame type instead
4926 of compile-time conditionals.
4927 (encode_menu_string): New function.
4928 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
4929 the macro, since different types of frame need different encoding
4930 of menu items.
4931 (digest_single_submenu): Use run-time tests of frame type instead
4932 of, or in addition to, compile-time conditionals.
4933 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
4934 (Fx_popup_menu): Detect when the function is called from keyboard
dee4ba59
SM
4935 on a TTY. Don't barf when invoked on a text-mode frame.
4936 Check frame type at run time, instead of compile-time conditionals for
4937 invoking terminal-specific menu-show functions.
4938 Call tty_menu_show on text-mode frames.
4939 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
4ed77415
EZ
4940 run time to determine which alternative to invoke; support dialogs
4941 on TTYs.
4942
4943 * keyboard.h <Qmouse_movement>: Declare.
4944
4945 * keyboard.c <Qmouse_movement>: Now extern.
4946 <Qecho_keystrokes>: New static variable.
4947 (read_key_sequence): Accept an additional argument, a flag to
4948 prevent redisplay during reading of the key sequence. All callers
4949 changed.
4950 (read_menu_command): New function.
4951 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
4952 autosave.
4953 (toolkit_menubar_in_use): New function.
4954 (make_lispy_event): Use it instead of a compile-time test.
4955
4956 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
4957 window-system being available.
4958
4959 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
4960 to x-popup-dialog on the frame type, they all now support popup
4961 dialogs.
4962
4963 * dispnew.c (save_current_matrix): Save the margin areas.
4964 (restore_current_matrix): Restore margin areas.
4965 (update_frame_with_menu): New function.
4966
4967 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
4968 Add prototypes.
4969
4970 * alloc.c (make_save_ptr): Now compiled unconditionally.
4971
ecab13d4
DA
49722013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
4973
4974 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
4975 (redraw_frame, update_frame): Adjust users.
4976 * dispextern.h (set_window_update_flags): Adjust prototype.
4977 * xdisp.c (redisplay_internal): When updating all frames with zero
4978 windows_or_buffers_changed, assume that only the windows that shows
4979 current buffer should be really updated.
4980
f8498081
DA
49812013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
4982
4983 Do not allocate huge temporary memory areas and objects while encoding
4984 for file I/O, thus reducing an enormous memory usage for large buffers.
4985 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
4986 * coding.h (struct coding_system): New member raw_destination.
4987 * coding.c (setup_coding_system): Initialize it to zero.
4988 (encode_coding_object): If raw_destination is set, do not create
4989 dst_object. Add comment.
4990 * fileio.c (toplevel): New constant E_WRITE_MAX.
4991 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
4992 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
4993
d180bde8
JD
49942013-10-08 Jan Djärv <jan.h.d@swipnet.se>
4995
35e951cd 4996 * nsterm.m (windowDidExitFullScreen:)
d180bde8
JD
4997 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
4998
87c4314d
PE
49992013-10-08 Paul Eggert <eggert@cs.ucla.edu>
5000
18978362
PE
5001 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
5002 * keyboard.c (unblock_input_to): Don't process pending signals
5003 if a fatal error is in progress.
5004
87c4314d
PE
5005 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
5006 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
5007 they're talking about words in Lisp bool vectors.
5008 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
1142cc2a
PE
5009 * data.c (popcount_bits_word): Rename from popcount_size_t.
5010 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
5011 All uses changed.
87c4314d 5012
595e113b
PE
50132013-10-07 Paul Eggert <eggert@cs.ucla.edu>
5014
5015 Improve support for popcount and counting trailing zeros (Bug#15550).
5016 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
5017 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
5018 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
5019 (popcount_size_t_msc, popcount_size_t_gcc):
5020 Remove; now done by Gnulib.
5021 (popcount_size_t): Now a macro that defers to Gnulib.
5022 (count_trailing_zero_bits): Return int, for consistency with
5023 Gnulib and because Emacs prefers signed to unsigned int.
5024 Don't assume that size_t is either unsigned int or unsigned long
5025 or unsigned long long.
5026 (size_t_to_host_endian): Do not assume that size_t is either
5027 exactly 32 or exactly 64 bits wide.
5028 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
5029 etc., so that it's now an enum constant, not a macro.
5030 No need to assume that it's either 32 or 64.
5031
ddb317ba
JD
50322013-10-07 Jan Djärv <jan.h.d@swipnet.se>
5033
5034 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
5035 on >= 10.7.
5036
bd74250f
DA
50372013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
5038
5039 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
764636db 5040 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
bd74250f 5041
223752d7
PE
50422013-10-07 Paul Eggert <eggert@cs.ucla.edu>
5043
5044 emacs_read and emacs_write now use void *, not char *.
5045 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
5046 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
5047 Buffer arg is now void *, not char *. This matches plain
5048 'read' and 'write' better, and avoids a constraint violation
5049 on Solaris 9 with Oracle Studio.
5050
3c439e0a
DA
50512013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
5052
5053 * alloc.c (Fmake_string): For ASCII char initializer, prefer
5054 memset to explicit loop. Otherwise copy largest possible chunk
5055 from initialized to uninitialized part, thus allowing the longer
5056 memcpy runs and reducing the number of loop iterations.
5057
28c76099
JD
50582013-10-06 Jan Djärv <jan.h.d@swipnet.se>
5059
5060 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
5061 hide toolbar (Bug#15388).
5062 (windowDidEnterFullScreen:): If presentation options are zero,
5063 set them here (Bug#15388).
a3e9050c
JD
5064 (ns_update_auto_hide_menu_bar): Remove runtime check.
5065 Don't auto hide dock unless menubar is also auto hidden.
28c76099 5066
544a2a80
XF
50672013-10-05 Xue Fuqiao <xfq.free@gmail.com>
5068
5069 * editfns.c (message): Mention batch mode in doc string.
5070
a27fd309
JD
50712013-10-05 Jan Djärv <jan.h.d@swipnet.se>
5072
5073 * nsterm.m (check_native_fs): Remove erroneous comment.
5074
942f6f82
DA
50752013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
5076
5077 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
5078 uses find_newline instead of scan_newline and so doesn't move point.
5079
157fec2e
PE
50802013-10-04 Paul Eggert <eggert@cs.ucla.edu>
5081
4eed3157
PE
5082 Use hardware support for byteswapping on glibc x86 etc.
5083 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
5084 whereas the old swap64 needed 30.
5085 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
5086 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
5087 Use byteswap.h's macros to swap bytes.
5088 * lisp.h (swap16, swap32, swap64): Remove.
5089 All uses replaced by bswap_16, bswap_32, bswap_64.
5090
157fec2e
PE
5091 * bytecode.c (exec_byte_code): Use some more volatile variables
5092 to work around local variables getting clobbered by longjmp.
5093 Port to pre-C99, which doesn't allow decls after stmts.
5094
b52f569d
PE
50952013-10-03 Paul Eggert <eggert@cs.ucla.edu>
5096
75273afb
PE
5097 * lisp.h (eassert): Assume that COND is true when optimizing.
5098 In other words, take on the behavior of eassert_and_assume.
5099 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
5100 (eassert_and_assume): Remove. All uses replaced by eassert.
5101
ead45345
PE
5102 * xdisp.c (Qglyphless_char): Now static.
5103
0a858ebf
PE
5104 Adjust to merge from gnulib.
5105 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
5106 * lisp.h: Include <verify.h>, for 'assume'.
5107
b52f569d
PE
5108 * eval.c (clobbered_eassert): New macro.
5109 (internal_catch, internal_condition_case)
5110 (internal_condition_case_1, internal_condition_case_2)
5111 (internal_condition_case_n): Use it instead of eassert
5112 when the argument contains locals clobbered by longjmp.
5113 Don't use clobbered locals outside of clobbered_eassert.
5114 (internal_lisp_condition_case): Use a volatile variable
5115 to work around a local variable's getting clobbered.
5116
adf2aa61
SM
51172013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
5118
5119 * lisp.h (struct handler): Merge struct handler and struct catchtag.
5120 (PUSH_HANDLER): New macro.
5121 (catchlist): Remove.
5122 (handlerlist): Always declare.
5123
5124 * eval.c (catchlist): Remove (merge with handlerlist).
5125 (handlerlist, lisp_eval_depth): Not static any more.
5126 (internal_catch, internal_condition_case, internal_condition_case_1)
5127 (internal_condition_case_2, internal_condition_case_n):
5128 Use PUSH_HANDLER.
5129 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
5130 handlerlist/catchlist.
5131 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
5132 handlerlist which can only handle a single condition-case handler at
5133 a time.
5134 (find_handler_clause): Simplify since we only a single branch here
5135 any more.
5136
5137 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
5138 and Bpophandler.
5139 (bcall0): New function.
5140 (exec_byte_code): Add corresponding cases. Improve error message when
5141 encountering an invalid byte-code. Let Bunwind_protect accept
5142 a function (rather than a list of expressions) as argument.
5143
5144 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
5145 and make them unconditional now that they're heap-allocated.
5146
328a8179
SM
51472013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
5148
5149 * charset.c (Fdecode_char, Fencode_char): Remove description of
5150 `restriction' arg. now that it's hidden by advertised-calling-convention.
5151
c348360a
JD
51522013-10-02 Jan Djärv <jan.h.d@swipnet.se>
5153
328a8179
SM
5154 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
5155 Remove unused variable (from mac-port).
c348360a
JD
5156 (macfont_draw): Use s->ybase for correct y position.
5157
1a23cd48
DA
51582013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
5159
5160 * frame.h (struct frame): Drop has_minibuffer member because...
5161 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
5162 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
5163
29bf4de4
DA
51642013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
5165
5166 * window.h (struct window): Prefer enum text_cursor_kinds to int
5167 for phys_cursor_type member. Move the latter, phys_cursor_width,
5168 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
5169 * window.c (replace_window, make_window): Adjust users.
5170
a30ddace
DA
51712013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
5172
5173 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
5174 this module is never compiled otherwise.
5175
45435f08
AA
51762013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
5177
5178 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
5179 (Bug#15500).
5180
92e5298b
EZ
51812013-09-29 Eli Zaretskii <eliz@gnu.org>
5182
5183 * xdisp.c (get_next_display_element): Don't call face_for_font in
5184 a build configured --without-x. (Bug#15484)
5185
caa50be2
JD
51862013-09-29 Jan Djärv <jan.h.d@swipnet.se>
5187
66d13b20
JD
5188 * window.c (calc_absolute_offset): #elif should be #elif defined.
5189
caa50be2
JD
5190 * frame.c (delete_frame): Block/unblock input to overcome race
5191 condition (Bug#15475).
5192
062e286b 51932013-09-29 Andreas Politz <politza@hochschule-trier.de>
d3e2acb6
AP
5194
5195 * frame.c (delete_frame): Record selected frame only after
5196 calling Qdelete_frame_functions (Bug#15477).
5197
1610938f
JD
51982013-09-28 Jan Djärv <jan.h.d@swipnet.se>
5199
5200 * nsterm.m (ns_selection_color): Remove.
5201 (ns_get_color): Check for ns_selection_(fg|bg)_color using
5202 NSColor selectedText(Background)Color. Only for COCOA.
5203 (ns_term_init): Remove assignment of ns_selection_color, logic
5204 moved to ns_get_color.
5205
328a8179 5206 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
1610938f
JD
5207 NS_SELECTION_COLOR_DEFAULT.
5208 (NS_SELECTION_FG_COLOR_DEFAULT): New.
5209
0d2647e6
EZ
52102013-09-28 Eli Zaretskii <eliz@gnu.org>
5211
5212 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
5213 frame' does not have the tool_bar_window member.
5214
ba355de0
BR
52152013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
5216
5217 Signal error when reading an empty byte-code object (Bug#15405)
c295fc18
JB
5218 * lread.c (read1): Signal error.
5219 * alloc.c (make_byte_code): eassert header size.
5220 (sweep_vectors): Change an int to size_t.
ba355de0 5221
4710d6f4
PE
52222013-09-24 Paul Eggert <eggert@cs.ucla.edu>
5223
cf647d93
PE
5224 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
5225 instead of ints, as it's the usual style for offsetof constants. See:
5226 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
5227
4710d6f4
PE
5228 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
5229 This is ugly, but it should fix the performance problem for older
5230 GCC versions in the short run. I'll look into integrating the
5231 Gnulib module for popcount, as a better fix.
5232 See the thread starting in:
5233 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
5234 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
5235 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
5236 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
5237 (popcount_size_t): Use it.
5238
10ebac9d
DC
52392013-09-24 Daniel Colascione <dancol@dancol.org>
5240
5241 * process.c (Fnetwork_interface_info): Fix build break due to
5242 vector changes.
5243
9da0f50e
PE
52442013-09-24 Paul Eggert <eggert@cs.ucla.edu>
5245
5246 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
5247 Prefer signed to unsigned integers where either will do.
5248 No need for 'const' on locals that do not escape.
5249 Omit easserts with unnecessary and unportable assumptions about
5250 alignment. Avoid unnecessary casts to char *.
5251
d6d9cbc1
DA
52522013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
5253
5254 Use union for the payload of struct Lisp_Vector.
5255 This helps to avoid a few glitches dictated by C's aliasing rules.
5256 * lisp.h (struct Lisp_Vector): Use union for next and
5257 contents member. Adjust comment. Change related users.
5258 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
5259 Related users changed.
5260 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
5261 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
5262 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
5263 * xfaces.c, xfont.c, xmenu.c: Related users changed.
5264
ec7bc82f
DA
52652013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
5266
5267 Optimize glyph row clearing and copying routines.
5268 * dispextern.h (struct glyph_row): Change layout of struct
5269 glyph_row to help copy_row_except_pointers. Adjust comment.
5270 * dispnew.c (null_row): Remove.
5271 (clear_glyph_row): Use offsetof and memset to find and clear
5272 just the members that need clearing. Adjust comment.
5273 (copy_row_except_pointers): Likewise for copying.
5274
d160dd0c
PE
52752013-09-24 Paul Eggert <eggert@cs.ucla.edu>
5276
7be68de5
PE
5277 Some minor cleanups of recently-added bool vector code.
5278 * conf_post.h (assume): Always return void. Use lint version
5279 only if GCC and MSC versions don't apply.
5280 * conf_post.h (assume):
5281 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
5282 Depend on _MSC_VER, not __MSC_VER, for consistency with
5283 the rest of Emacs.
5284 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
5285 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
5286 (bool_vector_binop_driver, count_trailing_zero_bits)
5287 (size_t_to_host_endian): Now static, not static inline;
5288 the latter isn't needed with modern compilers and doesn't
5289 work with older compilers anyway.
5290
d160dd0c
PE
5291 * alloc.c (valgrind_p): Use bool for boolean.
5292
e08813d0
DA
52932013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
5294
5295 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
5296 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
5297 (display_last_displayed_message_p, message_buf_print)
5298 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
5299 Use bool for boolean.
3a6a78fd
DA
5300 * dispextern.h (cancel_line, init_desired_glyphs):
5301 Remove ancient leftover.
5302 (help_echo_showing_p, hourglass_shown_p):
e08813d0
DA
5303 * lisp.h (noninteractive_need_newline): Adjust declaration.
5304
5492865b
DA
53052013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
5306
5307 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
5308 Move to...
5309 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
5310 ...this file and convert the latter to static. Adjust comment.
5311 (make_initial_frame):
5312 * window.c (init_window_once): Adjust user.
5313 * frame.h (last_nonminibuf_frame): Remove declaration.
5314 * lisp.h (selected_frame): Likewise.
5315 * msdos.c (the_only_display_info): Adjust comment.
5316
cd548fa4
EZ
53172013-09-23 Eli Zaretskii <eliz@gnu.org>
5318
f03eddbf
EZ
5319 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
5320 computing the end column of mouse-highlight that comes from
5321 display or overlay strings. (Bug#15437)
b519df23
EZ
5322 (note_mouse_highlight): Adapt calculation of last argument to
5323 mouse_face_from_string_pos to the above change.
f03eddbf 5324
cd548fa4
EZ
5325 * conf_post.h (__has_builtin): Define to zero, if undefined, on
5326 all platforms, not just for clang.
5327
8762e524
JD
53282013-09-23 Jan Djärv <jan.h.d@swipnet.se>
5329
5330 * filelock.c (lock_file_1): Rearrange to remove compiler warning
5331 about excess arguments to snprintf.
5332
5333 * conf_post.h(assume): Use __builtin_unreachable for clang.
5334
d4a9284f
JB
53352013-09-23 Juanma Barranquero <lekktu@gmail.com>
5336
5337 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
5338 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
5339
a84683fd
DC
53402013-09-23 Daniel Colascione <dancol@dancol.org>
5341
5342 * alloc.c (USE_VALGRIND): New macro; on by default
5343 when ENABLE_CHECKING.
ffb3f67a 5344 (mark_maybe_object, mark_maybe_pointer)
a84683fd
DC
5345 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
5346 valgrind purposes.
5347 (valgrind_p) [USE_VALGRIND]: New variable.
5348 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
5349
8fef36c6
JD
53502013-09-22 Jan Djärv <jan.h.d@swipnet.se>
5351
fb83ea63
JD
5352 * process.c (wait_reading_process_output): Change int pnamelen to
5353 socklen_t.
5354
35e951cd 5355 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
fb83ea63
JD
5356 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
5357 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
5358 argument to unsigned long to avoid warning.
5359 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
5360
8fef36c6
JD
5361 * conf_post.h (assume): Fix compiler error: x shall be cond.
5362
cd9356f2
DC
53632013-09-22 Daniel Colascione <dancol@dancol.org>
5364
5365 * xfns.c (x_get_monitor_attributes): Suppress unused variable
5366 warning when compiling without a window system.
5367
3e0b94e7
DC
53682013-09-22 Daniel Colascione <dancol@dancol.org>
5369
5370 * data.c (Qbool_vector_p): New symbol.
ffb3f67a
PE
5371 (bool_vector_spare_mask, popcount_size_t_generic)
5372 (popcount_size_t_msc, popcount_size_t_gcc)
3e0b94e7
DC
5373 (popcount_size_t)
5374 (bool_vector_binop_driver)
ffb3f67a 5375 (count_trailing_zero_bits, size_t_to_host_endian)
3e0b94e7
DC
5376 (Fbool_vector_exclusive_or)
5377 (Fbool_vector_union)
ffb3f67a
PE
5378 (Fbool_vector_intersection, Fbool_vector_set_difference)
5379 (Fbool_vector_subsetp, Fbool_vector_not)
3e0b94e7
DC
5380 (Fbool_vector_count_matches)
5381 (Fbool_vector_count_matches_at): New functions.
5382 (syms_of_data): Intern new symbol, functions.
5383 * alloc.c (bool_vector_payload_bytes): New function.
5384 (Fmake_bool_vector): Instead of calling Fmake_vector,
5385 which performs redundant initialization and argument checking,
5386 just call allocate_vector ourselves. Make sure we clear any
5387 terminating padding to zero.
ffb3f67a 5388 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
3e0b94e7
DC
5389 instead of open-coding the size calculation.
5390 (vroundup_ct): New macro.
5391 (vroundup): Assume argument >= 0; invoke vroundup_ct.
ffb3f67a 5392 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
328a8179
SM
5393 * composite.c (composition_gstring_put_cache):
5394 Change lint_assume to assume.
3e0b94e7
DC
5395 * conf_post.h (assume): New macro.
5396 (lint_assume): Remove.
5397 * dispnew.c (update_frame_1): Change lint_assume to assume.
5398 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
5399 to assume.
5400 * image.c (gif_load): Change lint_assume to assume.
5401 * lisp.h (eassert_and_assume): New macro.
5402 (Qbool_vector_p): Declare.
ffb3f67a
PE
5403 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
5404 (swap16, swap32, swap64): New inline functions.
a12bf61e 5405 * macfont.m (macfont_shape): Change lint_assume to assume.
3e0b94e7
DC
5406 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
5407 * xsettings.c (parse_settings): Use new swap16 and
5408 swap32 from lisp.h instead of file-specific macros.
5409
76880d88
EZ
54102013-09-22 Eli Zaretskii <eliz@gnu.org>
5411
5412 * xdisp.c (try_window_id): Don't abort if cursor row could not be
5413 found (which can legitimately happen when the glyph row at the
5414 window start is disabled in the current_matrix. (Bug#15365)
5415
c6cfd910
PE
54162013-09-22 Paul Eggert <eggert@cs.ucla.edu>
5417
5418 Fix syntax.h bug introduced by recent INLINE change.
5419 syntax.h defined an extern inline function SYNTAX_ENTRY that was
5420 conditionally compiled one way in some modules, and a different
5421 way in others. This doesn't work with extern inline functions,
5422 which must have the same definition in all modules, because the
5423 defining code might be shared across modules, depending on the
5424 implementation. Symptoms reported by Martin Rudalics in:
5425 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
5426 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
5427 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
5428 overriding the corresponding functions in syntax.h.
5429 * syntax.h (syntax_property_entry, syntax_property_with_flags)
5430 (syntax_property): New inline functions.
5431 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
5432 Rewrite in terms of these new functions.
5433
b3f1d119
EZ
54342013-09-21 Eli Zaretskii <eliz@gnu.org>
5435
5436 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
5437 not chars_in_text, whose result depends on the multibyteness of
5438 the current buffer. (Bug#15426)
5439
00382e8b
PE
54402013-09-20 Paul Eggert <eggert@cs.ucla.edu>
5441
e3b29769
PE
5442 Port recent change to hosts where pointers aren't 'long'.
5443 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
5444 Don't assume that pointers are the same width as 'long'.
5445 Add a compile-time check that a pointer fits into two X slots.
5446
00382e8b
PE
5447 A simpler, centralized INLINE.
5448 * conf_post.h (INLINE): Define only if not already defined.
5449 This allows us to use a single INLINE, defined by one file
5450 per executable.
5451 * emacs.c (INLINE): Define it.
5452 Also, include category.h, charset.h, composite.h, dispextern.h,
5453 syntax.h, systime.h, so that their INLINE definitions are expanded
5454 properly for Emacs.
5455 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
5456 * buffer.h, buffer.c (BUFFER_INLINE):
5457 * category.h, category.c (CATEGORY_INLINE):
5458 * character.h, character.c (CHARACTER_INLINE):
5459 * charset.h, charset.c (CHARSET_INLINE):
5460 * composite.h, composite.c (COMPOSITE_INLINE):
5461 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
5462 * frame.h, frame.c (FRAME_INLINE):
5463 * intervals.h, intervals.c (INTERVALS_INLINE):
5464 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
5465 * lisp.h, alloc.c (LISP_INLINE):
5466 * process.h, process.c (PROCESS_INLINE):
5467 * syntax.h, syntax.c (SYNTAX_INLINE):
5468 * systime.h, sysdep.c (SYSTIME_INLINE):
a12bf61e 5469 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
00382e8b
PE
5470 * window.h, window.c (WINDOW_INLINE):
5471 Remove. All uses replaced with INLINE.
5472
2b943ba6
DA
54732013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
5474
5475 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
5476 to avoid Bug#15398.
5477
13d9698a
EZ
54782013-09-19 Eli Zaretskii <eliz@gnu.org>
5479
5480 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
5481 'const char *' to avoid compiler warnings due to similar change in
5482 the prototype of x_get_string_resource.
5483
ced135eb
DA
54842013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
5485
5486 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
5487 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
5488 going to replace static variables below. Adjust comments.
5489 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
5490 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
5491 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
5492 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
5493 Related users changed.
5494 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
5495 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
5496 last_mouse_movement_time, going to replace static variables below.
5497 Adjust comments.
5498 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
5499 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
5500 Remove.
5501 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
5502 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
5503 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
5504 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
5505 static variables below.
5506 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
5507 (last_mouse_scroll_bar): Remove.
5508 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
5509 (mouseExited): Related users changed.
5510
091f1e1f
DA
55112013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
5512
5513 Do not use external array to process X scroll bar messages.
5514 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
5515 (x_send_scroll_bar_event): Pack window pointer into two slots
5516 of XClientMessageEvent if we're 64-bit. Adjust comment.
5517 (x_scroll_bar_to_input_event): Unpack accordingly.
5518
582ed56c
DA
55192013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
5520
5521 Ifdef away recent changes which aren't relevant to NS port.
5522 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
5523 [!HAVE_NS]: Declare as such.
5524 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
5525 [!HAVE_NS]: Define as such.
5526
18da0d8a
DA
55272013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
5528
5529 * frame.c (x_redo_mouse_highlight): New function
5530 to factor out common code used in W32 and X ports.
5531 * dispextern.h (x_redo_mouse_highlight): Add prototype.
5532 * xterm.h (struct x_display_info):
5533 * w32term.h (struct w32_display_info):
5534 * nsterm.h (struct ns_display_info): New members
5535 last_mouse_motion_frame, last_mouse_motion_x and
5536 last_mouse_motion_y, going to replace static variables below.
5537 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
5538 (redo_mouse_highlight): Remove.
5539 (note_mouse_movement, syms_of_xterm): Adjust user.
5540 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
5541 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
5542 (redo_mouse_highlight): Remove.
5543 (note_mouse_movement, syms_of_w32term): Adjust user.
5544 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
5545 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
5546 Remove.
5547 (note_mouse_movement, mouseMoved, syms_of_nsterm):
5548 * nsfns.m (compute_tip_xy): Adjust user.
5549
7a0c745a
DA
55502013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
5551
5552 * frame.c (x_mouse_grabbed): New function.
5553 * dispextern.h (x_mouse_grabbed): Add prototype.
5554 (last_mouse_frame): Remove declaration.
5555 * xterm.h (struct x_display_info):
5556 * w32term.h (struct w32_display_info):
5557 * nsterm.h (struct ns_display_info): New member
5558 last_mouse_frame, going to replace...
5559 * xdisp.c (last_mouse_frame): ...global variable.
5560 (note_tool_bar_highlight):
5561 * w32term.c (w32_mouse_position, w32_read_socket):
5562 * xterm.c (XTmouse_position, handle_one_xevent):
5563 Use x_mouse_grabbed.
5564 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
5565
0791d107
DA
55662013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
5567
5568 * w32term.c (w32_read_socket): Avoid temporary
5569 variables in a call to x_real_positions.
5570 * xterm.c (handle_one_xevent): Likewise.
5571
2cd98812
DA
55722013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
5573
5574 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
5575 (x_icon_type): Remove prototype.
5576 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
5577 * frame.c (x_icon_type): Remove.
5578 * w32term.c (x_make_frame_visible, x_iconify_frame):
5579 * xterm.c (x_make_frame_visible, x_iconify_frame):
5580 Use x_set_bitmap_icon to factor out common code.
5581
a6c2ee1b
DA
55822013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
5583
5584 * dispextern.h (check_x_display_info, x_get_string_resource):
5585 Declare here just once and unify the latter.
5586 * frame.c (check_x_display_info, x_get_string_resource):
5587 * nsterm.h (check_x_display_info):
5588 * xrdb.c (x_get_string_resource):
5589 * xterm.h (check_x_display_info): Remove prototypes.
5590 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
5591 * w32reg.c (x_get_string_resource): Likewise.
5592 (w32_get_rdb_resource): Adjust user.
5593
baed3603
DA
55942013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
5595
5596 * xterm.h (struct x_display_info): New member
5597 x_pending_autoraise_frame, going to replace...
5598 * xterm.c (pending_autoraise_frame): ...static variable.
5599 (x_new_focus_frame, XTread_socket): Adjust users.
5600 * w32term.h (struct w32_display_info): New member
5601 w32_pending_autoraise_frame, going to replace...
5602 * w32term.c (pending_autoraise_frame): ...global variable.
5603 (x_new_focus_frame, w32_read_socket): Adjust users.
5604
90582f05
GM
56052013-09-17 Glenn Morris <rgm@gnu.org>
5606
5607 * xdisp.c (message_dolog): If we create *Messages*,
5608 switch it to messages-buffer-mode.
5609
b7ad2f74
PE
56102013-09-17 Paul Eggert <eggert@cs.ucla.edu>
5611
5612 Don't overuse 'const' in types of locals.
5613 * bidi.c (bidi_count_bytes):
5614 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
5615 (xg_event_is_for_scrollbar):
5616 * xselect.c (x_handle_property_notify)
5617 (x_handle_selection_notify, x_handle_dnd_message):
5618 * xsettings.c, xsettings.h (xft_settings_event):
5619 * xterm.c (x_handle_net_wm_state, handle_one_event)
5620 (x_menubar_window_to_frame, x_detect_focus_change)
5621 (construct_mouse_click, note_mouse_movement)
5622 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
5623 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
5624 (handle_one_xevent, x_handle_net_wm_state):
5625 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
5626 (x_handle_dnd_message):
5627 Avoid unnecessary 'const', typically the second 'const' in
5628 'const foo * const arg', a 'const' that does not affect the API
5629 and doesn't significantly help the human reader.
5630
19452b86
DA
56312013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
5632
5633 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
5634 only if Glib < 2.36.0.
5635 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
5636 * xsettings.c (init_gconf, init_gsettings): Do not check
5637 for g_type_init.
1893694e
DA
5638 * xterm.c (handle_one_xevent): Do not call to x_clear_area
5639 if GTK >= 2.7.0.
33b83dd7 5640 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
19452b86 5641
6434e343
JD
56422013-09-16 Jan Djärv <jan.h.d@swipnet.se>
5643
3f386383
JD
5644 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
5645 before calling g_type_init.
5646
6434e343
JD
5647 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
5648
5649 * nsterm.m (syms_of_nsterm): ... to here.
5650
83a119f8
DA
56512013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
5652
5653 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
5654 (ignore_next_mouse_click_timeout): Use Time as X does.
5655 (handle_one_xevent): Avoid cast and use unsigned comparison.
5656
61582e6a
DA
56572013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
5658
5659 Do not copy X event in handle_one_xevent except KeyPress case.
5660 Wnen XEvent is processed, it is unlikely to be changed except
5661 KeyPress case, so we can avoid copying and use const pointer to
5662 const data to make sure that an event is not changed elsewhere.
5663 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
5664 const' and do not create local copy except for the KeyPress event.
5665 Use casts to avoid a few glitches. Adjust formatting. Add comments.
5666 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
5667 (x_handle_net_wm_state, x_menubar_window_to_frame)
5668 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
5669 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
5670 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
5671 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
5672 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
5673 (x_handle_dnd_message):
5674 * xsettings.c (xft_settings_event):
5675 Use 'const XEvent * const' where appropriate.
a12bf61e 5676 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
61582e6a 5677
f8eb1572
DA
56782013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
5679
5680 Fix X event waiting to handle multiple frames.
5681 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
5682 * xterm.c (pending_event_wait): Remove. Adjust users.
5683 (x_detect_focus_change): Pass frame arg.
5684 (handle_one_xevent): Find related frame early and clear per-frame
5685 wait_event_type only if this is an event for the relevant frame.
5686 (x_wait_for_event): Use per-frame wait_event_type.
5687
3fa2054e
JD
56882013-09-15 Jan Djärv <jan.h.d@swipnet.se>
5689
745d3809 5690 * nsfns.m (Fx_create_frame): Fix font driver registration for
a6c4680a 5691 GNUstep.
745d3809
JD
5692
5693 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
5694 for syms_of_macfont.
5695
3fa2054e
JD
5696 * nsterm.m: Include macfont.h.
5697 (ns_tmp_flags, ns_tmp_font): Remove.
5698 (ns_compute_glyph_string_overhangs): Check for driver Qns.
5699 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
5700 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
5701 (changeFont:): Fix code style. Check for font driver type when
5702 getiing font.
5703
5704 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
5705 (f)->descent.
5706
5707 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
5708 (nsfont_open): Set font driver type.
5709 Set font->ascent and font->descent. Figure out font instead of
5710 ns_tmp_font, and flags instead of ns_tmp_flags.
e9dc713d 5711 Fix indentation. Remove call to ns_draw_text_decoration,
3fa2054e
JD
5712 moved to nsterm.
5713
5714 * nsfns.m: Include macfont.h.
5715 (Fx_create_frame): Register macfont driver, make a better default font.
5716 (Fns_popup_font_panel): Get font from macfont driver, if used.
5717
a12bf61e 5718 * macfont.m, macfont.h, macuvs.h: New files.
3fa2054e
JD
5719
5720 * font.h: Declare syms_of_macfont.
5721
5722 * font.c (syms_of_font): Call syms_of_macfont.
5723
5724 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
5725
0eed0355
DA
57262013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
5727
5728 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
5729 and it is always zero for others, so I assume that this is an ancient
5730 leftover which nobody will want to change any more.
5731 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
5732 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
5733 * frame.c (x_set_scroll_bar_width):
5734 * w32fns.c (w32_createscrollbar):
5735 * w32term.c (w32_set_vertical_scroll_bar):
5736 * xfns.c (x_set_scroll_bar_default_width):
5737 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
5738 (x_scroll_bar_expose): Related users changed.
5739
07013c68
DA
57402013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
5741
5742 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
5743 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
901049a6
DA
5744 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
5745 Define as such.
c7cc32f7
DA
5746 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
5747 Define once here...
5748 * nsterm.h, w32term.h, xterm.h: ...and not here.
901049a6
DA
5749 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
5750 Remove unused Xisms.
7f09455e
DA
5751 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
5752 these modules are never compiled otherwise.
07013c68 5753
0df00f59
EZ
57542013-09-14 Eli Zaretskii <eliz@gnu.org>
5755
08a209bf 5756 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
0df00f59
EZ
5757 Doc fix. (Bug#15375)
5758
fcd42c11
DA
57592013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5760
5761 Unify Fx_focus_frame between all ports.
5762 * frame.h (x_focus_frame): New prototype.
5763 * xfns.c (Fx_focus_frame): Remove.
5764 (syms_of_xfns): Do not defsubr it.
5765 (x_focus_frame): X implementation.
5766 * nsfns.m (Fx_focus_frame): Remove.
5767 (syms_of_nsfns): Do not defsubr it.
5768 (x_focus_frame): NS implementation.
5769 * w32term.c (Fx_focus_frame): Remove.
5770 (x_focus_on_frame): Rename to...
5771 (x_focus_frame): W32 implementation.
5772 * w32term.h (x_focus_on_frame): Remove prototype.
5773 * w32fns.c (Fx_focus_frame): Remove.
5774 (syms_of_w32fns): Do not defsubr it.
5775 * frame.c (Fx_focus_frame): Define here.
5776 (syms_of_frame): Defsubr here.
5777 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
5778
aad3612f
DA
57792013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5780
5781 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
5782 All of them are replaced with FRAME_DISPLAY_INFO, defined in
5783 each port to reference the port-specific window system data.
5784 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
5785 (FRAME_DISPLAY_INFO): Define.
5786 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
5787 (FRAME_DISPLAY_INFO): Define. Adjust users.
5788 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
5789 (FRAME_DISPLAY_INFO): Define. Adjust users.
5790 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
5791 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
5792 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
5793 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
5794 * xselect.c, xterm.c: All related users changed.
5795
9a650e62
DA
57962013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5797
5798 * xterm.h (x_window_to_frame, x_any_window_to_frame)
5799 (x_menubar_window_to_frame): Remove prototypes.
5800 * xfns.c (x_window_to_frame, x_any_window_to_frame)
5801 (x_menubar_window_to_frame, x_top_window_to_frame):
5802 Move from here...
5803 * xterm.c (x_window_to_frame, x_any_window_to_frame)
5804 (x_menubar_window_to_frame, x_top_window_to_frame):
5805 ...to here and convert all but the last to static.
5806
347ae3e1
EZ
58072013-09-12 Eli Zaretskii <eliz@gnu.org>
5808
5809 * lisp.mk (lisp): Add w32-common-fns.elc.
5810
15c6d837
XF
58112013-09-12 Xue Fuqiao <xfq.free@gmail.com>
5812
5813 * charset.c (char_charset): Document an exception for char-charset.
5814
27e90f77
DA
58152013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
5816
5817 * xterm.h (x_display_info): New field last_user_time...
5818 * xterm.c (toplevel): ...to replace static last_user_time.
5819 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
5820
8ffbc36b
DA
58212013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
5822
5823 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
5824 scroll bar values to prevent thumb from disappear and update comment.
5825
5ec0337a
GM
58262013-09-11 Glenn Morris <rgm@gnu.org>
5827
5828 * emacs.c (usage_message): Possessive apostrophe tweak.
5829
fb55b9d1
DA
58302013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5831
8d2db8be
DA
5832 * nsterm.m (syms_of_nsterm): Use Qns.
5833 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
5834 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
5835 * xfns.c (x_display_info_for_name, Fx_open_connection):
5836 Remove old '#if 0' code.
5837 (syms_of_xfns): Use Qx.
fb55b9d1
DA
5838 * termhooks.h (fullscreen_hook): Remove the leftover.
5839 (struct terminal): Fix typo in comment.
5840
927eec55
DA
58412013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5842
5843 Cleaning up a few X scroll bar bits.
5844 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
5845 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
5846 New member last_seen_part, going to replace...
5847 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
5848 (xt_action_hook) [USE_LUCID]: Adjust user.
5849 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
5850 Lucid-specific scroll bar support.
5851 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
5852 to int and adjust to use last_seen_part member.
5853 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
5854 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
5855 Initialize last_seen_part.
5856
71b28baa
SM
58572013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
5858
5859 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
5860 insert-buffer-substring an empty string.
5861
f5dacaae
PE
58622013-09-11 Paul Eggert <eggert@cs.ucla.edu>
5863
5864 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
5865 avoiding a GCC warning.
5866
742516e0
DA
58672013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5868
5869 Ifdef away frame tool bar code when it is not really used.
5870 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
5871 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
5872 and minimize_tool_bar_window_p under the above.
5873 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
5874 (fset_tool_bar_window): Likewise.
5875 * dispnew.c (clear_current_matrices, clear_desired_matrices)
5876 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
5877 (change_frame_size_1):
5878 * window.c (window_from_coordinates, Frecenter): Adjust users.
5879 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
5880 code is not really used.
5881 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
5882 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
5883 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
5884 [!USE_GTK && !HAVE_NS]: Define as such.
5885 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
5886 (note_mouse_highlight, expose_frame):
5887 * xfns.c (x_set_tool_bar_lines):
5888 * xterm.c (handle_one_xevent): Adjust users.
5889
73f82c7e
PE
58902013-09-11 Paul Eggert <eggert@cs.ucla.edu>
5891
5892 Fix corruption with multiple emacsclient -t instances (Bug#15222).
5893 This bug was introduced by my 2013-08-26 patch, which incorrectly
5894 assumed that the terminfo implementation doesn't use termcap buffers.
5895 * term.c (init_tty) [TERMINFO]: Remove optimization, as
5896 these buffers apparently are used after all.
5897 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
5898 (struct tty_display_info): Define members termcap_term_buffer and
5899 termcap_strings_buffer even if TERMINFO.
5900
53482f41
DA
59012013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5902
5903 Fix last change.
5904 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
5905 'usage' docstring entry to pacify make-docfile.
5906
59072013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
5908
5909 Change comparison functions =, <, >, <=, >= to take many arguments.
5910 * data.c: Change comparison functions' interface and implementation.
5911 * lisp.h: Make arithcompare available for efficient two arg
5912 comparisons.
5913 * bytecode.c: Use arithcompare.
5914 * fileio.c: Use new interface.
5915
533f258f
SM
59162013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
5917
5918 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
5919
8c27f5ff
SM
59202013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
5921
5922 * eval.c (Feval): Document the new use of `lexical'.
5923
0750a308
DA
59242013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5925
5926 Review and drop old frame resize hack.
5927 * frame.h (struct frame): Remove force_flush_display_p.
5928 * dispnew.c (update_frame): Adjust user and don't call
5929 flush_frame here. The comment has said that there was an issues
5930 with redisplaying fringes, but I don't see any differences with
5931 and without this hack. Hopefully we can continue without it.
5932 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
5933 current frame matrices twice if resized_p is set.
5934
83fc0554
DA
59352013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5936
5937 Do not populate pure Xism x_sync to other ports.
5938 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
5939 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
5940 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
5941 * w32term.h (x_sync): Remove prototype.
5942
fd462129
DA
59432013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
5944
5945 Cleanup frame flushing.
8c27f5ff
SM
5946 * dispextern.h (struct redisplay_interface):
5947 Drop flush_display_optional because flush_display is enough
fd462129
DA
5948 for X and flushing via RIF is just a no-op for others.
5949 * frame.h (flush_frame): New function.
5950 * dispnew.c (update_frame):
5951 * minibuf.c (read_minibuf):
5952 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
5953 Use it.
5954 * keyboard.c (detect_input_pending_run_timers): Do not flush
5955 all frames but selected one in redisplay_preserve_echo_area.
5956 * nsterm.m (ns_flush): Remove no-op.
5957 (ns_redisplay_interface): Adjust user.
5958 * w32term.h (x_flush): Remove no-op.
5959 (w32_redisplay_interface): Adjust user.
5960 * xterm.c (x_flush): Simplify because we do not flush all
5961 frames at once any more. Adjust comment.
5962 (x_redisplay_interface): Adjust user.
5963
4b73fc73
PE
59642013-09-07 Paul Eggert <eggert@cs.ucla.edu>
5965
5966 Port --without-x --enable-gcc-warnings to Fedora 19.
5967 * gfilenotify.c (globals_of_gfilenotify):
5968 Call g_type_init only if using an older glib version that needs it.
5969
77394d40
DA
59702013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5971
5972 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
5973 (last_glyphless_glyph_merged_face_id): Remove declarations.
5974 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
5975 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
5976 (last_glyphless_glyph_merged_face_id): Now static.
5977 (merge_escape_glyph_face): New function, refactored from...
5978 (get_next_display_element): ...here.
5979 (merge_glyphless_glyph_face): New function, refactored from...
5980 (produce_glyphless_glyph): ...here...
5981 * term.c (produce_glyphless_glyph): ...and here.
5982
306d67bd
SM
59832013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
5984
5985 * eval.c (eval_sub): Only call Ffunction if necessary.
5986
7f6c6450
DA
59872013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
5988
5989 Attempt to make redisplay more selective when changing cursor type.
5990 * frame.h (struct frame): New bitfield cursor_type_changed.
5991 * xdisp.c (cursor_type_changed): Remove.
5992 (try_cursor_movement, redisplay_window, try_window_id)
5993 (set_frame_cursor_types, try_window_reusing_current_matrix):
5994 Adjust to use per-frame bitfield.
5995 (redisplay_internal): Look for cursor type change on each visible
5996 frame and consider all frames if cursor type has been changed on
5997 the frame other than selected. If cursor type has been changed on
5998 selected frame only, do not use fast update.
5999
bd0443bb
DA
60002013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
6001
6002 Attempt to make redisplay more selective when changing fonts.
6003 * frame.h (struct frame): New bitfield fonts_changed.
6004 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
6005 (adjust_frame_glyphs): Add prototype.
6006 * dispnew.c (fonts_changed_p): Remove.
8bda01d3 6007 (adjust_glyphs): Remove because we do not
bd0443bb
DA
6008 adjust matrices on all frames at once any more.
6009 (adjust_frame_glyphs): Block and unblock input here.
6010 (adjust_glyph_matrix): Use fonts_changed.
6011 (change_frame_size_1): Use adjust_frame_glyphs.
6012 * font.c (font_open_entity): Use fonts_changed.
6013 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
6014 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
6015 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
6016 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
6017 (shrink_mini_window, Fresize_mini_window_internal)
6018 (window_scroll_pixel_based, Fset_window_configuration)
6019 (apply_window_adjustment, Fset_window_vscroll):
6020 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
6021 Use adjust_frame_glyphs.
6022 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
6023 (try_window_reusing_current_matrix, try_window_id, display_line)
6024 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
6025 (redisplay_internal): Consider fonts_changed and adjust frame
6026 matrices for each frame only if the frame is visible. If font
6027 has been changed on some frame during full redisplay, retry
6028 only visible frames where the font has been actually changed.
6029
b9695828
DA
60302013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
6031
6032 Cache current header and mode line height for each window.
6033 * window.h (struct window): New fields mode_line_height
6034 and header_line_height.
6035 * window.c (make_window): Initialize them.
6036 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
6037 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
6038 (current_mode_line_height, current_header_line_height):
6039 Remove declaration.
6040 * xdisp.c (current_mode_line_height, current_header_line_height):
6041 Remove.
6042 (pos_visible_p, init_xdisp): Adjust user.
6043 (redisplay_window): Invalidate mode_line_height and
6044 header_line_height if current and desired matrices do not agree.
6045
66738305
DA
60462013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
6047
6048 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
6049 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
6050
257b3b03
DA
60512013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
6052
6053 Make --without-x compatible with --enable-gcc-warnings.
6054 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
6055 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
6056 members under HAVE_WINDOW_SYSTEM.
6057 * keyboard.c (make_lispy_focus_out): Likewise.
6058 (record_menu_key): Move under HAVE_MENUS.
6059 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
6060 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
6061 (syms_of_xdisp): Adjust user.
6062 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
6063 (start_hourglass, cancel_hourglass):
6064 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
6065 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
6066 and CLEAR_FONT_TABLE_NFONTS.
6067 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
6068 Declare only if HAVE_WINDOW_SYSTEM.
6069 (lface_same_font_attributes_p, clear_face_gcs): Define only
6070 if HAVE_WINDOW_SYSTEM.
6071
98b7f4bd
DA
60722013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
6073
6074 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
6075 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
6076 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
6077
a7e43722
SM
60782013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
6079
6080 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
6081
0c90b9ee
PE
60822013-09-04 Paul Eggert <eggert@cs.ucla.edu>
6083
6084 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
6085 This fixes a type error on hosts where ptrdiff_t is wider than int.
6086
d99760fa
SM
60872013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
6088
6629638e
SM
6089 * keyboard.c (read_key_sequence_vs): New function.
6090 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
6091 common code.
6092
d99760fa
SM
6093 * callint.c (Fcall_interactively): Always return a vector for 'K'.
6094
224e313d
PE
60952013-09-04 Paul Eggert <eggert@cs.ucla.edu>
6096
6097 Makefile improvements.
6098 * Makefile.in (config.status): Don't use double-colon rules, as
6099 they are not portable according to POSIX. Fix shell typo with `;
6100 I guess this rule has never been tested?
6101 (VCSWITNESS): New macro, to override any environment var.
6102
6d6ed1af
DA
61032013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
6104
6105 * xterm.h (struct x_display_info): Do not track X connection
6106 fd separately because it is always available from Display.
6107 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
6108 Adjust users.
6109
bc923770
DA
61102013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
6111
6112 * buffer.c (drop_overlay):
6113 * fileio.c (restore_point_unwind): Prefer unchain_marker to
6114 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
6115
b1cf96de
DA
61162013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
6117
6118 * buffer.c (Fmake_overlay, Fmove_overlay):
6119 * intervals.c (set_point_from_marker):
6120 * print.c (PRINTPREPARE): Prefer signal_error
6121 to plain error and report unsuitable marker too.
6122
d1fc6c21
DA
61232013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
6124
6125 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
6126 for 'dragging' member.
d1ae6a0b
DA
6127 (struct x_output): Remove set-but-unused leftovers
6128 'left_before_move' and 'top_before_move'.
d1fc6c21
DA
6129 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
6130 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
6131 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
6132 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
6133 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
6134 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
d1ae6a0b 6135 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
ec5e7504 6136 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
d1fc6c21 6137
0ce9f6de
JD
61382013-09-03 Jan Djärv <jan.h.d@swipnet.se>
6139
6140 * nsfont.m (INVALID_GLYPH): New define.
6141 (nsfont_encode_char): Use INVALID_GLYPH.
6142 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
6143
b594a96c
DA
61442013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
6145
6146 * xterm.c (x_last_mouse_movement_time): Revert last change.
6147 This code should use XDisplayMotionBufferSize to check display's
6148 motion history first, and there are few other issues as well.
6149 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
6150 (handle_one_xevent): Adjust user.
6151
8b098236
MR
61522013-09-02 Martin Rudalics <rudalics@gmx.at>
6153
9718b207
MR
6154 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
6155 * frame.c (Flast_nonminibuf_frame): ... to here.
6156 (check_minibuf_window): Don't abort if no window was found
6157 (Bug#15247).
8b098236 6158
84e70bba
DA
61592013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
6160
6161 Use XGetMotionEvents to ask the last mouse motion time from X server.
6162 * xterm.c (X_MOTION_HISTORY): Default to 1.
6163 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
6164 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
6165 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
6166 Ifdef away legacy code.
6167 (XTmouse_position, x_scroll_bar_report_motion):
6168 Use x_last_mouse_movement_time.
fc85e20b
DA
6169 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
6170 UnmapNotify event.
84e70bba 6171
1fccc530
DA
61722013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
6173
6174 * msdos.c (last_mouse_window): Move to...
6175 (dos_rawgetc): ...this function and adjust comment.
6176 * nsterm.m (last_window): Rename to last_mouse_window, move to...
6177 (mouseMoved): ...this function and adjust comment.
6178 * w32term.c (last_window): Likewise with...
6179 (w32_read_socket): ...this function.
6180 * xterm.c (last_window): Likewise with...
6181 (handle_one_xevent): ...this function.
6182
0ab10992
DA
61832013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
6184
b7da754d 6185 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
0ab10992
DA
6186 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
6187 (handle_one_xevent): ...to here.
6188 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
6189 otherwise.
6190
0c7f856e
DA
61912013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
6192
6193 * msdos.c (IT_set_terminal_window): Remove no-op.
6194 (initialize_msdos_display): Adjust terminal setup.
6195 * w32console.c (w32con_set_terminal_window): Remove no-op.
6196 (initialize_w32_display): Adjust terminal setup.
6197 * w32term.c (w32_set_terminal_window): Remove no-op.
6198 (w32_create_terminal): Adjust terminal setup.
6199 * xterm.c (XTset_terminal_window): Remove no-op.
6200 (x_create_terminal): Adjust terminal setup.
6201
a892a94c
DA
62022013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
6203
6204 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
6205 Remove no-ops.
6206 (ns_create_terminal): Adjust terminal setup.
6207 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
6208 Remove no-ops.
6209 (w32_create_terminal): Adjust terminal setup.
6210 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
6211 Remove no-ops.
6212 (x_create_terminal): Adjust terminal setup.
6213
cf91889a
DA
62142013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
6215
6216 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
6217 (CLIP_TEXT_POS_FROM_MARKER): New macro.
6218 * dispnew.c (buffer_posn_from_coords):
6219 * window.c (Fwindow_end, displayed_window_lines):
6220 * xdisp.c (redisplay_mode_lines): Use it.
6221
5b0891df
JD
62222013-09-01 Jan Djärv <jan.h.d@swipnet.se>
6223
6224 * fontset.c (face_for_char): Check char in the current face font first
6225 if HAVE_NS (Bug#15138).
6226
0a357e98
MR
62272013-08-31 Martin Rudalics <rudalics@gmx.at>
6228
6229 * window.c (temp_output_buffer_show): Make sure window returned
6230 by display_buffer is live (Bug#15213).
6231
9d7693d7
DA
62322013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
6233
6234 Minor cleanup to avoid forward declarations.
6235 * coding.h (struct ccl_spec): Remove forward declaration.
6236 * composite.h (toplevel): Include font.h.
6237 (struct composition_it, struct face, struct font_metrics):
6238 Remove forward declaration.
6239 * dispextern.h (struct image, struct atimer): Likewise.
6240 * emacsgtkfixed.h (struct frame): Likewise.
6241 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
6242 * font.h (struct font_driver, struct font, struct glyph_string)
6243 (struct face): Remove forward declaration.
6244 * fontset.h (struct face, struct font): Likewise.
6245 * frame.h (toplevel): Style cleanup.
6246 (enum output_method): Move to...
6247 * termhooks.h (enum output_method): ...here.
6248 (struct glyph, struct frame, struct ns_display_info)
6249 (struct x_display_info, struct w32_display_info):
6250 Remove forward declaration.
6251 * xterm.h (toplevel): Include termhooks.h.
6252 (struct font, struct window, struct glyph_matrix, struct frame)
6253 (struct input_event, struct face, struct image): Remove forward
6254 declaration.
6255 * gtkutil.h (struct _widget_value): Likewise.
6256 * keyboard.h (toplevel): Include termhooks.h.
6257 (struct input_event): Remove forward declaration.
6258
032f7451
DA
62592013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
6260
6261 * intervals.c (set_point_from_marker): New function.
6262 * editfns.c (Fgoto_char):
6263 * process.c (Finternal_default_process_filter):
6264 * window.c (select_window_1): Use it.
6265 * buffer.h (set_point_from_marker): Add prototype.
6266
3f940c5a
EZ
62672013-08-29 Eli Zaretskii <eliz@gnu.org>
6268
6269 * w32.c (term_winsock): Call release_listen_threads before calling
6270 WSACleanup.
6271 (_sys_wait_accept): Wait for accept event in a loop with a finite
6272 timeout, instead of waiting indefinitely. Will hopefully avoid
6273 hanging during exit because WSACleanup deadlocks waiting for the
6274 event object to be released. (Bug#14333)
6275
6276 * w32proc.c (release_listen_threads): New function, signals all
6277 the reader threads that listen for connections to stop waiting.
6278
6279 * w32.h (release_listen_threads): Add prototype.
6280
101ed2bb
DA
62812013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
6282
6283 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
6284 field of new marker (for sanity and safety).
20de2834
DA
6285 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
6286 anyway because XMISCTYPE is a function and can't be an lvalue).
101ed2bb 6287
1f5cf200
DA
62882013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
6289
6290 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
35e951cd
JB
6291 (x_after_update_window_line, x_scroll_bar_create)
6292 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
1f5cf200
DA
6293 (handle_one_xevent, x_clear_frame_area):
6294 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
6295 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
6296 * xterm.h (x_clear_area): Adjust prototype.
6297
d2b36813
DA
62982013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
6299
6300 Hook scanning and indentation functions to find_newline. This helps
6301 to avoid duplicated code and renders more respect to newline cache.
6302 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
6303 * cmds.c (Fforward_line):
6304 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
6305 Use find_newline and avoid unnecessary point movements.
6306 * search.c (scan_newline): Implement on top of find_newline.
6307
3ec7babc
SM
63082013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
6309
6310 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
6311 scoped code (bug#11258).
6312
5ab473cd
JD
63132013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
6314
6315 * nsterm.m (last_window): New variable.
6316 (EV_TRAILER2): New macro.
6317 (EV_TRAILER): Call EV_TRAILER2.
e9dc713d 6318 (mouseMoved:): Add support for mouse-autoselect-window
5ab473cd
JD
6319 on nextstep (Bug#6888).
6320
78779650
AS
63212013-08-28 Andreas Schwab <schwab@suse.de>
6322
6323 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
6324 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
6325 Remove unused macro definitions.
6326 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
3ec7babc
SM
6327 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
6328 Only define if emacs.
78779650 6329
c3c4768d
DA
63302013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
6331
6332 Prefer enum glyph_row_area to int where appropriate.
6333 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
6334 Fix comment.
6335 (window_box, window_box_width, window_box_left, window_box_left_offset)
6336 (window_box_right, window_box_right_offset): Adjust prototypes.
6337 * xdisp.c (window_box, window_box_width, window_box_left)
6338 (window_box_left_offset, window_box_right, window_box_right_offset):
6339 Use enum glyph_row_area. Adjust users and tweak comment where needed.
6340 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
6341 * nsterm.m (ns_clip_to_row):
6342 * w32term.c (w32_clip_to_row):
6343 * xterm.c (x_clip_to_row): Likewise.
6344
6bdcbfe1
DA
63452013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
6346
6347 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
6348 (Fprevious_overlay_change): Fast path for buffer with no overlays.
6349
50b13cde
PE
63502013-08-28 Paul Eggert <eggert@cs.ucla.edu>
6351
6352 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
6353 for portability to hosts where /bin/sh has problems.
6354
f60e429a
DA
63552013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
6356
6357 Redesign redisplay interface to drop global output_cursor.
6358 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
6359 (toplevel): Remove declaration of output_cursor.
6360 (set_output_cursor, x_cursor_to): Remove prototype.
6361 * window.h (struct window): New member output_cursor.
6362 (output_cursor_to): New function to replace RIF member.
6363 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
6364 (update_text_area, set_window_cursor_after_update): Use it.
6365 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
6366 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
6367 * nsterm.m (ns_update_window_begin, ns_update_window_end):
6368 * w32term.c (x_update_window_begin, x_update_window_end):
6369 * xterm.c (x_update_window_begin, x_update_window_end):
6370 Adjust to use per-window output cursor.
6371
43aac990
PE
63722013-08-27 Paul Eggert <eggert@cs.ucla.edu>
6373
d486344e
PE
6374 Simplify SELECT_TYPE-related code.
6375 Like EMACS_TIME, this portability layer is no longer needed, since
6376 Emacs has been using fd_set as a portability layer for some time.
6377 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
6378 (SELECT_TYPE): Remove. All uses changed to fd_set.
6379 (fd_set) [!FD_SET]: New typedef.
6380
43aac990
PE
6381 Simplify EMACS_TIME-related code.
6382 This portability layer is no longer needed, since Emacs has been
6383 using struct timespec as a portability layer for some time.
6384 * atimer.h, buffer.h, dispextern.h, xgselect.h:
6385 Include <time.h> rather than "systime.h"; that's all that's needed now.
6386 * dispnew.c: Include <timespec.h> rather than "systime.h";
6387 that's all that's needed now.
6388 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
6389 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
6390 TIMESPEC_RESOLUTION.
6391 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
6392 LOG10_TIMESPEC_RESOLUTION.
6393 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
6394 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
6395 (make_emacs_time): Remove. All used changed to make_timespec.
6396 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
6397 (current_timespec): Rename from current_emacs_time. All uses changed.
6398 (add_emacs_time): Remove. All uses changed to timespec_add.
6399 (sub_emacs_time): Remove. All uses change dot timespec_sub.
6400 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
6401 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
6402 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
6403 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
6404 (current_timespec): Rename from current_emacs_time. All uses changed.
6405 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
6406 changed to timespec_cmp.
6407 * xgselect.c: Include <timespec.h>, since our .h files don't.
6408
d350e350
DA
64092013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
6410
6411 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
6412 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
6413 Remove the leftovers.
6414 * gtkutil.c (toplevel): Do not declare Qxft but include
6415 font.h to do so.
6416 * image.c (toplevel): Do not declare Vlibrary_cache because
6417 it's already done in lisp.h.
6418
9fed9729
DA
64192013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
6420
6421 * lisp.h (Mouse_HLInfo): Move from here...
6422 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
6423 (reset_mouse_highlight): New function.
6424 * msdos.c (dos_set_window_size, IT_update_begin)
6425 (internal_terminal_init):
6426 * nsterm.m (ns_update_window_end, x_free_frame_resources)
6427 (ns_initialize_display_info):
6428 * w32console.c (initialize_w32_display):
6429 * w32term.c (x_update_window_end, x_free_frame_resources)
6430 (w32_initialize_display_info):
6431 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
6432 * window.c (Fdelete_other_windows_internal):
6433 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
6434 * termchar.h (toplevel):
6435 * xterm.h (toplevel): Include dispextern.h.
6436
f462f075
PE
64372013-08-26 Paul Eggert <eggert@cs.ucla.edu>
6438
6439 Fix minor problems found by static checking.
6440 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
6441 (expect): Avoid nested-if warning.
6442 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
6443 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
6444 * nsterm.h, nsterm.m (ns_select):
6445 * xgselect.c, xgselect.h (xg_select):
6446 Adjust signature to better match pselect's.
6447 * nsterm.m (ns_select):
6448 Don't set *TIMEOUT, since pselect doesn't.
6449 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
6450 diagnostic about assigning const char * to it.
6451 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
6452
068f9124
SM
64532013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
6454
6455 * lread.c (substitute_object_recurse): Handle hash-tables as well
6456 (bug#15190).
6457
f5adc984
PE
64582013-08-26 Paul Eggert <eggert@cs.ucla.edu>
6459
1fc8eb33
PE
6460 Fix unlikely core dump in init_tty, and simplify terminfo case.
6461 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
6462 The old version incorrectly dumped core if malloc returned a
6463 buffer containing only non-NUL bytes.
6464 (init_tty): Do not allocate or free termcap buffers; the
6465 struct does that for us now.
6466 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
6467 (struct tty_display_info): Define members termcap_term_buffer and
6468 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
6469 use them. Allocate them directly in struct rather than indirectly
6470 via a pointer, to simplify init_tty.
6471
f5adc984
PE
6472 * frame.c (check_minibuf_window): Initialize 'window' properly,
6473 so that Emacs reliably aborts later if 'window' is not initialized.
6474
efec3894
JD
64752013-08-26 Jan Djärv <jan.h.d@swipnet.se>
6476
6477 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
6478 of VoidSymbol (Bug#15154).
6479
e1d0341e
DA
64802013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
6481
6482 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
6483 mouse_face_beg_y and mouse_face_end_y.
6484 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
6485 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
6486 Adjust users and update comment where appropriate.
6487
bfff6445
MR
64882013-08-26 Martin Rudalics <rudalics@gmx.at>
6489
6490 * frame.c (check_minibuf_window): New function.
068f9124
SM
6491 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
6492 Call check_minibuf_window (Bug#15183).
bfff6445 6493
c80016b3
DA
64942013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
6495
6496 * window.h (struct window): Replace last_cursor with last_cursor_vpos
6497 because this is the only last cursor data we need to keep and consult.
6498 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
6499 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
6500 Adjust users.
6501
de396731
DA
65022013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
6503
068f9124
SM
6504 Fix recovering from possible decompression error.
6505 Since insert_from_gap doesn't always move point, we can't use PT as
de396731 6506 the position where the partially decompressed data ends, and
447218dd 6507 should count how many bytes was produced so far.
de396731
DA
6508 * decompress.c (struct decompress_unwind_data): Add nbytes member.
6509 (unwind_decompress): Really delete partially uncompressed data.
6510 (Fzlib_decompress_region): Take decompressed data size into account.
6511
c76826d9
DA
65122013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
6513
6514 * syntax.c (init_syntax_once): Adjust comment and do an early
6515 initialization of Qchar_table_extra_slots just once...
6516 * casetab.c (init_casetab_once):
6517 * category.c (init_category_once):
6518 * character.c (syms_of_character):
6519 * coding.c (syms_of_coding):
6520 * xdisp.c (syms_of_xdisp): ...and omit it here.
6521
b34454d0
EZ
65222013-08-24 Eli Zaretskii <eliz@gnu.org>
6523
11f20add
EZ
6524 * xdisp.c (get_next_display_element): Don't apply to characters
6525 from a display vector the logic of setting it->end_of_box_run_p
6526 suitable for characters from a buffer. (Bug#15175)
6527
b34454d0
EZ
6528 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
6529 to handle directories, rather than '_utime' which doesn't.
6530 (Bug#15176)
6531
6e1b469e
JD
65322013-08-24 Jan Djärv <jan.h.d@swipnet.se>
6533
6534 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
6535 or fullscreen (Bug#14627).
6536
9c05bccf
PE
65372013-08-24 Paul Eggert <eggert@cs.ucla.edu>
6538
6539 System-dependent integer overflow fixes.
6540 * process.c (Fset_process_window_size): Signal an error if
6541 the window size is outside the range supported by the lower level.
6542 * sysdep.c (set_window_size): Return negative on error,
6543 nonnegative on success, rather than -1, 0, 1 on not in system,
6544 failure, success. This is simpler. Caller changed.
6545 (serial_configure): Remove unnecessary initialization of local.
6546 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
6547 size fits in unsigned long; this isn't true on some 32-bit hosts.
6548 Avoid buffer overrun if some future version of /proc/meminfo has a
6549 variable name longer than 20 bytes.
6550 (system_process_attributes) [__FreeBSD__]:
6551 Don't assume hw.availpages fits in 'int'.
6552
c365c355
PE
65532013-08-23 Paul Eggert <eggert@cs.ucla.edu>
6554
6555 Don't let very long directory names overrun the stack.
6556 Fix some related minor problems involving "//", vfork.
6557 * callproc.c (encode_current_directory): New function.
6558 (call_process): Don't append "/"; not needed.
6559 * fileio.c (file_name_as_directory_slop): New constant.
6560 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
6561 this can save the caller having to alloca.
6562 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
6563 Use SAFE_ALLOCA, not alloca.
6564 (directory_file_name, Fexpand_file_name): Leave leading "//"
6565 alone, since it can be special even on POSIX platforms.
6566 * callproc.c (call_process):
6567 * process.c (Fformat_network_address):
6568 * sysdep.c (sys_subshell):
6569 Use encode_current_directory rather than rolling our own.
6570 (create_process): No need to encode directory; caller does that now.
6571 * process.h (encode_current_directory): New decl.
6572 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
6573 Rework to avoid 'goto xyzzy;'.
6574
6c6014d4
EZ
65752013-08-23 Eli Zaretskii <eliz@gnu.org>
6576
6577 * xdisp.c (handle_face_prop): If the default face was remapped use
6578 the remapped face for strings from prefix properties. (Bug#15155)
6579
9997ec56
DA
65802013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
6581
6582 Minor cleanup for redisplay interface and few related functions.
6583 * frame.h (enum text_cursor_kinds): Move from here...
6584 * dispextern.h (enum text_cursor_kinds): ...to here.
6585 (toplevel): Drop unnecessary declarations.
6586 (struct redisplay_interface): Use bool and enum text_cursor_kinds
6587 in update_window_end_hook and draw_window_cursor functions.
6588 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
6589 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
ffb3f67a 6590 * w32term.c (x_update_window_end, w32_draw_window_cursor):
9997ec56
DA
6591 * xterm.c (x_update_window_end, x_draw_window_cursor):
6592 * xdisp.c (display_and_set_cursor, update_window_cursor)
6593 (update_cursor_in_window_tree, x_update_cursor): Use bool and
6594 enum text_cursor_kinds where appropriate.
6595
7f780da6
DA
65962013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
6597
6598 Redesign redisplay interface to drop updated_row and updated_area.
6599 * dispextern.h (updated_row, updated_area): Remove declaration.
6600 (struct redisplay_interface): Pass glyph row and row area parameters
6601 to write_glyphs, insert_glyphs and clear_end_of_line functions.
6602 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
6603 Adjust prototypes.
6604 * dispnew.c (updated_row, updated_area): Remove.
6605 (redraw_overlapped_rows, update_window_line): Adjust user.
6606 (update_marginal_area, update_text_area): Likewise. Pass updated row
6607 as a parameter. Prefer enum glyph_row_area to int where appropriate.
6608 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
6609 Adjust users.
6610
26495794
PE
66112013-08-22 Paul Eggert <eggert@cs.ucla.edu>
6612
6613 * process.c (flush_pending_output): Remove stub.
6614 All uses removed.
6615
4a88129a
PE
66162013-08-21 Paul Eggert <eggert@cs.ucla.edu>
6617
6618 * callproc.c: Fix race that killed background processes (Bug#15144).
6619 (call_process): New arg TEMPFILE_INDEX. Callers changed.
6620 Record deleted process-id in critical section, not afterwards.
6621 Don't mistakenly kill process created by a call-process invocation
6622 that discards output and does not wait.
6623
0c5307b0
DA
66242013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
6625
6626 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
6627 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
6628 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
6629 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
6630 to shut up compiler in mark_object.
6631 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
6632
0d7c1e66
PE
66332013-08-21 Paul Eggert <eggert@cs.ucla.edu>
6634
6635 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
6636 We can't portably rely on PTY_OPEN doing that, even if
6637 it calls posix_openpt with O_CLOEXEC.
6638
3f246b65
KH
66392013-08-20 Kenichi Handa <handa@gnu.org>
6640
6641 * character.c (string_char): Improve commentary.
6642
8c2f38aa
PE
66432013-08-20 Paul Eggert <eggert@cs.ucla.edu>
6644
6645 * image.c (SIGNATURE_DIGESTSIZE): Remove.
6646 (struct animation_cache): Make signature a flexible array member.
6647 All uses changed. This is a tad slower but may insulate us better
6648 from future changes to ImageMagick.
6649
bb566cea
PE
66502013-08-19 Paul Eggert <eggert@cs.ucla.edu>
6651
6652 * image.c: Shrink memory needed for animation cache.
6653 (SIGNATURE_DIGESTSIZE): New constant.
6654 (struct animation_cache): Make 'signature' a fixed size array of bytes.
6655 (imagemagick_create_cache): Copy the signature. This saves
6656 several KB of memory that ImageMagick wastes per signature.
6657 Don't bother updating the update_time, as the caller does that now.
6658 (imagemagick_prune_animation_cache): Don't destroy the signature, as
6659 it's a fixed size struct member now.
6660 (imagemagick_get_animation_cache): Always destroy the signature,
6661 as it's now imagemagick_create_cache's responsibility to copy it.
6662 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
6663 and use memcmp rather than strcmp.
6664 eassert that ImageMagick returns a signature of the specified length.
6665
6da26928
LMI
66662013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
6667
6668 * image.c (imagemagick_get_animation_cache): Don't segfault on
6669 each invocation.
453f4022
LMI
6670 (imagemagick_get_animation_cache): Revert to previous definition
6671 so that it actually works. But keep the memory leak fix.
6672 (imagemagick_get_animation_cache): Fix memory leak.
6da26928 6673
22490125
PE
66742013-08-19 Paul Eggert <eggert@cs.ucla.edu>
6675
d0139df5
PE
6676 * image.c: Fix animation cache signature memory leak.
6677 Fix some other minor performance problems while we're at it.
6678 (imagemagick_create_cache): Clear just the members that
6679 need clearing. Don't set update_time, as caller does that now.
6680 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
6681 Simplify by using pointer-to-pointer instead of a prev pointer.
6682 (imagemagick_prune_animation_cache): Use make_emacs_time rather
6683 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
6684 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
6685 it's already a copy. Free the signature probe unless it's cached.
6686
22490125
PE
6687 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
6688 This was introduced by my 2013-08-12 fix for Bug#15035.
6689
deb31e75
DA
66902013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
6691
6692 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
6693 (imagemagick_prune_animation_cache): Now static.
6694
319a4d03
LMI
66952013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
6696
6697 * image.c (imagemagick_get_animation_cache): Don't segfault when
6698 pruning all entries.
6699
f747d82e
KB
67002013-08-18 Ken Brown <kbrown@cornell.edu>
6701
6702 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
6703 static heap if ENABLE_CHECKING is defined.
6704 (max_bss_sbrk_ptr): New variable.
6705 (bss_sbrk): Use it.
6706 (report_sheap_usage): Report maximum static heap usage instead of
6707 ending static heap usage.
6708
d2c28fab
EZ
67092013-08-17 Eli Zaretskii <eliz@gnu.org>
6710
6711 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
6712 of zlib_initialized according to the results of calling
6713 init_zlib_functions.
6714
274ff63f
LMI
67152013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
6716
6717 * image.c: Implement an ImageMagick per-image cache.
8a6f875f 6718 (imagemagick_get_animation_cache): Fix a double-free error.
49ceb676
LMI
6719 (imagemagick_load_image): Remove the ping_wand code, which only
6720 apparently saved time on invalid animated images, and slowed down
6721 everything else. Optimise for the common case.
274ff63f 6722
2bede2ed
XF
67232013-08-16 Xue Fuqiao <xfq.free@gmail.com>
6724
70ff8240
XF
6725 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
6726
de179a3e
XF
6727 * editfns.c (insert_before_markers): Mention overlay in the doc string.
6728
2bede2ed
XF
6729 * marker.c (set_marker): Remove documentation of undefined behavior.
6730
703dbeba
LMI
67312013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6732
6733 * image.c (imagemagick_compute_animated_image): Animate correctly
6734 when sub-images are smaller than the main image.
1d18b1e6
LMI
6735 (imagemagick_compute_animated_image): Setting the iterator row to
6736 zero is apparently not allowed.
79670014
LMI
6737 (imagemagick_compute_animated_image): Allow images that say they
6738 have sub-images that are bigger than the main image, but just crop
6739 them.
703dbeba 6740
63216c5e
JD
67412013-08-15 Jan Djärv <jan.h.d@swipnet.se>
6742
6743 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
6744
a5b5f73f
LMI
67452013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6746
6747 * image.c (imagemagick_compute_animated_image): Respect the GIF
6748 disposal methods.
6749
0fe73012
KB
67502013-08-15 Ken Brown <kbrown@cornell.edu>
6751
6752 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
6753 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
6754 needed.
6755
691a357f
PE
67562013-08-15 Paul Eggert <eggert@cs.ucla.edu>
6757
6758 Fix minor problems found by static checking.
6759 * frame.c (delete_frame):
6760 * xdisp.c (next_element_from_display_vector):
6761 Avoid uninitialized local.
6762 * image.c (imagemagick_compute_animated_image): Port to C89.
6763 Prefer usual GNU indentation style for loops.
6764 Be more careful about bizarrely large sizes, by using ptrdiff_t
6765 instead of int.
6766
42fe2e88
DA
67672013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6768
6769 Fix infinite frame selection loop (Bug#15025).
6770 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
6771
d39a3da6
EZ
67722013-08-15 Eli Zaretskii <eliz@gnu.org>
6773
068f9124
SM
6774 * xdisp.c (compute_window_start_on_continuation_line):
6775 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
d39a3da6
EZ
6776 to make sure we end up setting the window start at the leftmost
6777 visible character of the display line. This avoids funky
6778 horizontal shifting because the window start is not kept on the
6779 same position. (Bug#15090)
05426239
EZ
6780 (next_element_from_display_vector): Support 'box' face attribute
6781 in the face definitions of a display vector. (Bug#15099)
d39a3da6 6782
6e856b69
LMI
67832013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
6784
6785 * image.c (imagemagick_compute_animated_image): Implement animated
6786 images (bug#14700).
995be755
LMI
6787 (imagemagick_compute_animated_image): Fix some compilation
6788 warnings. Implement a very simple cache to make the animation
6789 usable at all, but it should be replaced with a per-image cache.
6e856b69 6790
d5a1acfa
DA
67912013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6792
6793 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
6794 to do `for' loops over alist values.
6795 * buffer.h (FOR_EACH_BUFFER):
6796 * process.c (FOR_EACH_PROCESS): Use it.
6797 (handle_child_signal, status_notify, Fget_buffer_process)
6798 (kill_buffer_processes): Use FOR_EACH_PROCESS.
6799
9c253307
DA
68002013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
6801
6802 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
6803 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
6804 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
6805 to xzalloc and so avoid redundant call to memset.
6806 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
6807 members because it is allocated with xzalloc and so already zeroed.
6808
05e64f9f
KB
68092013-08-14 Ken Brown <kbrown@cornell.edu>
6810
6811 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
6812 (Bug#15094).
6813
5b71542d
DA
68142013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6815
6816 Utility function and macro to copy Lisp string to C string.
6817 * lisp.h (xlispstrdupa): New macro.
6818 (xlispstrdup): New prototype.
6819 * alloc.c (xlispstrdup): New function.
6820 * callint.c (Fcall_interactively):
6821 * fileio.c (Ffile_name_directory, Fexpand_file_name)
6822 (Fsubstitute_in_file_name):
6823 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
6824 * image.c (x_create_bitmap_from_file):
6825 * w32term.c (w32_term_init):
6826 * xterm.c (x_term_init): Use xlispstrdup.
6827
71530c97
LMI
68282013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
6829
4ce82fb8
LMI
6830 * image.c (imagemagick_load_image): Make animated pictures work.
6831 There's still some problems with background color settings, though
6832 (bug#14700).
6833
71530c97
LMI
6834 * decompress.c (unwind_decompress): Always restore point.
6835
7510a061
XF
68362013-08-14 Xue Fuqiao <xfq.free@gmail.com>
6837
6838 * marker.c (set_marker): Reformat documentation.
6839
01c3051f
PE
68402013-08-14 Paul Eggert <eggert@cs.ucla.edu>
6841
aab1fcdf
PE
6842 * xdisp.c (cursor_type_changed): Now static.
6843
01c3051f
PE
6844 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
6845 Use changed. This avoids the need to call xmalloc and for the
6846 caller to call xfree, and avoids memory leaks in some situations.
6847
2084152a
DA
68482013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6849
6850 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
6851 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
94a4e898
DA
6852 (redisplay_window): If window_end_valid is cleared due to non-zero
6853 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
6854 so do not call to try_cursor_movement for that window.
2084152a 6855
02455cb6
DA
68562013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6857
6858 * window.h (struct window): Convert window_end_pos and
6859 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
6860 (wset_window_end_pos, wset_window_end_vpos): Remove.
6861 * dispnew.c (adjust_glyph_matrix):
6862 * window.c (Fwindow_end, replace_window, set_window_buffer)
6863 (make_window):
6864 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
6865 (set_vertical_scroll_bar, redisplay_window, try_window)
6866 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
6867 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
6868 (note_mouse_highlight): Adjust users.
6869 (try_cursor_movement): Likewise. Convert old precondition to eassert.
6870 Add comment.
6871
da5707e8
DA
68722013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6873
6874 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
6875 * image.c (imagemagick_filename_hint): Use `const char *' and
6876 prefer SSDATA to SDATA to avoid warnings.
6877
25554267
DA
68782013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6879
6880 Cleanup window fringes, margins and scroll bars adjustments.
6881 * window.c (set_window_fringes, set_window_margins)
6882 (set_window_scroll_bars, apply_window_adjustment): New functions.
6883 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
6884 (Fset_window_scroll_bars): Use them.
6885
38a2c910
DA
68862013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
6887
6888 * window.h (struct window): Convert scroll_bar_width
6889 from Lisp_Object to integer. Adjust comment.
6890 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
6891 Adjust users.
6892 * window.c (wset_scroll_bar_width): Remove.
6893 (make_window): Initialize scroll_bar_width.
6894 (Fsplit_window_internal): Use direct assignment.
6895 (Fset_window_configuration, save_window_save):
6896 Convert Lisp_Object to integer and back where appropriate.
6897 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
6898 bar was actually changed, and mention this in docstring.
6899
2d065031
PE
69002013-08-13 Paul Eggert <eggert@cs.ucla.edu>
6901
6902 * decompress.c: Minor simplifications.
6903 (Fzlib_decompress_region): Don't bother verifying
6904 that avail_out <= UINT_MAX, as that was confusing.
6905 Mention the restriction in a comment instead.
6906 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
6907
a5bd5abb
JD
69082013-08-13 Jan Djärv <jan.h.d@swipnet.se>
6909
6910 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
6911 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
6912
66e7901a
LMI
69132013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
6914
6915 * image.c (imagemagick_filename_hint): Check for errors in the
6916 alist structure.
6917
2fa611b7
EZ
69182013-08-13 Eli Zaretskii <eliz@gnu.org>
6919
6920 * window.c (Fwindow_margins): Return nil when there's no marginal
6921 area, as per the documented API.
6922
6923 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
6924 Fmake_vector, as scroll bar's struct members are not all Lisp
6925 objects now. This avoids crashes in GC.
6926
6927 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
6928 bool, so its address could be taken.
6929
8259030d
LMI
69302013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
6931
6932 * image.c (imagemagick_filename_hint): New function to possibly
6933 apply `image-content-type-suffixes'.
6934 (imagemagick_load_image): Use it.
6935
866c710e
EZ
69362013-08-13 Eli Zaretskii <eliz@gnu.org>
6937
6938 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
6939 if loading zlib failed.
6940
f10490f0
JD
69412013-08-13 Jan Djärv <jan.h.d@swipnet.se>
6942
96311be7
JD
6943 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
6944 2013-08-13 checkin below. Change bool to BOOL, rule is:
6945 All Obj-C code uses BOOL, except for interfaces callable from C.
6946
f10490f0
JD
6947 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
6948
c8ae93b0
DA
69492013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6950
6951 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
6952 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
6953 bool instead of BOOL.
6954 * w32term.h (struct scroll_bar): Convert fringe_extended_p
6955 from Lisp_Object to bitfield. Adjust comment.
6956 * w32term.c (x_scroll_bar_create): Adjust user.
6957 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
6958 * xterm.c (XTset_vertical_scroll_bar): Likewise.
6959 Use bool for boolean.
6960 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
6961 to `unsigned int' when defining a bitfield.
6962
53b64418
PE
69632013-08-13 Paul Eggert <eggert@cs.ucla.edu>
6964
6965 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
6966
eeaf9bf3
DA
69672013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6968
6969 * window.h (struct window): Convert left_margin_cols and
6970 right_margin_cols from Lisp_Objects to integers. Adjust comment.
6971 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
6972 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
6973 Adjust users.
6974 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
6975 Adjust comment.
6976 (showing_window_margins_p, update_window_line, update_frame_1):
6977 * fringe.c (draw_fringe_bitmap_1):
6978 * xdisp.c (window_box_width): Adjust users.
6979 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
6980 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
6981 Use direct assignment.
6982 (Fset_window_configuration, save_window_save, Fwindow_margins):
6983 Convert Lisp_Object to integer and back where appropriate.
6984 (Fset_window_margins): Adjust user. Return t if any margin
6985 was actually changed, and mention this in docstring.
6986
956720af
XF
69872013-08-13 Xue Fuqiao <xfq.free@gmail.com>
6988
f73f4ce6 6989 * syntax.c (forward_word):
956720af
XF
6990 * cmds.c (forward_char, backward_char): Mention the optional argument.
6991
9e37ee3b
DA
69922013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
6993
6994 * window.h (struct window): Convert left_fringe_width
6995 and right_fringe_width from Lisp_Objects to integers.
6996 Adjust comment.
6997 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
6998 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
6999 * window.c (wset_left_fringe_width, wset_right_fringe_width):
7000 Remove.
7001 (make_window): Initialize new integer fields to -1.
7002 (Fsplit_window_internal): Use direct assignment.
068f9124
SM
7003 (Fset_window_configuration, save_window_save):
7004 Convert Lisp_Object to integer and back where appropriate.
9e37ee3b
DA
7005 (Fset_window_fringes): Adjust user. Return t if any fringe
7006 was actually changed, and mention this in docstring.
7007
e4375ca7
DA
70082013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
7009
7010 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
9cda66e4
DA
7011 * nsfns.m (x_set_cursor_type):
7012 * w32fns.c (x_set_cursor_type):
e903c210 7013 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
9cda66e4 7014 * xdisp.c (set_frame_cursor_types): ...but in common code.
e4375ca7 7015
a45543bc
DA
70162013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
7017
7018 * font.c (clear_font_cache): New function, stripped from...
7019 (Fclear_font_cache): ...here, which now uses the function
7020 above. Adjust comment.
7021 * font.h (clear_font_cache): Add prototype.
7022 * xfaces.c (clear_face_cache): Use clear_font_cache.
7023
ae966a86
DA
70242013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
7025
7026 * window.c (Fset_window_start): Compare `w', not `window' because
7027 `w' might not be equal to `window' after call to decode_live_window.
7028
297a545b
PE
70292013-08-12 Paul Eggert <eggert@cs.ucla.edu>
7030
7031 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
7032 This fixes a problem introduced by the Bug#15035 patch
7033 when using GPG. Reported by Herbert J. Skuhra.
7034
aa942e2b
EZ
70352013-08-12 Eli Zaretskii <eliz@gnu.org>
7036
7037 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
7038 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
7039 not yet initialized.
7040
7699d09e
LMI
70412013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
7042
7043 * decompress.c (Fzlib_decompress_region): Support zlib
7044 decompression, too, and rename.
7045
1d238bc7
PE
70462013-08-12 Paul Eggert <eggert@cs.ucla.edu>
7047
7048 Minor zlib configuration tweaks.
7049 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
7050 Don't assume presence of fn_inflateInit2_ zlib internal function.
7051
8a44a184
LMI
70522013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
7053
7054 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
7055 include the zlib prefix.
7056
594a4307
EZ
70572013-08-12 Eli Zaretskii <eliz@gnu.org>
7058
7059 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
7060 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
7061 define static variables that are pointers to zlib functions to be
7062 dynamically loaded.
7063 (init_zlib_functions) [WINDOWSNT]: New function.
7064 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
7065 New macros.
7066 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
7067 macros instead of invoking the zlib functions directly.
068f9124
SM
7068 (syms_of_decompress): DEFSYM Qzlib_dll.
7069 Staticpro Szlib_available_p.
594a4307 7070
d2e113bc
DA
70712013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
7072
7073 Avoid looping over all frame windows to freeze and unfreeze.
7074 * window.h (struct window): Drop frozen_window_start_p.
7075 (freeze_window_starts): Drop prototype.
7076 * frame.h (struct frame): New frozen_window_starts flag.
7077 (FRAME_WINDOWS_FROZEN): New macro.
7078 * window.c (freeze_window_start, freeze_window_starts):
7079 Remove.
7080 (select_window, replace_window): Adjust users.
7081 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
7082 (window_frozen_p): New function.
7083 (redisplay_window): Use it.
7084
94fcd171
PE
70852013-08-12 Paul Eggert <eggert@cs.ucla.edu>
7086
7087 Fix some fd issues when running subprocesses (Bug#15035).
7088 Fix bugs that can leak files or file descriptors on errors.
7089 Don't unlink open temp files, as that's hard for users to diagnose
7090 when things go awry (e.g., temp disk exhausted).
7091 Don't bother to lock temp files. Check for invalid recursion.
7092 * callproc.c (synch_process_fd): Remove. All uses removed.
7093 (synch_process_tempfile): New var or macro.
7094 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
7095 New constants.
7096 (record_kill_process): New arg, the temp name. All callers changed.
7097 (delete_temp_file): Now just a simple wrapper around unlink.
7098 (call_process_kill): New arg, the call_process_fd array.
7099 Close them all. Clear synch_process_pid. Remove the temp file,
7100 or arrange for it to be removed.
7101 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
7102 that's been moved to synch_process_tempfile. Caller changed.
7103 Do not remove the tempfile; that's now call_process_kill's
7104 responsibility.
7105 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
7106 call_process_kill; the caller now does that.
7107 (call_process_cleanup): Do not close the process fd; that's now
7108 call_process_kill's responsibility.
7109 (Fcall_process): Implement via new function call_process, which
7110 has most of the old body of Fcall_process, but with a different API.
7111 (call_process): New function that does not open or close filefd if
7112 it is nonnegative. Record which fds need to be closed, and let
7113 call_process_kill close (and remove the tempfile, on MSDOS) on error.
7114 Signal an error if invoked recursively (could be done via a hook).
7115 Simplify creation of the tempfile in the MSDOS case.
7116 Don't create the output file until after checking for the executable.
7117 Report any failure to open /dev/null.
7118 Don't open /dev/null for writing twice; once is enough.
7119 Don't create pipe if all output is being discarded or sent to file.
7120 Don't worry about setting up the coding system or reading from the
7121 pipe if all output is being discarded.
7122 Hoist fd_error local into top level, to lessen block nesting.
7123 Don't record deleted pid here; now done by Fcall_process_region.
7124 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
7125 and note its success in synch_process_tempfile.
7126 Do not leak resources when child_setup fails.
7127 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
7128 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
7129 (create_temp_file): Now returns open fd, with an additional
7130 Lisp_Object * argument to return the name. All callers changed.
7131 Do not close the file; rewind it instead, and leave it open for
7132 the caller. Do not lock the temp file. Unwind-protect the file
7133 and the file-descriptor.
7134 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
7135 If an asynchrounous process, record it here, not in call_process.
7136 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
7137 * eval.c (set_unwind_protect): New function.
7138 * fileio.c (write_region): New function, generalized from the
7139 old Fwrite_region. Do not lock temp files.
7140 (Fwrite_region): Use it.
7141 * lisp.h (set_unwind_protect, write_region): New decls.
7142 * process.c: Include <verify.h>.
7143 (make_process): Mark fds as initially closed.
7144 (deleted_pid_list): Now a list of pid-filename pairs.
7145 All uses changed.
7146 (close_process_fd): New function.
7147 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
7148 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
7149 New constants. Verify that their number matches PROCESS_OPEN_FDS.
7150 (create_process, create_pty, Fmake_serial_process)
7151 (server_accept_connection): Record which fds need to be closed,
7152 and let deactivate_process close them.
7153 (Fmake_network_process): Do not discard the unwind-protect
7154 until it's safe to do so.
7155 (deactivate_process): Close the fds opened by create_process etc.
7156 (Fprocess_send_eof): Adjust to new way of recording open fds.
7157 Report an error if /dev/null can't be opened, instead of aborting.
7158 * process.h (PROCESS_OPEN_FDS): New constant.
7159 (struct Lisp_Process): New member open_fds.
7160 (record_kill_process, record_deleted_pid): Adjust signatures.
7161 (record_deleted_pid): Move decl here ...
7162 * syswait.h (record_deleted_pid): ... from here.
7163
d0e615c3
PE
71642013-08-11 Paul Eggert <eggert@cs.ucla.edu>
7165
7166 * decompress.c: Fix bugs with large buffers and weird inputs.
7167 Tune a bit. Reindent as per usual Emacs style.
7168 (BUFFER_SIZE): Remove.
7169 (Fdecompress_gzipped_region): Do not mishandle input buffers with
7170 more than UINT_MAX bytes. Decompress into the gap instead of into
7171 an auto buffer, as this should avoid copying. Return nil if
7172 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
7173 set immediate_quit; we shouldn't trust zlib code that much.
7174
313546eb
LMI
71752013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
7176
99a32242
LMI
7177 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
7178 errors, and really move the gap to where we want it.
7179
313546eb
LMI
7180 * lisp.h: Include decompress.c support.
7181
7182 * emacs.c (main): Include decompress.c support.
7183
7184 * Makefile.in: Include -lz if present.
7185
d2d699ac
JD
71862013-08-11 Jan Djärv <jan.h.d@swipnet.se>
7187
f90e3ebd
JD
7188 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
7189 (initWithTitle:): Initialize frame to 0.
7190 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
068f9124 7191 (fillWithWidgetValue:frame:): Rename from
f90e3ebd
JD
7192 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
7193
7194 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
7195 fillWithWidgetValue:frame:
7196
423d3b3f
JD
7197 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
7198 remove memory leak warnings.
7199
d2d699ac
JD
7200 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
7201 (ns_check_menu_open): Handle menu == nil. Remove assignment to
7202 menu_pending_title.
7203
7204 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
7205 (x_activate_menubar): Update the whole menu.
7206 (trackingNotification:): Call ns_check_menu_open if tracking ends.
7207 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
7208 current event is not NSSystemDefined (Bug#15001).
7209 Call ns_check_menu_open only if trackingMenu is 2.
7210 (menuDidClose:): New method, decrease trackingMenu.
7211 (fillWithWidgetValue:setDelegate:): New method.
7212 (fillWithWidgetValue:): Call the above.
7213
7214 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
7215
7d652d97
PE
72162013-08-11 Paul Eggert <eggert@cs.ucla.edu>
7217
7218 Omit some unnecessary casts.
7219 Many of these go back to the old pre-C89 days, when they may have
7220 been needed, but we've been assuming C89 or later for a while now.
7221 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
7222 (live_float_p, live_misc_p, live_vector_p):
7223 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
7224 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
7225 (defvar_per_buffer):
7226 * callint.c (Fcall_interactively):
7227 * doc.c (Fsubstitute_command_keys):
7228 * filelock.c (get_boot_time):
7229 * frame.c (xrdb_get_resource):
7230 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
7231 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
7232 (xg_get_file_name_from_selector, menuitem_destroy_callback)
7233 (menuitem_highlight_callback, menu_destroy_callback)
7234 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
7235 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
7236 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
7237 (xg_tool_bar_help_callback, tb_size_cb):
7238 * image.c (xpm_alloc_color, png_read_from_memory)
7239 (png_read_from_file, png_load_body, our_memory_skip_input_data)
7240 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
7241 (syms_of_image):
7242 * keymap.c (describe_map):
7243 * nsfns.m (Fns_display_monitor_attributes_list):
7244 * nsmenu.m (process_dialog:):
7245 * nsterm.m (hold_event):
7246 * process.c (wait_reading_process_output):
7247 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
7248 * scroll.c (do_direct_scrolling, scrolling_1):
7249 * termcap.c (tgetent):
7250 * window.c (check_window_containing, add_window_to_list)
7251 (freeze_window_starts):
7252 * xdisp.c (compare_overlay_entries, vmessage):
7253 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
7254 (x_get_monitor_attributes_xrandr)
7255 (Fx_display_monitor_attributes_list, x_display_info_for_name)
7256 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
7257 * xfont.c (xfont_match, xfont_open):
7258 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
7259 (menubar_selection_callback, menu_position_func)
7260 (popup_selection_callback, create_and_show_popup_menu)
7261 (dialog_selection_callback, create_and_show_dialog):
35e951cd 7262 * xrdb.c (x_get_string_resource)
7d652d97
PE
7263 (main) [TESTRM]:
7264 * xsmfns.c (x_session_check_input):
7265 * xterm.c (x_draw_glyphless_glyph_string_foreground)
7266 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
7267 (xaw_jump_callback, xaw_scroll_callback):
7268 Omit unnecessary casts.
7269
9acc1074
PE
72702013-08-10 Paul Eggert <eggert@cs.ucla.edu>
7271
7272 Minor string-length refactoring.
7273 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
7274 * frame.c (make_monitor_attribute_list):
7275 Prefer build_string to strlen + make_string.
7276
361c0eb8
JD
72772013-08-10 Jan Djärv <jan.h.d@swipnet.se>
7278
7279 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
7280 don't check minor_code (Bug#14417).
7281
14ba0822
EZ
72822013-08-09 Eli Zaretskii <eliz@gnu.org>
7283
7284 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
7285 vertical positions instead. This avoids calling MATRIX_ROW with
7286 row numbers that are possibly beyond valid limits. (Bug#15064)
7287
309f24d1
DA
72882013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
7289
7290 Use xstrdup and build_unibyte_string where applicable.
7291 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
7292 * xfns.c (x_window):
7293 * xrdb.c (x_get_customization_string):
7294 * xterm.c (xim_initialize):
7295 * w32fns.c (w32_window): Use xstrdup.
7296 (w32_display_monitor_attributes_list):
7297 * emacs.c (init_cmdargs):
7298 * keyboard.c (PUSH_C_STR):
7299 * nsfont.m (nsfont_open):
7300 * sysdep.c (system_process_attributes):
7301 * w32.c (system_process_attributes):
7302 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
7303
55902276
EZ
73042013-08-09 Eli Zaretskii <eliz@gnu.org>
7305
7306 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
7307 variables of these types so that GDB would know about them, as aid
7308 for debugging fatal exceptions. (Bug#15024) See also
7309 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
7310 discussions.
7311
10bf7f5a
JD
73122013-08-08 Jan Djärv <jan.h.d@swipnet.se>
7313
7314 * nsterm.m (ns_update_begin): Don't change clip path if it would be
7315 larger than the NSWindow (Bug#14934).
7316
65620264
DA
73172013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
7318
7319 Redesign redisplay interface to drop global variable updated_window.
7320 Always pass currently updated window as a parameter to update routines.
7321 * dispextern.h (updated_window): Remove declaration.
7322 (struct redisplay_interface): Pass window parameter to
7323 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
7324 and after_update_window_hook.
7325 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
7326 Adjust prototypes.
7327 * dispnew.c (updated_window): Remove.
7328 (redraw_overlapped_rows, update_marginal_area, update_text_area)
7329 (update_window_line): Adjust to match redisplay interface changes.
7330 * nsterm.m (ns_update_window_begin, ns_update_window_end)
7331 (ns_scroll_run, ns_after_update_window_line):
7332 * w32term.c (x_update_window_begin, x_update_window_end)
7333 (x_after_update_window_line, x_scroll_run):
7334 * xterm.c (x_update_window_begin, x_update_window_end)
7335 (x_after_update_window_line, x_scroll_run):
7336 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
7337 Likewise. Adjust comments where appropriate.
7338 (x_cursor_to): Simplify because this is always called during window
7339 update (but install debugging check anyway).
7340 (expose_window): Check must_be_updated_p flag to see whether this
7341 function is called during window update.
7342
628fdc56
DA
73432013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
7344
7345 Do not reset window modification event counters excessively.
7346 These leftovers and poor man's tricky methods to catch extra
7347 redisplay's attention are no longer needed.
7348 * frame.c (set_menu_bar_lines_1):
7349 * minibuf.c (read_minibuf_unwind):
7350 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
7351 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
7352 (window_scroll_line_based, Fset_window_configuration):
7353 * xdisp.c (redisplay_window): Do not reset last_modified and
7354 last_overlay_modified counters.
7355
8fd9c92e
JD
73562013-08-07 Jan Djärv <jan.h.d@swipnet.se>
7357
7358 * xselect.c (x_send_client_event): Set send_event and serial, memset
7359 data.l as it might be bigger than data.b. Use 24 bit mask to
7360 XSendEvent (Bug#15034).
7361
0ee18172
EZ
73622013-08-07 Eli Zaretskii <eliz@gnu.org>
7363
7364 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
7365 for TTY frames that are not the top frame on their console.
7366 (Bug#14616)
7367
16ddd1a6
MR
73682013-08-07 Martin Rudalics <rudalics@gmx.at>
7369
7370 * w32term.c (w32fullscreen_hook): Really maximize frame when
7371 asked for (Bug#14841).
7372
d2a95ffb
DA
73732013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
7374
7375 Prefer selected_window to Fselected_window, likewise for frames.
7376 * buffer.c (Fbuffer_swap_text):
7377 * data.c (Fvariable_binding_locus):
7378 * window.c (run_window_configuration_change_hook): Adjust users.
7379 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
7380 Use decode_live_frame.
7381
170da1ec
DA
73822013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
7383
7384 Be more careful if selected window shows the buffer other than current,
7385 use window_outdated only if this is not so. This change should also
7386 address some weird issues discussed in Bug#13012.
7387 * window.h (window_outdated): New prototype.
7388 * window.c (window_outdated): Now here. Convert from static and
7389 always assume window's buffer.
7390 (Fwindow_end, Fwindow_line_height): Use it.
7391 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
7392 and always assume window's buffer.
7393 (redisplay_window): Adjust user.
e5eefe9b 7394 (redisplay_internal): Call to reconsider_clip_changes once and
170da1ec
DA
7395 check whether mode line should be updated only if selected window
7396 shows current buffer.
7397 (run_window_scroll_functions): Use eassert for debugging check.
7398 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
7399
56b5d5b1
DA
74002013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7401
7402 * window.c (window_scroll, window_scroll_pixel_based)
7403 (window_scroll_line_based): Use bool for booleans.
7404
2878ba7e
PE
74052013-08-06 Paul Eggert <eggert@cs.ucla.edu>
7406
7407 * process.c: Fix minor off-by-one issues in descriptor counts.
7408 This shouldn't fix any real bugs, but it cleans up the code a bit.
7409 (max_process_desc, max_input_desc): -1, not 0, means none.
7410 All uses changed.
7411 (delete_input_desc): New function.
7412 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
7413 (deactivate_process): Scan backwards when recomuting max_process_desc;
7414 that should be faster.
7415 (init_process_emacs): Initialize max_input_desc.
7416
e30b79c1
DA
74172013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7418
7419 Use region cache to speedup bidi_find_paragraph_start.
7420 * buffer.h (struct buffer): New member bidi_paragraph_cache.
7421 Rename cache_long_line_scans to cache_long_scans.
7422 * buffer.c (bset_cache_long_line_scans): Rename to
7423 bset_cache_long_scans.
7424 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
7425 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
7426 into account.
7427 (syms_of_buffer): Rename cache-long-line-scans to
7428 cache-long-scans. Adjust docstring.
7429 * search.c (newline_cache_on_off):
7430 * indent.c (width_run_cache_on_off): Adjust users.
7431 * bidi.c (bidi_paragraph_cache_on_off): New function.
7432 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
068f9124
SM
7433 * insdel.c (prepare_to_modify_buffer):
7434 Invalidate bidi_paragraph_cache if enabled.
e30b79c1 7435
00012b86
DA
74362013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7437
7438 Invalidate region caches only if buffer text is going to be changed.
7439 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
7440 (modify_text): ...new prototype.
7441 (prepare_to_modify_buffer_1): New prototype.
7442 * textprop.c (modify_region): Rename to...
7443 (modify_text_properties): ...new function.
7444 (add_text_properties_1, set_text_properties, Fremove_text_properties)
7445 (Fremove_list_of_text_properties): Adjust users.
7446 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
7447 (modify_text): ...new function.
7448 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
7449 (prepare_to_modify_buffer_1): ...new function.
7450 * casefiddle.c (casify_region):
7451 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
7452 (Ftranspose_regions): Use modify_text.
7453
dc6c0eda
SM
74542013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
7455
7456 * lisp.mk (lisp): Add nadvice.elc.
7457
8f3a2c26
DA
74582013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
7459
7460 New macro to iterate over live buffers similar to frames.
7461 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
7462 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
7463 Declare buffer-related variables here to offload lisp.h.
7464 * buffer.c (Vbuffer_alist): Adjust comment.
7465 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
7466 (other_buffer_safely):
7467 * data.c (store_symval_forwarding):
7468 * dispnew.c (Fframe_or_buffer_changed_p):
7469 * fileio.c (Fdo_auto_save):
7470 * filelock.c (unlock_all_files):
7471 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
7472
e0fdb694
PE
74732013-08-04 Paul Eggert <eggert@cs.ucla.edu>
7474
7475 Fix some minor races in hosts lacking mkostemp (Bug#15015).
7476 * callproc.c (create_temp_file):
7477 * filelock.c (create_lock_file):
7478 Assume mkostemp, since it's now provided by Gnulib.
7479
63f5c6c2
EZ
74802013-08-04 Eli Zaretskii <eliz@gnu.org>
7481
7482 * w32.c (mkostemp): New function.
7483 (mktemp): Remove, no longer used. Most of the code reused in
7484 mkostemp. (Bug#15015)
484ab239 7485 (mktemp): Don't undef.
63f5c6c2 7486
f0b79313
DA
74872013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
7488
7489 * dispnew.c (glyph_matrix_count, glyph_pool_count):
7490 Move under GLYPH_DEBUG and ENABLE_CHECKING.
7491 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
7492 (free_glyph_pool, check_glyph_memory): Likewise for
7493 all users. Adjust comments where appropriate.
7494
98f638d6
PE
74952013-08-03 Paul Eggert <eggert@cs.ucla.edu>
7496
7497 * composite.h: Minor fixups.
7498 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
7499 to fix a misspelling, and change it to an inline function while
7500 we're at it (it need not be a macro). All uses changed.
7501 (composition_method, composition_valid_p):
7502 Rewrite to avoid assignments in if-conditions.
7503
75c59fb3
DA
75042013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
7505
7506 Do not use global Lisp_Object in composition macros.
7507 * composite.h (composition_temp): Remove declaration.
7508 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
7509 (composition_method, composition_valid_p): ...inline functions.
416a3e01 7510 (compose_region): Remove the leftover.
75c59fb3
DA
7511 * composite.c (composition_temp): Remove.
7512 (run_composition_function, update_compositions)
7513 (composition_compute_stop_pos, composition_adjust_point)
7514 (Ffind_composition_internal):
7515 * coding.c (handle_composition_annotation):
7516 * xdisp.c (handle_composition_prop, check_point_in_composition):
7517 Related users changed.
7518
a10c8269
DA
75192013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
7520
7521 Drop FRAME_PTR typedef.
7522 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
7523 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
7524 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
7525 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
7526 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
7527 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
7528 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
7529 All related users changed.
7530
a104f656
SM
75312013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
7532
7533 * eval.c (default_toplevel_binding): New function.
7534 (Fdefvar): Use it.
7535 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
7536 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
7537 (syms_of_eval): Export them.
7538 * data.c (Fdefault_value): Micro cleanup.
7539 * term.c (init_tty): Use "false".
7540
4b5c9326
DA
75412013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
7542
7543 Fix X GC leak in GTK and raw (no toolkit) X ports.
7544 * xterm.c (x_free_frame_resources): If white and black relief
7545 GCs are allocated, always free them here.
7546 * xfns.c (x_make_gc): Omit redundant initialization.
7547 * widget.c (create_frame_gcs): Remove the leftover.
7548 (EmacsFrameDestroy): Do nothing because all GCs are now freed
7549 in x_free_frame_resources.
7550
b19aa636
JD
75512013-08-02 Jan Djärv <jan.h.d@swipnet.se>
7552
7553 * nsterm.m (windowWillResize:toSize:): Only change title if
7554 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
7555 modifying it.
7556 (viewDidEndLiveResize): New method.
7557
7558 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
7559 inside NS_IMPL_COCOA.
7560
af1f7e06
DA
75612013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
7562
7563 * insdel.c (adjust_after_replace, replace_range, del_range_2):
7564 Do not check whether undo is enabled because record_insert and
7565 record_delete does that themselves.
7566
65b02bb9
DA
75672013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
7568
7569 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
7570 member which is not really used any more.
7571 (FRAME_XIC_BASE_FONTNAME): Remove.
7572 * xfns.c (xic_free_fontset): Adjust user.
7573 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
7574 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
7575 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
7576 (xdialog_show): Use eassert for debugging check.
7ee0f047 7577 * w32term.c (x_unfocus_frame): Remove unused dummy function.
65b02bb9 7578
6318cde0
PE
75792013-08-01 Paul Eggert <eggert@cs.ucla.edu>
7580
7581 * fileio.c, fns.c (merge): Move extern decl from here ...
7582 * lisp.h (merge): ... to here.
7583
6c1a09ba
DA
75842013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
7585
7586 Fix last font-related change.
7587 * w32font.h (w32font_list_internal, w32font_match_internal):
7588 Fix prototype.
35e951cd 7589 * w32uniscribe.c (uniscribe_list, uniscribe_match)
6c1a09ba
DA
7590 (uniscribe_list_family): Adjust to match font API change.
7591 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
7592 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
7593
f8c20208
DA
75942013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
7595
7596 * frame.h (FRAME_MOUSE_UPDATE):
7597 * nsterm.m (ns_frame_up_to_date): Omit redundant check
7598 whether hlinfo->mouse_face_mouse_frame is non-NULL.
7599
fdb396e2
DA
76002013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
7601
7602 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
7603 * font.h (struct font_driver): Change list, match, and list_family
7604 functions to accept struct frame * as first arg.
068f9124
SM
7605 * font.c (font_score, font_compare, font_sort_entities):
7606 Remove prototypes.
35e951cd 7607 (font_sort_entities, font_list_entities, font_select_entity)
fdb396e2
DA
7608 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
7609 match font API change.
7610 * xfont.c (xfont_list, xfont_match, xfont_list_family):
7611 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
7612 * ftxfont.c (ftxfont_list, ftxfont_match):
7613 * xftfont.c (xftfont_list, xftfont_match):
7614 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
35e951cd 7615 * w32font.c (w32font_list, w32font_match, w32font_list)
fdb396e2
DA
7616 (w32font_list_internal, w32_font_match_internal): Likewise.
7617 * xfaces.c (Fx_family_fonts): Adjust user.
7618
52b8a085
DA
76192013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
7620
7621 Do not use pure Xism x_wm_set_icon_position in non-X ports.
7622 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
7623 only if HAVE_X_WINDOWS is in use.
7624 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
7625 * nsterm.m (x_wm_set_icon_position): Remove no-op.
7626 * w32term.c (x_wm_set_icon_position): Likewise.
7627 * w32fns.c (x_icon): Adjust user.
7628
c791c18e
DA
76292013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
7630
7631 * xterm.c (last_mouse_press_frame): Remove the
7632 leftover which is not really used any more.
7633 (handle_one_xevent, syms_of_xterm): Adjust users.
1ca6cc28
DA
7634 (x_flush): Call XFlush once per each X display, not frame.
7635 This is better because this code always unconditionally skips
e9dc713d 7636 non-X frames in Vframe_list and issues the only XFlush if we
1ca6cc28 7637 have more than one X frame on the same X display.
2f935d86
DA
7638 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
7639 Use bool for booleans.
35e951cd 7640 (x_draw_glyph_string_background, cvt_string_to_pixel)
2f935d86
DA
7641 (cvt_pixel_dtor): Drop unnecessary prototypes.
7642 * xterm.h (x_display_ok): Adjust prototype.
c791c18e 7643
f435830e
DA
76442013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
7645
7646 Drop unnecessary functions that deals with frame pixel size.
7647 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
7648 (x_pixel_height): Drop prototypes.
7649 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
7650 (x_pixel_height): Drop implementations.
7651 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
7652 which should be always valid for window frame.
7653 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
7654 * w32menu.c (Fx_popup_dialog):
7655 * xmenu.c (Fx_popup_dialog): Likewise for both.
7656
84231434
DA
76572013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
7658
7659 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
7660 frame parameters and call to Fmodify_frame_parameters just once.
4c131798
DA
7661 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
7662 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
7663 and mention nil frame in docstring.
84231434 7664
959067a1
DA
76652013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
7666
7667 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
7668 (x_figure_window_size): Likewise. Adjust to return long.
7669 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
7670 (toplevel): Move Qterminal_live_p to...
7671 * terminal.c (toplevel): ...here, make it static, and...
7672 (syms_of_terminal): ...DEFSYM here.
7673 * frame.h (Qterminal_live_p): Remove declaration.
7674 (make_frame, x_figure_window_size): Adjust prototype.
7675 * nsfns.m (Fx_create_frame): Use long for window flags.
7676
f4b169ce
PE
76772013-07-30 Paul Eggert <eggert@cs.ucla.edu>
7678
7679 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
7680 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
7681 Do not assume that emacs_close (INT_MAX) is a no-op.
7682
bee6a2c7
DA
76832013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7684
7685 * xfaces.c (make_face_cache): For struct face_cache, prefer
7686 xmalloc to xzalloc and so avoid redundant call to memset.
7687 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
7688
d7e6881a
DA
76892013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7690
7691 * fringe.c (draw_window_fringes, update_window_fringes)
7692 (compute_fringe_widths):
7693 * w32term.c (x_draw_glyph_string):
7694 * window.c (candidate_window_p, Frecenter):
7695 * xfaces.c (realize_basic_faces, realize_default_face)
7696 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
7697 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
7698 * xfns.c (x_set_cursor_color, xic_free_xfontset):
7699 * xmenu.c (Fx_menu_bar_open_internal):
7700 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
7701 * xsettings.c (xft_settings_event):
7702 * xterm.c (x_draw_glyph_string, x_had_errors_p):
7703 Use bool for booleans. Adjust style and comments where
7704 appropriate.
7705 * dispextern.h (draw_window_fringes, update_window_fringes)
7706 (compute_fringe_widths):
7707 * xterm.h (x_had_errors_p): Adjust prototype.
7708
ec3058af
DA
77092013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
7710
7711 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
7712 CHECK_LIST. Rewrite the loop to avoid useless local variable.
7713
218e0637
DA
77142013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
7715
7716 * fns.c (toplevel): Remove comment before Fsafe_length because
7717 it checks for QUIT.
7718
e560aba9
PE
77192013-07-28 Paul Eggert <eggert@cs.ucla.edu>
7720
7721 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
7722
2e5ce5de
EZ
77232013-07-28 Eli Zaretskii <eliz@gnu.org>
7724
7725 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
7726 frame which got the message is still alive, before dereferencing
7727 its pointer. (Bug#14970)
7728
7729 * frame.c (delete_frame): Test "this" frame's minibuffer window to
7730 be a live window, before using it as such. (Bug#14970)
7731
e95da6d3
EZ
77322013-07-27 Eli Zaretskii <eliz@gnu.org>
7733
7734 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
7735 w32_detect_focus_change instead of doing part of its job by hand.
7736 This fixes the problem whereby FOCUS_OUT events were not sent to
7737 the event queue.
7738
a8f93651
EZ
77392013-07-26 Eli Zaretskii <eliz@gnu.org>
7740
fec92060
EZ
7741 * process.c (Fprocess_list): Doc fix.
7742
a8f93651
EZ
7743 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
7744 being re-exposed only if it didn't ask to become visible.
7745 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
7746 was previously iconified. (Bug#14841)
7747 (x_iconify_frame): Mark the frame iconified.
7748
d5a7a9d9
PE
77492013-07-26 Paul Eggert <eggert@cs.ucla.edu>
7750
7751 Fix minor problems found by static checking.
7752 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
7753 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
7754
56ea7291
SM
77552013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
7756
7757 * eval.c (set_specpdl_old_value): New function.
7758 (unbind_to): Minor simplification.
7759 (get_backtrace_frame): New function.
7760 (Fbacktrace_frame): Use it. Add `base' argument.
7761 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
7762 (syms_of_eval): Export backtrace-eval.
7763 * xterm.c (x_focus_changed): Simplify.
7764
9d611ffe
PE
77652013-07-25 Paul Eggert <eggert@cs.ucla.edu>
7766
7767 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
7768
999c74e3
EZ
77692013-07-24 Eli Zaretskii <eliz@gnu.org>
7770
7771 * xdisp.c (redisplay_window): Instead of moving point out of
7772 scroll margin, reject the force_start method, and try scrolling
7773 instead. (Bug#14780)
7774
198fa217
KB
77752013-07-24 Ken Brown <kbrown@cornell.edu>
7776
7777 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
7778 (Bug#14944).
7779
53840e55
PE
77802013-07-24 Paul Eggert <eggert@cs.ucla.edu>
7781
7782 * eval.c (Fprogn): Do not check that BODY is a proper list.
7783 This undoes the previous change. The check slows down the
7784 interpreter, and is not needed to prevent a crash. See
7785 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
7786
60967f56
GM
77872013-07-23 Glenn Morris <rgm@gnu.org>
7788
7789 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
7790
9ca960e2
PE
77912013-07-23 Paul Eggert <eggert@cs.ucla.edu>
7792
a29c3e6d
PE
7793 Port to GNU/Linux systems with tinfo but not ncurses.
7794 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
7795 to decide whether ncurses is being used. Without this change,
7796 GCC complains about tgetent not being declared, on a system
7797 that has tinfo installed but ncurses not installed.
7798
f274311c
PE
7799 * eval.c (Fprogn): Check that BODY is a proper list.
7800
16b0520a
PE
7801 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
7802 * data.c (Fsetq_default):
7803 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
7804 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
7805 (Fcondition_case):
7806 Tune by taking advantage of the fact that ARGS is always a list
7807 when a function is declared to have UNEVALLED args.
7808
9ca960e2
PE
7809 * emacsgtkfixed.c: Port to GCC 4.6.
7810 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
7811
afacaa1b
JB
78122013-07-23 Juanma Barranquero <lekktu@gmail.com>
7813
7814 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
7815 here to silence compiler warnings.
7816
368a85a4
PE
78172013-07-22 Paul Eggert <eggert@cs.ucla.edu>
7818
7819 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
7820 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
7821 from messing up Emacs's 'struct frame' (Bug#14923).
7822
f4e891b5
PE
78232013-07-21 Paul Eggert <eggert@cs.ucla.edu>
7824
7825 * alloc.c (make_save_ptr_ptr): Define this function.
7826 It was inadvertently omitted. It's needed only if
7827 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
7828
96c8b65e
JD
78292013-07-21 Jan Djärv <jan.h.d@swipnet.se>
7830
7831 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
7832 frame have focus (Bug#14895).
7833
ee010797
PE
78342013-07-21 Paul Eggert <eggert@cs.ucla.edu>
7835
7836 Avoid vfork-related deadlock more cleanly.
7837 * callproc.c (child_setup): When the child's exec fails, output
7838 the program name, as that's more useful. Use O_NONBLOCK to avoid
7839 deadlock.
7840 * process.c (create_process_1): Remove; no longer needed.
7841 (create_process): Remove timer hack; no longer needed, now that
7842 the child avoids deadlock.
7843
f0398ec1 78442013-07-20 Glenn Morris <rgm@gnu.org>
8bfcc21a
GM
7845
7846 * image.c (Fimage_flush): Fix doc typo.
7847
b2a069c2
PE
78482013-07-20 Paul Eggert <eggert@cs.ucla.edu>
7849
6496aec9
PE
7850 Fix array bounds violation when pty allocation fails.
7851 * process.c (PTY_NAME_SIZE): New constant.
7852 (pty_name): Remove static variable; it's now auto.
7853 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
7854 Take pty_name as an arg rather than using a static variable.
7855 All callers changed.
7856 (create_process): Recover pty_flag from process, not from volatile local.
7857 (create_pty): Stay inside array even when pty allocation fails.
7858 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
7859
b2a069c2
PE
7860 * lread.c (Fload): Avoid initialization only when lint checking.
7861 Mention that it's needed only for older GCCs.
7862
99107004
KH
78632013-07-20 Kenichi Handa <handa@gnu.org>
7864
7865 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
7866 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
7867
6b1b199d
AS
78682013-07-20 Andreas Schwab <schwab@linux-m68k.org>
7869
7870 * lread.c (Fload): Avoid uninitialized warning.
7871
4195afc3
PE
78722013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7873
3f5bef16
PE
7874 Fix some minor file descriptor leaks and related glitches.
7875 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
7876 (create_lock_file): Use write, not emacs_write.
7877 * image.c (slurp_file, png_load_body):
7878 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
7879 (server_accept_connection):
7880 Don't leak an fd on memory allocation failure.
7881 * image.c (slurp_file): Add a cheap heuristic for growing files.
7882 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
7883 as that's what the other routines do. Maybe input need not be
7884 blocked at all, but it's better to be consistent.
7885 Avoid undefined behavior when strlen is zero.
7886
4195afc3
PE
7887 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
7888 (NSTATICS): Now a constant; doesn't need to be a macro.
7889
a1aeeffe
RS
78902013-07-19 Richard Stallman <rms@gnu.org>
7891
7892 * coding.c (decode_coding_utf_8): Add simple loop for fast
7893 processing of ASCII characters.
7894
63b34baa
PE
78952013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7896
7897 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
7898
621dd9ac
EZ
78992013-07-19 Eli Zaretskii <eliz@gnu.org>
7900
7901 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
7902 unportable 'struct x_display_info'.
7903 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
7904 is a portable type.
7905
1396ac86
PE
79062013-07-19 Paul Eggert <eggert@cs.ucla.edu>
7907
ab9980cd
PE
7908 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
7909 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
7910 or fscanf fails.
7911 (system_process_attributes): Prefer plain char to unsigned char
7912 when either will do. Clean up properly if interrupted or if
068f9124
SM
7913 memory allocations fail. Don't assume sscanf succeeds.
7914 Remove no-longer-needed workaround to stop GCC from whining.
7915 Read command-line once, instead of multiple times. Check read status a
ab9980cd
PE
7916 bit more carefully.
7917
1396ac86
PE
7918 Fix obscure porting bug with varargs functions.
7919 The code assumed that int is treated like ptrdiff_t in a vararg
7920 function, which is not a portable assumption. There was a similar
7921 -- though these days less likely -- porting problem with various
7922 assumptions that pointers of different types all smell the same as
7923 far as vararg functions is conserved. To make this problem less
7924 likely in the future, redo the API to use varargs functions.
7925 * alloc.c (make_save_value): Remove this vararg function.
7926 All uses changed to ...
7927 (make_save_int_int_int, make_save_obj_obj_obj_obj)
7928 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
7929 New functions.
7930 (make_save_ptr): Rename from make_save_pointer, for consistency with
7931 the above. Define only on platforms that need it. All uses changed.
7932
4d19d194
PE
79332013-07-18 Paul Eggert <eggert@cs.ucla.edu>
7934
7935 * keyboard.c: Try to fix typos in previous change.
7936 (DISPLAY_LIST_INFO): New macro.
7937 (kbd_buffer_get_event): Do not access members that are not present
c7064f05 7938 in X11. Revert inadvertent change of "!=" to "=".
4d19d194 7939
945c5bb1
JB
79402013-07-18 Juanma Barranquero <lekktu@gmail.com>
7941
7942 * keyboard.c (kbd_buffer_get_event):
7943 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
7944 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
7945
f4b1eb36
PE
79462013-07-18 Paul Eggert <eggert@cs.ucla.edu>
7947
5e679a2c
PE
7948 * filelock.c: Fix unlikely file descriptor leaks.
7949 (get_boot_time_1): Rework to avoid using emacs_open.
7950 This doesn't actually fix a leak, but is better anyway.
7951 (read_lock_data): Use read, not emacs_read.
7952
a8cd4836
PE
7953 * doc.c: Fix minor memory and file descriptor leaks.
7954 * doc.c (get_doc_string): Fix memory leak when doc file absent.
7955 (get_doc_string, Fsnarf_documentation):
7956 Fix file descriptor leak on error.
7957
ef30e638
PE
7958 * term.c: Fix minor fdopen-related file descriptor leaks.
7959 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
7960 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
7961
f4b1eb36
PE
7962 * charset.c: Fix file descriptor leaks and errno issues.
7963 Include <errno.h>.
7964 (load_charset_map_from_file): Don't leak file descriptor on error.
7965 Use plain record_xmalloc since the allocation is larger than
7966 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
7967 of entries.
7968 * eval.c (record_unwind_protect_nothing):
7969 * fileio.c (fclose_unwind):
7970 New functions.
7971 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
7972 The replacement doesn't block input, but that no longer seems
7973 necessary.
7974
b648c163
PE
79752013-07-17 Paul Eggert <eggert@cs.ucla.edu>
7976
a0931322
PE
7977 * lread.c: Fix file descriptor leaks and errno issues.
7978 (Fload): Close some races that leaked fds or streams when 'load'
7979 was interrupted.
7980 (Fload, openp): Report error number of last nontrivial failure to open.
7981 ENOENT counts as trivial.
7982 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
7983 New functions.
7984 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
7985 now that the function is always called with a nonnegative arg.
7986 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
7987 All uses replaced with ...
7988 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
7989
b648c163
PE
7990 A few more minor file errno-reporting bugs.
7991 * callproc.c (Fcall_process):
7992 * doc.c (Fsnarf_documentation):
7993 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
7994 * process.c (set_socket_option):
7995 Don't let a constructor trash errno.
7996 * doc.c: Include <errno.h>.
7997
b1dc4084
JB
79982013-07-16 Juanma Barranquero <lekktu@gmail.com>
7999
8000 * w32fns.c (unwind_create_tip_frame): Fix declaration.
8001
c43843aa
PE
80022013-07-16 Paul Eggert <eggert@cs.ucla.edu>
8003
50a30cce
PE
8004 Fix w32 bug with call-process-region (Bug#14885).
8005 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
8006 to Fcall_process when the input is empty. This simplifies the
8007 code a bit. It makes no difference on POSIXish platforms but
8008 apparently it fixes a bug on w32.
8009
44e18199 8010 Fix bug where insert-file-contents closes a file twice (Bug#14839).
41d48a42
PE
8011 * fileio.c (close_file_unwind): Don't close if FD is negative;
8012 this can happen when unwinding a zapped file descriptor.
8013 (Finsert_file_contents): Unwind-protect the fd before the point marker,
8014 in case Emacs runs out of memory between the two unwind-protects.
8015 Don't trash errno when closing FD.
8016 Zap the FD in the specpdl when closing it, instead of deferring
8017 the removal of the unwind-protect; this fixes a bug where a child
8018 function unwinds the stack past us.
8019
27e498e6
PE
8020 New unwind-protect flavors to better type-check C callbacks.
8021 This also lessens the need to write wrappers for callbacks,
8022 and the need for make_save_pointer.
a12bf61e 8023 * alloc.c (free_save_value):
27e498e6
PE
8024 * atimer.c (run_all_atimers):
8025 Now extern.
8026 * alloc.c (safe_alloca_unwind):
8027 * atimer.c (unwind_stop_other_atimers):
8028 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
8029 * menu.c (cleanup_popup_menu) [HAVE_NS]:
8030 * minibuf.c (choose_minibuf_frame_1):
8031 * process.c (make_serial_process_unwind):
a12bf61e 8032 * xdisp.c (pop_message_unwind):
27e498e6
PE
8033 * xselect.c (queue_selection_requests_unwind):
8034 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
a12bf61e 8035 * alloc.c (record_xmalloc):
27e498e6
PE
8036 Prefer record_unwind_protect_ptr to record_unwind_protect with
8037 make_save_pointer.
a12bf61e 8038 * alloc.c (Fgarbage_collect):
27e498e6
PE
8039 Prefer record_unwind_protect_void to passing a dummy.
8040 * buffer.c (restore_buffer):
8041 * window.c (restore_window_configuration):
8042 * xfns.c, w32fns.c (do_unwind_create_frame)
8043 New wrapper. All record-unwind uses of wrappee changed.
8044 * buffer.c (set_buffer_if_live):
8045 * callproc.c (call_process_cleanup, delete_temp_file):
8046 * coding.c (code_conversion_restore):
8047 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
8048 * editfns.c (save_excursion_restore)
8049 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
8050 (save_restriction_restore):
8051 * eval.c (restore_stack_limits, un_autoload):
8052 * fns.c (require_unwind):
8053 * keyboard.c (recursive_edit_unwind, tracking_off):
8054 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
8055 * macros.c (pop_kbd_macro, restore_menu_items):
8056 * nsfns.m (unwind_create_frame):
8057 * print.c (print_unwind):
8058 * process.c (start_process_unwind):
8059 * search.c (unwind_set_match_data):
8060 * window.c (select_window_norecord, select_frame_norecord):
8061 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
8062 (fast_set_selected_frame):
8063 * xfns.c, w32fns.c (unwind_create_tip_frame):
8064 Return void, not a dummy Lisp_Object. All uses changed.
8065 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
8066 * callproc.c (call_process_kill):
8067 * fileio.c (restore_point_unwind, decide_coding_unwind)
8068 (build_annotations_unwind):
8069 * insdel.c (Fcombine_after_change_execute_1):
8070 * keyboard.c (read_char_help_form_unwind):
8071 * menu.c (unuse_menu_items):
8072 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
8073 * sound.c (sound_cleanup):
8074 * xdisp.c (unwind_redisplay):
8075 * xfns.c (clean_up_dialog):
8076 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
8077 Accept no args and return void, instead of accepting and returning
8078 a dummy Lisp_Object. All uses changed.
8079 * cygw32.c (fchdir_unwind):
8080 * fileio.c (close_file_unwind):
8081 * keyboard.c (restore_kboard_configuration):
8082 * lread.c (readevalllop_1):
8083 * process.c (wait_reading_process_output_unwind):
8084 Accept int and return void, rather than accepting an Emacs integer
8085 and returning a dummy object. In some cases this fixes an
8086 unlikely bug when the corresponding int is outside Emacs integer
8087 range. All uses changed.
8088 * dired.c (directory_files_internal_unwind):
8089 * fileio.c (do_auto_save_unwind):
8090 * gtkutil.c (pop_down_dialog):
8091 * insdel.c (reset_var_on_error):
8092 * lread.c (load_unwind):
8093 * xfns.c (clean_up_file_dialog):
8094 * xmenu.c, nsmenu.m (pop_down_menu):
8095 * xmenu.c (cleanup_widget_value_tree):
8096 * xselect.c (wait_for_property_change_unwind):
8097 Accept pointer and return void, rather than accepting an Emacs
8098 save value encapsulating the pointer and returning a dummy object.
8099 All uses changed.
8100 * editfns.c (Fformat): Update the saved pointer directly via
8101 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
8102 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
8103 (unwind_body): New function.
8104 (record_unwind_protect): First arg is now a function returning void,
8105 not a dummy Lisp_Object.
8106 (record_unwind_protect_ptr, record_unwind_protect_int)
8107 (record_unwind_protect_void): New functions.
8108 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
8109 * fileio.c (struct auto_save_unwind): New type.
8110 (do_auto_save_unwind): Use it.
8111 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
8112 * insdel.c (struct rvoe_arg): New type.
8113 (reset_var_on_error): Use it.
8114 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
8115 New constants.
8116 (specbinding_func): Remove; there are now several such functions.
8117 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
8118 (set_unwind_protect_ptr): New function.
8119 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
8120
4e604a5d
PE
8121 Be simpler and more consistent about reporting I/O errors.
8122 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
8123 Say "Read error" and "Write error", rather than "I/O error", or
8124 "IO error reading", or "IO error writing", when a read or write
8125 error occurs.
8126 * process.c (Fmake_network_process, wait_reading_process_output)
8127 (send_process, Fprocess_send_eof, wait_reading_process_output):
8128 Capitalize diagnostics consistently. Put "failed foo" at the
8129 start of the diagnostic, so that we don't capitalize the
8130 function name "foo". Consistently say "failed" for such
8131 diagnostics.
8132 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
8133 All callers changed. This is so it can use report_file_error.
8134 * sysdep.c (serial_open, serial_configure): Capitalize I/O
8135 diagnostics consistently as above.
8136
a9757f6a
PE
8137 * fileio.c (report_file_errno): Fix errno reporting bug.
8138 If the file name is neither null nor a pair, package it up as a
8139 singleton list. All callers changed, both to this function and to
8140 report_file_error. This fixes a bug where the memory allocator
8141 invoked by list1 set errno so that the immediately following
8142 report_file_error reported the wrong errno value.
8143
c43843aa
PE
8144 Fix minor problems found by --enable-gcc-warnings.
8145 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
8146 * keyboard.c (kbd_buffer_get_event): Remove unused local.
8147
18c26d81
JD
81482013-07-16 Jan Djärv <jan.h.d@swipnet.se>
8149
8150 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
8151 Set event->arg to Qt if switch-event shall be generated.
8152 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
8153
8154 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
8155
8156 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
8157 FOCUS_OUT_EVENT.
8158
8159 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
8160 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
8161 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
8162 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
44e18199 8163 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
18c26d81
JD
8164 and there is a focused frame.
8165 (head_table): Add focus-in and focus-out.
8166 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
8167 bind to handle-focus-in/out.
8168
8169 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
8170 (Fhandle_switch_frame): Call Fhandle_focus_in.
8171 (syms_of_frame): defsubr handle-focus-in/out.
8172
6c6f1994
PE
81732013-07-16 Paul Eggert <eggert@cs.ucla.edu>
8174
c7ddc792
PE
8175 Fix porting bug to older POSIXish platforms (Bug#14862).
8176 * sysdep.c (emacs_pipe): New function, that implements
8177 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
8178 This should port better to CentOS 5 and to Mac OS X 10.6.
8179 All calls to pipe2 changed.
8180
6c6f1994
PE
8181 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
8182 This makes the code easier to read and the executable a bit smaller.
8183 Do not replace all calls to Fcons that happen to create lists,
8184 just calls that are intended to create lists. For example, when
8185 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
8186 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
8187 Similarly for list2 through list5.
8188 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
8189 * bytecode.c (exec_byte_code):
8190 * callint.c (quotify_arg, Fcall_interactively):
8191 * callproc.c (Fcall_process, create_temp_file):
8192 * charset.c (load_charset_map_from_file)
8193 (Fdefine_charset_internal, init_charset):
8194 * coding.c (get_translation_table, detect_coding_system)
8195 (Fcheck_coding_systems_region)
8196 (Fset_terminal_coding_system_internal)
8197 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
8198 * composite.c (update_compositions, Ffind_composition_internal):
8199 * dired.c (directory_files_internal, file_name_completion)
8200 (Fsystem_users):
8201 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
8202 * doc.c (Fsnarf_documentation):
8203 * editfns.c (Fmessage_box):
8204 * emacs.c (main):
8205 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
8206 (Feval, eval_sub, Ffuncall, apply_lambda):
8207 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
8208 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
8209 (Fset_file_times, Finsert_file_contents)
8210 (Fchoose_write_coding_system, Fwrite_region):
8211 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
8212 * font.c (font_registry_charsets, font_parse_fcname)
8213 (font_prepare_cache, font_update_drivers, Flist_fonts):
8214 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
8215 * frame.c (make_frame, Fmake_terminal_frame)
8216 (x_set_frame_parameters, x_report_frame_params)
8217 (x_default_parameter, Fx_parse_geometry):
8218 * ftfont.c (syms_of_ftfont):
8219 * image.c (gif_load):
8220 * keyboard.c (command_loop_1):
8221 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
8222 (Fcopy_keymap, append_key, Fcurrent_active_maps)
8223 (Fminor_mode_key_binding, accessible_keymaps_1)
8224 (Faccessible_keymaps, Fwhere_is_internal):
8225 * lread.c (read_emacs_mule_char):
8226 * menu.c (find_and_return_menu_selection):
8227 * minibuf.c (get_minibuffer):
8228 * nsfns.m (Fns_perform_service):
8229 * nsfont.m (ns_script_to_charset):
8230 * nsmenu.m (ns_popup_dialog):
8231 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
8232 (Fx_own_selection_internal):
8233 * nsterm.m (append2):
8234 * print.c (Fredirect_debugging_output)
8235 (print_prune_string_charset):
8236 * process.c (Fdelete_process, Fprocess_contact)
8237 (Fformat_network_address, set_socket_option)
8238 (read_and_dispose_of_process_output, write_queue_push)
8239 (send_process, exec_sentinel):
8240 * sound.c (Fplay_sound_internal):
8241 * textprop.c (validate_plist, add_properties)
8242 (Fput_text_property, Fadd_face_text_property)
8243 (copy_text_properties, text_property_list, syms_of_textprop):
8244 * unexaix.c (report_error):
8245 * unexcoff.c (report_error):
8246 * unexsol.c (unexec):
8247 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
8248 (Fformat_mode_line, syms_of_xdisp):
8249 * xfaces.c (set_font_frame_param)
8250 (Finternal_lisp_face_attribute_values)
8251 (Finternal_merge_in_global_face, syms_of_xfaces):
8252 * xfns.c (x_default_scroll_bar_color_parameter)
8253 (x_default_font_parameter, x_create_tip_frame):
8254 * xfont.c (xfont_supported_scripts):
8255 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
8256 (menu_help_callback, xmenu_show):
8257 * xml.c (make_dom):
8258 * xterm.c (set_wm_state):
8259 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
8260 and similarly for list2 through list5.
8261
bafe80ce
PE
82622013-07-15 Paul Eggert <eggert@cs.ucla.edu>
8263
8264 * callproc.c (Fcall_process_region): Fix minor race and tune.
8265 (create_temp_file): New function, with the temp-file-creation part
8266 of the old Fcall_process_region. Use Fcopy_sequence to create the
8267 temp file name, rather than alloca + build_string, for simplicity.
8268 Don't bother to block input around the temp file creation;
068f9124
SM
8269 shouldn't be needed. Simplify use of mktemp.
8270 Use record_unwind_protect immediately after creating the temp file;
bafe80ce
PE
8271 this closes an unlikely race where the temp file was not removed.
8272 Use memcpy rather than an open-coded loop.
8273 (Fcall_process_region): Use the new function. If the input is
8274 empty, redirect from /dev/null rather than from a newly created
8275 empty temp file; this avoids unnecessary file system traffic.
8276
4700b5a5
PE
82772013-07-14 Paul Eggert <eggert@cs.ucla.edu>
8278
5c97beae
PE
8279 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
8280 Simplify by making this case like the other two. This is a bit
8281 slower on obsolete hosts, but the extra complexity isn't worth it.
8282
4700b5a5
PE
8283 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
8284 * process.c (create_process) [!DOS_NT]:
8285 Remove now-unnecessary calls to emacs_close.
8286
f9a74c4c
EZ
82872013-07-13 Eli Zaretskii <eliz@gnu.org>
8288
922ae7ee
EZ
8289 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
8290 returning early. (Bug#14850)
8291
f9a74c4c
EZ
8292 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
8293 and inhibit-iso-escape-detection attributes of 'undecided'.
8294 (Bug#14822)
8295
5e301d76
PE
82962013-07-13 Paul Eggert <eggert@cs.ucla.edu>
8297
69e0e5ee
PE
8298 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
8299 Reported by Herbert J. Skuhra in
8300 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
8301
5e301d76
PE
8302 Don't lose top specpdl entry when memory is exhausted.
8303 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
8304 specpdl overflow here, to simplify callers; all callers changed.
8305 Always reserve an unused entry at the stack top; this avoids
8306 losing the top entry's information when memory is exhausted.
8307
7e649856
PE
83082013-07-12 Paul Eggert <eggert@cs.ucla.edu>
8309
a773ed9a
PE
8310 Clean up errno reporting and fix some errno-reporting bugs.
8311 * callproc.c (Fcall_process):
8312 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
8313 * process.c (create_process, Fmake_network_process):
8314 * unexaix.c (report_error):
8315 * unexcoff.c (report_error):
8316 Be more careful about reporting the errno of failed operations.
8317 The code previously reported the wrong errno sometimes.
8318 Also, prefer report_file_errno to setting errno + report_file_error.
8319 (Fcall_process): Look at openp return value rather than at path,
8320 as that's a bit faster and clearer when there's a numeric predicate.
8321 * fileio.c (report_file_errno): New function, with most of the
8322 old contents of report_file_error.
8323 (report_file_error): Use it.
8324 (Ffile_exists_p, Ffile_accessible_directory_p):
8325 Set errno to 0 when it is junk.
8326 * fileio.c (Faccess_file):
8327 * image.c (x_create_bitmap_from_file):
8328 Use faccessat rather than opening the file, to avoid the hassle of
8329 having a file descriptor open.
8330 * lisp.h (report_file_errno): New decl.
8331 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
8332
7e649856
PE
8333 Minor EBADF fixes.
8334 * process.c (create_process, wait_reading_process_output) [AIX]:
8335 Remove obsolete SIGHUP-related code, as Emacs no longer disables
8336 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
8337 a multithreaded environment anyway).
8338 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
8339
f6774c1a
AS
83402013-07-12 Andreas Schwab <schwab@linux-m68k.org>
8341
8342 * image.c (x_find_image_file): Don't close a remote file handle.
8343
bacba3c2
PE
83442013-07-12 Paul Eggert <eggert@cs.ucla.edu>
8345
8346 Fix races with threads and file descriptors.
8347 * callproc.c (Fcall_process_region):
8348 * dired.c (open_directory):
8349 * emacs.c (main, Fdaemon_initialized):
8350 * image.c (x_find_image_file):
8351 * inotify.c (Finotify_rm_watch):
8352 * lread.c (Flocate_file_internal):
8353 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
8354 * term.c (term_mouse_moveto, init_tty):
8355 * termcap.c (tgetent):
8356 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
8357 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
8358 * unexhp9k800.c, unexmacosx.c (unexec):
8359 * callproc.c (Fcall_process_region):
8360 Use emacs_close, not close.
8361 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
8362 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
8363 and posix_close function on current platforms (which all lack them).
8364 (emacs_close): Use it. This should fix the races on GNU/Linux and
8365 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
8366 and it should avoid closing random victim file descriptors on
8367 other platforms.
8368
653d4f43
PE
83692013-07-11 Paul Eggert <eggert@cs.ucla.edu>
8370
c8536ec4
PE
8371 * inotify.c (uninitialized): Remove. All uses replaced by -1.
8372 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
8373 Touch up doc a bit.
8374
9c203066
PE
8375 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
8376 This is for .gdbinit xbacktrace.
8377
653d4f43
PE
8378 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
8379 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
8380 (emacs_set_tty): Now static.
8381 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
8382 * term.c (tty_capable_p, tty_default_color_capabilities)
8383 (get_tty_terminal, term_mouse_movement)
8384 (handle_one_term_event, init_tty, maybe_fatal):
8385 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
8386 (tgetent, scan_file, name_match, compare_contin):
8387 * terminal.c (get_terminal):
8388 Use bool for boolean.
8389 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
8390 Prefer char to unsigned char if either will do.
8391 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
8392 (tty_write_glyphs): Prefer int to unsigned.
8393 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
8394 All callers changed.
8395 * termcap.c (tprint, main) [TEST]: Remove non-working test.
8396
45b683a1
PE
83972013-07-10 Paul Eggert <eggert@cs.ucla.edu>
8398
29abe551
PE
8399 Port to C89.
8400 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
8401 (B__dummy__): New dummy symbol, to pacify C89.
8402 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
8403 they can't grok varargs macros.
8404 * dispnew.c (add_window_display_history)
8405 (add_frame_display_history):
8406 * print.c (print_object):
8407 * xdisp.c (debug_method_add):
8408 Use %p printf format only for void pointers.
8409 * emacs.c (usage_message): New constant, replacing ...
8410 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
8411 (main): Adjust to usage reorg.
8412 * fns.c (syms_of_fns):
8413 * profiler.c (syms_of_profiler):
8414 Don't use non-constant struct initializers.
8415 * gnutls.h (gnutls_initstage_t):
8416 * lisp.h (enum Lisp_Fwd_Type):
8417 * lread.c (lisp_file_lexically_bound_p):
8418 * xsettings.c (anonymous enum):
8419 Remove trailing comma.
8420 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
8421 * lisp.h (ENUM_BF): Use unsigned if pedantic.
8422 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
8423 (DEFUN): Use it.
8424 * regex.c (const_re_char): New type, to pacify strict C89.
8425 All uses of 'const re_char' replaced to use it.
8426 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
8427 with glibc when strict C89. This change is imported from gnulib.
8428 All uses changed.
8429 (_Restrict_arr_): Rename from __restrict_arr, similarly.
8430 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
8431 Omit GNU_LINUX implementation, since it requires long long.
8432 * xterm.c (x_draw_underwave):
8433 Do not assume the traditional order of struct's members.
8434 (x_term_init): Rewrite to avoid the need for non-constant structure
8435 initializers.
8436
45b683a1 8437 Syntax cleanup, mostly replacing macros with functions.
763a086d 8438 This removes the need for the syntax_temp hack.
45b683a1
PE
8439 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
8440 * syntax.c (SYNTAX_INLINE): New macro.
8441 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
8442 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
8443 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
8444 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
8445 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
8446 (SYNTAX_COMEND_FIRST): Now functions, not macros.
8447 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
8448 Now constants, not macros.
8449 (syntax_temp) [!__GNUC__]: Remove.
8450 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
8451 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
8452 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
8453 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
8454 Move here from syntax.h; now functions, not macros. Except for the
8455 last function, these are static since only syntax.c uses them.
8456 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
8457 All uses changed. Now a function, not a macro; use this fact
8458 to simplify the code.
8459 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
8460 compiler bugs; no longer relevant.
8461 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8462 (SYNTAX_INLINE): New macro.
8463 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
8464 for the new functions. Use bool for boolean member.
8465 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
8466 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
8467 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
8468 (SETUP_BUFFER_SYNTAX_TABLE):
8469 Now extern inline functions, not macros.
8470 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
8471 Remove; all uses replaced by implementation.
8472 (syntax_temp) [!__GNUC__]: Remove decl.
8473 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
8474
29be4a50
JD
84752013-07-10 Jan Djärv <jan.h.d@swipnet.se>
8476
8477 * emacs.c (main): Fix syntax error.
8478
954b166e
PE
84792013-07-10 Paul Eggert <eggert@cs.ucla.edu>
8480
8481 Timestamp fixes for undo (Bug#14824).
8482 * atimer.c (schedule_atimer):
8483 * fileio.c (Ffile_newer_than_file_p):
8484 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
8485 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
8486 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
8487 (syms_of_fileio): Remove Sclear_visited_file_name.
8488 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
8489 file doesn't exist; this avoids an ambiguity with negative timestamps.
8490 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
8491 * systime.h (make_emacs_time, invalid_emacs_time):
8492 Don't assume struct timespec layout; POSIX doesn't guarantee it.
8493 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
8494 * undo.c (record_first_change): Push (visited-file-modtime) onto
8495 undo list rather than reimplementing it by hand, incorrectly.
8496
d74647c3
KB
84972013-07-09 Ken Brown <kbrown@cornell.edu>
8498
8499 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
8500
3c51b96b
JB
85012013-07-09 Juanma Barranquero <lekktu@gmail.com>
8502
8503 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
8504
4ebbdd67
PE
85052013-07-09 Paul Eggert <eggert@cs.ucla.edu>
8506
8507 Handle errno and exit status a bit more carefully.
8508 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
8509 number into an exit status. Instead, use EXIT_CANCELED.
8510 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
8511 * callproc.c (relocate_fd):
8512 * emacs.c (close_output_streams, main):
8513 * process.c (create_process):
8514 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
8515 Use emacs_perror for simplicity.
8516 * callproc.c (relocate_fd, main):
8517 * sysdep.c (sys_subshell):
8518 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
8519 (shut_down_emacs): Use emacs_write, not write.
8520 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
8521 * fileio.c (Fcopy_file, e_write):
8522 * nsterm.m (ns_select):
8523 * process.c (send_process):
8524 * sound.c (vox_write):
8525 Use emacs_write_sig, not emacs_write.
8526 * lisp.h (emacs_write_sig, emacs_perror): New decls.
8527 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
8528 New constants.
8529 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
8530 of write.
8531 (emacs_full_write): New function.
8532 (emacs_write): Rewrite to use it.
8533 (emacswrite_sig, emacs_perror): New functions.
8534 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
8535
44e18199 85362013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
e4b1e5af
JD
8537
8538 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
8539 on NS even if it is present. Pixmap on NS is a void*.
8540
9caab067
PE
85412013-07-07 Paul Eggert <eggert@cs.ucla.edu>
8542
8543 Port to Ubuntu 10 (Bug#14803).
8544 Problem reported by T.V. Raman.
8545 * process.c (close_on_exec, accept4, process_socket):
8546 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
8547
1d442672
EZ
85482013-07-07 Eli Zaretskii <eliz@gnu.org>
8549
8550 * w32.c (sys_dup): Declare prototype.
8551
8552 * filelock.c:
8553 * emacs.c:
8554 * callproc.c [WINDOWSNT]: Include sys/socket.h.
8555
067428c1
PE
85562013-07-07 Paul Eggert <eggert@cs.ucla.edu>
8557
8558 Make file descriptors close-on-exec when possible (Bug#14803).
8559 This simplifies Emacs a bit, since it no longer needs to worry
8560 about closing file descriptors by hand in some cases.
8561 It also fixes some unlikely races. Not all such races, as
8562 libraries often open files internally without setting
8563 close-on-exec, but it's an improvement.
8564 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
8565 * callproc.c (Fcall_process) [!MSDOS]:
8566 * emacs.c (main) [!DOS_NT]:
8567 * nsterm.m (ns_term_init):
8568 * process.c (create_process):
8569 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
8570 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
8571 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
8572 Prefer mkostemp with O_CLOEXEC to mkstemp.
8573 * callproc.c (relocate_fd) [!WINDOWSNT]:
8574 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
8575 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
8576 now using pipe2.
8577 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
8578 Make the resulting file descriptor close-on-exec.
8579 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
8580 * lread.c (load_descriptor_list, load_descriptor_unwind):
8581 Remove; no longer needed. All uses removed.
8582 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
8583 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
8584 New functions.
8585 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
35e951cd 8586 (Fmake_network_process, Fnetwork_interface_list)
067428c1
PE
8587 (Fnetwork_interface_info, server_accept_connection):
8588 Make newly-created socket close-on-exec.
8589 * sysdep.c (emacs_open, emacs_fopen):
8590 Make new-created descriptor close-on-exec.
8591 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
8592 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
8593
0da857dd
JD
85942013-07-07 Jan Djärv <jan.h.d@swipnet.se>
8595
8596 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
8597 for NS_IMPL_GNUSTEP.
8598
5f86adcd
PE
85992013-07-07 Paul Eggert <eggert@cs.ucla.edu>
8600
8601 Fix openp errno handling.
8602 * callproc.c (Fcall_process): Preserve openp errno around close.
8603 * lread.c (openp): Set errno when returning -1, as some callers
8604 expect this.
8605
1afb1d07
JD
86062013-07-06 Jan Djärv <jan.h.d@swipnet.se>
8607
8608 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
8609
8610 * nsterm.h (NSSavePanel): Update comment.
8611 (NSAPP_DATA2_RUNFILEDIALOG): Define.
8612 (ns_run_file_dialog): Declare.
8613
8614 * nsfns.m: Remove panelOK.
8615 (ns_fd_data): New.
8616 (ns_run_file_dialog): New function.
8617 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
8618 event loop, so file dialog is popped up by ns_run_file_dialog, called
8619 by sendEvent (Bug#14578).
8620 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
8621
3323c263
EZ
86222013-07-06 Eli Zaretskii <eliz@gnu.org>
8623
fdda0220
EZ
8624 * xdisp.c (default_line_pixel_height): New function.
8625 (pos_visible_p, move_it_vertically_backward, try_scrolling)
8626 (try_cursor_movement, redisplay_window, try_window)
8627 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
8628
068f9124
SM
8629 * window.c (window_scroll_pixel_based):
8630 use default_line_pixel_height.
fdda0220
EZ
8631
8632 * dispextern.h (default_line_pixel_height): Add prototype.
8633
8634 * frame.c (x_set_line_spacing): Accept a float value for
8635 line-spacing parameter, per the documentation.
8636
3323c263
EZ
8637 * data.c (Fmultibyte_string_p): Doc fix.
8638
47ba6d43
PE
86392013-07-05 Paul Eggert <eggert@cs.ucla.edu>
8640
406af475
PE
8641 Use emacs_open more consistently when opening files.
8642 This handles EINTR more consistently now, and makes it easier
8643 to introduce other uniform changes to file descriptor handling.
a12bf61e
GM
8644 * sysstdio.h: New file.
8645 * buffer.c (mmap_init):
406af475
PE
8646 * cygw32.c (chdir_to_default_directory):
8647 * dispnew.c (Fopen_termscript):
8648 * emacs.c (Fdaemon_initialized):
8649 * fileio.c (Fdo_auto_save):
8650 * image.c (slurp_file, png_load_body, jpeg_load_body):
8651 * keyboard.c (Fopen_dribble_file):
8652 * lread.c (Fload):
8653 * print.c (Fredirect_debugging_output):
8654 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
8655 * termcap.c (tgetent):
8656 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
8657 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
8658 * w32term.c (w32_initialize) [CYGWIN]:
8659 * xfaces.c (Fx_load_color_file):
8660 Use emacs_open instead of plain open, and emacs_fopen instead of
8661 plain fopen.
8662 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
8663 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
8664 * callproc.c (default_output_mode): New constant.
8665 (Fcall_process): Use it to call emacs_open instead of plain creat.
8666 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
8667 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
8668 (emacs_fopen): New function.
8669 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
8670 Include <lisp.h>, for emacs_open.
8671 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
8672
47ba6d43
PE
8673 Remove duplicate #include directives.
8674 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
8675 * xfaces.c:
8676 Don't include stdio.h twice.
8677 * buffer.c [USE_MMAP_FOR_BUFFERS]:
8678 Don't include sys/types.h or stdio.h twice.
8679 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
8680 * lread.c: Don't include coding.h twice.
8681 * nsfont.m: Don't include frame.h twice.
8682 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
8683 * ralloc.c: Don't include <unistd.h> twice.
8684 * xdisp.c: Don't include font.h twice.
8685 * xterm.c: Don't include fontset.h twice.
8686 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
8687
b9ed53d5
PE
86882013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8689
8690 Scale ImageMagick images more carefully.
8691 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
8692 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
8693 Be more careful about avoiding undefined behavior after
8694 integer overflow and division by zero.
8695
cf13177e
YM
86962013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8697
8698 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
8699 (syms_of_w32fns): DEFSYM them.
8700 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
8701 (CCHDEVICENAME): Define macros if not defined.
8702 (struct MONITOR_INFO_EX): New struct.
8703 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
8704 (enum_display_monitors_fn): New variable.
8705 (globals_of_w32fns): Initialize it.
8706 (Fx_display_pixel_width, Fx_display_pixel_height)
8707 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
8708 multi-monitor setups in docstrings.
8709 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
8710 screen size by primary monitor's millimeter per pixel.
8711 (w32_monitor_enum, w32_display_monitor_attributes_list)
8712 (w32_display_monitor_attributes_list_fallback)
8713 (Fw32_display_monitor_attributes_list): New functions.
8714 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
8715
8716 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
8717 if not defined.
8718 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
8719
86dfb7a8
MA
87202013-07-04 Michael Albinus <michael.albinus@gmx.de>
8721
8722 * fileio.c (Qfile_notify_error): New error symbol.
8723
8724 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
8725 * inotify.c (inotify_callback, symbol_to_inotifymask)
8726 (Finotify_add_watch, Finotify_rm_watch): Use it.
8727 (inotifyevent_to_event): Exchange order of cookie and file name.
8728 (Finotify_add_watch): Adapt docstring.
8729
8730 * lisp.h (Qfile_notify_error): Declare.
8731
2c1c974b
PE
87322013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8733
8734 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
8735 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8736 Do not clear _malloc_thread_enabled_p, undoing the previous change,
8737 which did not work (see <http://bugs.gnu.org/14569#307>).
8738 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
8739 && (!noninteractive || initialized)). This attempts to thread
8740 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
8741
7a35b20f
JB
87422013-07-04 Juanma Barranquero <lekktu@gmail.com>
8743
8744 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
8745 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
8746
1ce5cd04
PE
87472013-07-04 Paul Eggert <eggert@cs.ucla.edu>
8748
8749 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
8750 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8751 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
8752 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
8753
57f8c490
PE
87542013-07-02 Paul Eggert <eggert@cs.ucla.edu>
8755
8756 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
8757 Define to __sys_siglist.
8758
bcffb5ca
EZ
87592013-07-02 Eli Zaretskii <eliz@gnu.org>
8760
8761 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
8762 word-wrap, so that overflow-newline-into-fringe would work in
8763 visual-line-mode. (Bug#2749)
8764 (move_it_in_display_line_to): When the last scanned display
8765 element fits exactly on the display line, and
8766 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
8767 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
8768 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
8769 finding buffer position that corresponds to pixel coordinates,
8770 e.g. in buffer_posn_from_coords.
8771
2c41e781
JD
87722013-07-02 Jan Djärv <jan.h.d@swipnet.se>
8773
8774 * process.c (handle_child_signal): Call catch_child_signal if
8775 NS_IMPL_GNUSTEP.
8776
c2418359
PE
87772013-07-02 Paul Eggert <eggert@cs.ucla.edu>
8778
52a9bcae
PE
8779 Don't convert function pointers to void * and back.
8780 It isn't portable C, and it's easy enough to avoid.
8781 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
8782 (make_save_value): Add support for SAVE_FUNCPOINTER.
8783 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
8784 * print.c (print_object):
8785 Distinguish function from object pointers.
8786 * lisp.h (SAVE_FUNCPOINTER): New constant.
8787 (SAVE_SLOT_BITS): Adjust to it.
8788 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
8789 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
8790 (voidfuncptr): New typedef.
8791 (struct Lisp_Save_Value): New member data[0].funcpointer.
8792 (XSAVE_FUNCPOINTER): New function.
8793
c2418359
PE
8794 Simplify buildobj processing.
8795 * Makefile.in (buildobj.h): Make it a sequence of strings each
8796 followed by comma, rather than a single string. Put it into a
8797 .tmp file in case there's an error while generating it.
8798 (gl-stamp): Use .tmp for temp files.
8799 (mostlyclean): Clean .tmp files.
8800 * doc.c (buildobj): Move to just the routine that needs it.
8801 It's now an array of strings, so processing is simpler.
8802
8f43ce49
PE
88032013-07-01 Paul Eggert <eggert@cs.ucla.edu>
8804
8805 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
8806 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
8807 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
8808 Invoke malloc_enable_thread even when not interactive.
8809 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
8810 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
8811 in this case, since the underlying bug has now been fixed.
8812
24827db9
JB
88132013-07-01 Juanma Barranquero <lekktu@gmail.com>
8814
8815 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
8816 unlinking it (bug#14691).
8817
ef099a94
MN
88182013-06-30 Michal Nazarewicz <mina86@mina86.com>
8819
8820 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
8821 before checking whether buffer is modified. This lets
8822 `kill-buffer-query-functions' cancel killing of the buffer or save
8823 its content before `kill-buffer' asks user the "Buffer %s
8824 modified; kill anyway?" question.
8825
9d3f2fc2
JD
88262013-06-30 Jan Djärv <jan.h.d@swipnet.se>
8827
8828 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
8829 Let the super performKeyEquivalent deal with them (Bug#14747).
8830
e6c6c8c7
PE
88312013-06-30 Paul Eggert <eggert@cs.ucla.edu>
8832
1d71c1d9
PE
8833 * widget.c (resize_cb): Remove unused local.
8834
8f5f35cc
PE
8835 Do not use GTK 3 if it exists but cannot be compiled.
8836 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
8837 * xterm.c (x_error_handler) [!USE_GTK]:
8838 Do not use GTK 3.
8839
e6c6c8c7
PE
8840 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
8841
0ba54312
EZ
88422013-06-30 Eli Zaretskii <eliz@gnu.org>
8843
5d1c3286
EZ
8844 * intervals.c (get_local_map): Instead of aborting, clip POSITION
8845 to the valid range of values. (Bug#14753)
8846
0ba54312
EZ
8847 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
8848 when moving point by using the current glyph matrix. This avoids
8849 the need to force redisplay when this function is called in a
8850 loop.
8851
9c90cc06
PE
88522013-06-29 Paul Eggert <eggert@cs.ucla.edu>
8853
8854 Fix minor problems found by static checking.
8855 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
8856 Redo the latter's body to sidestep GCC parenthesization warnings.
8857 (setup_coding_system, detect_coding, detect_coding_system): Use them.
8858 * coding.c (detect_coding, detect_coding_system):
8859 * coding.h (struct undecided_spec):
8860 Use bool for boolean.
8861 * image.c (QCmax_width, QCmax_height): Now static.
8862 * xdisp.c (Fmove_point_visually): Remove unused local.
8863
4c672a0f
EZ
88642013-06-29 Eli Zaretskii <eliz@gnu.org>
8865
8866 * xdisp.c (Fmove_point_visually): New function.
8867
c1ea3abf
JB
88682013-06-28 Kenichi Handa <handa@gnu.org>
8869
8870 * coding.h (define_coding_undecided_arg_index): New enum.
8871 (coding_attr_index): New members
8872 coding_attr_undecided_inhibit_null_byte_detection,
8873 coding_attr_undecided_inhibit_iso_escape_detection,
8874 coding_attr_undecided_prefer_utf_8.
8875 (undecided_spec): New struct.
8876 (struct coding_system): New member `undecided' of the member
8877 `spec'.
8878
8879 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
8880 (detect_coding): Likewise.
8881 (detect_coding_system): Likewise.
8882 (Fdefine_coding_system_internal): New coding system properties
8883 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
8884 :prefer-utf-8.
8885 (syms_of_coding): Adjust for coding_arg_undecided_max.
8886
ba3de9e6
PE
88872013-06-28 Paul Eggert <eggert@cs.ucla.edu>
8888
8889 * image.c (x_from_xcolors): Remove unused local.
8890
547c9269
YM
88912013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8892
8893 Defer image data transfer between X client and server until actual
8894 display happens.
8895
8896 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
8897 and `mask_img'.
8898
8899 * image.c (Destroy_Image): Remove.
8900 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
8901 `mask_p', and `colors_p'. All uses changed.
8902 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
ef099a94
MN
8903 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
8904 New macros for `flags' arg to x_clear_image_1.
547c9269
YM
8905 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
8906 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
04b66ce7 8907 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
547c9269
YM
8908 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
8909 (image_get_x_image, image_unget_x_image): New functions or macros.
8910 (image_background, image_background_transparent, x_to_xcolors)
8911 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
8912 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
8913 instead of Destroy_Image.
8914 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
8915 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
8916 (png_load_body, jpeg_load_body, tiff_load, gif_load)
8917 (imagemagick_load_image, svg_load_image): Use them instead of
8918 x_create_x_image_and_pixmap, and x_put_x_image followed by
8919 x_destroy_x_image, respectively.
8920 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
8921 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
8922 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
8923 background_transparent fields.
8924 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
8925 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
8926
dae2f5ef
PE
89272013-06-27 Paul Eggert <eggert@cs.ucla.edu>
8928
8929 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
8930 This mostly consists of undoing recent changes.
8931 * callproc.c (Fcall_process):
8932 * process.c (create_process):
8933 Do not worry about catching SIGCHLD here, undoing previous change.
8934 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
8935 * process.c, process.h (catch_child_signal):
8936 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
8937 * process.c (catch_child_handler): Don't worry about being called
8938 lazily and do not assume caller has blocked SIGCHLD, undoing
8939 previous change. Move first-time stuff back to
8940 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
8941 tickle glib, as that causes Cygwin bootstrap to fail. Do not
8942 set lib_child_handler if it's already initialized, which may
a6c4680a 8943 help avoid problems on GNUstep.
dae2f5ef 8944
fa55d2aa
PE
89452013-06-23 Paul Eggert <eggert@cs.ucla.edu>
8946
8947 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
8948 * callproc.c (Fcall_process):
8949 * process.c (create_process):
8950 Make sure SIGCHLD is caught before we fork,
8951 since Emacs startup no arranges to catch SIGCHLD.
8952 * process.c (lib_child_handler): Initialize to null, not to
8953 dummy_handler.
8954 (catch_child_signal): Allow self to be called lazily.
8955 Do nothing if it's already been called.
8956 Assume caller has blocked SIGCHLD (all callers do now).
8957 * emacs.c (main): Do not catch SIGCHLD here; defer it until
8958 just before it's really needed.
8959 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
8960 since it hasn't been caught yet.
8961
f3f9606c
LMI
89622013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
8963
8964 * image.c (compute_image_size): New function to implement
8965 :max-width and :max-height.
8966 (imagemagick_load_image): Use it.
8967
c7041908
PE
89682013-06-23 Paul Eggert <eggert@cs.ucla.edu>
8969
8970 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
8971 * callproc.c, process.h (block_child_signal, unblock_child_signal):
8972 Now extern.
8973 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
8974 * process.c (catch_child_signal): Block SIGCHLD while futzing with
8975 the SIGCHLD handler, since the code is not atomic and (due to glib)
8976 signals may be arriving now.
8977 * sysdep.c (init_signals): Do not catch child signals here;
8978 'main' now does that later, at a safer time.
8979
f86852b4
PE
89802013-06-22 Paul Eggert <eggert@cs.ucla.edu>
8981
0dfeed58
PE
8982 Clean up SIGCHLD handling a bit (Bug#14569).
8983 * process.c, process.h (catch_child_signal):
8984 Now always extern, even if !NS_IMPL_GNUSTEP.
8985 * process.c (catch_child_signal): Move glib tickler here from
8986 init_process_emacs, so that it's done earlier in Emacs
8987 initialization. Also move the noninteractive && !initialized
8988 check here from init_process_emacs. This is all a bit cleaner for
8989 GNUish platforms, and I hope it works around the Cygwin bug.
8990 * sysdep.c (init_signals): Invoke catch_child_signal here, so
8991 that glib signal handling is tickled before glib creates threads.
8992
f86852b4
PE
8993 * process.c (wait_reading_process_output): Avoid int overflow
8994 when reading more than 2 GiB total from a process.
8995
cbd6509c
PE
89962013-06-21 Paul Eggert <eggert@cs.ucla.edu>
8997
8998 * process.c (create_process): Handle a couple more cases,
8999 i.e., work even if new_argv and wait_child_setup[i] are cached.
9000 Use Fcall_process's style for volatile vars.
9001
9de1114a
AS
90022013-06-21 Andreas Schwab <schwab@linux-m68k.org>
9003
9004 * process.c (create_process): Mark PROCESS volatile.
9005
fbe9e0b9
PE
90062013-06-21 Paul Eggert <eggert@cs.ucla.edu>
9007
9008 Use C99-style flexible array members if available.
9009 This avoids some subtle aliasing issues, which typically
9010 aren't a problem with GCC but may be a problem elsewhere.
9011 * alloc.c (sdata): New typedef, replacing the old struct sdata.
9012 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
9013 In either case, it uses a flexible array member rather than
9014 the old struct hack. All uses changed.
9015 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
9016 Adjust to sdata reorganization.
9017 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
9018 Use offsetof (struct, flex_array_member), not sizeof (struct), as
9019 that ports better to pre-C99 non-GCC.
9020 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
9021 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
9022 as the latter has changed.
9023 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
9024 and port better to pre-C99 GCC.
9025 * image.c (struct xpm_cached_color):
9026 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
9027 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
9028 Use FLEXIBLE_ARRAY_MEMBER.
9029 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
9030 Move decl to top level so it gets checked against implementation.
9031 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
9032 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
9033
1fc71008
PE
90342013-06-20 Paul Eggert <eggert@cs.ucla.edu>
9035
9036 * syntax.c: Integer cleanups.
9037 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
9038 All uses that need 0-or-2 changed to:
9039 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
9040 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
9041 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
9042 (char_quoted, prev_char_comend_first, back_comment)
9043 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
9044 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
9045 Use bool for boolean.
9046 (update_syntax_table, skip_chars, skip_syntaxes):
9047 Prefer int to unsigned when either will do.
9048 (back_comment): Return boolean success flag, like forw_comment,
9049 instead of positive-or-minus-1 (which might have overflowed int anyway).
9050 Don't stuff ptrdiff_t into int.
9051 (syntax_spec_code, syntax_code_spec): Now const.
9052 (Fmatching_paren, scan_lists, scan_sexps_forward):
9053 Use enum syntaxcode for syntax code.
9054 (Fmatching_paren): Check that arg is a character, not just an integer.
9055 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
9056 (Finternal_describe_syntax_value): Omit no-longer-needed
9057 comparison to 0.
9058 (skip_chars): Use char, not unsigned char, when the distinction
9059 doesn't matter.
9060 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
9061 * bytecode.c (exec_byte_code):
9062 * syntax.c (syntax_spec_code, Fchar_syntax)
9063 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
9064 (init_syntax_once):
9065 * syntax.h (SYNTAX_WITH_FLAGS):
9066 Omit unnecessary casts.
9067
b932cad7
EZ
90682013-06-20 Eli Zaretskii <eliz@gnu.org>
9069
9070 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
9071 line dimensions here, to avoid race conditions with the main
9072 thread. (Bug#14062, bug#14630, bug#14669)
9073
9074 * w32term.c (w32_draw_window_cursor): Compute the header line and
9075 mode line dimensions here.
9076 <w32_system_caret_window, w32_system_caret_hdr_height>:
9077 <w32_system_caret_mode_height>: New variables.
9078
9079 * w32term.h: Declare them.
9080
89561f72
PE
90812013-06-20 Paul Eggert <eggert@cs.ucla.edu>
9082
5013fc08
PE
9083 * alloc.c (die): Move "assertion failed" string here ...
9084 * lisp.h (eassert): ... from here. Also, suppress evaluation of
9085 COND when SUPPRESS_CHECKING. This shrinks the executable text
9086 size by 0.8% to 2.2% when configured with --enable-checking,
9087 depending on optimization flags (GCC 4.8.1 x86-64).
9088
89561f72
PE
9089 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
9090
763a086d 90912013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
89561f72
PE
9092
9093 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
9094 base is 2; this is more accurate.
9095
983aeb9a
JB
90962013-06-19 Juanma Barranquero <lekktu@gmail.com>
9097
9098 * sound.c (string_default): Move to !WINDOWSNT section.
9099 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
9100
178ba3e6
PE
91012013-06-19 Paul Eggert <eggert@cs.ucla.edu>
9102
bbc51b15
PE
9103 * sound.c: Integer cleanups.
9104 Remove unnecessary forward decls.
9105 (struct sound_device): The 'file' member is now a Lisp_Object, not
9106 a char *, so that we needn't invoke alloca on a huge size.
9107 (Fplay_sound_internal): Adjust to this.
9108 (string_default): New function.
9109 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
9110 Use it to adjust to the struct sound_device change.
9111 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
9112 (be2hs) [0]: Remove.
9113
178ba3e6
PE
9114 * syntax.c (skip_chars): Don't use uninitialized storage
9115 when searching a multibyte buffer for characters that are not in a
9116 unibyte string that contains non-ASCII characters.
9117
69f60cdc
JD
91182013-06-18 Jan Djärv <jan.h.d@swipnet.se>
9119
9120 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
9121 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
9122
0d6224d4
PE
91232013-06-18 Paul Eggert <eggert@cs.ucla.edu>
9124
9125 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
9126
3c542890
KH
91272013-06-18 Kenichi Handa <handa@gnu.org>
9128
f7e3f7cd
KH
9129 * font.c (Ffont_spec): Signal an error for an invalid font name
9130 (Bug#14648).
3c542890 9131
9349e5f7
PE
91322013-06-18 Paul Eggert <eggert@cs.ucla.edu>
9133
9134 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
9135 In particular this ports to 32-bit sparc Sun cc.
9136 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
9137 array with a dummy element at specpdl[-1], so that its address can
9138 be taken portably.
9139 (unbind_to): Do not copy the binding; not needed, now that we
9140 copy old_value in the one place where the copy is needed.
9141 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
9142 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
9143 (union specbinding): Rename from struct specbinding. Redo layout
9144 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
9145 which is not portable. With Sun C 5.12 32-bit sparc, the
9146 declaration causes nargs to be an unsigned bitfield, a behavior
9147 that the C standard allows; but Emacs wants nargs to be signed.
9148 The overall type is now a union of structures rather than a
9149 structure of union of structures, and the 'kind' member is now a
9150 bitfield, so that the overall type doesn't grow. All uses changed.
9151 * process.c (Fmake_serial_process): Remove unnecessary initialization.
9152
0a4df6a5
PE
91532013-06-17 Paul Eggert <eggert@cs.ucla.edu>
9154
ec6ecaad
PE
9155 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
9156 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
9157
0a4df6a5
PE
9158 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
9159
7bfe8dbc
EZ
91602013-06-17 Eli Zaretskii <eliz@gnu.org>
9161
9162 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
9163 unless we know that the window w's frame is a frame object.
9164 Another attempt at solving bug#14062 and bug#14630.
9165
708e05f6
LMI
91662013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
9167
9168 * textprop.c (property_set_type): New enum.
9169 (add_properties): Allow appending/prepending text properties.
9170 (add_text_properties_1): Factored out of Fadd_text_properties.
ef099a94 9171 (Fadd_text_properties): Move all the code into
708e05f6
LMI
9172 add_text_properties_1.
9173 (Fadd_face_text_property): New function that calls
9174 add_text_properties_1.
9175
84575e67
PE
91762013-06-17 Paul Eggert <eggert@cs.ucla.edu>
9177
9178 Move functions from lisp.h to individual modules when possible.
9179 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
9180 * alloc.c (XFLOAT_INIT, set_symbol_name):
9181 * buffer.c (CHECK_OVERLAY):
9182 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
9183 (set_char_table_parent):
9184 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
9185 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
9186 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
9187 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
9188 (set_blv_valcell):
9189 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
9190 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
9191 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
9192 (backtrace_args, backtrace_debug_on_exit):
9193 * floatfns.c (CHECK_FLOAT):
9194 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
9195 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
9196 (set_hash_hash, set_hash_hash_slot, set_hash_index)
9197 (set_hash_index_slot):
9198 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
9199 * marker.c (CHECK_MARKER):
9200 * textprop.c (CHECK_STRING_OR_BUFFER):
9201 * window.c (CHECK_WINDOW_CONFIGURATION):
9202 Move here from lisp.h, and make these functions static rather than
9203 extern inline.
9204 * buffer.c (Qoverlayp):
9205 * data.c (Qsubrp):
9206 * fns.c (Qhash_table_p):
9207 * window.c (Qwindow_configuration_p):
9208 Now static.
9209 * lisp.h: Remove the abovementioned defns and decls.
9210
44e18199 9211 Use functions, not macros, for XINT etc (Bug#11935).
84575e67
PE
9212 In lisp.h, prefer functions to function-like macros, and
9213 constants to object-like macros, when either will do. This:
9214 . simplifies use, as there's no more need to worry about
9215 arguments' side effects being evaluated multiple times.
9216 . makes the code easier to debug on some platforms.
9217 However, when using gcc -O0, keep using function-like macros
9218 for a few critical operations, for performance reasons.
9219 This sort of thing isn't needed with gcc -Og, but -Og
9220 is a GCC 4.8 feature and isn't widely-enough available yet.
9221 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
9222 Remove enum lsb_bits; no longer needed.
9223 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
9224 * buffer.c (Qoverlap):
9225 * data.c (Qsubrp):
9226 * fns.c (Qhash_table_p):
9227 Now extern, so lisp.h can use these symbols.
9228 * dispextern.h: Include character.h, for MAX_CHAR etc.
9229 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
9230 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
9231 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
9232 (GLYPH_CODE_P): Move here from lisp.h.
9233 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
9234 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
9235 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
9236 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
9237 XUNTAG now returns void *.
9238 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
9239 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
9240 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
9241 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
9242 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
9243 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
9244 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
9245 (lisp_h_XPNTR, lisp_h_XSYMBOL):
9246 New macros, renamed from their sans-lisp_h_ counterparts.
9247 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
9248 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
9249 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
9250 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
9251 If compiling via GCC without optimization, define these as macros
9252 in addition to inline functions.
9253 To disable this, compile with -DINLINING=0.
9254 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
9255 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
9256 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
9257 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
9258 (INTMASK, VALMASK): Now macros, since static values cannot be
9259 accessed from extern inline functions.
9260 (VALMASK): Also a constant, for benefit of old GDB.
9261 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
9262 is INTEGERP, which can fold it in.
5165d44a 9263 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
84575e67
PE
9264 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
9265 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
9266 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
9267 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
9268 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
9269 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
9270 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
9271 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
9272 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
9273 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
9274 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
9275 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
9276 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
9277 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
9278 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
9279 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
9280 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
9281 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
9282 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
9283 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
9284 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
9285 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
9286 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
9287 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
9288 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
9289 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
9290 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
9291 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
9292 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
9293 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
9294 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
9295 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
9296 Now functions.
9297 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
9298 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
9299 (VALMASK): Define in one place rather than in two, merging the
9300 USE_LSB_TAG parts; this is simpler.
9301 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
9302 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
9303 Move up, to avoid use before definition.
9304 Also include "globals.h" earlier, for the same reason.
9305 (make_natnum): New function.
9306 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
9307 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
9308 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
9309 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
9310 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
9311 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
9312 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
9313 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
9314 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
9315 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
9316 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
9317 (Qwindow_configuration_p, Qimage): New forward declarations.
9318 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
9319 (STRING_COPYIN): Remove; unused.
9320 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
9321 (xcar_addr, xcdr_addr): New functions. All uses changed.
9322 (IEEE_FLOATING_POINT): Now a constant, not a macro.
9323 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
9324 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
9325 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
9326 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
9327 (TYPE_RANGED_INTEGERP): Simplify.
9328 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
9329 (setlocale, fixup_locale, synchronize_system_messages_locale)
9330 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
9331 Now empty functions, not macros.
9332 (functionp): Return bool, not int.
9333 * window.c (Qwindow_configuration_p): Now extern,
9334 so window.h can use it.
9335 * window.h (Qwindowp): Move decl back to lisp.h.
9336
9583ec36
EZ
93372013-06-15 Eli Zaretskii <eliz@gnu.org>
9338
9339 * xdisp.c (Fline_pixel_height): New function, required for solving
9340 bug #14567.
9341
210272ce
PE
93422013-06-15 Paul Eggert <eggert@cs.ucla.edu>
9343
9344 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
9345
de0503df
SM
93462013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
9347
9348 * lread.c (syms_of_lread):
9349 * fns.c (Fprovide): Adjust to new format of after-load-alist.
9350
afbfe143
KD
93512013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
9352
9353 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
9354
d177e213
XF
93552013-06-12 Xue Fuqiao <xfq.free@gmail.com>
9356
9357 * fileio.c (expand_file_name): Doc fix.
9358
05e3e412
PE
93592013-06-11 Paul Eggert <eggert@cs.ucla.edu>
9360
f7394b12
PE
9361 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
9362 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
9363 Wait for self, not for 0. This can't hurt on GNU or similar
9364 system, and may help with Cygwin.
9365
05e3e412
PE
9366 * keyboard.c: Don't use PROP (...) as an lvalue.
9367 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
9368 Use set_prop (A, B), not PROP (A) = B.
9369
17dd3097
EZ
93702013-06-10 Eli Zaretskii <eliz@gnu.org>
9371
9372 * xdisp.c (get_it_property): Use it->window instead of generating
9373 a Lisp object from it->w.
9374
52fab9c9
EZ
93752013-06-09 Eli Zaretskii <eliz@gnu.org>
9376
9377 * xdisp.c (get_it_property): If it->object is a buffer, pass to
9378 get-char-property the window that is being rendered, instead of
9379 the buffer, to support window-specific overlays. (Bug#14575)
ad257d4f
EZ
9380 (compute_display_string_pos): When W is NULL, use the current
9381 buffer as the object to pass to get-char-property.
9382 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
9383 pointer member of the bidi iterator, since no window is pertinent
9384 to this function.
52fab9c9 9385
5bf97bfc
EZ
93862013-06-08 Eli Zaretskii <eliz@gnu.org>
9387
9388 * bidi.c (bidi_fetch_char): Accept additional argument, the window
9389 being displayed, and pass it to compute_display_string_pos.
9390 (bidi_level_of_next_char, bidi_resolve_explicit_1)
9391 (bidi_paragraph_init): All callers changed.
9392
9393 * xdisp.c (init_from_display_pos, init_iterator)
9394 (handle_single_display_spec, next_overlay_string)
9395 (get_overlay_strings_1, reseat_1, reseat_to_string)
e7b41c4c
JB
9396 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
9397 Set bidi_it.w member from it->w.
5bf97bfc
EZ
9398 (compute_display_string_pos): Accept additional argument, the
9399 window being displayed, and pass it to Fget_char_property.
9400 (Bug#14575)
9401
9402 * dispextern.h (struct bidi_it): New member w, the window being
9403 displayed.
9404 (compute_display_string_pos): Adjust prototype.
9405
5de0e011
JD
94062013-06-08 Jan Djärv <jan.h.d@swipnet.se>
9407
e7b41c4c 9408 * xgselect.c: Remove unneeded include xterm.h.
b33f93ee
JD
9409
9410 * process.c (wait_reading_process_output): Check for NS before GLIB.
9411 GLIB may be linked in due to rsvg, but ns_select must be called.
9412
5de0e011
JD
9413 * xgselect.c (xg_select): Remove call to window_system_available
9414 and g_main_context_pending at the top, so Gdk events (i.e. file
9415 notify) are processed when Emacs is started with -nw.
9416
a822acff
EZ
94172013-06-07 Eli Zaretskii <eliz@gnu.org>
9418
9419 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
9420 (ctagsfiles3): New variable, includes only *.m files.
9421 (TAGS): Use an explicit language name in the regular expressions,
9422 to avoid transformation of '/SOMETHING' by MSYS to
9423 'c:\MSYS\SOMETHING'.
9424
6c0a9ed1
RC
94252013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
9426
9427 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
9428
9ef6111b
EZ
94292013-06-06 Eli Zaretskii <eliz@gnu.org>
9430
9431 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
9432 still need to set the mouse pointer shape and activate help-echo.
9433 (Bug#14558)
9434
7d300d64
PE
94352013-06-06 Paul Eggert <eggert@cs.ucla.edu>
9436
9437 A few porting etc. fixes for the new file monitor code.
9438 See the thread containing
9439 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
9440 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
9441 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
9442 (dir_monitor_callback, Fgfile_rm_watch):
9443 Use assq_no_quit instead of Fassoc, for speed.
9444 (dir_monitor_callback, Fgfile_rm_watch):
9445 eassert that the monitor is a fixnum.
9446 (dir_monitor_callback): No need for CDR_SAFE.
9447 Simplify building of lisp with alternative tails.
9448 (Fgfile_add_watch, Fgfile_rm_watch):
9449 Do not assume glib functions set errno reliably on failure.
9450 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
9451 and signal an error otherwise.
9452 (Fgfile_rm_watch): Prefer CONSP to !NILP.
9453 Use Fdelq instead of Fdelete, for speed.
9454
817ebfcf
EZ
94552013-06-05 Eli Zaretskii <eliz@gnu.org>
9456
9457 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
9458 don't insist on being invoked on a highlighted tool-bar button.
9459 Avoids losing tool-bar functionality when mouse-highlight is nil.
9460 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
9461 Don't highlight when mouse-highlight is nil.
9462 (note_mouse_highlight): When mouse-highlight is nil, don't return
9463 right away; instead, run tool-bar and mode-line highlight
9464 subroutine, clear any existing highlight, and revert the mouse
9465 pointer to its default shape. (Bug#14558)
9466
55577e7c
SM
94672013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
9468
9469 * lisp.mk (lisp): Add prog-mode.el.
9470
f019a684
PE
94712013-06-05 Paul Eggert <eggert@cs.ucla.edu>
9472
9473 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
9474 * process.c (dummy_handler): New function.
9475 (lib_child_handler): New static var.
9476 (handle_child_signal): Invoke it.
9477 (catch_child_signal): If a library has set up a signal handler,
9478 save it into lib_child_handler.
9479 (init_process_emacs): If using glib and not on Windows, tickle glib's
9480 child-handling code so that it initializes its private SIGCHLD handler.
9481 * syssignal.h (SA_SIGINFO): Default to 0.
9482 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
9483 31; it should no longer be needed now.
9484
90db8702
MA
94852013-06-05 Michael Albinus <michael.albinus@gmx.de>
9486
9487 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
9488
9489 * gfilenotify.c (globals_of_gfilenotify): New function.
9490 (syms_of_gfilenotify): Move global initialization there.
9491
9492 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
9493
bfa3acd6
SM
94942013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
9495
9496 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
9497 * keyboard.c (menu_bar_items, tool_bar_items):
9498 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
9499 not override local keymaps any more.
9500
ba59bd80
EZ
95012013-06-04 Eli Zaretskii <eliz@gnu.org>
9502
9503 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
9504
7f203aa1
EZ
95052013-06-03 Eli Zaretskii <eliz@gnu.org>
9506
9337e206
EZ
9507 * w32console.c (initialize_w32_display): Return the dimensions of
9508 the console window via 2 additional arguments, not via the current
9509 frame. This avoids crashes due to overrunning the bounds of
9510 frame's decode_mode_spec_buffer, which is not resized following
9511 the change of the frame dimensions from the initial 10x10.
9512
9513 * w32term.h (w32_initialize_display_info): Adjust prototype.
9514
9515 * term.c (init_tty): Take dimensions of the frame from the values
9516 returned by initialize_w32_display.
9517
7f203aa1
EZ
9518 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
9519 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
9520 (LIBES): Add $(GFILENOTIFY_LIBS).
9521
9522 * w32inevt.c (handle_file_notifications): Add dummy implementation
9523 for !HAVE_W32NOTIFY.
9524
9525 * w32term.c: Wrap code with HAVE_W32NOTIFY.
9526
55a87246
JD
95272013-06-03 Jan Djärv <jan.h.d@swipnet.se>
9528
9529 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
9530
9531 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
9532
9533 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
9534
3d5ee10a
PE
95352013-06-03 Paul Eggert <eggert@cs.ucla.edu>
9536
9537 Fix minor problems found by static checking.
9538 * data.c (pure_write_error):
9539 Use xsignal2, not Fsignal, as Fsignal might return.
9540 * eval.c (set_backtrace_debug_on_exit): Now static.
9541 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
9542 No longer inline. EXTERN_INLINE is needed only for functions
9543 defined in .h files. Reindent function header as per GNU style.
9544 (backtrace_p, backtrace_top, backtrace_next):
9545 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
9546 compiler or linker. Add extern decls to pacify gcc -Wall.
9547 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
9548 Now static.
9549 * frame.c (free_monitors): Define only on platforms that need it.
9550 * nsterm.m (ns_term_init):
9551 * process.c (catch_child_signal):
9552 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
9553 defined on all porting targets these days.
9554 * process.c, process.h (catch_child_signal):
9555 Make it extern only if NS_IMPL_GNUSTEP is defined.
9556
e2d8a6f0
EZ
95572013-06-03 Eli Zaretskii <eliz@gnu.org>
9558
9559 * w32.c (gettimeofday): Make the signature identical to prototype
9560 in nt/inc/sys/time.h.
9561
a8a7c5f6
SM
95622013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
9563
9564 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
9565 .gdbinit.
9566
9567 * keyboard.c (safe_run_hooks_error): Improve error message.
9568
9569 * data.c (pure_write_error): Add `object' argument.
9570 * puresize.h (CHECK_IMPURE): Use it.
9571
c9628c79
MA
95722013-06-03 Michael Albinus <michael.albinus@gmx.de>
9573
9574 * Makefile.in (NOTIFY_OBJ): New variable.
9575 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
9576
9577 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
9578 Call syms_of_gfilenotify.
9579
9580 * gfilenotify.c: New file.
9581
9582 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
9583 and Qfile_w32notify.
9584 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
9585 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
9586
9587 * lisp.h: Declare syms_of_gfilenotify.
9588
9589 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
9590
2f592f95
SM
95912013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
9592
9593 Merge the specpdl and backtrace stacks. Make the structure of the
9594 specpdl entries more obvious via a tagged union of structs.
9595 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
9596 (enum specbind_tag): New enum.
9597 (struct specbinding): Make it a tagged union of structs.
9598 Add a case for backtrace records.
9599 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
9600 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
9601 (backtrace_debug_on_exit): New accessors.
9602 (struct backtrace): Remove.
9603 (struct catchtag): Remove backlist field.
9604 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
9605 Move to eval.c.
9606 (Flocal_variable_p): Speed up the common case where the binding is
9607 already loaded.
9608 * eval.c (backtrace_list): Remove.
9609 (set_specpdl_symbol, set_specpdl_old_value): Remove.
9610 (set_backtrace_args, set_backtrace_nargs)
9611 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
9612 (backtrace_next): New functions.
9613 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
9614 (unwind_to_catch, internal_lisp_condition_case)
9615 (internal_condition_case, internal_condition_case_1)
9616 (internal_condition_case_2, internal_condition_case_n): Don't bother
9617 with backtrace_list any more.
9618 (Fsignal): Adjust to new backtrace format.
9619 (grow_specpdl): Move up.
9620 (record_in_backtrace): New function.
9621 (eval_sub, Ffuncall): Use it.
9622 (apply_lambda): Adjust to new backtrace format.
9623 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
9624 data.c.
9625 (specbind): Adjust to new specpdl format. Simplify.
9626 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
9627 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
9628 backtrace format.
9629 (mark_backtrace): Remove.
9630 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
9631 * xdisp.c (redisplay_internal): Use record_in_backtrace.
9632 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
9633 Use mark_specpdl.
9634 * profiler.c (record_backtrace): Use get_backtrace.
9635 (handle_profiler_signal): Use backtrace_top_function.
9636 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
9637 accessor functions.
9638
c0342369
JD
96392013-06-02 Jan Djärv <jan.h.d@swipnet.se>
9640
9641 * process.h (catch_child_signal): Declare.
9642
9643 * process.c (catch_child_signal): New function.
9644 (init_process_emacs): Call it.
9645
9646 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
9647 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
9648 NS_IMPL_COCOA.
9649 (x_set_cursor_type): Remove declaration.
9650 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
a6c4680a 9651 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
c0342369
JD
9652 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
9653 (ns_get_color): Use F suffix on float.
9654 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
9655 (ns_get_rgb_color): Remove.
9656 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
9657 (note_mouse_movement): x and y are CGFloat.
9658 (ns_draw_fringe_bitmap): Remove unused rowY.
9659 Change #if to COCOA && >= 10_6.
9660 (ns_draw_window_cursor): Remove unused overspill.
9661 (ns_draw_underwave): width and x are EamcsCGFloat.
9662 (ns_draw_box): thickness is CGFloat.
9663 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
9664 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
9665 if not in main thread.
9666 (ns_get_pending_menu_title, ns_check_menu_open)
9667 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
9668 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
9669 (sendFromMainThread:): New method.
9670 (changeFont:): size is CGFloat.
9671 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
9672 Disable warning about permanent text.
a6c4680a 9673 (characterIndexForPoint:): Adjust return type depending on GNUstep
c0342369
JD
9674 version.
9675 (mouseDown:): delta is CGFloat.
9676 (updateFrameSize): Remove unised variable f.
9677 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
9678 Cast float to EmacsCGFloat.
9679 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
9680 also to -1 when restoring.
9681 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
9682 inside NS_IMPL_COCOA.
9683 (toggleFullScreen:): Put call to toggleFullScreen inside
9684 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
9685 (setPosition:portion:whole:): por is CGFloat.
9686 (getMouseMotionPart:window:x:y:): Add F suffix to float.
9687 (mouseDown:): Use CGFloat.
9688 (mouseDragged:): Remove unised variable edge.
9689 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
9690
a6c4680a 9691 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
c0342369
JD
9692 of CGFloat differs.
9693 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
9694 when NS_IMPL_GNUSTEP.
9695 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
9696 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
9697 (EmacsToolbar): Add clearAll. Add tag argument to
9698 addDisplayItemWithImage.
9699 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
9700
9701 * nsselect.m (ns_get_local_selection): Remove unused variable type.
9702
9703 * nsmenu.m (ns_update_menubar): Make static.
9704 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
9705 (fillWithWidgetValue:): Add cast to SEL for setAction.
9706 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
a6c4680a 9707 (update_frame_tool_bar): Update code for GNUstep.
c0342369
JD
9708 (clearAll): New method.
9709 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
4f405069 9710 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
e7b41c4c 9711 Move identifierToItem setObject and activeIdentifiers addObject before
c0342369
JD
9712 call to insertItemWithItemIdentifier.
9713 (validateVisibleItems): Fix indentation.
9714 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
9715 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
9716 UtilityWindow to aStyle, remove call to setStyleMask.
9717
9718 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
9719
9720 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
9721 (ns_charset_covers, ns_get_covering_families, nsfont_open):
9722 Use F suffix on floats.
9723 (ns_char_width): Returns CGFloat.
9724 (ns_ascii_average_width): w is CGFloat instead of float.
e7b41c4c 9725 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
c0342369
JD
9726 DPSxshow.
9727 (ns_glyph_metrics): CGFloat instead of float.
9728
a0eb10b3
JB
9729 * nsfns.m (x_set_foreground_color, x_set_background_color):
9730 Use EmacsCGFloat.
9731 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
9732 remove unused variables.
9733 (Fns_read_file_name): Keep track if panel is for save.
9734 Use ns_filename_from_panel/ns_directory_from_panel.
c0342369 9735 (Fns_list_services): delegate only used for COCOA.
a6c4680a
GM
9736 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
9737 Just return the input if GNUstep.
c0342369
JD
9738 (x_screen_planes): Remove.
9739 (Fxw_color_values): Use EmacsCGFloat
9740 (Fns_display_monitor_attributes_list): Only get screen number for
9741 Cocoa.
ef099a94 9742 (getDirectory, getFilename): Remove from EmacsOpenPanel and
c0342369
JD
9743 EmacsSavePanel.
9744 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
9745 ns_directory_from_panel.
9746
da9aff11
PE
97472013-06-01 Paul Eggert <eggert@cs.ucla.edu>
9748
9749 * process.c (handle_child_signal): Also use WCONTINUED.
9750 This is so that list-processes doesn't mistakenly list the process
9751 as stopped, when the process has actually been continued and is
9752 now running.
9753
0e64479a
PE
97542013-05-31 Paul Eggert <eggert@cs.ucla.edu>
9755
fc186a96
PE
9756 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
9757 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
9758 not already configured.
9759
0e64479a
PE
9760 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
9761
38b787fa
EZ
97622013-05-29 Eli Zaretskii <eliz@gnu.org>
9763
9764 * Makefile.in (mostlyclean): Remove *.res files.
9765
22513e52
SM
97662013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
9767
9768 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
9769 a buffer (bug#8447).
9770
6ef3db10
EZ
97712013-05-27 Eli Zaretskii <eliz@gnu.org>
9772
9773 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
9774 display vector, and we backtrack, handle the case that the
9775 previous character position is also displayed from a display
9776 vector or covered by a display string or image. (Bug#14476)
9777
6799bb26
JD
97782013-05-25 Jan Djärv <jan.h.d@swipnet.se>
9779
9780 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
9781 (struct MonitorInfo, free_monitors): Remove.
9782 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
9783 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
9784 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
9785 Qframes, Qsource.
9786
9787 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
9788 (struct MonitorInfo, free_monitors): Remove.
9789 (ns_screen_name): Make static.
9790 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
9791 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
9792 Qframes, Qsource.
9793
9794 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
9795 (struct MonitorInfo): New struct.
9796 (free_monitors, make_monitor_attribute_list): Declare.
9797
22513e52
SM
9798 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
9799 New Lisp_Object:s.
6799bb26
JD
9800 (free_monitors, make_monitor_attribute_list): New functions.
9801 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
9802 Qsource.
9803
38cd43eb
XF
98042013-05-25 Xue Fuqiao <xfq.free@gmail.com>
9805
9806 * callproc.c (call_process): Refine the doc string. (Bug#14045)
9807
2af0948d
SM
98082013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
9809
a7eb9b0f
SM
9810 * keyboard.c: Apply keyboard decoding only to events that come directly
9811 from the tty, not from unread-command-events (bug#14368).
0f1d2934 9812 (read_event_from_main_queue): New function, extracted from read_char.
a7eb9b0f
SM
9813 (read_decoded_char): Remove.
9814 (read_decoded_event_from_main_queue): New function to replace it.
9815 (read_char): Use it.
9816 (read_key_sequence): Use read_char rather than read_decoded_char.
9817
2af0948d
SM
9818 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
9819
9698f11c 98202013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
1413e9a5
BR
9821
9822 * casetab.c (init_casetab_once): Fix last change (bug#14424).
9823
e6d2f155
KH
98242013-05-22 Kenichi Handa <handa@gnu.org>
9825
9826 The following changes are to fix the setting of
9827 buffer-file-coding-system on, for instance, C-x RET c unix RET
9828 _FILE_OF_DOS_EOL_TYPE_ RET.
9829
9830 * coding.h (struct coding_system): New member detected_utf8_chars.
9831
9832 * coding.c (detect_coding_utf_8): Count characters and check EOL
9833 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
9834 BOM is there.
9835 (setup_coding_system): Do not initialize coding->head_ascii.
9836 (check_ascii): Do not set coding->eol_seen but update it. Do not
9837 call adjust_coding_eol_type here.
1413e9a5
BR
9838 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
9839 If the eol-type of CODING is already specified, adjust the eol type
e6d2f155
KH
9840 of the found coding-system.
9841 (decode_coding_gap): Cancel previous change. Utilize the
9842 character numbers counted by detect_coding_utf_8. Fix detection
9843 of BOM for utf-8.
9844
9698f11c 98452013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
fc30d803
SM
9846
9847 * search.c (looking_at_1): Only set last_thing_searched if the match
9848 changed the match-data (bug#14281).
9849
ecc3c6ed
DA
98502013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
9851
9852 * xdisp.c (reseat_at_previous_visible_line_start):
a0eb10b3 9853 Already declared in dispextern.h, so remove it here.
ecc3c6ed
DA
9854 (move_it_vertically_backward): Likewise.
9855
5ba8bf35
YM
98562013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9857
9858 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
d6635ba2 9859 (Fx_display_pixel_width, Fx_display_pixel_height)
fc30d803
SM
9860 (Fx_display_mm_width, Fx_display_mm_height):
9861 Mention `display-monitor-attributes-list' in docstrings.
5ba8bf35 9862
91e8418b 9863 * nsfns.m (ns_get_screen): Remove function. All uses removed.
a0eb10b3 9864 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
91e8418b
YM
9865 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
9866 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
9867 (Fx_display_backing_store, Fx_display_visual_class)
9868 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
9869 (Fx_display_grayscale_p, Fx_display_pixel_width)
9870 (Fx_display_pixel_height, Fx_display_planes)
9871 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
9872 (Fx_display_screens): Don't confuse X11 screens with NS screens.
9873 (Fx_display_mm_width, Fx_display_mm_height)
9874 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
9875 height for all physical monitors as in X11.
9876
fc30d803
SM
9877 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
9878 Return pixel width or height for all physical monitors as in X11.
91e8418b 9879
31ff141c
PE
98802013-05-18 Paul Eggert <eggert@cs.ucla.edu>
9881
9882 Port --enable-gcc-warnings to clang.
9883 * bytecode.c (exec_byte_code):
9884 * regex.c:
9885 Redo diagnostic pragmas to pacify clang, too.
9886 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
9887 * editfns.c (Fencode_time):
9888 * fileio.c (file_accessible_directory_p):
9889 * font.c (font_unparse_xlfd):
9890 Use '&"string"[index]' instead of '"string" + (index)'.
9891 * undo.c (user_error): Remove; unused.
9892
df065a0b
EZ
98932013-05-16 Eli Zaretskii <eliz@gnu.org>
9894
04d360e7
EZ
9895 * insdel.c (insert_1_both): Document the arguments, instead of
9896 referring to insert_1, which no longer exists.
9897
5bb98290
EZ
9898 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
9899 some window, increment windows_or_buffers_changed, so that
9900 *Messages* display in that window is updated. (Bug#14408)
9901
df065a0b
EZ
9902 * w32.c: Include epaths.h.
9903 (init_environment): Use cmdproxy.exe without leading directories.
9904 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
9905 case.
9906 (gettimeofday): Adjust signature and return value to Posix
9907 expectations.
9908
9909 * unexw32.c (open_output_file): Delete the existing emacs.exe
9910 before creating it, to break the hard link to the versioned
9911 executable.
9912
9913 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
9914 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
9915 (FIRSTFILE_OBJ): New variables.
9916 (W32_RES): Rename to EMACSRES. All users changed.
9917 (base_obj): Use $(CM_OBJ).
9918 (ALLOBJS): Use $(FIRSTFILE_OBJ).
9919 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
9920 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
9921 $(W32_RES_LINK) before $(LIBES).
9922 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
9923
1aa8d505
SM
99242013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9925
6e911150
SM
9926 * makefile.w32-in (DOC): Use just "DOC".
9927
9928 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
9929
1aa8d505
SM
9930 * process.c: Export default filters and sentinels to Elisp.
9931 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
9932 New constants.
9933 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
9934 (Fset_process_sentinel, Fformat_network_address):
9935 Default to them instead of nil.
9936 (server_accept_connection): Sentinels can't be nil any more.
9937 (read_and_dispose_of_process_output): New function, extracted from
9938 read_process_output.
9939 (read_process_output): Use it; filters can't be nil.
9940 (Finternal_default_process_filter): New function, extracted from
9941 read_process_output.
9942 (exec_sentinel_unwind): Remove function.
9943 (exec_sentinel): Don't zilch sentinel while running.
9944 (status_notify): Sentinels can't be nil.
9945 (Finternal_default_process_sentinel): New function extracted from
9946 status_notify.
9947 (setup_process_coding_systems): Default filter is not nil any more.
9948 (syms_of_process): Export new Elisp functions and initialize
9949 new constants.
9950 * lisp.h (make_lisp_proc): New function.
9951
5ac2eb34
SM
99522013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9953
9954 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
9955
eda9c7d7
EZ
99562013-05-14 Eli Zaretskii <eliz@gnu.org>
9957
9958 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
5ac2eb34
SM
9959 unless we know that the window w is a leaf window.
9960 Another attempt at solving bug#14062.
eda9c7d7 9961
8fdeaad5
JD
99622013-05-14 Jan Djärv <jan.h.d@swipnet.se>
9963
9964 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
9965 fdesc (Bug#14375).
9966
44aa9ee6
PE
99672013-05-12 Paul Eggert <eggert@cs.ucla.edu>
9968
9969 * image.c (gif_load): Check that subimages fit (Bug#14345).
9970
759fd763
SM
99712013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
9972
9973 * lread.c (skip_dyn_eof): New function.
9974 (read1): Use it to skip the end of a file in response to #@00.
9975
9976 * doc.c (get_doc_string): Slightly relax the sanity checking.
9977
4465bfb4
JD
99782013-05-09 Jan Djärv <jan.h.d@swipnet.se>
9979
9980 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
9981 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
9982 (MonitorInfo): New struct.
9983 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
9984 (Fns_display_monitor_attributes_list): New functions.
9985 (display-usable-bounds): Remove.
9986 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
9987 Qsource.
9988
7583e2a0
PE
99892013-05-09 Paul Eggert <eggert@cs.ucla.edu>
9990
9991 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
9992 (GTK_CHECK_VERSION): New macro, if not already defined.
9993 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
9994 replaced by GTK_CHECK_VERSION.
9995
ad75d77e
PE
99962013-05-08 Paul Eggert <eggert@cs.ucla.edu>
9997
9998 * xterm.h (GTK_PREREQ): New macro.
9999 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
10000 to use this macro instead, for consistency and clarity.
10001
07525f77
EZ
100022013-05-08 Eli Zaretskii <eliz@gnu.org>
10003
10004 * xdisp.c (row_for_charpos_p): New function, with code of
10005 cursor_row_p, but accepts an additional argument CHARPOS instead
10006 of using a hardcoded PT.
10007 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
10008 (row_containing_pos): Call row_for_charpos_p instead of partially
10009 doing the same. Fixes cursor positioning under longlines-mode
10010 when longlines-show-effect includes more than one newline, when
10011 moving the cursor vertically up.
10012
d901fc8d
JB
100132013-05-08 Juanma Barranquero <lekktu@gmail.com>
10014
10015 * makefile.w32-in (ACL_H): New macro.
10016 ($(BLD)/fileio.$(O)): Update dependencies.
10017
f269bc61
PE
100182013-05-07 Paul Eggert <eggert@cs.ucla.edu>
10019
e7b41c4c 10020 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
ffdc270a
PE
10021 * Makefile.in (LIB_ACL): New macro.
10022 (LIBACL_LIBS): Remove.
10023 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
10024 * fileio.c: Include <acl.h>.
10025 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
10026 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
10027 !acl_errno_valid.
10028 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
10029 it ourselves.
10030
f269bc61
PE
10031 * unexelf.c: Don't assume ElfW (Half) fits in int.
10032 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
10033 when dealing with ElfW (Half) values, since they can exceed 2**31
10034 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
10035 (entry_address): Omit unused NUM arg. All uses changed.
10036
a261c53e
JL
100372013-05-07 Juri Linkov <juri@jurta.org>
10038
10039 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
10040 to the string converted from number with `Fnumber_to_string'.
10041 (Bug#14254)
10042
2b66427d
PE
100432013-05-07 Paul Eggert <eggert@cs.ucla.edu>
10044
10045 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
10046 This fixes a problem introduced by my previous change.
10047
15acfe41
GM
100482013-05-07 Glenn Morris <rgm@gnu.org>
10049
10050 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
10051
5ea03bf5
JD
100522013-05-07 Jan Djärv <jan.h.d@swipnet.se>
10053
10054 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
10055
e0c9d565
PE
100562013-05-07 Paul Eggert <eggert@cs.ucla.edu>
10057
10058 Static checking by GCC 4.8.0.
10059 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
10060 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
10061 (x_get_monitor_attributes_fallback)
10062 (x_get_monitor_attributes_xinerama)
10063 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
10064 Define only if USE_GTK.
10065 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
10066 (x_get_monitor_attributes_fallback): Omit unused locals.
10067 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
10068 Use double, not float, to avoid mixed-mode floating point arithmetic.
10069
4e3f9230
YM
100702013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10071 Jan Djärv <jan.h.d@swipnet.se>
10072
10073 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
10074 (XINERAMA_CFLAGS): New macros.
10075 (ALL_CFLAGS, LIBES): Use them.
10076
10077 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
10078 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
10079 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
10080 (syms_of_xfns): DEFSYM them.
10081 (struct MonitorInfo): New struct.
10082 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
10083 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
10084 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
10085 (x_get_monitor_attributes_xinerama): New functions.
10086 (Fx_display_monitor_attributes_list): New primitive.
10087 (syms_of_xfns): Defsubr it.
10088
10089 * xterm.h (x_display_info): Add Xatom_net_workarea and
10090 Xatom_net_current_desktop.
10091
10092 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
10093 and dpyinfo->Xatom_net_current_desktop.
10094
05839b6a
EZ
100952013-05-06 Eli Zaretskii <eliz@gnu.org>
10096
10097 * xdisp.c (pos_visible_p): Use the special code for finding the
10098 beginning of a display property or overlay for any "replacing"
10099 display property, not just for display strings. This solves
10100 incorrect reporting of position by posn-at-point. (Bug#14241)
10101
dc4a2ee0
PE
101022013-05-06 Paul Eggert <eggert@cs.ucla.edu>
10103
5ee94506
PE
10104 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
10105 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
10106 Verify that ElfW (Half) fits in int.
10107 (fatal): Use same signature as lisp.h.
10108 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
10109 configure and build with -DUNEXELF_DEBUG without worrying about
10110 other modules that use DEBUG.
10111 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
10112 possibly-wide integers now uses it instead of plain fprintf.
10113 (entry_address): New function, which avoids problems with 32-bit
10114 overflow on 64-bit hosts.
10115 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
10116 (round_up): Don't assume the remainder fits in int.
10117 (find_section): Use bool for boolean. Simplify debug code.
10118 (unexec): Don't assume file sizes fit in int or size_t.
10119 Omit unnecessary trailing newline in 'fatal' format.
10120 Use strerror rather than outputting decimal error number.
10121 Remove unused code when emacs is not defined;
10122 this file relies on Emacs now.
10123 Don't assume e_phnum and e_shnum are positive.
10124
dc4a2ee0
PE
10125 * regex.c: Fix problems when DEBUG is defined.
10126 (extract_number, extract_number_and_incr): Define regardless of
10127 whether DEBUG is defined; that's simpler and makes the code less
10128 likely to go stale in the normal case when DEBUG is not defined.
10129 Return int rather than taking an int * arg. All callers changed.
10130 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
10131 Remove, replacing with ...
10132 (DEBUG_PRINT): New macro. All callers changed.
10133 (DEBUG_COMPILES_ARGUMENTS): New macro.
10134 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
10135 (print_compiled_pattern, print_double_string) [DEBUG]:
10136 Use prototype rather than old-style definition.
10137 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
10138 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
10139 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
10140 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
10141 Don't assume ptrdiff_t, size_t, and long are the same width as int.
10142 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
10143 This matters only when DEBUG is defined.
10144
14c7ed05
EZ
101452013-05-05 Eli Zaretskii <eliz@gnu.org>
10146
10147 * xdisp.c (set_iterator_to_next): Set the
10148 ignore_overlay_strings_at_pos_p flag only if we are _really_
10149 iterating over an overlay string, as indicated by the
10150 current.overlay_string_index member. (Bug#14306)
10151
e6076b1b
JD
101522013-05-05 Jan Djärv <jan.h.d@swipnet.se>
10153
10154 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
10155 to where it is used, to avoid autorelease issues (Bug#14050).
10156
cbee2131
PE
101572013-05-05 Paul Eggert <eggert@cs.ucla.edu>
10158
10159 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
10160 * fileio.c (syms_of_fileio): Implement this.
10161 * filelock.c (create_lock_file): If symbolic links don't work, so
10162 we use a regular file as a lock file, do not fsync the lock file;
10163 it's not needed.
10164
30c7e542
SM
101652013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
10166
10167 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
10168 (syms_of_minibuf): Adjust accodingly.
10169 * lread.c (Fread):
10170 * callint.c (Fcall_interactively): Adjust calls accordingly.
10171
5bebd186
EZ
101722013-05-04 Eli Zaretskii <eliz@gnu.org>
10173
10174 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
30c7e542
SM
10175 w->contents is a buffer before computing everything else.
10176 Use parentheses to disambiguate last part of the condition.
5bebd186
EZ
10177
10178 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
10179 assertion violations. (Bug#14062)
10180
0fb0a4f3
DR
101812013-05-01 David Reitter <david.reitter@gmail.com>
10182
10183 * nsfns.m (ns_tooltip): Initialize.
10184
9e63b4a5
EZ
101852013-04-28 Eli Zaretskii <eliz@gnu.org>
10186
10187 * coding.c (decode_coding_gap): Don't remove the character before
10188 a newline unless it's a CR character. (Bug#14287)
10189
ad60824e
DN
101902013-04-28 Dan Nicolaescu <dann@gnu.org>
10191
10192 * dispextern.h (struct face): Move enum face_underline_type
10193 earlier so that bitfields can be in the same word.
10194
edbdcec0
JD
101952013-04-28 Jan Djärv <jan.h.d@swipnet.se>
10196
10197 * nsfns.m (handlePanelKeys): New function.
10198 (EmacsOpenPanel:performKeyEquivalent:)
10199 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
10200 arrows/function/control and copy/paste keys (Bug#14296).
10201
0208ede7
JL
102022013-04-27 Juri Linkov <juri@jurta.org>
10203
10204 * callint.c (Fcall_interactively): Call `Qread_number' for
10205 interactive code letter `n' instead of using duplicate code.
10206 (Bug#14254)
10207
b8dd59f7
PE
102082013-04-27 Paul Eggert <eggert@cs.ucla.edu>
10209
10210 * systime.h (make_timeval): Declare as 'const'.
10211
8bd722db
KH
102122013-04-27 Kenichi Handa <handa@gnu.org>
10213
10214 * font.c (font_open_entity): Always open a font of manageable
10215 size.
10216
13d0e56f 102172013-04-26 Paul Eggert <eggert@cs.ucla.edu>
cbee2131 10218
f780d632
PE
10219 Port better to AIX (Bug#14258).
10220 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
10221 to pacify AIX xlc.
10222
ec509856
KH
102232013-04-24 Kenichi Handa <handa@gnu.org>
10224
10225 * coding.c (decode_coding_iso_2022): When an invalid escape
10226 sequence is encountered, reset the invocation and designation
10227 status to the safest one.
10228
84fc48e5
PE
102292013-04-22 Paul Eggert <eggert@cs.ucla.edu>
10230
10231 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
10232 Without this fix, "make distclean" leaves stamp-h1 behind.
10233
806bda47
EC
102342013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
10235
10236 * w32fns.c (w32_fullscreen_rect): New function to compute the
10237 window rectangle for the given fullscreen mode.
10238 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
10239 longer tunes the window size. This keeps the window's edges flush
10240 with the screen and allows the taskbar to hide itself in fullboth.
10241
10242 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
10243 window decorations and uses the entire screen.
10244
10245 * w32term.h (w32_fullscreen_rect) Add prototype.
10246 (struct w32_output): Replace normal_width, normal_height,
10247 normal_top, and normal_left members with a single normal_placement
10248 struct.
10249 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
10250 Remove macros.
10251 (FRAME_NORMAL_PLACEMENT): New macro.
10252
9cc2810b
JB
102532013-04-16 Juanma Barranquero <lekktu@gmail.com>
10254
10255 * minibuf.c (Ftest_completion): Silence compiler warning.
10256
fd16b54c
EZ
102572013-04-15 Eli Zaretskii <eliz@gnu.org>
10258
10259 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
5fbcd237 10260 bug#14062.
fd16b54c
EZ
10261
10262 * frame.h (WINDOW_FRAME): Protect macro and its argument with
10263 parentheses.
10264
10265 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
10266 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
10267 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
10268 parentheses where appropriate.
10269
9e3379a0
PE
102702013-04-14 Paul Eggert <eggert@cs.ucla.edu>
10271
10272 * keyboard.c (timer_start_idle): Remove no-longer-used local.
10273
ddd6b685
EZ
102742013-04-14 Eli Zaretskii <eliz@gnu.org>
10275
a544fbe1 10276 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
ddd6b685
EZ
10277 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
10278 Mention in the doc string that setting these variables takes
10279 effect only after a call to set-window-buffer. (Bug#14200)
10280
29b79ba1
EZ
102812013-04-13 Eli Zaretskii <eliz@gnu.org>
10282
10283 * indent.c (Fvertical_motion): Don't consider display strings on
10284 overlay strings as display strings on the buffer position we
10285 started from. This prevents vertical cursor motion from jumping
10286 more than one line when there's an overlay string with a display
10287 property at end of line.
10288 Reported by Karl Chen <Karl.Chen@quarl.org> in
10289 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
10290
562c6ee9
SM
102912013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
10292
10293 * window.c (select_window): `record_buffer' even if window is
10294 already selected (bug#14191).
10295
fcc1fe85
EZ
102962013-04-11 Eli Zaretskii <eliz@gnu.org>
10297
10298 * window.c (Fwindow_end): Test more flags, including the buffer's
10299 last_overlay_modified flag, to determine whether the window's
10300 display is really up-to-date. Prevents the function from
10301 returning a stale value. (Bug#14170)
10302 (Fwindow_line_height): Fix the test for up-to-date-ness of the
10303 current matrix.
10304
f009190a
EZ
103052013-04-10 Eli Zaretskii <eliz@gnu.org>
10306
10307 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
562c6ee9
SM
10308 garbaged only if it is not already the top frame on its TTY.
10309 This prevents flickering due to constant redrawing of TTY frames when
f009190a
EZ
10310 there are GUI frames open in the same session. (Bug#13864)
10311
78ce603d
SM
103122013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
10313
10314 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
10315 of marking the idle timers directly.
10316
a8036e40
SM
103172013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
10318
10319 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
10320 tables (bug#14054).
10321
7ffe7ef6
SM
103222013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
10323
10324 * window.c (select_window): Don't record_buffer while the invariant is
10325 temporarily broken (bug#14161).
10326
10327 * fns.c (Fdelq): Don't assume !NILP => CONSP.
10328
7d9f6883
EZ
103292013-04-07 Eli Zaretskii <eliz@gnu.org>
10330
10331 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
10332
5406cfd9
RF
103332013-04-07 Romain Francoise <romain@orebokech.com>
10334
10335 Ignore additional platform-specific ACL errors (Bug#13702).
10336 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
10337 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
10338
95c0e83b
JD
103392013-03-31 Jan Djärv <jan.h.d@swipnet.se>
10340
10341 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
10342 f->output_data.ns.
10343
876da980
PE
103442013-04-07 Paul Eggert <eggert@cs.ucla.edu>
10345
10346 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
10347 This bug was introduced by my 2013-02-25 change that simplified
10348 data_start configuration. Without this change, on GNU/Linux
10349 an Emacs configured with --enable-profiling fails immediately
10350 due to a profiler signal.
10351 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
10352 with these flags. On platforms where special flags are needed
10353 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
10354 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
10355 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
10356
7452b7bd
DA
103572013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
10358
10359 Get rid of some platform-specific functions examining window
10360 system and its capabilities. This is a partial rework of the
10361 2013-04-05 change.
10362 * lisp.h (have_menus_p): Remove prototype. This function is
10363 replaced with platform-independent window_system_available.
10364 (check_window_system): Move to...
10365 * frame.h (decode_window_system_frame, window_system_available):
10366 ...here, add new prototypes.
10367 * frame.c (window_system_available, decode_window_system_frame):
10368 New functions.
10369 (check_window_system): Platform-independent now.
10370 * xterm.h (x_in_use): Remove declaration.
10371 (check_x_frame):
10372 * w32term.h (check_x_frame):
10373 * nsterm.h (check_x_frame): Remove prototypes. This function
10374 is replaced with platform-independent decode_window_system_frame.
10375 * msdos.c (have_menus_p): Remove.
10376 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
10377 Remove platform-specific functions. Use check_window_system,
10378 decode_window_system_frame and check_ns_display_info where
10379 appropriate. Minor style and comment tweaks.
10380 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
10381 (check_x_frame): Likewise.
10382 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
10383 Likewise.
10384 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
10385 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
10386 * xmenu.c, xselect.c: All related users changed.
10387
251e9147
KH
103882013-04-03 Kenichi Handa <handa@gnu.org>
10389
10390 The following changes is to optimize the code for reading UTF-8
10391 files.
10392
562c6ee9 10393 * coding.c (check_ascii): Rename from detect_ascii. Return value
251e9147
KH
10394 changed. Check EOL format. Do not call adjust_coding_eol_type
10395 here.
10396 (check_utf_8): New function.
10397 (adjust_coding_eol_type): Do nothing if already adjusted.
10398 (detect_coding): Compare the return value of check_ascii with
10399 coding->src_bytes. Call adjust_coding_eol_type if necessary.
10400 (decode_coding_gap): Optimize for valid UTF-8.
10401
8bc369d4
KH
104022013-03-21 Kenichi Handa <handa@gnu.org>
10403
10404 * coding.c (syms_of_coding): Cancel previous change.
10405
10406 * insdel.c (insert_from_gap): Fix previous change.
10407
73931ad1
DA
104082013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
10409
10410 Consistently use platform-specific function to detect window system.
10411 * lisp.h (check_window_system): New prototype. This function is
10412 going to replace check_x, check_w32 and check_ns.
10413 (have_menus_p): Mention msdos.c in comment.
10414 * fontset.c (check_window_system_func): Remove. Adjust all users.
10415 * fontset.h (check_window_system_func): Remove prototype.
10416 * nsterm.h (check_ns):
10417 * xterm.h (check_x):
10418 * w32term.h (check_w32): Likewise.
10419 * menu.c (Fx_popup_menu): Use check_window_system.
10420 * msdos.c (check_window_system): Define for MS-DOS.
10421 * nsfns.m (check_window_system): Define for NS. Adjust all users.
10422 * w32fns.c (check_window_system): Likewise for MS-Windows.
10423 * xfns.c (check_window_system): Likewise for X.
10424 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
10425 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
10426
7216e43b
PE
104272013-04-02 Paul Eggert <eggert@cs.ucla.edu>
10428
10429 Prefer < to > in range checks such as 0 <= i && i < N.
10430 This makes it easier to visualize quantities on a number line.
10431 This patch doesn't apply to all such range checks,
10432 only to the range checks affected by the 2013-03-24 change.
10433 This patch reverts most of the 2013-03-24 change.
10434 * alloc.c (xpalloc, Fgarbage_collect):
10435 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
10436 * character.c (string_escape_byte8):
10437 * charset.c (read_hex):
10438 * data.c (cons_to_unsigned):
10439 * dispnew.c (update_frame_1):
10440 * doc.c (Fsubstitute_command_keys):
10441 * doprnt.c (doprnt):
10442 * editfns.c (hi_time, decode_time_components):
10443 * fileio.c (file_offset):
10444 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
10445 * font.c (font_intern_prop):
10446 * frame.c (x_set_alpha):
10447 * gtkutil.c (get_utf8_string):
10448 * indent.c (check_display_width):
10449 * keymap.c (Fkey_description):
10450 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
10451 * lread.c (read1):
10452 * minibuf.c (read_minibuf_noninteractive):
10453 * process.c (wait_reading_process_output):
10454 * search.c (Freplace_match):
10455 * window.c (get_phys_cursor_glyph):
10456 * xdisp.c (redisplay_internal):
10457 * xsmfns.c (smc_save_yourself_CB):
10458 Prefer < to > for range checks.
10459 * dispnew.c (sit_for): Don't mishandle NaNs.
10460 This fixes a bug introduced in the 2013-03-24 change.
10461 * editfns.c (decode_time_components): Don't hoist comparison.
10462 This fixes another bug introduced in the 2013-03-24 change.
10463
92759988
DA
104642013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
10465
10466 * frame.h (struct frame): Drop scroll_bottom_vpos
10467 member becaue all real users are dead long ago.
10468 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
10469 * xdisp.c (redisplay_internal): Adjust user.
10470
812a0930 104712013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
9a1971bb 10472
f38ab167
JD
10473 * nsmenu.m (showAtX:Y:for:): setLevel to
10474 NSPopUpMenuWindowLevel (Bug#13998).
10475
6d01f1fe
JD
104762013-03-30 Jan Djärv <jan.h.d@swipnet.se>
10477
10478 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
10479 (ns_check_pending_open_menu): Declare.
10480
10481 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
10482 (x_activate_menubar): Update the menu with title that matches
10483 ns_get_pending_menu_title, and call
10484 ns_check_pending_openmenu (Bug#12698).
10485 (menuWillOpen:): New method.
10486 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
10487
10488 * nsterm.m (menu_will_open_state, menu_mouse_point)
10489 (menu_pending_title): New varaibles.
10490 (ns_get_pending_menu_title, ns_check_menu_open)
10491 (ns_check_pending_open_menu): New functions.
10492
781f4782
DA
104932013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
10494
10495 * indent.c (current_column_bol_cache): Remove leftover which is not
10496 used in Fmove_to_column any more.
10497 (current_column, scan_for_column): Adjust users.
10498 * keyboard.c (last_point_position_buffer, last_point_position_window):
10499 Remove leftovers which are not used for recording undo any more.
10500 (command_loop_1, syms_of_keyboard): Adjust users.
10501 * xdisp.c (last_max_ascent): Remove leftover which is not used in
10502 redisplay_window any more.
10503 (move_it_to): Adjust user.
10504
1921c31b
JB
105052013-03-29 Juanma Barranquero <lekktu@gmail.com>
10506
10507 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
10508 Update dependencies.
10509
717b8bcd
SM
105102013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
10511
10512 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
10513 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
10514 forward references.
10515
e74aeda8
DA
105162013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
10517
10518 * window.h (struct window): Replace hchild, vchild and buffer slots
fa9daa28 10519 with a single slot 'contents'. This is possible because each valid
e74aeda8
DA
10520 window may have either the child window (in vertical or horizontal
10521 combination) or buffer to display (for the leaf window). Using that,
fa9daa28 10522 a lot of operations to traverse and/or change window hierarchies may
e74aeda8
DA
10523 be simplified. New member horizontal is used to distinguish between
10524 horizontal and vertical combinations of internal windows.
10525 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
10526 (WINDOW_VERTICAL_COMBINATION_P): New macros.
10527 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
10528 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
10529 Use contents slot, not buffer, where appropriate.
10530 (wset_combination): New function.
10531 (wset_buffer): Add eassert.
10532 (Fframe_first_window): Simplify the loop reaching first window.
10533 (Fwindow_buffer): Use WINDOW_LEAF_P.
10534 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
10535 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
10536 (unshow_buffer): Convert initial debugging check to eassert.
10537 (replace_window, recombine_windows, Fdelete_other_windows_internal)
10538 (make_parent_window, window_resize_check, window_resize_apply)
10539 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
10540 (Fset_window_configuration, delete_all_child_windows, save_window_save):
10541 Adjust to match struct window changes.
10542 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
10543 (mark_window_cursors_off, count_windows, get_leaf_windows)
10544 (foreach_window_1): Simplify the loop.
10545 * alloc.c (mark_object): Do not check for the leaf window because
10546 internal windows has no glyph matrices anyway.
10547 * dispnew.c (clear_window_matrices, showing_window_margins_p)
10548 (allocate_matrices_for_window_redisplay, fake_current_matrices)
10549 (allocate_matrices_for_frame_redisplay, free_window_matrices)
10550 (build_frame_matrix_from_window_tree, mirror_make_current)
10551 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
10552 (update_window_tree, set_window_update_flags): Simplify the loop.
10553 (sync_window_with_frame_matrix_rows): Enforce live window.
10554 Use contents slot, not buffer, where appropriate.
10555 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
10556 and WINDOW_HORIZONTAL_COMBINATION_P.
10557 (make_frame_visible_1): Simplify the loop.
10558 Use contents slot, not buffer, where appropriate.
10559 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
10560 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
10561 (expose_window_tree): Likewise.
10562 Use contents slot, not buffer, where appropriate.
10563 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
10564 to avoid deleted windows. Use contents slot instead of buffer.
10565 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
10566 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
10567 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
10568 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
10569
121ab1cd
EZ
105702013-03-28 Eli Zaretskii <eliz@gnu.org>
10571
ef454cf7
EZ
10572 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
10573 identify the reasons for assertion violations in bug#14062 and
10574 similar ones.
21e930f8
EZ
10575 (Fx_show_tip): Fix compilation error under
10576 "--enable-check-lisp-object-type". (Bug#14073)
ef454cf7 10577
121ab1cd
EZ
10578 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
10579 Reported by <rzl24ozi@gmail.com>.
10580
5c89ca24
DA
105812013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
10582
10583 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
10584 start marker...
562c6ee9
SM
10585 (unwind_with_echo_area_buffer): ...to restore it here.
10586 This is needed to ensure that...
5c89ca24
DA
10587 (redisplay_window): ...both window markers are valid here,
10588 which is verified by eassert.
10589 * editfns.c (save_excursion_save): Do not assume that
10590 selected_window always displays the buffer.
c7f53895
DA
10591 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
10592 Fix comment.
5c89ca24 10593
f557c1b1
SM
105942013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
10595
10596 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
10597 the upcase table.
10598
40693bba 105992013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
10600
10601 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
10602
c86f791f
EZ
106032013-03-27 Eli Zaretskii <eliz@gnu.org>
10604
10605 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
10606 since MinGW's w32api headers do. This avoids compiler warnings.
10607
10608 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
10609 if already defined.
10610
c6e72e17
EZ
106112013-03-26 Eli Zaretskii <eliz@gnu.org>
10612
10613 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
10614
54e95010
JD
106152013-03-26 Jan Djärv <jan.h.d@swipnet.se>
10616
10617 * gtkutil.c (style_changed_cb): Check if frame is live and an
10618 X frame (Bug#14038).
10619
b88b62de
EZ
106202013-03-26 Eli Zaretskii <eliz@gnu.org>
10621
a18d7de6
EZ
10622 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
10623 Define only for _WIN32_WINNT less than 0x0500.
da9dcbb8
EZ
10624 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
10625 MinGW64.
8f5e14c8
EZ
10626 Move inclusion of time.h before sys/time.h, so that MinGW64 could
10627 see its own definitions of 'struct timeval' and 'struct timezone'.
a18d7de6 10628
b88b62de
EZ
10629 Fix incompatibilities between MinGW.org and MinGW64 headers.
10630 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
10631
10632 * w32.c (REPARSE_DATA_BUFFER): Guard with
10633 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
10634
c074e458
JD
106352013-03-25 Jan Djärv <jan.h.d@swipnet.se>
10636
10637 * xterm.c: Include X11/XKBlib.h
10638 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
10639
908589fd
AS
106402013-03-24 Andreas Schwab <schwab@linux-m68k.org>
10641
10642 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
10643 written backwards.
10644 * blockinput.h (input_blocked_p): Likewise.
10645 * bytecode.c (exec_byte_code): Likewise.
10646 * callproc.c (call_process_kill, call_process_cleanup)
10647 (Fcall_process): Likewise.
10648 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
10649 (Fccl_execute_on_string): Likewise.
10650 * character.c (string_escape_byte8): Likewise.
10651 * charset.c (read_hex): Likewise.
10652 * cm.c (calccost): Likewise.
10653 * data.c (cons_to_unsigned): Likewise.
10654 * dired.c (directory_files_internal, file_name_completion):
10655 Likewise.
10656 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
10657 (sit_for): Likewise.
10658 * doc.c (Fsubstitute_command_keys): Likewise.
10659 * doprnt.c (doprnt): Likewise.
10660 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
10661 * emacsgtkfixed.c: Likewise.
10662 * fileio.c (file_offset, Fwrite_region): Likewise.
10663 * floatfns.c (Fexpt, fmod_float): Likewise.
10664 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
10665 Likewise.
10666 * font.c (font_intern_prop): Likewise.
10667 * frame.c (x_set_alpha): Likewise.
10668 * gtkutil.c (get_utf8_string): Likewise.
10669 * indent.c (check_display_width): Likewise.
10670 * intervals.c (create_root_interval, rotate_right, rotate_left)
10671 (split_interval_right, split_interval_left)
10672 (adjust_intervals_for_insertion, delete_node)
10673 (interval_deletion_adjustment, adjust_intervals_for_deletion)
10674 (merge_interval_right, merge_interval_left, copy_intervals)
10675 (set_intervals_multibyte_1): Likewise.
10676 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
10677 * keymap.c (Fkey_description): Likewise.
10678 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
10679 * lread.c (openp, read_integer, read1, string_to_number):
10680 Likewise.
10681 * menu.c (ensure_menu_items): Likewise.
10682 * minibuf.c (read_minibuf_noninteractive): Likewise.
10683 * print.c (printchar, strout): Likewise.
10684 * process.c (create_process, Faccept_process_output)
10685 (wait_reading_process_output, read_process_output, send_process)
10686 (wait_reading_process_output): Likewise.
10687 * profiler.c (make_log, handle_profiler_signal): Likewise.
10688 * regex.c (re_exec): Likewise.
10689 * regex.h: Likewise.
10690 * search.c (looking_at_1, Freplace_match): Likewise.
10691 * sysdep.c (get_child_status, procfs_ttyname)
10692 (procfs_get_total_memory): Likewise.
10693 * systime.h (EMACS_TIME_VALID_P): Likewise.
10694 * term.c (dissociate_if_controlling_tty): Likewise.
10695 * window.c (get_phys_cursor_glyph): Likewise.
10696 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
10697 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
10698 Likewise.
10699 * xfns.c (Fx_window_property): Likewise.
10700 * xmenu.c (set_frame_menubar): Likewise.
10701 * xselect.c (x_get_window_property, x_handle_dnd_message):
10702 Likewise.
10703 * xsmfns.c (smc_save_yourself_CB): Likewise.
10704 * xterm.c (x_scroll_bar_set_handle): Likewise.
10705
2bf7d27a
DA
107062013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
10707
10708 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
10709 to be optional or nil. Adjust comment and convert it to docstring.
10710 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
10711 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
10712
a9ebfa0b
PE
107132013-03-24 Paul Eggert <eggert@cs.ucla.edu>
10714
10715 Static checking by GCC 4.8-20130319.
10716 * image.c (gif_load): Assume pass < 3 to pacify GCC.
10717 * process.c (Fset_process_datagram_address)
10718 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
35e951cd 10719 * xdisp.c (get_char_face_and_encoding)
a9ebfa0b
PE
10720 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
10721 (get_glyph_face_and_encoding): Prepare face before possibly using it.
10722 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
10723
4f3576ee
KB
107242013-03-24 Ken Brown <kbrown@cornell.edu>
10725
789b5e9a
KB
10726 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
10727 fix compilation on 64-bit Cygwin, where underscores are not
10728 automatically prepended.
10729
4f3576ee
KB
10730 * w32term.c (w32_initialize): Silence compiler warning.
10731
b5b7745f
EZ
107322013-03-23 Eli Zaretskii <eliz@gnu.org>
10733
cdc0d0bd
EZ
10734 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
10735 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
562c6ee9
SM
10736 variables, to save and restore frame dimensions.
10737 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
10738 after returning from a 'fullscreen' configuration.
10739 use SendMessage instead of PostMessage to send the SC_RESTORE message,
cdc0d0bd
EZ
10740 to avoid races between the main thread and the input thread.
10741
10742 * w32term.h (struct w32_output): New members normal_width,
10743 normal_height, normal_top, normal_left, and prev_fsmode.
10744 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
10745 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
10746 members of a frame.
10747
b5b7745f
EZ
10748 * w32term.c (w32fullscreen_hook): Record last value of the frame's
10749 'fullscreen' parameter. Always record previous width and height
10750 of the frame, except when switching out of maximized modes, so
10751 that they could be restored correctly, instead of resetting to the
10752 default frame dimensions. Send SC_RESTORE command to the frame,
10753 unless we are going to send SC_MAXIMIZE, to restore the frame
10754 resize hints in the mouse pointer shown by the window manager.
10755 (Bug#14032)
10756
10757 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
10758
10759 * lisp.h (get_frame_param): Adjust conditions for prototype
10760 declaration.
10761
a3454eed
KB
107622013-03-22 Ken Brown <kbrown@cornell.edu>
10763
10764 * unexcw.c: Drop unneeded inclusion of w32common.h.
10765 (report_sheap_usage): Declare.
10766 (read_exe_header): Add magic numbers for x86_64.
10767 (fixup_executable): Fix printf format specifier for unsigned long
10768 argument.
10769
5a49b79c
DA
107702013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
10771
10772 * frame.h (struct frame): Put menu_bar_window under #ifdef
10773 because this member is not needed when X toolkit is in use.
10774 (fset_menu_bar_window):
10775 * dispnew.c (clear_current_matrices, clear_desired_matrices)
10776 (free_glyphs, update_frame):
10777 * xdisp.c (expose_frame): Likewise.
10778 (display_menu_bar): Likewise. Remove redundant eassert.
10779 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
10780 toolkit is in use.
10781
d6723bf7
PE
107822013-03-21 Paul Eggert <eggert@cs.ucla.edu>
10783
7b1123d8
PE
10784 Use functions and constants to manipulate Lisp_Save_Value objects.
10785 This replaces code that used macros and strings and token-pasting.
10786 The change makes the C source a bit easier to follow,
10787 and shrinks the Emacs executable a bit.
10788 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
10789 (make_save_value): Change 1st arg from string to enum. All callers
10790 changed.
10791 (INTX): Remove.
10792 (mark_object): Use if, not #if, for GC_MARK_STACK.
10793 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
10794 (XSAVE_OBJECT): Now functions, not macros.
10795 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
10796 the constant was never used.
10797 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
10798 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
10799 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
10800 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
10801 New constants.
10802 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
10803 type3 with a single member save_type. All uses changed.
10804 (save_type, set_save_pointer, set_save_integer): New functions.
10805 * print.c (PRINTX): Remove.
10806
d6723bf7
PE
10807 * alloc.c: Remove redundant static declarations.
10808
5f24fa51
DA
108092013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
10810
10811 * window.h (struct window): Convert left_col, top_line, total_lines
10812 and total_cols from Lisp_Objects to integers. Adjust comments.
10813 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
10814 Remove.
10815 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
10816 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
10817 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
10818 Adjust users where appropriate.
10819
42143acd
DA
108202013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
10821
10822 * frame.h (struct frame): Drop resx and resy because the same data is
10823 available from window system-specific output context. Adjust users.
562c6ee9
SM
10824 (default_pixels_per_inch_x, default_pixels_per_inch_y):
10825 New functions to provide defaults when no window system available.
42143acd 10826 (FRAME_RES_X, FRAME_RES_Y): New macros.
562c6ee9 10827 (NUMVAL): Move from xdisp.c.
42143acd
DA
10828 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
10829 (Ffont_face_attributes, Fopen_font):
10830 * image.c (gs_load):
10831 * w32font.c (fill_in_logfont):
10832 * xdisp.c (calc_pixel_width_or_height):
10833 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
10834 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
10835
c0a17406
KH
108362013-03-20 Kenichi Handa <handa@gnu.org>
10837
10838 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
10839 to 1 (temporary workaround until a bug related to ASCII
10840 optimization is fixed).
10841
095d384d
DA
108422013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
10843
10844 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
10845 Signal error if window is not internal. Adjust docstring.
10846 (delete_all_child_windows): Use combination_limit to save the buffer.
10847 (Fset_window_configuration): Adjust accordingly.
cf4bb06d
DA
10848 * print.c (syms_of_print): Initialize debugging output not here...
10849 (init_print_once): ...but in a new function here.
10850 * lisp.h (init_print_once): Add prototype.
10851 * emacs.c (main): Add call to init_print_once. Adjust comments.
095d384d 10852
748fa866
DA
108532013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
10854
10855 * window.c (window_resize_check, window_resize_apply)
10856 (window_from_coordinates, recombine_windows, set_window_buffer)
10857 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
10858 (Fsplit_window_internal, Fdelete_window_internal)
10859 (freeze_window_starts): Use bool for booleans.
10860 * window.h (window_frame_coordinates, resize_frame_windows)
10861 (freeze_window_starts, set_window_buffer): Adjust prototypes.
10862
81519fd2
SM
108632013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
10864
10865 * dispnew.c (bitch_at_user): Use `user-error'.
10866
6db423a9
KB
108672013-03-17 Ken Brown <kbrown@cornell.edu>
10868
10869 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
10870 as return type of image_background. (Bug#13981)
10871 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
10872
8f2906f5
JD
108732013-03-16 Jan Djärv <jan.h.d@swipnet.se>
10874
960ce480 10875 * nsterm.m (updateFrameSize:): Change resize increments if needed.
6615748a 10876 (ns_select): Don't return with result uninitialized.
960ce480 10877
8f2906f5
JD
10878 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
10879 and getDirectory.
10880
81519fd2
SM
10881 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
10882 New functions.
8f2906f5
JD
10883 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
10884 directories. If filename is nil, get directory name (Bug#13932).
10885 Use getFilename and getDirectory.
10886 (getFilename, getDirectory): New methods for EmacsSavePanel and
10887 EmacsOpenPanel.
10888 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
10889
cded56c1
PE
108902013-03-15 Paul Eggert <eggert@cs.ucla.edu>
10891
10892 * coding.c (decode_coding_gap): Fix typo caught by static checking.
10893
251e9147 108942013-03-15 Kenichi Handa <handa@gnu.org>
8a44e6d1
KH
10895
10896 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
10897 (adjust_after_replace): Make it back to static. Delete the third
10898 arg text_at_gap_tail. Cancel the code for handling it.
10899
10900 * coding.h (struct coding_system): New member eol_seen.
10901
10902 * coding.c (detect_ascii): New function.
10903 (detect_coding): Set coding->head_ascii and coding->eol_seen only
10904 when the source bytes are actually scanned. On detecting for
10905 coding_category_utf_8_auto, call detect_ascii instead of scanning
10906 source bytes directly.
10907 (produce_chars): Call insert_from_gap with the new arg 0.
10908 (encode_coding): Likewise.
10909 (decode_coding_gap): Control ASCII optimization by the variable
10910 disable_ascii_optimization instead of #ifndef .. #endif.
10911 Deccode EOL format according to coding->eol_seen.
10912 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
10913 variable.
10914
8a44e6d1
KH
10915 * lisp.h (adjust_after_replace): Cancel externing it.
10916 (insert_from_gap): Adjust prototype.
10917
5f795e34
EZ
109182013-03-15 Eli Zaretskii <eliz@gnu.org>
10919
10920 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
10921 FULLSCREEN_MAXIMIZED. (Bug#13935)
10922
f258b4be
DA
109232013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
10924
10925 * region-cache.c (find_cache_boundary, move_cache_gap)
10926 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
10927 Simplify debugging check and convert to eassert. Adjust comment.
10928 (pp_cache): Put under ENABLE_CHECKING.
10929
a5cc4dde
EZ
109302013-03-14 Eli Zaretskii <eliz@gnu.org>
10931
10932 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
10933 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
10934 and WM_ACTIVATEAPP.
10935 (w32fullscreen_hook): If the frame is visible, reset
10936 f->want_fullscreen flag after changing the frame size. If the
10937 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
10938 (Bug#13953)
10939
3fc5e44a
DC
109402013-03-13 Daniel Colascione <dancol@dancol.org>
10941
10942 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
10943 too so that these builds can use Cygwin's file conversion
10944 functions. (We've been building and linking cygw32.o all along
10945 and just not using it.)
10946
47d7532e
PE
109472013-03-13 Paul Eggert <eggert@cs.ucla.edu>
10948
10949 File synchronization fixes (Bug#13944).
10950 * Makefile.in (LIB_FDATASYNC): New macro.
10951 (LIBES): Use it.
10952 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
10953 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
10954 Don't worry about HAVE_FSYNC, since a substitute fsync is
10955 available if the system lacks one.
10956 (Fwrite_regin): Retry fsync if interrupted.
10957
c7ffccaf
EZ
109582013-03-13 Eli Zaretskii <eliz@gnu.org>
10959
4e2df81d 10960 * w32term.c (w32_read_socket): If the Emacs frame is being
c7ffccaf
EZ
10961 activated, call w32fullscreen_hook, to make sure the new frame
10962 dimensions are in effect. (Bug#13937)
10963
8a7debc1
DA
109642013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
10965
10966 * xdisp.c (init_iterator): Simplify because both character and byte
10967 positions are either specified or -1. Add eassert. Adjust comment.
ffcd945e
DA
10968 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
10969 character and byte positions can be obtained from marker.
8a7debc1 10970
7fd8c501
PE
109712013-03-13 Paul Eggert <eggert@cs.ucla.edu>
10972
d9df6f40
PE
10973 Static checking by Sun C 5.12.
10974 * alloc.c (buffer_memory_full) [REL_ALLOC]:
10975 * bytecode.c (exec_byte_code):
10976 * dispnew.c (init_display):
10977 * eval.c (error):
10978 * fileio.c (Fsubstitute_in_file_name):
10979 * keyboard.c (Fevent_convert_list):
10980 * keymap.c (Fsingle_key_description):
10981 * term.c (maybe_fatal, fatal):
10982 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
10983 * xsmfns.c (Fhandle_save_session):
10984 Omit unreachable code.
10985 * keymap.c (map_keymap_char_table_item): Cast void * to
10986 a function pointer type; the C Standard requires this.
10987
7fd8c501
PE
10988 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
10989 Include <sys/param.h> unconditionally, as that works elsewhere and
10990 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
10991 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
10992 and FreeBSD now.
10993
a020afb9 10994See ChangeLog.12 for earlier changes.
aac0c6e3
MR
10995
10996;; Local Variables:
10997;; coding: utf-8
aac0c6e3
MR
10998;; End:
10999
ba318903 11000 Copyright (C) 2011-2014 Free Software Foundation, Inc.
aac0c6e3
MR
11001
11002 This file is part of GNU Emacs.
11003
11004 GNU Emacs is free software: you can redistribute it and/or modify
11005 it under the terms of the GNU General Public License as published by
11006 the Free Software Foundation, either version 3 of the License, or
11007 (at your option) any later version.
11008
11009 GNU Emacs is distributed in the hope that it will be useful,
11010 but WITHOUT ANY WARRANTY; without even the implied warranty of
11011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11012 GNU General Public License for more details.
11013
11014 You should have received a copy of the GNU General Public License
11015 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.