]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Merge from emacs-24
[gnu-emacs] / src / ChangeLog
1 2014-12-05 Lee Duhem <lee.duhem@gmail.com> (tiny change)
2
3 * eval.c (Fsignal): Remove duplicate test.
4 (Fautoload_do_load): Fix up docstring.
5
6 2014-12-05 Jan Djärv <jan.h.d@swipnet.se>
7
8 * nsterm.m (represented_filename, represented_frame): New variables.
9 (ns_set_represented_filename): New function.
10 (sendEvent:): Set represented filename here to avoid flicker,
11 related to Bug#18757.
12
13 * nsterm.h: Declare ns_set_represented_filename.
14
15 * nsfns.m (ns_set_name_as_filename): Don't set represented filename
16 at once, call ns_set_represented_filename instead.
17
18 2014-12-05 Eli Zaretskii <eliz@gnu.org>
19 2014-12-05 Eli Zaretskii <eliz@gnu.org>
20
21 * dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.
22 (struct bidi_stack): Reduce size by using bit fields and by
23 packing sos, override, and isolate_status into a single 8-bit
24 byte called 'flags'.
25
26 * bidi.c (ISOLATE_STATUS, OVERRIDE): New macros.
27 (bidi_push_embedding_level): Construct flags from individual
28 bits. Adapt to changes in prev_for_neutral and next_for_neutral
29 members.
30 (bidi_pop_embedding_level): Use ISOLATE_STATUS. Extract 'sos'
31 from flags. Adapt to changes in prev_for_neutral,
32 next_for_neutral, and last_strong members.
33 (bidi_line_init): Initialize flags to zero.
34 (bidi_resolve_explicit, bidi_resolve_weak, bidi_resolve_brackets)
35 (bidi_resolve_neutral): Use ISOLATE_STATUS and OVERRIDE.
36
37 2014-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
38
39 * eval.c (backtrace_eval_unrewind): Rewind also the excursions.
40 (Fapply): Try and simplify the control flow.
41
42 2014-12-03 Chris Zheng <chriszheng99@gmail.com> (tiny change)
43
44 * gnutls.c (init_gnutls_functions, gnutls_certificate_details):
45 Use gnutls_sign_get_name directly because
46 gnutls_sign_algorithm_get_name is a macro on MinGW (bug#19231).
47 (init_gnutls_functions): Load missing gnutls_server_name_set.
48
49 2014-12-02 Eli Zaretskii <eliz@gnu.org>
50
51 * bidi.c (bidi_find_first_overridden): New function.
52
53 * xdisp.c (Fbidi_find_overridden_directionality): New function.
54 (syms_of_xdisp): Defsubr it.
55
56 * dispextern.h (bidi_find_first_overridden): Add prototype.
57
58 2014-12-02 Jan Djärv <jan.h.d@swipnet.se>
59
60 * nsimage.m (initFromSkipXBM:width:height:flip:length:): Set bmRep
61 to nil after release (Bug#9133).
62
63 2014-11-30 Paul Eggert <eggert@cs.ucla.edu>
64
65 Port better to AddressSanitizer.
66 These changes suffice for temacs on x86-64 with GCC 4.9.2 and
67 -fsanitize=address.
68 * alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]:
69 Return -1 or 0, as the pipe trick doesn't work.
70 * alloc.c (relocatable_string_data_p, mark_object, sweep_symbols):
71 * data.c (Ffset):
72 * print.c (print_object):
73 When a pointer-check primitive returns -1, do not assume this
74 means the pointer is valid or that the underlying system has failed.
75 It could just be that addresses are being sanitized so Emacs can't
76 test for pointer validity.
77 * lisp.h (defined_GC_CHECK_STRING_BYTES): New constant.
78 (USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the
79 string validity checker doesn't work on stack-based strings.
80
81 2014-11-29 Paul Eggert <eggert@cs.ucla.edu>
82
83 Improve clarity of USE_LSB_TAG definition.
84 Problem reported by Lee Duhem. Suggestion by Andreas Schwab in:
85 http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02222.html
86 * lisp.h (USE_LSB_TAG): Define in terms of the (simpler)
87 VAL_MAX / 2 rather than in terms of the (more complicated)
88 EMACS_INT_MAX >> GCTYPEBITS, and adjust commentary to match.
89
90 2014-11-29 Eli Zaretskii <eliz@gnu.org>
91
92 * xdisp.c (handle_single_display_spec): When ignoring a fringe
93 bitmap display, reset the ignore_overlay_strings_at_pos_p flag.
94 (next_element_from_buffer): When done with overlays, reset the
95 ignore_overlay_strings_at_pos_p flag. (Bug#19201)
96
97 2014-11-29 Eli Zaretskii <eliz@gnu.org>
98
99 * w32fns.c (Fw32_shell_execute): Convert forward slashes in
100 DOCUMENT to backslashes, if DOCUMENT is a file. (Bug#19141)
101
102 2014-11-29 Ulrich Müller <ulm@gentoo.org>
103
104 * Makefile.in (temacs$(EXEEXT)): Use consistent flag settings
105 for paxctl and setfattr. Fixes temacs startup failure with
106 grsecurity/PaX enabled Linux kernel (bug#19067).
107
108 2014-11-27 Oscar Fuentes <ofv@wanadoo.es>
109
110 * src/w32.c, src/w32heap.c, src/w32term.c:
111 Use MINGW_W64 instead of _W64.
112
113 2014-11-27 Stefan Monnier <monnier@iro.umontreal.ca>
114
115 * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003).
116
117 2014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
118
119 * gnutls.c (gnutls_ip_address_p): New function.
120 (Fgnutls_boot): Only send SNI if the host name is not an IP address.
121
122 2014-11-26 Toke Høiland-Jørgensen <toke@toke.dk> (tiny change)
123
124 * gnutls.c (Fgnutls_boot): Send the server name over (bug#18208).
125
126 2014-11-25 Paul Eggert <eggert@cs.ucla.edu>
127
128 Fix gnutls problems caught by static checking.
129 * gnutls.c (Fgnutls_boot): Remove unused local.
130 (Fgnutls_boot): Fix pointer signedness.
131
132 2014-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
133
134 * gnutls.c (gnutls_certificate_details): Don't include certain
135 certificate details on older gnutls versions (bug#19168).
136 (syms_of_gnutls): Export gnutls_peer_status_warning_describe.
137 (gnutls_certificate_details): Reversed check in last checkin.
138
139 2014-11-25 Teodor Zlatanov <tzz@lifelogs.com>
140
141 * gnutls.c (Fgnutls_peer_status): Check GNUTLS_INITSTAGE, not gnutls_p.
142 (Fgnutls_peer_status_warning_describe): Add function to describe a
143 peer verification warning symbol.
144 (Fgnutls_peer_status): Use it.
145 (Fgnutls_boot): Use it. Minor logging fixes.
146
147 2014-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
148
149 * gnutls.c: Fix compilation warnings given fix --enable-gcc-warnings.
150
151 2014-11-24 Glenn Morris <rgm@gnu.org>
152
153 * emacs.c (main) <--version>: Make use of PACKAGE_NAME.
154
155 * Makefile.in (emacs.res): Use ../nt rule, rather than duplicating it.
156 (ntsource, WINDRES, EMACS_MANIFEST): Remove, now unused.
157
158 2014-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
159
160 * gnutls.c: Fix Windows function definition of
161 gnutls_x509_crt_get_fingerprint.
162
163 * gnutls.c: Fix Windows return value for gnutls_pk_algorithm_get_name.
164
165 * gnutls.c (Fgnutls_boot): Save certificate for later inspection.
166
167 * process.h: Added more fields to Lisp_Process to track
168 certificate details.
169
170 * gnutls.c (gnutls_hex_string, gnutls_certificate_details)
171 (Fgnutls_peer_status): New functions to export TLS certificate
172 details to Emacs Lisp.
173
174 2014-11-23 Jan Djärv <jan.h.d@swipnet.se>
175
176 * gtkutil.c (gtk_adjustment_configure): Define for Gtk+ < 2.14.
177 (xg_set_toolkit_horizontal_scroll_bar_thumb): Remove wrong version
178 check for gtk_adjustment_configure (Bug#19149).
179 (gtk_adjustment_configure): Don't use 2.14 functions (Bug#19149).
180
181 2014-11-22 Glenn Morris <rgm@gnu.org>
182
183 * Makefile.in (emacs.res): Add dependency on icons/hand.cur. Use $<.
184
185 2014-11-22 Martin Rudalics <rudalics@gmx.at>
186
187 Don't shrink frame when using desktop-save-mode (Bug#19048).
188 * w32fns.c (x_set_tool_bar_lines): Always call
189 x_change_tool_bar_height (Bug#19048).
190 (x_change_tool_bar_height): Mark frame as garbaged since
191 adjust_frame_size might not have done that.
192 * xfns.c (x_set_tool_bar_lines): Always call
193 x_change_tool_bar_height (Bug#19048).
194 (x_change_tool_bar_height): Mark frame as garbaged since
195 adjust_frame_size might not have done that.
196
197 2014-11-21 Ulf Jasper <ulf.jasper@web.de>
198
199 * xml.c (parse_region): Take care of new optional parameter
200 'discard-comments' of 'libxml-parse(html|xml)-region'.
201 (Flibxml_parse_html_region, Flibxml_parse_xml_region): New
202 optional parameter 'discard-comments'.
203
204 2014-11-17 Paul Eggert <eggert@cs.ucla.edu>
205
206 Improve time stamp handling, and be more consistent about it.
207 * editfns.c (invalid_time): New function.
208 Use it instead of 'error ("Invalid time specification")'.
209 (time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
210 (decode_float_time, lisp_to_timespec, lisp_time_struct):
211 New functions.
212 (make_time_tail, make_time): Remove. All uses changed to use
213 new functions or plain list4i.
214 (disassemble_lisp_time): Return effective length if successful.
215 Check that LOW is an integer, if it's combined with other components.
216 (decode_time_components): Decode into struct lisp_time, not
217 struct timespec, so that we can support a wide set of times
218 regardless of whether time_t is signed. Decode plain numbers
219 as seconds since the Epoch, and nil as the current time.
220 (lisp_time_argument, lisp_seconds_argument, Ffloat_time):
221 Reimplement in terms of new functions.
222 (Fencode_time): Just use list2i.
223 (syms_of_editfns): Add time-add, time-subtract, time-less-p.
224 * keyboard.c (decode_timer): Don't allow the new formats (floating
225 point or nil) in timers.
226 * systime.h (LO_TIME_BITS): New constant. Use it everywhere in
227 place of the magic number '16'.
228 (struct lisp_time): New type.
229 (decode_time_components): Use it.
230 (lisp_to_timespec): New decl.
231
232 2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
233
234 * intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only'
235 text property.
236
237 * callint.c (Fcall_interactively): Pass in nil as argument to
238 Fbarf_if_buffer_read_only.
239
240 * fileio.c (Finsert_file_contents): Ditto.
241
242 * insdel.c (prepare_to_modify_buffer_1): Pass start region in.
243
244 * textprop.c (verify_interval_modification): Check buffer
245 readedness after the last interval.
246
247 * buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if
248 the text at POSITION (new optional argument) has the
249 `inhibit-read-only' text property set.
250
251 2014-11-16 Eli Zaretskii <eliz@gnu.org>
252
253 * window.c (window_scroll_pixel_based): Avoid truncation/rounding
254 errors in computing the number of pixels to scroll. Suggested by
255 Kelly Dean <kelly@prtime.org>. (Bug#19060)
256
257 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
258
259 * nsmenu.m (update_frame_tool_bar): If tool bar changes height,
260 call updateFrameSize.
261
262 * nsterm.m (setFrame:): Remove call to display (Bug#18757).
263
264 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
265
266 * nsfns.m (x_set_foreground_color, x_set_background_color)
267 (x_set_cursor_color, Fxw_color_values): Block/unblock input,
268 use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
269
270 2014-11-15 Jan Djärv <jan.h.d@swipnet.se>
271
272 * nsterm.m (ns_send_appdefined): Check for application defined
273 event on Cocoa (Bug#18993).
274 (run): Restore code before the previous 18993 fix.
275
276 2014-11-14 David Reitter <david.reitter@gmail.com>
277
278 * nsterm.m (run): Set timeout for event loop to prevent hang.
279 (Bug#18993)
280
281 2014-11-14 Paul Eggert <eggert@cs.ucla.edu>
282
283 * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1.
284
285 2014-11-14 Dmitry Antipov <dmantipov@yandex.ru>
286
287 * xfont.c (xfont_list_pattern): Do not allocate font entity object
288 for each candidate font but attempt to reuse it from previous improper
289 candidate, if any.
290
291 2014-11-13 Paul Eggert <eggert@cs.ucla.edu>
292
293 Avoid undefined behavior in color table hashing.
294 * image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
295 (ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function. All uses changed.
296 This function avoids undefined behavior with signed shift overflow.
297
298 2014-11-10 Eli Zaretskii <eliz@gnu.org>
299
300 * fileio.c (Finsert_file_contents): Invalidate buffer caches also
301 when the inserted text does not need decoding. (Bug#18982)
302
303 2014-11-10 Jan Djärv <jan.h.d@swipnet.se>
304
305 * nsterm.h (EmacsScroller): judge returns bool.
306
307 * nsterm.m (ns_set_vertical_scroll_bar): Release bar.
308 (ns_judge_scroll_bars): Only set removed if judge returns true.
309 (judge): Returns bool == condemned. Remove self from window.
310 (setPosition:portion:whole:): Remove raise SIGIO (Bug#18757).
311
312 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
313
314 * keyboard.c (command_loop_1): Record this-command in recent-keys.
315 (Frecent_keys): Rewrite. and add optional `include-cmds' arg.
316
317 2014-11-09 Jan Djärv <jan.h.d@swipnet.se>
318
319 * nsterm.m (ns_set_vertical_scroll_bar)
320 (ns_set_horizontal_scroll_bar): Cleanup merge error.
321
322 2014-11-09 Paul Eggert <eggert@cs.ucla.edu>
323
324 * xgselect.c (xg_select): Don't assume n_gfds is nonnegative
325 merely because tmo_in_millisec is nonnegative. The 1st call
326 to g_main_context_query could succeed while the 2nd one fails.
327
328 * frame.c (Fcan_run_window_configuration_change_hook): Return a value.
329
330 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
331
332 * nsterm.m (run): Only use non-system event loop if OSX version is
333 exactly 10.9 (Bug#18993).
334 (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
335 needed (Bug#18757).
336
337 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
338
339 * callproc.c (encode_current_directory): Support handling of file
340 names prepended by "/:". (Bug#18891)
341
342 2014-11-08 Alan Mackenzie <acm@muc.de>
343
344 * syntax.c (back_comment): Fix off-by-one error (bug#18022).
345
346 2014-11-08 Dima Kogan <dima@secretsauce.net>
347
348 * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
349
350 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
351
352 * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
353 raises an error. (Bug#18891)
354
355 2014-11-08 Martin Rudalics <rudalics@gmx.at>
356
357 * frame.c (adjust_frame_size): Call x_set_window_size only if
358 f->can_x_set_window_size is set.
359 (make_frame): Initialize f->can_x_set_window_size and
360 f->can_run_window_configuration_change_hook.
361 (Fcan_run_window_configuration_change_hook): New function.
362 * frame.h (frame): Split `official' into `can_x_set_window_size'
363 and `can_run_window_configuration_change_hook'.
364 * nsfns.m (Fx_create_frame): Set f->can_x_set_window_size.
365 * w32fns.c (Fx_create_frame, x_create_tip_frame): Set
366 f->can_x_set_window_size.
367 * window.c (run_window_configuration_change_hook): Return
368 immediately if either f->can_x_set_window_size or
369 f->can_run_window_configuration_change_hook are false.
370 (Fset_window_configuration): Instead of f->official set
371 f->can_x_set_window_size.
372 * xfns.c (Fx_create_frame, x_create_tip_frame): Set
373 f->can_x_set_window_size.
374
375 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
376
377 * nsterm.m (EmacsScroller.dealloc): Reinstate, removed at merge
378 cleanup from 2014-11-01 (Bug#18972).
379
380 2014-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
381
382 * keyboard.c: Call gui-set-selection instead of x-set-selection.
383 * xdisp.c (window-scroll-functions): Improve docstring.
384
385 2014-11-07 Paul Eggert <eggert@cs.ucla.edu>
386
387 Uniquify the 'size' symbol.
388 * frame.c (Qsize):
389 * w32notify.c (Qsize): Remove.
390 * lisp.h (Qsize): New decl.
391 * lread.c (Qsize): Now extern.
392 * w32notify.c (syms_of_w32notify): No need to defsym.
393
394 2014-11-07 Martin Rudalics <rudalics@gmx.at>
395
396 * dispnew.c (change_frame_size_1): Fix call of
397 adjust_frame_size.
398 * frame.c (Qsize, Qframe_position, Qframe_outer_size)
399 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
400 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
401 (Qtool_bar_size): New constants.
402 (frame_inhibit_resize, adjust_frame_size): New argument to
403 handle case where frame_inhibit_implied_resize is a list.
404 (Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
405 (Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
406 (x_set_right_divider_width, x_set_bottom_divider_width)
407 (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
408 (x_set_scroll_bar_width, x_set_scroll_bar_height):
409 Update callers.
410 (frame-inhibit-implied-resize): Rewrite doc-string.
411 * frame.h (frame_inhibit_resize, adjust_frame_size):
412 Fix external declarations.
413 (Qframe_position, Qframe_outer_size)
414 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
415 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
416 (Qtool_bar_size): Extern them.
417 * gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
418 (xg_height_or_width_changed): Remove.
419 (xg_frame_set_char_size): Adjust adjust_frame_size calls.
420 (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
421 (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
422 (xg_change_toolbar_position): Call adjust_frame_size directly.
423 * nsfns.m (x_set_internal_border_width, Fx_create_frame):
424 Fix calls of adjust_frame_size.
425 * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
426 (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls.
427 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
428 frame can get resized when tool-bar-lines parameter changes from
429 or to zero.
430 (Fw32_frame_menu_bar_size): Return fourth value.
431 (Fw32_frame_rect): Block input around system calls
432 (Fx_frame_geometry): New function.
433 * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
434 * w32term.c (x_new_font): Adjust adjust_frame_size call.
435 * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call.
436 * window.c (Fset_window_configuration): Adjust adjust_frame_size call.
437 * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
438 (Fx_create_frame): Adjust adjust_frame_size calls.
439 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
440 frame can get resized when tool-bar-lines parameter changes from
441 or to zero.
442 (Fx_frame_geometry): New function.
443 * xmenu.c (update_frame_menubar): On Lucid call
444 adjust_frame_size with one pixel less height to avoid that
445 repeatedly adding/removing the menu bar grows the frame.
446 (free_frame_menubar): On Motif arrange to optionally preserve
447 the old frame height when removing the menu bar.
448 * xterm.c (x_new_font): Adjust adjust_frame_size call.
449
450 2014-11-03 Eli Zaretskii <eliz@gnu.org>
451
452 * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
453 (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
454 frame; instead, print an error message.
455
456 2014-11-03 Jan Djärv <jan.h.d@swipnet.se>
457
458 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
459
460 2014-11-02 Jan Djärv <jan.h.d@swipnet.se>
461
462 * nsimage.m (allocInitFromFile:): Initialize bmRep.
463 (dealloc): Release bmRep.
464
465 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
466 imageListSetNext, imageListNext.
467
468 * nsimage.m (ImageList, imageListNext, imageListSetNext:)
469 (reference): Remove.
470 (allocInitFromFile:): Remove searching ImageList and calling
471 reference (Bug#18918).
472 (dealloc): Remove handling if ImageList.
473
474 2014-11-02 Andreas Schwab <schwab@linux-m68k.org>
475
476 * process.c (catch_child_signal): Fix incorrect assertion.
477
478 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
479
480 * macfont.m (macfont_draw):
481 * nsterm.m (ns_mouse_position, judge): Clean up merge conflict.
482
483 * macfont.m (macfont_glyph_extents): Turn off synthetic bold
484 if force_integral_p (i.e. no antialias).
485 (macfont_draw): Check ns_antialias_text, also turn off synthetic
486 bold if no antialias (Bug#18876).
487
488 * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
489 was given (Bug#18846).
490
491 * nsterm.h (ns_set_doc_edited): Declare taking no args.
492
493 * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
494 instead of in xdisp.c, function now takes void. (Bug#18884).
495
496 * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
497 (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
498
499 * nsterm.h (EmacsScroller): Replace Lisp_Object win with
500 struct window* (Bug#18889).
501 Remove getMouseMotionPart.
502 (ns_output): Make icon_top/left int.
503
504 * nsfns.m (x_icon): icon_top/left is int.
505
506 * nsterm.m (ns_mouse_position): Remove unused code.
507 (initFrame:window:, dealloc): Use window instead of win.
508 (getMouseMotionPart:window:x:y:): Remove, unused.
509 (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
510
511 2014-11-01 Eli Zaretskii <eliz@gnu.org>
512
513 * keyboard.c (readable_events): When FLAGS include
514 READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
515 This avoids returning non-nil from input-pending-p when only such
516 events are in the queue. (Bug#18856)
517
518 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
519
520 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
521 (NXPrimaryPboard, NXSecondaryPboard): Declare static.
522 (Qforeign_selection): Remove.
523 (ns_get_local_selection): Identation fix.
524 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
525
526 * nsselect.m (ns_get_local_selection): Remove calling of
527 functions in Vselection_converter_alist (Bug#18911).
528 (syms_of_nsselect): Remove Vselection_converter_alist.
529
530 2014-10-31 Dmitry Antipov <dmantipov@yandex.ru>
531
532 * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
533 and unnecessary initialization. Adjust comments.
534
535 2014-10-30 Eli Zaretskii <eliz@gnu.org>
536
537 * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
538 setting it to -1.
539 (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
540 index, not an absolute one, as that's what the function expects.
541
542 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru>
543
544 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
545 font on an initial frame when running as a daemon (Bug#18869).
546
547 * fontset.c (toplevel): Adjust comment to match 2014-06-19 change.
548
549 2014-10-30 Eli Zaretskii <eliz@gnu.org>
550
551 * fileio.c (Fexpand_file_name): Use make_unibyte_string, not
552 build_string, when importing a home directory. (Bug#18873)
553
554 * dispnew.c (buffer_posn_from_coords):
555 Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
556 account for the header-line height. (Bug#18839)
557
558 2014-10-28 Ulf Jasper <ulf.jasper@web.de>
559
560 * xml.c (parse_region): Do not forget the first document child.
561
562 2014-10-25 Jan Djärv <jan.h.d@swipnet.se>
563
564 * nsselect.m: pasteboard_changecount is new.
565 (ns_store_pb_change_count, ns_get_pb_change_count)
566 (ns_get_our_change_count_for): New functions.
567 (ns_string_to_pasteboard_internal): Correct comment.
568 type => gtype in eassert, Call ns_store_pb_change_count.
569 (Fns_own_selection_internal): Remove data, use value (Bug#18799).
570 (Fns_disown_selection_internal, Fns_selection_owner_p):
571 Replace Vselection_alist check, with change count check.
572 (Fns_get_selection): Initialize val to Qnil. Only get local
573 selection if change counts match (Bug#18799).
574 (nxatoms_of_nsselect): Initialize pasteboard_changecount.
575
576 2014-10-25 Noam Postavsky <npostavs@users.sourceforget.net>
577
578 * src/w32proc.c (create_child): If calling a quoted batch file,
579 pass NULL for exe. (Bug#18745)
580
581 2014-10-24 Eli Zaretskii <eliz@gnu.org>
582
583 * bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
584 (bidi_resolve_brackets): Use end of string position rather than ZV
585 when iterating over a string. (Bug#18815)
586
587 2014-10-24 Martin Rudalics <rudalics@gmx.at>
588
589 * keyboard.c (make_lispy_position): Return coordinates also when
590 on scroll bars, fringes, margins or not in a window.
591 * xdisp.c (show_mouse_face): Don't change cursor face during
592 mouse tracking.
593
594 2014-10-23 Martin Rudalics <rudalics@gmx.at>
595
596 * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
597 (frame_resize_pixelwise, frame_inhibit_implied_resize):
598 Fix doc-strings (Bug#18789).
599
600 2014-10-23 Paul Eggert <eggert@cs.ucla.edu>
601
602 * Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'.
603
604 2014-10-22 Eli Zaretskii <eliz@gnu.org>
605
606 Optimize redisplay of simple bracketed text.
607 * bidi.c (bidi_cache_reset_to): New function.
608 (bidi_cache_reset): Call it.
609 (bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
610 member to -1.
611 (bidi_resolve_explicit): Reset bracket_pairing_pos and
612 bracket_enclosed_type only if bracket_pairing_pos's value is not
613 ZV.
614 (MAX_BPA_STACK): Make sure the value is signed.
615 (PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
616 stop pushing values onto the stack.
617 (bidi_find_bracket_pairs): If the bracketed text is only on the
618 base embedding level, remove all the states cached by this
619 function from the cache, and return zero, so that the brackets in
620 this segment of text are processed as normal neutrals.
621 (bidi_resolve_brackets): Detect the brackets that are to be
622 processed as neutrals, and don't call bidi_find_bracket_pairs on
623 them. (Bug#18778)
624
625 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
626
627 * w32select.c (Fw32_selection_exists_p): Rename from
628 Fx_selection_exists_p.
629 (syms_of_w32select): Adjust accordingly.
630
631 * w16select.c (Fw16_selection_exists_p): Rename from
632 Fx_selection_exists_p.
633 (syms_of_win16select): Adjust accordingly.
634
635 * nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
636 (Fns_own_selection_internal): Tighten scoping.
637 (Fns_selection_exists_p): Rename from Fx_selection_exists_p.
638 (Fns_get_selection): Rename from Fx_get_selection_internal.
639 (Fns_get_selection_internal, Fns_store_selection_internal):
640 Remove functions.
641 (syms_of_nsselect): Adjust accordingly.
642
643 2014-10-21 Martin Rudalics <rudalics@gmx.at>
644
645 * w32fns.c (Fw32_frame_menu_bar_size): New function.
646 * w32term.c (x_set_window_size): Account for wrapped menu bar
647 lines when setting up frame height (Bug#15174 and Bug#18720).
648 (w32_add_wrapped_menu_bar_lines): New variable.
649
650 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
651
652 * xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
653 move point.
654
655 2014-10-20 Glenn Morris <rgm@gnu.org>
656
657 * Merge in all changes up to 24.4 release.
658
659 2014-10-19 Jan Djärv <jan.h.d@swipnet.se>
660
661 * gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
662 g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).
663
664 * xterm.h (x_output): Remove net_wm_state_hidden_seen.
665
666 * xterm.c (handle_one_xevent): Check return value from
667 x_handle_net_wm_state, remove net_wm_state_hidden_seen (Bug#18722).
668 (get_current_wm_state): Remove net_wm_state_hidden_seen setting.
669
670 * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
671 Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14 (Bug#18674).
672 (make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
673 Gtk+ >= 3.14 (Bug#18674).
674 (update_frame_tool_bar): Don't use gtk_misc_set_padding on
675 Gtk+ >= 3.14 (Bug#18674).
676
677 2014-10-18 Paul Eggert <eggert@cs.ucla.edu>
678
679 * gtkutil.c: Remove no-longer-used code.
680 (xg_update_menubar): Remove unused local and unnecessary call to
681 gtk_menu_item_get_submenu.
682 (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
683 (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
684 (TOOLBAR_TOP_WIDGET): Remove; no longer used.
685
686 2014-10-18 Jan Djärv <jan.h.d@swipnet.se>
687
688 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.
689
690 * xterm.h (handlebox_widget): Remove.
691
692 * xmenu.c (set_frame_menubar): Remove GTK block that calls
693 xg_have_tear_offs.
694
695 * gtkutil.h (xg_have_tear_offs): Remove declaration.
696
697 * gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
698 to handle Gtk versions.
699 (xg_get_file_with_chooser): Use them.
700 (xg_have_tear_offs, tearoff_remove, tearoff_activate):
701 Remove (create_menus): Remove teroff argument and code.
702 Remove call to gtk_menu_set_title.
703 (xg_update_menubar, xg_update_submenu): Remove tearoff code.
704 Adjust args to create_menus.
705 (xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
706 (xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
707 (xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
708 (xg_make_tool_item): Remove detach code.
709 (xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
710 (find_icon_from_name): New function.
711 (update_frame_tool_bar): Remove GtkStockItem code, move to
712 find_icon_from_name. Let stock be a list of icon names to try.
713 Only use gtk_image_new_from_stock on Gtk+ < 3.10.
714 Replace TOOLBAR_TOP_WIDGET.
715 (free_frame_tool_bar, xg_change_toolbar_position ):
716 Replace TOOLBAR_TOP_WIDGET.
717 (xg_initialize): Remove tearoff code.
718
719 2014-10-18 Eli Zaretskii <eliz@gnu.org>
720
721 * xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
722 pixel from the window's cursor glyph width, since X renders hollow
723 blocks 1 pixel wider than the 'width' parameter.
724
725 * xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
726 glyph->pixel_width; this is now done in xterm.c.
727
728 Fix reordering of bracket characters in isolates.
729 * bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
730 RESOLVED_ONLY; when non-zero, return from the cache only fully
731 resolved states. All callers changed.
732 (CANONICAL_EQU): New macro.
733 (PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
734 equivalent of the paired closing bracket character.
735 (bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
736 the default non-negative value, to be checked later in
737 bidi_resolve_brackets. Use CANONICAL_EQU to test candidate
738 characters against those pushed onto the BPA stack.
739 (bidi_record_type_for_neutral): New function.
740 (bidi_resolve_brackets): Record next_for_neutral and
741 prev_for_neutral when embedding level gets pushed. Force
742 resolution of bracket pairs when entering a level run that was not
743 yet BPA-resolved.
744 (bidi_resolve_neutral): Add assertions before calling
745 bidi_resolve_neutral_1.
746 (bidi_level_of_next_char): Remove the code that attempted to
747 resolve unresolved neutrals; that is now done by
748 bidi_resolve_neutral.
749
750 * w32select.c (owner_callback): Mark with ALIGN_STACK attribute.
751
752 2014-10-17 Eli Zaretskii <eliz@gnu.org>
753
754 * xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
755 1-pixel R2L characters.
756 Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
757 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.
758
759 2014-10-16 Eli Zaretskii <eliz@gnu.org>
760
761 * bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
762 useful.
763
764 2014-10-15 Paul Eggert <eggert@cs.ucla.edu>
765
766 * bidi.c (bidi_find_bracket_pairs): Initialize local var.
767 This pacifies GCC 4.9.1 with --enable-gcc-warnings.
768 It's not clear to me whether the initialization is needed,
769 but it can't hurt so I played it safe.
770
771 2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
772
773 * lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
774
775 2014-10-15 Eli Zaretskii <eliz@gnu.org>
776
777 Update the bidirectional reordering engine for Unicode 6.3 and 7.0.
778 * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level):
779 Remove variable.
780 (bidi_get_type): Return the isolate initiators and terminator types.
781 (bidi_isolate_fmt_char, bidi_paired_bracket_type)
782 (bidi_fetch_char_skip_isolates, find_first_strong_char)
783 (bidi_find_bracket_pairs, bidi_resolve_brackets): New functions.
784 (bidi_set_sos_type): Rename from bidi_set_sor_type and updated
785 for the new features.
786 (bidi_push_embedding_level, bidi_pop_embedding_level): Update to
787 push and pop correctly for isolates.
788 (bidi_remember_char): Modify to accept an additional argument
789 and record the bidi type according to its value.
790 (bidi_cache_iterator_state): Accept an additional argument to only
791 update an existing state. Handle the new members of struct bidi_it.
792 (bidi_cache_find): Arguments changed: no longer accepts a level,
793 instead accepts a flag telling it whether it is okay to return
794 unresolved neutrals.
795 (bidi_initialize): Initiate and staticpro the bracket-type uniprop
796 table. Initialize new isolate-related members.
797 (bidi_paragraph_init): Some code factored out into
798 find_first_strong_char.
799 (bidi_resolve_explicit_1): Function deleted, its code incorporated
800 into bidi_resolve_explicit.
801 (bidi_resolve_explicit): Support the isolate initiators and
802 terminator. Fix handling of embeddings and overrides according to
803 new UBA requirements. Record information about previously seen
804 characters here (moved from bidi_level_of_next_char).
805 (bidi_resolve_weak): Adapt to changes in struct members.
806 (FLAG_EMBEDDING_INSIDE, FLAG_OPPOSITE_INSIDE, MAX_BPA_STACK)
807 (STORE_BRACKET_CHARPOS, PUSH_BPA_STACK): New macros.
808 (bidi_resolve_neutral): Call bidi_resolve_brackets to handle the
809 paired bracket resolution. Handle isolate initiators and
810 terminator.
811 (bidi_type_of_next_char): Remove unneeded code for BN limit.
812 (bidi_level_of_next_char): Move the code that records information
813 about previous characters to bidi_resolve_explicit. Fix logic of
814 resolving neutrals and make sure their cache entries are updated.
815 Remove now unneeded special handling of PDF level.
816
817 * dispextern.h (struct glyph): Enlarge the width of resolved_level.
818 (BIDI_MAXDEPTH): New macro, renamed from BIDI_MAXLEVEL and
819 enlarged per Unicode 6.3.
820 (enum bidi_bracket_type_t): New data type.
821 (struct bidi_saved_info): Leave only 2 type members out of 4.
822 Remove bytepos.
823 (struct bidi_stack): Add members necessary to support isolating
824 sequences.
825 (struct bidi_it): Add new members necessary to support isolating
826 sequences and bracket pair resolution.
827
828 * xdisp.c (Fbidi_resolved_levels): New function.
829 (syms_of_xdisp): Defsubr it.
830 (append_glyph, append_composite_glyph, produce_image_glyph)
831 (append_stretch_glyph, append_glyphless_glyph): Convert aborts to
832 assertions.
833 (syms_of_xdisp) <inhibit-bidi-mirroring>: New variable.
834
835 * term.c (append_glyph, append_composite_glyph)
836 (append_glyphless_glyph): Convert aborts to assertions.
837
838 * .gdbinit (pgx): Display the character codepoint, resolved level,
839 and bidi type also for glyphless glyphs.
840
841 2014-10-15 Dmitry Antipov <dmantipov@yandex.ru>
842
843 Avoid unwanted point motion in Fline_beginning_position.
844 * lisp.h (scan_newline_from_point): Add prototype.
845 * search.c (scan_newline_from_point): New function, refactored from...
846 * cmds.c (Fforward_line): ...adjusted user.
847 * editfns.c (Fline_beginning_position): Use scan_newline_from_point
848 and simplify the former since the latter doesn't move point.
849
850 2014-10-14 Dmitry Antipov <dmantipov@yandex.ru>
851
852 Cleanup terminal handling code.
853 * dispextern.h (get_named_tty): Remove prototype but...
854 * termhooks.h (get_named_terminal): ...resurrect it under
855 more meaningful name.
856 (get_terminal): Likewise, but with...
857 (decode_live_terminal): ...this name.
858 (decode_tty_terminal): Add prototype.
859 * term.c (get_tty_terminal): Remove.
860 (get_named_tty): Remove.
861 (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
862 (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
863 Use decode_tty_terminal.
864 (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
865 * terminal.c (get_terminal): Refactor to...
866 (decode_terminal, decode_live_terminal): ...new functions.
867 (decode_tty_terminal): Replacement for get_tty_terminal.
868 (get_named_terminal): Likewise for get_named_tty.
869 * coding.c (Fset_terminal_coding_system_internal)
870 (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
871 (Fkeyboard_coding_system):
872 * composite.c (Fcomposition_get_gstring):
873 * dispnew.c (Fsend_string_to_terminal):
874 * frame.c (Fmake_terminal_frame):
875 * nsfns.m (check_ns_display_info):
876 * w32fns.c, xfns.c (check_x_display_info):
877 * xselect.c (frame_for_x_selection): Use decode_live_terminal.
878 * keyboard.c (handle_interrupt_signal, handle_interrupt)
879 (Fset_quit_char): Use get_named_terminal.
880 (Fset_output_flow_control, Fset_input_meta_mode):
881 Use decode_tty_terminal.
882
883 2014-10-13 Eli Zaretskii <eliz@gnu.org>
884
885 * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
886 between 32-bit and 64-bit MinGW builds. (Bug#18699)
887
888 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
889
890 Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
891 * process.c (accept4) [!HAVE_ACCEPT4]: New macro.
892
893 2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
894
895 * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
896 (bug#18638).
897
898 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
899
900 * editfns.c (dump_tz_string): No longer const.
901 It might be modified.
902
903 * nsmenu.m (clear): Assume OS X 10.6 or later.
904
905 2014-10-12 Jan Djärv <jan.h.d@swipnet.se>
906
907 * unexmacosx.c: Remove include ppc/reloc.h.
908 (unrelocate, copy_dysymtab): Remove PPC code.
909 (rebase_reloc_address): Remove, only used for PPC:
910
911 * nsterm.m: Always include macfont.h on COCOA.
912 (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
913 (ns_dumpglyphs_image, ns_check_menu_open)
914 (applicationDidFinishLaunching)
915 (antialiasThresholdDidChange:)
916 (keyDown:, toggleFullScreen:, setPosition:portion:whole:):
917 Remove checks for OSX <= 10.5/10.6.
918 (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
919 (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
920 GNUSTEP.
921
922 * nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
923 (NS_HAVE_NSINTEGER): Remove block.
924 Remove >= OSX 10.6 tests.
925
926 * nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
927 (x_activate_menubar, trackingNotification:): Remove check for
928 OSX >= 10.5.
929 (menuNeedsUpdate:): Remove check for OSX < 10.5.
930
931 * nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
932
933 * nsfns.m: Always include macfont.h on COCOA.
934 (ns_filename_from_panel, ns_directory_from_panel)
935 (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
936 (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
937
938 * macfont.m: Remove >= 1050 check.
939 (macfont_create_family_with_symbol)
940 (macfont_get_glyph_for_character)
941 (mac_font_get_glyphs_for_variants)
942 (mac_ctfont_create_available_families, syms_of_macfont):
943 Remove code for OSX < 10.6.
944 (mac_font_family_group, mac_font_family_compare): Remove, only used
945 for OSX < 10.6.
946
947 * macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
948 (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
949
950 * Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
951 comment.
952
953 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
954
955 Fix putenv race conditions with undefined behavior (Bug#8705).
956 Do all putenv calls before Emacs creates any threads.
957 Use a safer way to modify the TZ environment variable in the
958 presence of multiple threads. For further thread-safety,
959 prefer localtime_r and gmtime_r to localtime and gmtime,
960 and prefer struct tm's tm_gmtoff (if available) to calling
961 both localtime_r and gmtime_r.
962 * dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
963 (init_dbusbind): ... to this new function.
964 * emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
965 * xterm.c (x_term_init): Move xputenv call from here ...
966 (init_xterm): ... to this new function.
967 * emacs.c (main) [USE_GTK]: Call it before creating threads.
968 * editfns.c (HAVE_TM_GMTOFF): Default to false.
969 (dump_tz_string): New constant.
970 (init_editfns): Use it. This centralizes the dump_tz stuff.
971 Call set_time_zone_rule here, so that its xputenv is done
972 before Emacs goes multithreaded.
973 (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
974 thread-safe enough for Emacs.
975 (format_time_string, Fdecode_time, Fcurrent_time_string)
976 (Fcurrent_time_zone):
977 Prefer localtime_r and gmtime_r, which are more thread-safe, to
978 localtime and gmtime. Remove now-unnecessary calls to block_input.
979 (tm_gmtoff): New static function.
980 (Fdecode_time, Fcurrent_time_zone): Use it.
981 (Fencode_time): Use mktime_z, for better thread-safety.
982 (set_time_zone_rule): Now static. Rewrite to be mostly thread-safe,
983 i.e., not quite thread-safe but good enough for Emacs typical usage.
984 Do not reclaim storage that is in the environment; let it leak.
985 Always call tzset, since localtime_r does not.
986 * emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
987 This is now done in init_editfns.
988 * systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
989 New macros and declarations, for platforms lacking tzalloc & friends.
990
991 2014-10-09 Paul Eggert <eggert@cs.ucla.edu>
992
993 * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
994 On x86 platforms this works around GCC bug 63495
995 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
996 and more generally should fix a portability problem in Emacs.
997 Problem reported by Stefan Monnier in:
998 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
999
1000 2014-10-08 Leo Liu <sdl.web@gmail.com>
1001
1002 Enhance terpri to allow conditionally output a newline. (Bug#18652)
1003 * keymap.c (describe_vector_princ):
1004 * keyboard.c (Fcommand_error_default_function): Adapt to change to
1005 Fterpri.
1006
1007 * print.c (printchar_stdout_last): Declare.
1008 (printchar): Record the last char written to stdout.
1009 (Fterpri): Add optional argument ENSURE.
1010
1011 2014-10-08 Eli Zaretskii <eliz@gnu.org>
1012
1013 * w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
1014 DELAY argument to change_frame_size, so that the frame size
1015 changes, if any are needed, are delayed until the next redisplay.
1016 This is to avoid a too early QUIT inside change_frame_size, when
1017 it calls Lisp in frame_windows_min_size, in case one of the events
1018 we've read sets the quit-flag. (Bug#18649)
1019
1020 * w32fns.c (check_x_display_info): Accept terminal objects as
1021 argument, to follow what xfns.c does.
1022
1023 2014-10-07 Glenn Morris <rgm@gnu.org>
1024
1025 * Makefile.in ($(srcdir)/macuvs.h)
1026 ($(lispsource)/international/charprop.el): Add explicit FORCE.
1027
1028 2014-10-07 Eli Zaretskii <eliz@gnu.org>
1029
1030 * decompress.c (init_zlib_functions): Move the message about zlib
1031 being unavailable from here...
1032 (Fzlib_decompress_region): ...to here. (Bug#18650)
1033
1034 2014-10-07 Dmitry Antipov <dmantipov@yandex.ru>
1035
1036 * font.c (Ffont_get_glyphs): Use validate_subarray and fix
1037 the case where an optional string is used. Adjust docstring.
1038
1039 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
1040
1041 * lisp.mk (lisp): Remove w32-common-fns.elc.
1042
1043 2014-10-05 Paul Eggert <eggert@cs.ucla.edu>
1044
1045 * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
1046 These were already defined in buffer.c, and the duplicate
1047 definitions cause problems on platforms like 'gcc -fno-common'.
1048 Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
1049
1050 2014-10-05 Jan Djärv <jan.h.d@swipnet.se>
1051
1052 * nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
1053 if toolbar is visible.
1054
1055 * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
1056 0.23 (Bug#18030).
1057
1058 * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
1059 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
1060 (ns_select, ns_read_socket): Use unwind_protect to decrease
1061 apploopnr (Bug#18345).
1062 (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
1063 line height (Bug#17977).
1064
1065 * macfont.m: Fix indentation and import changes from macport 24.3.94.
1066 (macfont_closest_traits_index): New function.
1067 (macfont_closest_traits_index_p): Rename from
1068 macfont_closest_traits_index.
1069 (macfont_list): Use macfont_closest_traits_index_p.
1070
1071 2014-10-05 K. Handa <handa@gnu.org>
1072
1073 * coding.c (detect_coding_iso_2022): Set coding->rejected
1074 correctly when an invalid escape sequence is found (Bug#18610).
1075
1076 2014-10-04 Jan Djärv <jan.h.d@swipnet.se>
1077
1078 * gtkutil.c (create_menus): Only add tearoffs to empty menus.
1079 (xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
1080 for add_tearoff_p.
1081
1082 2014-10-04 Martin Rudalics <rudalics@gmx.at>
1083
1084 * buffer.c (scroll_bar_width, scroll_bar_height):
1085 Fix doc-strings.
1086 * window.c (Fset_window_scroll_bars): Fix doc-string.
1087 (Fwindow_scroll_bars): Have it return what the doc-string says.
1088
1089 2014-10-03 Eli Zaretskii <eliz@gnu.org>
1090
1091 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
1092 iterator backwards, to resync the bidi iterator. (Bug#18584)
1093
1094 2014-10-03 Dmitry Antipov <dmantipov@yandex.ru>
1095
1096 Consistently use min and max macros from lisp.h.
1097 * coding.c (min, max):
1098 * font.c (MAX):
1099 * unexhp9k800.c (min):
1100 * unexw32.c (min, max): Use definitions from lisp.h.
1101 * regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
1102 Adjust users.
1103 * gmalloc.c (min): Tiny style change.
1104
1105 * fileio.c (emacs_readlinkat, Finsert_file_contents):
1106 * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
1107
1108 2014-10-03 Paul Eggert <eggert@cs.ucla.edu>
1109
1110 Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
1111 * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
1112 (X_ULONG_MAX): Move these macros to xterm.h.
1113 (x_fill_property_data): Be more generous about allowing either
1114 signed or unsigned data of the appropriate width.
1115 * xterm.h (x_display_set_last_user_time): New function.
1116 All setters of last_user_time changd to use this function.
1117 If ENABLE_CHECKING, check that the times are in range.
1118
1119 2014-10-02 Eli Zaretskii <eliz@gnu.org>
1120
1121 * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
1122 'ssize_t'. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
1123
1124 2014-10-02 Jan Djärv <jan.h.d@swipnet.se>
1125
1126 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
1127 make a font_object from a tty frame (Bug#18573).
1128 (Finternal_set_lisp_face_attribute): Add FIXME comment.
1129
1130 2014-10-02 Dmitry Antipov <dmantipov@yandex.ru>
1131
1132 * alloc.c (mark_overlay): Assume that overlay boundaries are
1133 always markers. Add comment.
1134 * lread.c (read_internal_start): Use convenient validate_subarray.
1135 Adjust docstring.
1136 (Fread_from_string): Adjust docstring.
1137
1138 2014-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
1139
1140 * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
1141
1142 * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
1143 Rename from the "x-" prefix.
1144
1145 2014-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
1146
1147 * xselect.c (selection-converter-alist): Fix docstring.
1148
1149 2014-10-01 Eli Zaretskii <eliz@gnu.org>
1150
1151 * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
1152 argument passed by the caller, when we mirror all slashes into
1153 backslashes.
1154
1155 2014-10-01 Dmitry Antipov <dmantipov@yandex.ru>
1156
1157 * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
1158 Resurrect old code and fix compilation with GTK < 2.13.6.
1159
1160 2014-10-01 Paul Eggert <eggert@cs.ucla.edu>
1161
1162 Use AUTO_CONS instead of SCOPED_CONS, etc.
1163 * frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
1164 * lisp.h (AUTO_CONS): Rename from scoped_cons.
1165 (AUTO_LIST1): Rename from scoped_list1.
1166 (AUTO_LIST2): Rename from scoped_list2.
1167 (AUTO_LIST3): Rename from scoped_list3.
1168 (AUTO_LIST4): Rename from scoped_list4.
1169 (AUTO_STRING): Rename from SCOPED_STRING.
1170 * frame.h (AUTO_FRAME_ARG):
1171 * lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
1172 (AUTO_LIST4, AUTO_STRING):
1173 Prepend a new argument 'name'.
1174 Declare a variable instead of yielding a value.
1175 All uses changed.
1176 * lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
1177
1178 2014-09-30 Eli Zaretskii <eliz@gnu.org>
1179
1180 * w32fns.c (w32_createwindow): Accept an additional argument, an
1181 array of 2 values specifying the coordinates of the frame's
1182 top-left corner. Use these values instead of calling x_get_arg,
1183 which can cons Lisp objects, and therefore cannot be called except
1184 from the main thread. Remove redundant tests for the default
1185 values.
1186 (my_create_window): Move the calculation of the coordinates of the
1187 frame's top-left edge here. Pass them to the input thread via the
1188 second parameter of the WM_EMACS_CREATEWINDOW message.
1189 See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
1190 for the details.
1191
1192 2014-09-30 Eli Zaretskii <eliz@gnu.org>
1193
1194 * xdisp.c (cursor_row_fully_visible_p): Update commentary.
1195 (redisplay_window): Treat the frame's frozen_window_starts flag
1196 the same way as the optional_new_start flag for the window: only
1197 obey it if the glyph row showing point will be fully visible.
1198 Likewise when the window start is in a continuation line. If,
1199 after trying everything under the 'force_start' label, point is
1200 still not fully visible, give up and scroll the window.
1201 Add debugging traces. (Bug#18545)
1202
1203 * window.c (Frecenter): Set the window's redisplay flag.
1204
1205 2014-09-30 Eli Zaretskii <eliz@gnu.org>
1206
1207 * w32term.c (w32_read_socket): Don't use frame dimensions for
1208 resizing if GetClientRect returned an empty (0, 0, 0, 0)
1209 rectangle. Check the return value of GetClientRect, and don't use
1210 the results if it didn't succeed.
1211
1212 * dispnew.c (change_frame_size_1): Recompute the frame dimensions
1213 in columns and lines after correcting the pixel dimensions in
1214 check_frame_size.
1215 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
1216 negative values to xrealloc. (Bug#18528)
1217
1218 2014-09-30 Paul Eggert <eggert@cs.ucla.edu>
1219
1220 * alloc.c: Remove now-unnecessary check.
1221 Suggested by Dmitry Antipov in:
1222 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
1223
1224 * xterm.c (x_term_init): Allocate temps on stack, not on heap.
1225
1226 * frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
1227 to Ubuntu 14.04.1 x86-64.
1228
1229 Simplify stack-allocated Lisp objects, and make them more portable.
1230 The build_local_string macro was used in two ways: (1) string
1231 literals for which scoped allocation suffices, and (2) file name
1232 components, where it's not safe in general to assume bounded-size
1233 ASCII data. Simplify by defining a new macro SCOPED_STRING that
1234 allocates a block-scope string, and by using SCOPED_STRING for (1)
1235 and build_string for (2). Furthermore, actually use stack
1236 allocation only for objects known to have sufficient alignment.
1237 This simpler implementation means Emacs can make
1238 USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
1239 GC_MAKE_GCPROS_NOOPS.
1240 * lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
1241 for fewer differences among implementations.
1242 (struct Lisp_String): Now GCALIGNED.
1243 (USE_STACK_LISP_OBJECTS): Default to true, since the
1244 implementation no longer insists on a nonempty GCALIGNED.
1245 But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
1246 (SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
1247 separately. Move definiens to scoped_cons. The old definition
1248 was incorrect when GCALIGNED was defined to be empty.
1249 (union Aligned_String): New type.
1250 (USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
1251 implementation ports to compilers that don't align strictly enough.
1252 Don't worry about the union sizes; it's not worth bothering about.
1253 (scoped_cons, scoped_list1, scoped_list3, scoped_list4):
1254 Rewrite using USE_STACK_CONS.
1255 (scoped_cons): Assume the use of union Aligned_Cons.
1256 (lisp_string_size, make_local_string, build_local_string): Remove.
1257 Unless otherwise specified, all callers of build_local_string
1258 changed to use SCOPED_STRING.
1259 (SCOPED_STRING): New macro.
1260 * data.c (wrong_choice):
1261 * menu.c (single_menu_item):
1262 * process.c (Fformat_network_address):
1263 Hoist use of SCOPED_STRING out of a scope, so that its returned
1264 object lives long enough.
1265 * fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
1266 as the string might be long or might not be ASCII.
1267
1268 2014-09-29 Eli Zaretskii <eliz@gnu.org>
1269
1270 * msdos.c (internal_terminal_init): Bump version to 25.
1271
1272 2014-09-29 Dmitry Antipov <dmantipov@yandex.ru>
1273
1274 Keep stack-allocated Lisp objects fast rather than versatile.
1275 * lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
1276 (SCOPED_CONS_INITIALIZER): New macro.
1277 (scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
1278 (USE_LOCAL_ALLOCA): Remove.
1279 (local_cons, local_list1, local_list2, local_list3, local_list4):
1280 Remove. Stack overflow checking makes them too slow.
1281 (make_local_vector): Likewise. Also we just don't have enough
1282 users for it.
1283 (enum LISP_STRING_OVERHEAD): Remove.
1284 (local_string_init, local_vector_init): Remove prototypes.
1285 (make_local_string, build_local_string): Redesign to target short
1286 compile-time string constants, fall back to regular string allocation
1287 where appropriate.
1288 (lisp_string_size): New function.
1289 (verify_ascii) [ENABLE_CHECKING]: Add prototype.
1290 * alloc.c (local_string_init, local_vector_init): Remove.
1291 (verify_ascii) [ENABLE_CHECKING]: New function.
1292 * buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
1293 * fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
1294 * menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
1295 * xselect.c, xterm.c: All related users changed.
1296
1297 2014-09-28 Ken Brown <kbrown@cornell.edu>
1298
1299 * sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
1300 * gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
1301
1302 2014-09-27 Ken Brown <kbrown@cornell.edu>
1303
1304 Fix implementation of HYBRID_MALLOC on Cygwin.
1305 * sheap.c (bss_sbrk_buffer_end): Cast to void *.
1306 (bss_sbrk_buffer_beg): New variable. Use it...
1307 * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
1308 incorrect definition.
1309
1310 2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
1311
1312 * keyboard.c (track-mouse): Rename to internal--track-mouse.
1313 Make it into a function and change arg to be a function.
1314
1315 * lisp.mk (lisp): Add elisp-mode.elc.
1316
1317 2014-09-26 Paul Eggert <eggert@cs.ucla.edu>
1318
1319 * xfns.c (x_default_scroll_bar_color_parameter):
1320 Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
1321 to pacify --enable-gcc-warnings in non-scrollbar builds.
1322
1323 2014-09-26 Ken Brown <kbrown@cornell.edu>
1324
1325 * w32term.h (ALIGN_STACK): Fix the cpp condition.
1326
1327 2014-09-25 Eli Zaretskii <eliz@gnu.org>
1328
1329 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
1330 MinGW builds that use GCC before 4.2.
1331
1332 Default to stack objects on DOS_NT platforms as well.
1333 * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
1334 __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
1335
1336 * lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
1337
1338 * w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
1339 ALIGN_STACK attribute.
1340
1341 * w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
1342
1343 * w32uniscribe.c (add_opentype_font_name_to_list): Add the
1344 ALIGN_STACK attribute.
1345
1346 * w32font.c (add_font_name_to_list, add_font_entity_to_list)
1347 (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
1348
1349 2014-09-25 Martin Rudalics <rudalics@gmx.at>
1350
1351 * frame.c (frame_inhibit_resize):
1352 * widget.c (EmacsFrameResize):
1353 * window.c (resize_frame_windows, Fset_window_configuration):
1354 * xdisp.c (expose_frame):
1355 * xfns.c (x_change_tool_bar_height):
1356 * xmenu.c (update_frame_menubar):
1357 * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
1358 Remove code left dead after 2014-07-27 changes.
1359
1360 2014-09-25 Paul Eggert <eggert@cs.ucla.edu>
1361
1362 Fix local_cons etc. to not exhaust the stack when in a loop.
1363 Problem reported in:
1364 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
1365 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
1366 * charset.c (load_charset_map_from_file, Ffind_charset_region)
1367 (Ffind_charset_string):
1368 * chartab.c (uniprop_encode_value_numeric, uniprop_table):
1369 * data.c (wrong_range):
1370 * editfns.c (Fpropertize, format2):
1371 * emacs.c (init_cmdargs, decode_env_path):
1372 * fileio.c (auto_save_error):
1373 * fns.c (Fyes_or_no_p):
1374 * font.c (font_style_to_value, font_parse_xlfd)
1375 (font_parse_family_registry, font_delete_unmatched)
1376 (font_add_log):
1377 * fontset.c (Fset_fontset_font):
1378 * frame.c (x_get_arg):
1379 * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
1380 (read_char_minibuf_menu_prompt):
1381 * keymap.c (silly_event_symbol_error, describe_vector):
1382 * lread.c (load_warn_old_style_backquotes):
1383 * menu.c (single_menu_item):
1384 * minibuf.c (Fread_buffer):
1385 * process.c (status_message, Fformat_network_address)
1386 (server_accept_connection):
1387 * textprop.c (copy_text_properties):
1388 * xdisp.c (Fcurrent_bidi_paragraph_direction):
1389 * xfns.c (x_default_scroll_bar_color_parameter):
1390 * xfont.c (xfont_open):
1391 * xselect.c (x_clipboard_manager_error_1):
1392 * xterm.c (x_term_init):
1393 Put USE_LOCAL_ALLOCA at the start of the function.
1394 * fns.c (maybe_resize_hash_table): Use build_string instead of
1395 build_local_string, since we'd otherwise need a conditional
1396 USE_LOCAL_ALLOCA here, but this is just debugging output and is
1397 not worth the bother of optimization.
1398 * font.c (font_delete_unmatched): Remove by-hand code that
1399 observed MAX_ALLOCA limit, since it's now done automatically.
1400 * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
1401 since build_local_string needs its sa_alloc.
1402 * lisp.h (lisp_word_count): New function.
1403 (SAFE_ALLOCA_LISP): Use it.
1404 (USE_LOCAL_ALLOCA): New macro.
1405 (local_cons, make_local_vector, make_local_string):
1406 Observe the MAX_ALLOCA limit.
1407 (LISP_STRING_OVERHEAD): New constant.
1408 (make_local_string): Use it.
1409
1410 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
1411
1412 Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
1413 * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
1414 if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX
1415 and Solaris and it's likely to work on similar platforms.
1416
1417 Avoid signed integer overflow when converting Time to ptrdiff_t.
1418 * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
1419 New macros.
1420 (position_to_Time, Time_to_position): New functions.
1421 (gen_help_event, kbd_buffer_get_event): Use them.
1422 * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
1423 Go back to plain 'unsigned long', so that 'Time' is the same
1424 for both X and non-X builds; this is less likely to cause surprise.
1425 * termhooks.h: Remove compile-time check that Time and ptrdiff_t
1426 are the same size; this is no longer required.
1427
1428 * keyboard.c (make_lispy_event): Avoid unnecessary tests
1429 of bit 28 and of whether an unsigned value is negative.
1430 This simplifies the code a bit, and pacifies clang 3.4.
1431
1432 2014-09-24 Eli Zaretskii <eliz@gnu.org>
1433
1434 * systime.h (Time): Define as size_t, to be consistent with 64-bit
1435 Windows builds, where 'long' is a 32-bit type.
1436
1437 * w32inevt.h (w32_console_mouse_position): Update the argument
1438 types to use 'Time'.
1439
1440 * w32term.c (w32_mouse_position)
1441 (x_horizontal_scroll_bar_report_motion)
1442 (x_scroll_bar_report_motion): Update the argument types to use
1443 'Time'.
1444
1445 2014-09-24 Dmitry Antipov <dmantipov@yandex.ru>
1446
1447 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
1448 (struct input_event): ...unsigned bitfields. Likewise for
1449 `event_kind' member. Prefer unsigned for `code' and 'modifiers'.
1450 Use `timestamp' for HELP_EVENT position. Add compile-time assert.
1451 * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
1452 (kbd_buffer_get_event): Adjust users.
1453 (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
1454 (make_scroll_bar_position): New function, refactored out of...
1455 (make_lispy_event): ...adjusted user.
1456 * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
1457 * nsterm.m (ns_mouse_position, mouseUp):
1458 * term.c (term_mouse_position):
1459 * w32inevt.c (w32_console_mouse_position):
1460 * w32term.c (w32_mouse_position):
1461 * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
1462 (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
1463 Prefer enum and explicit enum members to integers and numeric values.
1464
1465 * chartab.c (uniprop_encode_value_numeric):
1466 * font.c (font_style_to_value): Use make_local_vector.
1467 (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
1468 * keymap.c (append_key): Use scoped_list1.
1469
1470 * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
1471 && __GNUC__ && !__clang__. Mention known problems. Adjust comment.
1472
1473 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
1474
1475 Fix some slow uses and misuses of strcat.
1476 * doc.c (get_doc_string):
1477 * gtkutil.c (get_utf8_string):
1478 * xsmfns.c (x_session_initialize):
1479 Avoid recomputation of string length.
1480 * ftfont.c (ftfont_spec_pattern):
1481 * xfns.c (xic_create_fontsetname):
1482 Don't assume output buffer is initially zero.
1483
1484 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
1485
1486 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
1487 All callers changed.
1488 * xterm.c (x_term_init): Use new functionality to avoid two needs
1489 to compute a string length.
1490
1491 * dispextern.h, xdisp.c (window_box_right_offset): Now static.
1492
1493 2014-09-23 Dmitry Antipov <dmantipov@yandex.ru>
1494
1495 Use known length of a Lisp string to copy it faster.
1496 * lisp.h (lispstrcpy): New function. Add comment.
1497 * callproc.c (child_setup):
1498 * dbusbind.c (xd_append_arg):
1499 * doc.c (get_doc_string):
1500 * font.c (Ffont_xlfd_name):
1501 * frame.c (xrdb_get_resource):
1502 * process.c (Fmake_network_process, network_interface_info):
1503 * w32fns.c (Fx_open_connection):
1504 * w32proc.c (sys_spawnve):
1505 * xfns.c (select_visual):
1506 * xfont.c (xfont_list):
1507 * xsmfns.c (x_session_initialize):
1508 * xterm.c (x_term_init): Use it.
1509
1510 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
1511
1512 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
1513 Problem reported by Dmitry Antipov in thread leading to:
1514 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
1515 This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
1516 the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
1517 remain unfixed.
1518 * callproc.c (call_process): Save and restore sa_avail.
1519 * lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
1520 (AVAIL_ALLOCA): New macro.
1521 (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
1522 Use it, and check against sa_avail rather than MAX_ALLOCA.
1523
1524 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
1525
1526 On OSX, do not free font-specific data more than once (Bug#18501).
1527 * macfont.m (macfont_close): Release and free font-specific data
1528 only if it wasn't previously freed.
1529
1530 2014-09-22 David Caldwell <david@porkrind.org> (tiny change)
1531
1532 * unexmacosx.c (dump_it): Improve error message.
1533
1534 2014-09-22 Juri Linkov <juri@jurta.org>
1535
1536 * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
1537 (Bug#10747, bug#18334)
1538
1539 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1540
1541 * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
1542 units in which the position is measured. (Bug#18493)
1543
1544 * xdisp.c (redisplay_internal): Force redisplay of all windows
1545 that show a buffer whose narrowing has changed. (Bug#18490)
1546
1547 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1548
1549 * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
1550 * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
1551 lines, draw the hollow-box and hbar cursors on the right side of
1552 cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for
1553 testing on X.
1554
1555 * xterm.c (x_draw_stretch_glyph_string):
1556 * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
1557 caused the block cursor to disappear on a TAB in R2L lines in
1558 every window except the leftmost one. Reported by Martin Rudalics
1559 <rudalics@gmx.at>.
1560
1561 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
1562
1563 Always use matched specpdl entry to record call arguments (Bug#18473).
1564 * lisp.h (record_in_backtrace): Adjust prototype.
1565 * eval.c (record_in_backtrace): Return current specpdl level.
1566 (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
1567 (eval_sub, Ffuncall): Record call arguments in matched specpdl
1568 entry and use that entry in call to backtrace_debug_on_exit.
1569 (apply_lambda): Likewise. Get current specpdl level as 3rd arg.
1570 (do_debug_on_call): Get current specpdl level as 2nd arg.
1571
1572 Prefer ptrdiff_t to int and avoid integer overflows.
1573 * fileio.c (make_temp_name):
1574 * font.c (font_parse_family_registry): Avoid integer
1575 overflow on string size calculation.
1576 * data.c (Faset): Likewise for byte index.
1577
1578 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1579
1580 Fix display of R2L lines in partial-width windows.
1581 * xdisp.c (init_iterator): Don't use it->bidi_p before it is
1582 assigned the correct value.
1583 (extend_face_to_end_of_line): Account for truncation and
1584 continuation glyphs in R2L rows when one of the fringes is not
1585 displayed.
1586 (display_line): Don't assign negative X offset to a row if we are
1587 going to produce a truncation glyph for it. When handling
1588 truncated R2L rows, consider the width of the left fringe instead
1589 of the right one.
1590 (produce_special_glyphs): Fix bogus assignments.
1591
1592 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1593
1594 * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
1595 always set to a valid value. Make sure the size passed to alloca
1596 is always positive. (Bug#18516)
1597
1598 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
1599
1600 Avoid extra call to oblookup when interning symbols.
1601 * lisp.h (intern_driver): Add prototype.
1602 * lread.c (intern_driver): New function.
1603 (intern1, intern_c_string_1, Fintern):
1604 * font.c (font_intern_prop):
1605 * w32font.c (intern_font_name): Use it.
1606
1607 2014-09-21 Paul Eggert <eggert@cs.ucla.edu>
1608
1609 Minor improvements to new stack-allocated Lisp objects.
1610 * frame.h (FRAME_PARAMETER):
1611 Prefer scoped_list1 to local_list1 where either would do.
1612 * lisp.h (scoped_list4): New macro.
1613 (local_cons, local_list1, local_list2, local_list3, local_list4)
1614 (make_local_vector, make_local_string, build_local_string):
1615 Prefer functions to macros where either would do.
1616 * xdisp.c (build_desired_tool_bar_string):
1617 Prefer scoped_list4 to local_list4 where either would do.
1618
1619 2014-09-18 Dmitry Antipov <dmantipov@yandex.ru>
1620
1621 More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
1622 * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
1623 [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
1624 * frame.h (FRAME_PARAMETER): New macro.
1625 * dispnew.c (init_display):
1626 * fontset.c (Fset_fontset_font):
1627 * frame.c (x_default_parameter):
1628 * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
1629 * xfns.c (x_default_scroll_bar_color_parameter)
1630 (x_default_font_parameter, x_create_tip_frame): Use it.
1631 * editfns.c (Fpropertize): Use local_cons.
1632 * process.c (status_message): Use build_local_string.
1633 * xfont.c (xfont_open): Use make_local_string.
1634 * xdisp.c (build_desired_tool_bar_string): Use local_list4.
1635
1636 2014-09-18 Paul Eggert <eggert@cs.ucla.edu>
1637
1638 Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
1639 * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
1640 !__clang__. This works with GCC and with clang and is safer for
1641 compilers we don't know about.
1642 (local_cons): Rename parameter to make capture less likely.
1643
1644 2014-09-17 Samuel Bronson <naesten@gmail.com>
1645
1646 * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
1647
1648 2014-09-17 Paul Eggert <eggert@cs.ucla.edu>
1649
1650 Fix minor problems found by static checking.
1651 * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
1652 Remove; now unused.
1653 * buffer.h (decode_buffer): Doc and indentation fixes.
1654 * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
1655
1656 2014-09-17 Dmitry Antipov <dmantipov@yandex.ru>
1657
1658 Avoid clang-specific warnings.
1659 * buffer.c (init_buffer): Shut up -Wself-assign.
1660 * process.c (server_accept_connection): Shut up -Wunsequenced.
1661
1662 2014-09-16 Daniel Colascione <dancol@dancol.org>
1663
1664 * fns.c (sxhash): For symbols, use address as hash code.
1665
1666 2014-09-16 Dmitry Antipov <dmantipov@yandex.ru>
1667
1668 If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
1669 * charset.c (load_charset_map_from_file): Use scoped_list2
1670 and build_local_string.
1671 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
1672 * emacs.c (init_cmdargs, decode_env_path):
1673 * fileio.c (Fexpand_file_name):
1674 * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
1675 * frame.c (x_get_arg):
1676 * keyboard.c (safe_run_hooks_error):
1677 * lread.c (load_warn_old_style_backquotes):
1678 * xdisp.c (Fcurrent_bidi_paragraph_direction):
1679 * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
1680 * xselect.c (x_clipboard_manager_error_1)
1681 (x_clipboard_manager_save_all):
1682 * xterm.c (x_term_init): Use build_local_string.
1683
1684 Avoid more integer overflows on string size calculations.
1685 * category.c (Fmake_category_set):
1686 * xdisp.c (get_overlay_arrow_glyph_row):
1687 * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
1688
1689 2014-09-15 Eli Zaretskii <eliz@gnu.org>
1690
1691 * sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
1692 (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
1693 error message format. Use message_with_string to have non-ASCII
1694 file names properly displayed.
1695 (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
1696 when w32-unicode-filenames is non-nil, but not on Windows 9X,
1697 where these APIs are not available even in UNICOWS.DLL.
1698 Improve the format of error messages and include the file name in them
1699 where appropriate.
1700 (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
1701 call play-sound-functions, per documentation.
1702
1703 * w32.c (w32_get_long_filename, w32_get_short_filename):
1704 Constify the input file name arguments.
1705
1706 * w32.h (w32_get_long_filename, w32_get_short_filename):
1707 Update prototypes.
1708
1709 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru>
1710
1711 If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
1712 * lisp.h (local_cons, local_list1, local_list2, local_list3)
1713 [USE_LOCAL_ALLOCATORS]: New macros.
1714 [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
1715 (build_local_string): Avoid argument name expansion clash with
1716 make_local_string.
1717 * alloc.c (toplevel)
1718 [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
1719 Preprocessor guard to avoid impossible configuration.
1720 * charset.c (Ffind_charset_region, Ffind_charset_string):
1721 Use make_local_vector.
1722 * lread.c (read1, substitute_object_recurse): Use scoped_cons.
1723 * textprop.c (Fput_text_property, Fadd_face_text_property):
1724 Use scoped_list2.
1725 (copy_text_properties): Use local_cons and local_list3.
1726 * chartab.c (uniprop_table):
1727 * data.c (wrong_choice, wrong_range):
1728 * doc.c (get_doc_string):
1729 * editfns.c (format2):
1730 * fileio.c (Fexpand_file_name, auto_save_error):
1731 * fns.c (Fyes_or_no_p):
1732 * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
1733 * fontset.c (Fset_fontset_font):
1734 * keyboard.c (echo_add_key, echo_dash, parse_menu_item)
1735 (read_char_minibuf_menu_prompt):
1736 * keymap.c (silly_event_symbol_error, describe_vector):
1737 * menu.c (single_menu_item):
1738 * minibuf.c (Fread_buffer):
1739 * process.c (status_message, Fformat_network_address)
1740 (server_accept_connection): Use make_local_string and
1741 build_local_string. Prefer compound literals where appropriate.
1742
1743 2014-09-15 Daniel Colascione <dancol@dancol.org>
1744
1745 * fns.c (Fsort): Tweak sort docstring.
1746
1747 2014-09-15 Eli Zaretskii <eliz@gnu.org>
1748
1749 * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
1750 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
1751 set errno to EAGAIN instead, to allow the caller to retry the
1752 write after some waiting. Fixes deadlocks when Emacs exchanges a
1753 lot of data through the pipe. (Bug#18420)
1754
1755 * sound.c (Fplay_sound_internal): Encode the sound file name in
1756 the ANSI codepage. Expand it against data-directory, as per docs,
1757 not against the current directory. No need to make a local copy
1758 of the file name; pass the encoded file name directly to
1759 do_play_sound. (Bug#18463)
1760
1761 * w32.c (ansi_encode_filename): If w32_get_short_filename returns
1762 NULL, and the file name is not encodable in ANSI codepage, return
1763 the string with "?" replacement characters, which will fail the
1764 caller. This avoids returning a random value in that case.
1765
1766 2014-09-15 Martin Rudalics <rudalics@gmx.at>
1767
1768 * window.c (Fresize_mini_window_internal): Set w->total_lines
1769 from w->pixel_height (Bug#18422).
1770
1771 2014-09-15 Jan Djärv <jan.h.d@swipnet.se>
1772
1773 * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
1774 (toggleFullScreen:): Take frame_resize_pixelwise into account when
1775 setting resize increments (Bug#18435).
1776
1777 2014-09-15 Eli Zaretskii <eliz@gnu.org>
1778
1779 * xdisp.c (pos_visible_p): Properly save and restore the iterator
1780 state around the call to line_bottom, since it can move the
1781 iterator to another screen line. This fixes off-by-one errors in
1782 the reported row in some rare cases.
1783
1784 2014-09-14 Jan Djärv <jan.h.d@swipnet.se>
1785
1786 * callproc.c (init_callproc): Fix bug introduced at
1787 2014-09-07 (Bug#18474).
1788
1789 2014-09-13 Dmitry Antipov <dmantipov@yandex.ru>
1790
1791 Prefer ptrdiff_t to int and avoid integer overflows.
1792 * fileio.c (make_temp_name):
1793 * font.c (font_parse_family_registry): Avoid integer
1794 overflow on string size calculation.
1795 * data.c (Faset): Likewise for byte index.
1796
1797 2014-09-12 Detlev Zundel <dzu@member.fsf.org>
1798
1799 * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
1800
1801 2014-09-11 Dmitry Antipov <dmantipov@yandex.ru>
1802
1803 * lisp.h (make_local_string): Nitpick indent.
1804 * print.c (Fprin1_to_string): Remove unused GCPROs.
1805
1806 More debugging aids around GCPROs.
1807 * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
1808 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
1809 Minor restyle. If DEBUG_GCPRO, initialize extra fields.
1810
1811 * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
1812 bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
1813
1814 Remove redundant GCPROs around Ffuncall and Fapply calls.
1815 This is safe because Ffuncall protects all of its arguments by itself.
1816 * charset.c (map_charset_for_dump): Remove redundant GCPRO.
1817 * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
1818 (call6, call7): Likewise. Use compound literals where applicable.
1819 (run_hook_with_args_2): Use compound literal.
1820
1821 2014-09-11 Paul Eggert <eggert@cs.ucla.edu>
1822
1823 Pacify --enable-gcc-warnings when no window system is used.
1824 These warnings found that subscript error, so they seem worthwhile.
1825 * composite.c (char_composable_p): Simplify a bit.
1826 * frame.c (x_set_frame_parameters): Add an IF_LINT.
1827 * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
1828 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
1829 * window.c (set_window_scroll_bars):
1830 Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
1831 * frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
1832 Ignore -Wsuggest-attribute=const.
1833 * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
1834 (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
1835
1836 2014-09-10 Paul Eggert <eggert@penguin.cs.ucla.edu>
1837
1838 * charset.c (Fget_unused_iso_final_char): Fix subscript error.
1839 Use check_iso_charset_parameter instead of doing the checks by hand.
1840 (check_iso_charset_parameter): Move up. Check parameters a bit
1841 more carefully, and return true for 96-char sets. All callers changed.
1842
1843 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
1844
1845 Simplify lisp.h by removing the __COUNTER__ business.
1846 Problem reported by Dmitry Antipov in:
1847 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
1848 * lisp.h (make_local_vector, make_local_string)
1849 (build_local_string): Simplify by not bothering with __COUNTER__.
1850 The __COUNTER__ business wasn't working properly, and was needed
1851 only for hypothetical future expansion anyway.
1852
1853 2014-09-10 Alp Aker <alp.tekin.aker@gmail.com>
1854
1855 * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
1856 terms to determine bitmap color. (Bug#18437)
1857
1858 2014-09-10 Eli Zaretskii <eliz@gnu.org>
1859
1860 * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
1861 translation buffer.
1862
1863 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
1864
1865 * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
1866
1867 2014-09-10 Jan Djärv <jan.h.d@swipnet.se>
1868
1869 * xterm.c (handle_one_xevent): Detect iconified by looking at
1870 _NET_WM_STATE_HIDDEN.
1871
1872 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
1873
1874 * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
1875 These can generate a constant with the correct value but the wrong
1876 width, which doesn't work as a printf argument. All uses removed.
1877 Problem reported by Dmitry Antipov in:
1878 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
1879 (ENUMABLE): Remove; no longer needed.
1880 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
1881 Remove; no longer needed because of the above change.
1882 Each definiens moved to the only use.
1883
1884 Improve the experimental local and scoped allocation.
1885 * alloc.c (local_string_init, local_vector_init):
1886 New functions, defined if USE_LOCAL_ALLOCATORS.
1887 Mostly, these are moved here from lisp.h, as it's not
1888 clear it's worth making them inline.
1889 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
1890 (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
1891 USE_STACK_LISP_OBJECTS, not on a laundry list.
1892 (local_string_init, local_vector_init): New decls.
1893 (union Aligned_Cons): New type.
1894 (scoped_cons): Use it. Give up on the char trick, as it's a too
1895 much of a maintenance hassle; if someone wants this speedup
1896 they'll just need to convince their compiler to align properly.
1897 Conversely, use the speedup if struct Lisp_Cons happens to
1898 be aligned even without a directive. Better yet, help it along
1899 by using union Aligned_Cons rather than struct Lisp_Cons.
1900 (pointer_valid_for_lisp_object): Remove. This check is not
1901 necessary, since make_lisp_ptr is already doing it. All uses removed.
1902 (local_vector_init, local_string_init): Move to alloc.c.
1903 (build_local_vector): Remove this awkward macro, replacing with ...
1904 (make_local_vector): New macro, which acts more like a function.
1905 Use statement expressions and use __COUNTER__ to avoid macro
1906 capture. Fall back on functions if these features are not supported.
1907 (build_local_string, make_local_string): Likewise.
1908
1909 2014-09-09 Dmitry Antipov <dmantipov@yandex.ru>
1910
1911 * xterm.c (x_term_init): Consolidate duplicated code.
1912 [USE_LUCID]: Revert 2014-04-02 change (Bug#18403). Add comment.
1913 (x_delete_terminal): Do not close X connection fd (Bug#18403).
1914 Add eassert and mark dpyinfo as dead only if it was alive.
1915
1916 Add macros to allocate temporary Lisp objects with alloca.
1917 Respect MAX_ALLOCA and fall back to regular GC for large objects.
1918 * character.h (parse_str_as_multibyte): Move prototype to ...
1919 * lisp.h (parse_str_as_multibyte): ... here.
1920 (struct Lisp_Cons): Add GCALIGNED attribute if supported.
1921 (scoped_cons, scoped_list2, build_local_vector, build_local_string):
1922 New macros.
1923 (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
1924 (local_string_init): New functions.
1925 * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
1926 (init_alloc_once): Call it.
1927
1928 Cleanup last change and make all new stuff conditional.
1929 * lisp.h (build_local_string): Rename to ...
1930 (make_local_string): ... this macro.
1931 (build_local_string, scoped_list1, scoped_list3): New macros.
1932 (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
1933 and functions as such, use regular fallbacks otherwise.
1934 * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
1935 conditionally.
1936
1937 2014-09-08 Eli Zaretskii <eliz@gnu.org>
1938
1939 * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
1940 always make sure the marginal areas of the row are in sync with
1941 what the window wants. (Bug#18419)
1942
1943 * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
1944 existing binding of a variable, to avoid silently aborting
1945 commands that use specbind. (Bug#18331)
1946
1947 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
1948
1949 Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
1950 * coding.c (growable_destination): New function.
1951 (produce_chars): Use it for sanity checks. Do not fiddle with
1952 dst_end if the source and destination are both nil, as it's
1953 the caller's responsibility to avoid overlap.
1954 * keyboard.c (read_decoded_event_from_main_queue):
1955 The destination must be MAX_MULTIBYTE_LENGTH times the max source
1956 length, not 4 times, to prevent decode_coding_c_string from trying
1957 to reallocate a destination. This removes the need for the FIXME.
1958
1959 * callproc.c (exec_failed) [DOS_NT]: Define a dummy.
1960 All callers simplified. Add a comment about exec_failed, vfork,
1961 and alloca.
1962
1963 Adjust drag-and-drop fix when window is above top (Bug#18303).
1964 * xselect.c (x_fill_property_data): Don't let sign bit of negative
1965 XCDR bleed into XCAR's encoded value. Improve checks for
1966 out-of-range data while we're at it.
1967
1968 2014-09-07 Jan Djärv <jan.h.d@swipnet.se>
1969
1970 * xselect.c (x_fill_property_data): Handle negative XCDR when data
1971 is CONSP (Bug#18303).
1972
1973 2014-09-07 Eli Zaretskii <eliz@gnu.org>
1974
1975 * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
1976 'alloca' gets passed arguments larger than MAX_ALLOCA.
1977
1978 * font.c (MAX): Define if not defined elsewhere.
1979
1980 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
1981
1982 * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
1983 here for destination buffer, to work around what appears to be a
1984 bug in decode_coding_c_string when the source and destination are
1985 both C strings.
1986
1987 Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
1988 This follows up on the recent thread in emacs-devel on alloca; see:
1989 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
1990 This patch also cleans up alloca-related glitches noted while
1991 examining the code looking for unbounded alloca.
1992 * alloc.c (listn):
1993 * callproc.c (init_callproc):
1994 Rewrite to avoid need for alloca.
1995 * buffer.c (mouse_face_overlay_overlaps)
1996 (report_overlay_modification):
1997 * buffer.h (GET_OVERLAYS_AT):
1998 * coding.c (make_subsidiaries):
1999 * doc.c (Fsnarf_documentation):
2000 * editfns.c (Fuser_full_name):
2001 * fileio.c (Ffile_name_directory, Fexpand_file_name)
2002 (search_embedded_absfilename, Fsubstitute_in_file_name):
2003 * fns.c (Fmake_hash_table):
2004 * font.c (font_vconcat_entity_vectors, font_update_drivers):
2005 * fontset.c (fontset_pattern_regexp, Ffontset_info):
2006 * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
2007 (xrdb_get_resource, x_get_resource_string):
2008 * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
2009 * ftxfont.c (ftxfont_draw):
2010 * image.c (xbm_load, xpm_load, jpeg_load_body):
2011 * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
2012
2013 * keymap.c (Fdescribe_buffer_bindings, describe_map):
2014 * lread.c (openp):
2015 * menu.c (digest_single_submenu, find_and_call_menu_selection)
2016 (find_and_return_menu_selection):
2017 * print.c (PRINTFINISH):
2018 * process.c (Fformat_network_address):
2019 * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
2020 * search.c (search_buffer, Fmatch_data, Fregexp_quote):
2021 * sound.c (wav_play, au_play):
2022 * syntax.c (skip_chars):
2023 * term.c (tty_menu_activate, tty_menu_show):
2024 * textprop.c (get_char_property_and_overlay):
2025 * window.c (Fset_window_configuration):
2026 * xdisp.c (safe__call, next_overlay_change, vmessage)
2027 (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
2028 * xfaces.c (face_at_buffer_position):
2029 * xmenu.c (x_menu_show):
2030 Use SAFE_ALLOCA etc. instead of plain alloca, since the
2031 allocation size isn't bounded.
2032 * callint.c (Fcall_interactively): Redo memory_full check
2033 so that it can be done at compile-time on some platforms.
2034 * coding.c (MAX_LOOKUP_MAX): New constant.
2035 (get_translation_table): Use it.
2036 * callproc.c (call_process): Use SAFE_NALLOCA instead of
2037 SAFE_ALLOCA, to catch integer overflows on size calculation.
2038 (exec_failed) [!DOS_NT]: New function.
2039 (child_setup) [!DOS_NT]: Use it.
2040 * editfns.c (Ftranspose_regions):
2041 Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
2042 * editfns.c (check_translation):
2043 Allocate larger buffers on the heap.
2044 * eval.c (internal_lisp_condition_case):
2045 Check for MAX_ALLOCA overflow.
2046 * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
2047 (Fbase64_encode_region, Fbase64_decode_region):
2048 Avoid unnecessary calls to SAFE_FREE before 'error'.
2049 * buffer.c (mouse_face_overlay_overlaps):
2050 * editfns.c (Fget_pos_property, check_translation):
2051 * eval.c (Ffuncall):
2052 * font.c (font_unparse_xlfd, font_find_for_lface):
2053 * ftfont.c (ftfont_drive_otf):
2054 * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
2055 (menu_bar_items, tool_bar_items):
2056 * sound.c (Fplay_sound_internal):
2057 * xdisp.c (load_overlay_strings, dump_glyph_row):
2058 Use an ordinary auto buffer rather than alloca, since the
2059 allocation size is fixed and small.
2060 * ftfont.c: Include <c-strcase.h>.
2061 (matching_prefix): New function.
2062 (get_adstyle_property): Use it, to avoid need for alloca.
2063 * keyboard.c (echo_add_key):
2064 * keymap.c (describe_map): Use ptrdiff_t, not int.
2065 * keyboard.c (echo_add_key): Prefer sizeof to strlen.
2066 * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
2067 when counting bytes.
2068 * lisp.h (xlispstrdupa): Remove, replacing with ...
2069 (SAFE_ALLOCA_STRING): ... new macro with different API.
2070 This fixes a portability problem, namely, alloca result
2071 passed to another function. All uses changed.
2072 (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
2073 not MAX_ALLOCA - 1.
2074 * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
2075 (REGEX_ALLOCATE): New macros.
2076 (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
2077 (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
2078 Use them.
2079 * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
2080 by hand.
2081 (decode_mode_spec_coding): Store directly into buf rather than
2082 into an alloca temporary and copying the temporary to the buf.
2083
2084 2014-09-06 Eli Zaretskii <eliz@gnu.org>
2085
2086 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416)
2087
2088 2014-09-04 Jan D <jan.h.d@swipnet.se>
2089
2090 * xterm.c (x_term_init): Don't call x_session_initialize if running
2091 as a daemon (Bug#18375).
2092
2093 * xsmfns.c: Initialize ice_fd.
2094
2095 2014-09-04 Paul Eggert <eggert@cs.ucla.edu>
2096
2097 Less chatter in 'make' output.
2098 * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
2099 (am__v_at_, am__v_at_0, am__v_at_1): New macros, taken from Automake.
2100 ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
2101
2102 2014-09-03 Martin Rudalics <rudalics@gmx.at>
2103
2104 * buffer.c (scroll-bar-height): Fix typo in doc-string.
2105 * frame.c (Vdefault_frame_horizontal_scroll_bars):
2106 Remove variable.
2107 * nsfns.m (Fx_create_frame):
2108 * w32fns.c (Fx_create_frame):
2109 * xfns.c (Fx_create_frame): Default horizontal scroll bars to
2110 nil.
2111
2112 2014-09-03 Eli Zaretskii <eliz@gnu.org>
2113
2114 * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
2115 the reported row in the case of a window with a header line, by
2116 improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
2117 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384)
2118
2119 2014-09-03 Paul Eggert <eggert@cs.ucla.edu>
2120
2121 * eval.c (internal_lisp_condition_case): Don't overrun the stack
2122 when configured --with-wide-int on typical 32-bit platforms.
2123
2124 2014-09-03 Eli Zaretskii <eliz@gnu.org>
2125
2126 * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
2127 when HPOS is negative, for the benefit of R2L glyph rows whose
2128 newline overflows into the fringe.
2129
2130 2014-09-03 Ken Brown <kbrown@cornell.edu>
2131
2132 * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)
2133
2134 2014-09-02 Paul Eggert <eggert@cs.ucla.edu>
2135
2136 Minor cleanup of recent strlen-avoiding patch.
2137 * fileio.c (CHECK_LENGTH): Remove.
2138 Rewrite callers so that they don't need it.
2139 (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
2140 variable wasn't set.
2141
2142 2014-09-02 Dmitry Antipov <dmantipov@yandex.ru>
2143
2144 * fileio.c (CHECK_LENGTH): New macro.
2145 (Fexpand_file_name): Use it and get rid of a few more calls
2146 to strlen and strcat.
2147 * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
2148 * lisp.h (egetenv): ... because of a new inline function used to
2149 avoid calls to strlen for a compile-time constants.
2150
2151 * buffer.h (decode_buffer): New function.
2152 * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
2153 (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
2154 (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
2155 * data.c (Flocal_variables_p):
2156 * fileio.c (Fverify_visited_file_modtime):
2157 * marker.c (live_buffer): Use it.
2158
2159 2014-09-01 Dmitry Antipov <dmantipov@yandex.ru>
2160
2161 Avoid extra calls to strlen in filesystem I/O routines.
2162 * fileio.c (Fexpand_file_name): Avoid calls to strlen if
2163 the length of 'newdir' is known or may be precalculated.
2164 (file_accessible_directory_p): Prefer to pass Lisp_Object,
2165 not 'char *', and so use precalculated length.
2166 (Ffile_accessible_directory_p):
2167 * callproc.c (encode_current_directory, init_callproc):
2168 * charset.c (init_charset):
2169 * lread.c (load_path_check, load_path_default): Adjust users.
2170 * lisp.h (file_accessible_directory_p): Tweak prototype.
2171
2172 2014-09-01 Eli Zaretskii <eliz@gnu.org>
2173
2174 * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
2175 locales.
2176
2177 2014-09-01 Paul Eggert <eggert@cs.ucla.edu>
2178
2179 --enable-silent-rules now suppresses more chatter.
2180 * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
2181 (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
2182 (am__v_CCLD_1): New macros, taken from Automake.
2183 (.c.o, .m.o, temacs$(EXEEXT)): Use them.
2184
2185 Clean up extern decls a bit.
2186 * bytecode.c: Include blockinput.h and keyboard.h rather
2187 than rolling their APIs by hand.
2188 * emacs.c: Include regex.h and rely on its and lisp.h's API
2189 rather than rolling them by hand.
2190 * lastfile.c: Include lisp.h, to check this file's API.
2191 * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
2192 New decls.
2193 * regex.h (re_max_failures): New decl.
2194 * unexcw.c, unexmacosx.c, unexw32.c:
2195 Rely on lisp.h's API rather than rolling it by hand.
2196 * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
2197 Declare at top level, to pacify GCC -Wnested-externs.
2198
2199 2014-08-31 Eli Zaretskii <eliz@gnu.org>
2200
2201 * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
2202 clipping rectangle become negative (i.e. large positive, since
2203 it's an unsigned data type). This can happen in R2L hscrolled
2204 glyph rows, and caused us to draw the cursor glyph on the fringe.
2205 For the details, see
2206 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
2207
2208 2014-08-31 Ken Brown <kbrown@cornell.edu>
2209
2210 * gmalloc.c: Don't include <stdlib.h>. Declare system malloc and
2211 friends before defining hybrid_malloc and friends if HYBRID_MALLOC
2212 is defined. (Bug#18368)
2213
2214 2014-08-30 Paul Eggert <eggert@cs.ucla.edu>
2215
2216 Vector-sorting fixes (Bug#18361).
2217 It's not safe to call qsort or qsort_r, since they have undefined
2218 behavior if the user-specified predicate is not a total order.
2219 Also, watch out for garbage-collection while sorting vectors.
2220 * fns.c: Include <vla.h>.
2221 (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
2222 (sort_vector_compare): Remove, replacing with ....
2223 (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
2224 ... these new functions.
2225 (sort_vector): Rewrite to use the new functions.
2226 GCPRO locals, since the predicate can invoke the GC.
2227 Since it's in-place return void; caller changed.
2228 (merge): Use 'inorder', for clarity.
2229
2230 * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
2231 One can't hoist this out of the 'if', because intervening calls to
2232 newlocale, twolower, etc. can change errno.
2233
2234 2014-08-30 Eli Zaretskii <eliz@gnu.org>
2235
2236 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
2237 wording of the error messages.
2238 (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
2239 sets errno.
2240
2241 * w32proc.c (get_lcid_callback): Accept locale specifications
2242 without the country part, as in "enu" vs "enu_USA".
2243 (w32_compare_strings): Signal an error if a locale was specified,
2244 but couldn't be translated into a valid LCID.
2245
2246 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
2247
2248 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
2249
2250 2014-08-29 Paul Eggert <eggert@cs.ucla.edu>
2251
2252 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
2253 errno after towlower_l. errno's value is not specified after
2254 towlower_l. Instead, assume that towlower_l returns its argument
2255 on failure, which is portable in practice.
2256
2257 2014-08-29 Eli Zaretskii <eliz@gnu.org>
2258
2259 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
2260
2261 * w32proc.c (w32_compare_strings): Accept additional argument
2262 IGNORE_CASE. Set up the flags for CompareStringW to ignore case
2263 if requested. If w32-collate-ignore-punctuation is non-nil, add
2264 NORM_IGNORESYMBOLS to the flags.
2265 (LINGUISTIC_IGNORECASE): Define if not already defined.
2266 (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
2267
2268 * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
2269 change.
2270
2271 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
2272
2273 * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
2274 Define substitutes for platforms that lack them.
2275 (str_collate): Add arguments locale and ignore_case.
2276
2277 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
2278 Add optional arguments LOCALE and IGNORE-CASE.
2279
2280 * lisp.h (str_collate): Adapt argument list.
2281
2282 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru>
2283
2284 Add vectors support to Fsort.
2285 * fns.c (sort_vector, sort_vector_compare): New functions.
2286 (sort_list): Likewise, refactored out of ...
2287 (Fsort): ... adjusted user. Mention vectors in docstring.
2288 (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
2289 * alloc.c (make_save_int_obj): New function.
2290 * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
2291 (make_save_int_obj): Add prototype.
2292
2293 Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
2294 * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
2295 Conditionally define to match system's qsort_r signature.
2296 (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
2297
2298 2014-08-28 Ken Brown <kbrown@cornell.edu>
2299
2300 Add support for HYBRID_MALLOC, allowing the use of gmalloc before
2301 dumping and the system malloc after dumping. (Bug#18222)
2302
2303 * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
2304 Define as macros, expanding to hybrid_malloc, etc.
2305 (HYBRID_GET_CURRENT_DIR_NAME): New macro.
2306 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
2307 macro.
2308 * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
2309 full implementation on Cygwin. Remove Cygwin-specific code that
2310 is no longer needed.
2311 (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
2312 Redefine as macros expanding to gmalloc, grealloc, etc.
2313 (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
2314 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
2315 (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
2316 (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
2317 [HYBRID_MALLOC]:
2318 (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
2319 (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
2320 HAVE_POSIX_MEMALIGN)]: New functions.
2321 * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
2322 HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
2323 hybrid_aligned_alloc; declare.
2324 (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
2325 HAVE_POSIX_MEMALIGN)]: Define.
2326 (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
2327 * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
2328 Define as macro, expanding to gget_current_dir_name, and define
2329 the latter.
2330 * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
2331 malloc_enable_thread(). Don't initialize malloc.
2332 * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
2333 no longer defined on Cygwin).
2334 (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
2335 * sheap.c (bss_sbrk_buffer_end): New variable.
2336 * unexcw.c (__malloc_initialized): Remove variable.
2337 * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
2338 SYSTEM_MALLOC.
2339 * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
2340 Vmemory_full.
2341
2342 2014-08-28 Martin Rudalics <rudalics@gmx.at>
2343
2344 * w32term.c (w32_horizontal_scroll_bar_handle_click):
2345 In `event->y' return entire range (the size of the scroll bar minus
2346 that of the thumb).
2347 * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
2348 return entire range (the scaled size of the scroll bar minus
2349 that of the slider). In `portion' return the scaled position of
2350 the slider.
2351 (xaw_jump_callback): Restore part of code for vertical scroll
2352 bar broken in change from 2014-07-27.
2353 (xaw_scroll_callback): Provide incremental scrolling with
2354 horizontal scroll bars.
2355
2356 2014-08-28 Eli Zaretskii <eliz@gnu.org>
2357
2358 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
2359
2360 * indent.c (Fvertical_motion): Fix vertical motion up through a
2361 display property after a newline. (Bug#18276)
2362
2363 * xdisp.c (display_line): Don't assume that the call to
2364 reseat_at_next_visible_line_start ends up at a character
2365 immediately following the newline on the previous line.
2366 Avoids setting the ends_at_zv_p flag on screen lines that are not at or
2367 beyond ZV, which causes infloop in redisplay. For the details, see
2368 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
2369
2370 * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
2371 coordinate for hscrolled R2L screen lines. (Bug#18277)
2372
2373 2014-08-28 Paul Eggert <eggert@cs.ucla.edu>
2374
2375 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
2376 (Bug#18051).
2377
2378 2014-08-27 Eli Zaretskii <eliz@gnu.org>
2379
2380 * syntax.c (scan_lists): Don't examine positions before BEGV.
2381 (Bug#18339)
2382
2383 2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
2384
2385 Improve robustness of new string-collation code (Bug#18051).
2386 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
2387 (newlocale, wcscoll_l): Define substitutes for platforms that
2388 lack them, so as to simplify the mainline code.
2389 (str_collate): Simplify the code by assuming the above definitions.
2390 Use wcscoll_l, not uselocale, as uselocale is too fragile.
2391 For example, the old version left the Emacs in the wrong locale if
2392 wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
2393 result. Report an error if newlocale fails.
2394
2395 2014-08-27 Michael Albinus <michael.albinus@gmx.de>
2396
2397 * lisp.h (str_collate):
2398 * sysdep.c (str_collate): Return int.
2399 (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
2400
2401 2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2402
2403 Fix some glitches in previous change.
2404 * sysdep.c (stack_direction): Replace stack_grows_down
2405 to simplify calculation of stack boundaries.
2406 (handle_sigsegv): Check whether we really crash somewhere near
2407 to stack boundary, and handle fatal signal as usual if not.
2408 (init_sigsegv): Adjust accordingly.
2409 * keyboard.c (Vtop_level_message): Rename to
2410 Vinternal__top_level_message, as suggested by Stefan Monnier in
2411 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
2412 All related users changed.
2413
2414 2014-08-26 Dmitry Antipov <dmantipov@yandex.ru>
2415
2416 Handle C stack overflow caused by too nested Lisp evaluation.
2417 * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
2418 siglongjmp point to transfer control from SIGSEGV handler.
2419 * keyboard.c (return_to_command_loop, recover_top_level_message)
2420 [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
2421 (regular_top_level_message): New variable.
2422 (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
2423 exit from SIGSEGV handler and adjust message displayed by Vtop_level
2424 if appropriate.
2425 (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
2426 new variables described above.
2427 * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
2428 (stack_grows_down, sigsegv_stack, handle_sigsegv)
2429 [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
2430 (init_sigsegv): New function.
2431 (init_signals): Use it.
2432
2433 2014-08-25 Ken Brown <kbrown@cornell.edu>
2434
2435 * emacs.c (main): Remove use of obsolete macro
2436 G_SLICE_ALWAYS_MALLOC.
2437
2438 2014-08-25 Eli Zaretskii <eliz@gnu.org>
2439
2440 Implement locale-sensitive string collation for MS-Windows.
2441 * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
2442 New functions. (Bug#18051)
2443
2444 * w32.h (w32_compare_strings): Add prototype.
2445
2446 * w32.c <g_b_init_compare_string_w>: New global flag.
2447 (globals_of_w32): Initialize it.
2448
2449 * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
2450
2451 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
2452 [WINDOWSNT]: Call str_collate on MS-Windows.
2453
2454 2014-08-25 Dmitry Antipov <dmantipov@yandex.ru>
2455
2456 One more minor cleanup of font subsystem.
2457 * font.h (struct font_driver): Convert text_extents to
2458 return void because returned value is never actually used.
2459 * macfont.m (macfont_text_extents):
2460 * w32font.c (w32font_text_extents):
2461 * xftfont.c (xftfont_text_extents): Adjust to return void
2462 and assume that 'metrics' argument is always non-NULL.
2463 * ftfont.c (ftfont_text_extents):
2464 * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset.
2465
2466 2014-08-25 Paul Eggert <eggert@cs.ucla.edu>
2467
2468 Minor cleanups of str_collate fix (Bug#18051).
2469 * fns.c (str_collate): Move decl from here ...
2470 * lisp.h (str_collate): ... to here.
2471 * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
2472 Remove unnecessary casts. Use SAFE_NALLOCA to avoid
2473 potential problems with integer overflow. Don't assume
2474 setlocale succeeds. Remove unnecessary test before restoring
2475 locale via setlocale, and free the copied setlocale string
2476 when done with it.
2477
2478 2014-08-24 Michael Albinus <michael.albinus@gmx.de>
2479
2480 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
2481
2482 * sysdep.c (str_collate): New function. (Bug#18051)
2483
2484 2014-08-23 Karol Ostrovsky <karol.ostrovsky@gmail.com> (tiny change)
2485
2486 * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
2487 if the initial "rm -f" fails. This is for MinGW builds, where
2488 MS-Windows will not allow deleting the executable file of a
2489 running program.
2490
2491 2014-08-20 Eli Zaretskii <eliz@gnu.org>
2492
2493 * w32term.c (w32_scroll_bar_handle_click)
2494 (w32_horizontal_scroll_bar_handle_click)
2495 (x_scroll_bar_report_motion)
2496 (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
2497 SB_THUMBTRACK, use the 32-bit position information returned by
2498 GetScrollInfo, not the 16-bit information returned in the Windows
2499 message sent to us.
2500
2501 2014-08-19 Eli Zaretskii <eliz@gnu.org>
2502
2503 * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
2504 second coordinate ('y') reported for dragging the horizontal
2505 scroll bar thumb.
2506
2507 2014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2508
2509 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
2510 and text area-relative x-coordinates.
2511
2512 2014-08-17 Eli Zaretskii <eliz@gnu.org>
2513
2514 Avoid overwriting the reversed_p flags in the glyph matrices when
2515 init_iterator or start_display are called.
2516 * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
2517 the glyph row here.
2518 (tool_bar_height, redisplay_tool_bar, try_window)
2519 (try_window_reusing_current_matrix, try_window_id)
2520 (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
2521 reversed_p flag of the iterator's glyph row where the glyph row
2522 is going to be redrawn.
2523
2524 2014-08-16 Paul Eggert <eggert@cs.ucla.edu>
2525
2526 * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
2527
2528 2014-08-16 Martin Rudalics <rudalics@gmx.at>
2529
2530 * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
2531 of emacs_event return length from si.nPage to si.nMax.
2532 * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
2533 interchange start and end of thumb.
2534
2535 2014-08-15 Ken Brown <kbrown@cornell.edu>
2536
2537 * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
2538 ERRORCHECK mutexes. (Bug#18222)
2539
2540 2014-08-12 Martin Rudalics <rudalics@gmx.at>
2541
2542 * frame.c (set_menu_bar_lines_1): Remove.
2543 (set_menu_bar_lines): Call change_frame_size instead of
2544 set_menu_bar_lines_1.
2545
2546 2014-08-11 Jan Djärv <jan.h.d@swipnet.se>
2547
2548 * nsfns.m (Fx_create_frame): Call adjust_frame_size,
2549 set f->official.
2550
2551 2014-08-11 Glenn Morris <rgm@gnu.org>
2552
2553 * fileio.c: Revert 2013-01-31 change, which chose coding system for
2554 writing before backing up, since it causes a more serious problem
2555 than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
2556 (choose_write_coding_system): No longer callable from Lisp.
2557 Move last piece back here from Fwrite_region.
2558 (Fwrite_region, syms_of_fileio): Update for above changes.
2559
2560 2014-08-11 Martin Rudalics <rudalics@gmx.at>
2561
2562 * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
2563 (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
2564 (Fwindow_new_pixel, Fset_window_new_pixel)
2565 (Fset_window_new_total, Fset_window_new_normal)
2566 (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
2567 See also:
2568 http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
2569
2570 2014-08-11 Eli Zaretskii <eliz@gnu.org>
2571
2572 * fontset.c (Finternal_char_font): Recompute basic faces if the
2573 frame's face cache was cleared. (Bug#18162)
2574
2575 2014-08-11 Dmitry Antipov <dmantipov@yandex.ru>
2576
2577 Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
2578 * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
2579 base buffer's undo list.
2580
2581 2014-08-10 Reuben Thomas <rrt@sc3d.org>
2582
2583 Fix a couple of recent inadvertent breaks of the MSDOS port.
2584 * msdos.c: include required menu.h
2585 * term.c: set correct menu_show_hook on MSDOS.
2586
2587 2014-08-10 Martin Rudalics <rudalics@gmx.at>
2588
2589 Fix handling of menu bar line on TTY frames (Bug#18136)
2590 (Bug#18196).
2591 * dispnew.c (handle_window_change_signal):
2592 * keyboard.c (Fsuspend_emacs): Call change_frame_size with
2593 frame's menu bar lines subtracted from height.
2594 * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
2595 frames.
2596 (adjust_frame_size): Count in menu bar when setting FrameRows.
2597 (make_terminal_frame): When setting up the frame's lines and
2598 text height don't count in the menu bar.
2599 (Fmake_terminal_frame): Call adjust_frame_size with menu bar
2600 lines subtracted from height.
2601 (do_switch_frame): Set tty's FrameRows to number of total lines
2602 of frame.
2603 (Fframe_pixel_height, Fframe_pixel_width): If no window system
2604 is used, return total number of lines and columns.
2605 * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
2606 of FRAME_LINES.
2607 * term.c (OUTPUT, tty_set_terminal_modes)
2608 (tty_set_terminal_window, tty_set_scroll_region)
2609 (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
2610 (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
2611 Use FRAME_TOTAL_LINES instead of FRAME_LINES.
2612 (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
2613 Call change_frame_size with frame's menu bar lines subtracted
2614 from height.
2615 * w32console.c (w32con_clear_to_end, w32con_clear_frame)
2616 (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
2617 FRAME_LINES.
2618
2619 2014-08-09 Reuben Thomas <rrt@sc3d.org>
2620
2621 * alloc.c (Fmemory_info): Remove a stray brace.
2622
2623 * process.c: Fix a comment typo.
2624
2625 * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
2626
2627 2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
2628
2629 * widgetprv.h (EmacsFramePart): Remove font.
2630
2631 * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
2632 (resources, setup_frame_cursor_bits): Remove unused variables and
2633 functions, esp. wrt. font (Bug#18227).
2634
2635 2014-08-07 Paul Eggert <eggert@cs.ucla.edu>
2636
2637 * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
2638
2639 2014-08-07 Reuben Thomas <rrt@sc3d.org>
2640
2641 Refer to MS-DOS using the same name everywhere.
2642
2643 * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
2644 commit.
2645 * xfaces.c: ditto.
2646
2647 2014-08-05 Martin Rudalics <rudalics@gmx.at>
2648
2649 * w32term.c (w32_redeem_scroll_bar):
2650 * xterm.c (XTredeem_scroll_bar): Revert part of last change by
2651 not redeeming scroll bars that have been turned off.
2652
2653 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
2654
2655 * keyboard.c (safe_run_hooks): Follow the convenient style to bind
2656 inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See
2657 <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
2658 (safe_run_hook_funcall): Adjust accordingly.
2659
2660 2014-08-04 Martin Rudalics <rudalics@gmx.at>
2661
2662 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
2663 Condition correctly according to toolkit used.
2664 * frame.c (make_initial_frame, make_terminal_frame)
2665 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
2666 (Vdefault_frame_horizontal_scroll_bars): Correctly condition
2667 assignments according to presence of toolkit scrollbars.
2668 * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
2669 Condition correctly according to toolkit used.
2670 * window.c (set_window_scroll_bars): Set horizontal scroll bar
2671 only if toolkit supports it.
2672 * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
2673 present.
2674 * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
2675 non-toolkit builds.
2676 (XTredeem_scroll_bar): Always redeem scroll bar if present.
2677
2678 2014-08-04 Dmitry Antipov <dmantipov@yandex.ru>
2679
2680 * keyboard.c (safe_run_hook_funcall): Avoid consing around
2681 Vinhibit_quit and prefer internal_condition_case_n to pass args.
2682 (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
2683 (safe_run_hooks): Remove comment which is not relevant any more.
2684
2685 2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
2686
2687 Don't let big frames overrun the stack.
2688 * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
2689 Use SAFE_NALLOCA, not alloca.
2690
2691 Fix bug with clang + directory_files_internal + GC (Bug#16986).
2692 * dired.c (directory_files_internal): Use a volatile variable
2693 to prevent the compiler from optimizing away all copies of a local.
2694 I wonder how many other GC-related bugs like this lurk elsewhere?
2695
2696 Avoid 100% CPU utilization on ssh session exit (Bug#17691).
2697 * xterm.h (struct x_display_info): New member 'connection'.
2698 * xterm.c (x_term_init, x_delete_terminal): Set and use it,
2699 so that x_delete_terminal has a file descriptor to pass to
2700 delete_keyboard_wait_descriptor.
2701
2702 Don't mishandle year-9999 dates (Bug#18176).
2703 * editfns.c (decode_time_components): Store an invalid timespec
2704 on overflow, instead of returning false, so that the caller can
2705 distinguish overflow from other errors.
2706 (lisp_time_argument, lisp_seconds_argument): If the time is out
2707 of range, signal a time overflow instead of an invalid time spec.
2708 * keyboard.c (decode_timer): Treat time overflow like other
2709 timespec errors.
2710
2711 Avoid undefined behavior with signed left shift.
2712 Caught by 'gcc -fsanitize=undefined'.
2713 * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
2714 * dispnew.c (line_hash_code, scrolling):
2715 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
2716 Use 'unsigned', not 'int', for line hashes.
2717 (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
2718
2719 2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
2720
2721 Make compare-strings more compatible with old behavior (Bug#17903).
2722 * fns.c (Fcompare_strings): Silently bring too-large ends into range.
2723
2724 2014-08-02 Jan Djärv <jan.h.d@swipnet.se>
2725
2726 * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
2727 Don't add label between left and right buttons (Bug#18129).
2728
2729 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
2730
2731 Make functions static that no longer need to be extern.
2732 * frame.c, frame.h (set_menu_bar_lines):
2733 * keyboard.c (Qleftmost, Qrightmost):
2734 * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
2735 (x_set_internal_border_width):
2736 Now static.
2737
2738 2014-08-01 Eli Zaretskii <eliz@gnu.org>
2739
2740 Fix display of R2L lines when the last character fits only partially.
2741 See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
2742 for the details.
2743 * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
2744 R2L row is visible only partially, give the row a negative x
2745 offset.
2746 (display_line): Fix the calculation of the glyph whose pixel width
2747 is used to decide whether the last produced glyph fits on the
2748 line. When the last glyph fits only partially, give the row a
2749 negative x offset.
2750
2751 Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
2752 * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
2753 pixel width of the first glyph that is hscrolled from display.
2754 (display_line): In R2L glyph rows, don't give a negative offset to
2755 row->x when the first glyph begins before first_visible_x.
2756
2757 * xdisp.c (display_line): If called with iterator set up to write
2758 to a marginal area, delay the call to handle_line_prefix until we
2759 switch back to the text area. (Bug#18035)
2760
2761 * .gdbinit (xwindow): The members total_cols, total_lines,
2762 left_col, and top_line are C integers (and has been so for the
2763 last 1.5 years).
2764
2765 2014-08-01 Andreas Schwab <schwab@suse.de>
2766
2767 * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
2768 kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
2769
2770 2014-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2771
2772 * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
2773 (timerfd_callback): Ignore weird events with no data. Add tight
2774 assertions and comments.
2775 (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
2776 disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor.
2777
2778 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
2779
2780 * frame.c (x_set_frame_parameters): Fix typo in previous patch.
2781 I had confused && with ||.
2782
2783 2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
2784
2785 Simplify timerfd configuration and fix some minor glitches.
2786 * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
2787 (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
2788 Fall back on timer_create if timerfd_create fails at runtime.
2789 (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
2790 kernel primitives to do resolution. All uses removed.
2791 (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
2792 (turn_on_atimers): Clear timer_create-based timers too,
2793 for consistency.
2794
2795 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
2796 Without this change, the code can access the local variable 'width'
2797 even when it has not been initialized, and likewise for 'height';
2798 in either case this leads to undefined behavior.
2799
2800 2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2801
2802 * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
2803 necessary, put horizontal scroll bar resources as well. See
2804 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
2805 * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
2806
2807 2014-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2808
2809 * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
2810 background value to match the resource of its vertical counterpart.
2811
2812 2014-07-29 Martin Rudalics <rudalics@gmx.at>
2813
2814 * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
2815 FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
2816
2817 2014-07-28 Martin Rudalics <rudalics@gmx.at>
2818
2819 * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
2820 change that added the top margin height to the requested height
2821 and revert (undocumented) part of 2014-07-28 change that changed
2822 the logic of whether a size change occurred.
2823
2824 2014-07-28 Eli Zaretskii <eliz@gnu.org>
2825
2826 * .gdbinit (xwindow): The members total_cols, total_lines,
2827 left_col, and top_line are C integers (and has been so for the
2828 last 1.5 years).
2829
2830 * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
2831 now C integers.
2832
2833 2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
2834
2835 On GNU/Linux, use timerfd for asynchronous timers.
2836 * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
2837 (toplevel): Rename alarm_timer_ok to special_timer_available.
2838 [HAVE_TIMERFD]: Declare timerfd.
2839 [HAVE_CLOCK_GETRES]: Declare resolution.
2840 (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
2841 system timer resolution.
2842 (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
2843 (timerfd_callback) [HAVE_TIMERFD]: New function.
2844 (atimer_result, debug_timer_callback, Fdebug_timer_check)
2845 [ENABLE_CHECKING]: New function for the sake of automated tests.
2846 (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
2847 [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
2848 [ENABLE_CHECKING]: Defsubr test function.
2849 * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
2850 * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
2851 * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
2852
2853 Fix --without-x build and pacify --enable-gcc-warnings.
2854 Problems reported in Bug#18122 and Bug#18124.
2855 * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
2856 (frame_windows_min_size): Now static.
2857 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
2858 Define as no-op.
2859 (adjust_frame_size): Always declare prototype.
2860
2861 Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
2862 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
2863 * atimer.c (timerfd_callback): Always read expiration data.
2864 Add comment.
2865 (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
2866 * process.c (add_timer_wait_descriptor): Add timer descriptor
2867 to input_wait_mask and non_process_wait_mask as well.
2868
2869 2014-07-28 Paul Eggert <eggert@cs.ucla.edu>
2870
2871 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
2872
2873 2014-07-27 Jan Djärv <jan.h.d@swipnet.se>
2874
2875 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
2876 Reinstate code removed by the prevoius commit to this file.
2877
2878 2014-07-27 Martin Rudalics <rudalics@gmx.at>
2879
2880 * buffer.h (struct buffer): New fields scroll_bar_height and
2881 horizontal_scroll_bar_type.
2882 * buffer.c (bset_scroll_bar_height)
2883 (bset_horizontal_scroll_bar_type): New functions.
2884 (Fbuffer_swap_text): Handle old_pointm field.
2885 (init_buffer_once): Set defaults for scroll_bar_height and
2886 horizontal_scroll_bar_type.
2887 (syms_of_buffer): New variables scroll_bar_height and
2888 horizontal_scroll_bar_type.
2889 * dispextern.h (window_part): Rename ON_SCROLL_BAR to
2890 ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR.
2891 (set_vertical_scroll_bar): Remove prototype.
2892 (x_change_tool_bar_height): Add prototype.
2893 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
2894 (window_to_frame_vpos, update_frame_1, scrolling, init_display):
2895 Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
2896 and FRAME_LINES.
2897 (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
2898 (update_window): Start mode_line_row->y after horizontal scroll
2899 bar.
2900 (change_frame_size_1): Call adjust_frame_size.
2901 (init_display): When changing the size of a tty frame do not
2902 pass height of menu bar.
2903 (Qframe_windows_min_size): New symbol.
2904 * frame.h (struct frame): List tool bar fields after menu bar
2905 fields. Add official, total_lines, horizontal_scroll_bars,
2906 config_scroll_bar_height and config_scroll_bar_lines fields.
2907 (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
2908 (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
2909 (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
2910 (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
2911 (FRAME_WINDOWS_HEIGHT): New macros.
2912 (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
2913 (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
2914 (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
2915 horizontal scroll bar.
2916 (frame_inhibit_resize, adjust_frame_size)
2917 (frame_windows_min_size): Add declarations.
2918 (Qscroll_bar_height, Qhorizontal_scroll_bars)
2919 (x_set_scroll_bar_default_height, x_set_left_fringe)
2920 (x_set_right_fringe, x_set_vertical_scroll_bars)
2921 (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
2922 (x_set_scroll_bar_height): Add external declarations.
2923 * frame.c: (frame_inhibit_resize, frame_windows_min_size)
2924 (adjust_frame_size): New functions.
2925 (make_frame): Initial horizontal_scroll_bars field.
2926 Use SET_FRAME_LINES. Don't allow horizontal scroll bar in
2927 minibuffer window.
2928 (make_initial_frame, make_terminal_frame): No horizontal scroll
2929 bar in initial and terminal frames. Use adjust_frame_size.
2930 (Fframe_total_cols): Fix doc-string.
2931 (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
2932 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
2933 Rewrite using adjust_frame_size.
2934 (Qscroll_bar_height, Qhorizontal_scroll_bars)
2935 (Qframe_windows_min_size): New symbols.
2936 (x_set_frame_parameters): Remove call of check_frame_size.
2937 (x_report_frame_params): Return scroll_bar_height value.
2938 (x_set_left_fringe, x_set_right_fringe): New functions.
2939 (adjust_frame_height, x_set_internal_border_width)
2940 (x_set_fringe_width): Remove.
2941 (x_set_internal_border_width, x_set_vertical_scroll_bars)
2942 (x_set_scroll_bar_width, x_set_right_divider_width)
2943 (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
2944 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
2945 New functions.
2946 (x_figure_window_size): Rewrite to make frame display the
2947 expected number of lines.
2948 (Vdefault_frame_scroll_bars): Rewrite doc-string.
2949 (Vdefault_frame_horizontal_scroll_bars)
2950 (Vframe_initial_frame_tool_bar_height)
2951 (frame_inhibit_implied_resize): New variables.
2952 * fringe.c (compute_fringe_widths): Remove.
2953 * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
2954 (xg_create_horizontal_scroll_bar)
2955 (xg_update_horizontal_scrollbar_pos)
2956 (xg_set_toolkit_horizontal_scroll_bar_thumb)
2957 (xg_get_default_scrollbar_height)
2958 (xg_clear_under_internal_border): Extern.
2959 * gtkutil.c (xg_frame_resized): Don't call
2960 do_pending_window_change.
2961 (xg_frame_set_char_size): Use adjust_frame_size.
2962 (style_changed_cb): Call update_theme_scrollbar_height and
2963 x_set_scroll_bar_default_height.
2964 (x_wm_set_size_hint): Don't call check_frame_size.
2965 (update_theme_scrollbar_height)
2966 (xg_get_default_scrollbar_height)
2967 (xg_create_horizontal_scroll_bar)
2968 (xg_update_horizontal_scrollbar_pos)
2969 (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
2970 (xg_create_scroll_bar): Set horizontal slot of bar.
2971 (xg_initialize): Call update_theme_scrollbar_height.
2972 (xg_clear_under_internal_border): No more static.
2973 * insdel.c (adjust_suspend_auto_hscroll): New function.
2974 (adjust_markers_for_delete, adjust_markers_for_insert)
2975 (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
2976 * keyboard.c (readable_events, discard_mouse_events)
2977 (make_lispy_event): Handle horizontal scroll bar click events.
2978 (Fsuspend_emacs): When changing the size of a tty frame do not
2979 pass height of menu bar.
2980 (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
2981 (Qright, Qleftmost, Qrightmost): New symbols.
2982 * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
2983 FRAME_LINES.
2984 * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
2985 * nsfns.m (x_set_internal_border_width): New function.
2986 * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
2987 Remove extended fringe code.
2988 (x_set_window_size, x_new_font): Don't call
2989 compute_fringe_widths.
2990 * term.c (Fresume_tty): When changing the size of a tty frame do
2991 not pass height of menu bar.
2992 (clear_tty_hooks, set_tty_hooks):
2993 Clear horizontal_scroll_bar_hook.
2994 (init_tty): Frame has no horizontal scroll bars.
2995 * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
2996 scroll_bar_before_handle, scroll_bar_horizontal_handle,
2997 scroll_bar_after_handle, scroll_bar_left_arrow,
2998 scroll_bar_right_arrow, scroll_bar_to_leftmost and
2999 scroll_bar_to_rightmost entries.
3000 (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
3001 (struct terminal): Add set_horizontal_scroll_bar_hook.
3002 * w32console.c (initialize_w32_display):
3003 Clear horizontal_scroll_bar_hook.
3004 * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
3005 FRAME_X_DISPLAY.
3006 (x_clear_under_internal_border, x_set_internal_border_width):
3007 New functions.
3008 (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
3009 Set windows_or_buffers_changed when adding the menu bar.
3010 (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
3011 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
3012 (w32_createhscrollbar): New functions.
3013 (w32_createscrollbar): Rename to w32_createvscrollbar.
3014 (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
3015 (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
3016 WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
3017 Add WM_EMACS_SHOWCURSOR.
3018 (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
3019 case do not artificially impose WM size hints.
3020 Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
3021 by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
3022 cases.
3023 (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
3024 WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
3025 (unwind_create_frame_1): Remove.
3026 (Fx_create_frame): Make both scrollbars the system standard
3027 width and height. Use official field of frame structure to
3028 inhibit running window-configuration-change-hook.
3029 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
3030 pixelwise. Handle frame's official field.
3031 (w32_frame_parm_handlers): Remove x_set_fringe_width
3032 entries. Add x_set_scroll_bar_height,
3033 x_set_horizontal_scroll_bars, x_set_left_fringe and
3034 x_set_right_fringe.
3035 * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
3036 pass height of menu bar to change_frame_size.
3037 * w32menu.c (set_frame_menubar): Rewrite using
3038 frame_inhibit_resize.
3039 * w32term.h (struct w32_display_info):
3040 Add horizontal_scroll_bar_cursor and cursor_display_counter.
3041 (struct scroll_bar): Add horizontal.
3042 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
3043 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
3044 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
3045 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
3046 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
3047 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
3048 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
3049 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
3050 (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
3051 Define instead of WM_EMACS_CREATESCROLLBAR.
3052 (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
3053 WND_SCROLLBAR_INDEX.
3054 * w32term.c (horizontal_scroll_bar_min_handle)
3055 (horizontal_scroll_bar_left_border)
3056 (horizontal_scroll_bar_right_border): New integers.
3057 (x_set_frame_alpha): Replace x_highlight_frame by
3058 w32_focus_frame.
3059 (x_window_to_scroll_bar): New argument "type". Update callers
3060 accordingly.
3061 (w32_set_horizontal_scroll_bar_thumb)
3062 (x_horizontal_scroll_bar_report_motion)
3063 (w32_set_horizontal_scroll_bar)
3064 (w32_horizontal_scroll_bar_handle_click)
3065 (x_horizontal_scroll_bar_report_motion): New functions.
3066 (w32_mouse_position): Discriminate horizontal and vertical
3067 scrollbar cases.
3068 (my_create_scrollbar): Replace with two new functions
3069 my_create_vscrollbar and my_create_hscrollbar.
3070 (x_scroll_bar_create): New argument "horizontal".
3071 Update callers accordingly.
3072 (x_scroll_bar_remove, w32_condemn_scroll_bars)
3073 (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
3074 scroll bar case.
3075 (w32_read_socket): Handle WM_HSCROLL cae.
3076 (x_new_font): Don't recompute fringe widths.
3077 Use frame_inhibit_resize. Calculate new menu bar height iff we
3078 build without toolkit. Always clear under internal border.
3079 (x_set_window_size): Don't check frame size or recompute
3080 fringes. Reset fullscreen status before applying sizes.
3081 Always resize as requested by pixelwise argument. Don't call
3082 do_pending_window_change.
3083 (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
3084 (w32_initialize_display_info): Initialize dpyinfo's
3085 horizontal_scroll_bar_cursor entry.
3086 (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
3087 (w32_initialize): Init horizontal_scroll_bar_min_handle and
3088 horizontal_scroll_bar_left_border.
3089 (w32fullscreen_hook): Intermittently resize window to normal
3090 when switching from fullscreen to maximized state.
3091 (run_window_configuration_change_hook): Don't run it if frame is
3092 not official yet.
3093 (unwind_change_frame): Remove.
3094 (Fset_window_configuration): Rewrite using frame's official field.
3095 * widget.c (set_frame_size): Don't call compute_fringe_widths.
3096 (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
3097 * window.h (struct window): New fields old_pointm,
3098 horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
3099 scroll_bar_height and suspend_auto_hscroll.
3100 (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
3101 New functions.
3102 (sanitize_window_sizes): Extern.
3103 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
3104 (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
3105 (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
3106 (WINDOW_CONFIG_SCROLL_BAR_LINES)
3107 (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
3108 New macros.
3109 (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
3110 (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
3111 (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
3112 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
3113 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
3114 (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
3115 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
3116 (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
3117 * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
3118 (Fwindow_old_point, sanitize_window_sizes): New functions.
3119 (Qwindow_sanitize_window_sizes): New symbol.
3120 (window_body_height): Count in horizontal scroll bar.
3121 (set_window_hscroll, Fscroll_left, Fscroll_right):
3122 Set suspend_auto_hscroll slot.
3123 (Fwindow_inside_edges): Count fringes pixelwise.
3124 (coordinates_in_window, Fcoordinates_in_window_p):
3125 Consider horizontal scroll bar.
3126 (check_frame_size, adjust_window_margins): Remove functions and
3127 corresponding calls.
3128 (set_window_buffer): Initialize old_pointm and horizontal scroll bars.
3129 (temp_output_buffer_show): Reset hscroll related fields.
3130 Initialize old_pointm.
3131 (make_parent_window): Initialize old_pointm.
3132 (make_window): Initialize old_pointm, horizontal scroll bar type,
3133 and scroll bar height.
3134 (resize_frame_windows): Don't count top margin in new sizes.
3135 Don't use safe sizes when shrinking a frame; let the window
3136 manager do the clipping.
3137 (Fsplit_window_internal): Inherit horizontal scroll bar type and
3138 height.
3139 (Fdelete_window_internal): Unchain old_pointm marker.
3140 (window_scroll_pixel_based, Fscroll_other_window):
3141 Adjust old_pointm.
3142 (Fwindow_text_width, Fwindow_text_height): New argument
3143 "pixelwise".
3144 (struct saved_window): New fields, old_pointm, hscroll_whole,
3145 suspend_auto_hscroll, scroll_bar_height and
3146 horizontal_scroll_bar_type.
3147 (Fset_window_configuration, save_window_save): Set new fields of
3148 saved_window.
3149 (apply_window_adjustment): Don't call adjust_window_margins.
3150 (set_window_margins): Don't change margins if new sizes don't
3151 fit into window.
3152 (set_window_scroll_bars): New argument "horizontal_type".
3153 Handle horizontal scroll bars. Don't change scroll bars if they
3154 don't fit into window.
3155 (Fset_window_scroll_bars): New argument "horizontal_type".
3156 (Fwindow_scroll_bars): Return values for horizontal scroll bars.
3157 (compare_window_configurations): Compare horizontal scroll bar
3158 settings.
3159 * xdisp.c (window_text_bottom_y, window_box_height): Count in
3160 horizontal scroll bar height.
3161 (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
3162 instead of FRAME_LINES.
3163 (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
3164 ON_VERTICAL_SCROLL_BAR.
3165 (with_echo_area_buffer): Initialize old_pointm.
3166 (with_echo_area_buffer_unwind_data): Store old_pointm values in
3167 vector.
3168 (unwind_with_echo_area_buffer): Handle old_pointm.
3169 (update_tool_bar): Set do_update when the tool bar window has at
3170 least one line (since this is what the user sets).
3171 (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
3172 (redisplay_tool_bar): Return early when toolbar has zero lines.
3173 Call x_change_tool_bar_height. Don't use max_tool_bar_height.
3174 (hscroll_window_tree): Handle suspension of auto_hscroll and
3175 old_pointm.
3176 (set_horizontal_scroll_bar): New function.
3177 (redisplay_window): Set ignore_mouse_drag_p when tool bar has
3178 more than one line. Handle horizontal scroll bars.
3179 (note_mouse_highlight): Handle horizontal scrol bars.
3180 (expose_frame): Set dimensions of XRectangle from frame's text
3181 sizes.
3182 (Vvoid_text_area_pointer): Update doc-string.
3183 * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
3184 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
3185 (x_set_internal_border_width): New functions.
3186 (x_set_tool_bar_lines): Call x_change_tool_bar_height.
3187 (unwind_create_frame_1): Remove.
3188 (Fx_create_frame): Handle horizontal scroll bars. Use official
3189 field of frame structure to inhibit running
3190 window-configuration-change-hook.
3191 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
3192 pixelwise. Handle frame's official field.
3193 (x_frame_parm_handlers): Add x_set_scroll_bar_height,
3194 x_set_horizontal_scroll_bars, x_set_left_fringe,
3195 x_set_right_fringe.
3196 * xmenu.c (update_frame_menubar, free_frame_menubar):
3197 Use adjust_frame_size.
3198 * xterm.h (struct x_display_info):
3199 Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
3200 slots.
3201 (struct scroll_bar): Add horizontal slot.
3202 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
3203 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
3204 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
3205 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
3206 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
3207 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
3208 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
3209 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
3210 (x_clear_under_internal_border): Remove.
3211 * xterm.c (XTmouse_position): Handle horizontal scroll bars.
3212 (x_window_to_scroll_bar): New argument TYPE. Update callers.
3213 (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
3214 HORIZONTAL. Update callers.
3215 (horizontal_action_hook_id): New action hook id.
3216 (x_horizontal_scroll_bar_to_input_event)
3217 (x_create_horizontal_toolkit_scroll_bar)
3218 (xt_horizontal_action_hook)
3219 (x_set_toolkit_horizontal_scroll_bar_thumb)
3220 (XTset_horizontal_scroll_bar, x_net_wm_state)
3221 (x_horizontal_scroll_bar_report_motion): New functions.
3222 (xg_scroll_callback, x_scroll_bar_handle_click):
3223 Handle horizontal scroll bars.
3224 (SCROLL_BAR_HORIZONTAL_NAME): Define.
3225 (XTset_vertical_scroll_bar): Attempt to clear areas not covered
3226 by scroll bar.
3227 (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
3228 Handle horizontal scroll bars.
3229 (handle_one_xevent): Handle horizontal scroll bar events.
3230 Call x_net_wm_state.
3231 (x_set_window_size_1, x_wm_set_size_hint): Don't call
3232 check_frame_size.
3233 (x_set_window_size): Don't call check_frame_size and
3234 do_pending_window_change.
3235 (x_term_init): Init horizontal_scroll_bar_cursor display info.
3236 (x_create_terminal): Add set_horizontal_scroll_bar_hook.
3237 (x_scroll_bar_set_handle): Add some checks when calling
3238 x_clear_area.
3239
3240 2014-07-26 Paul Eggert <eggert@cs.ucla.edu>
3241
3242 Revert previous change.
3243 There is certainly nothing wrong with writing code like 'lo <= i
3244 && i <= hi', even if LO happens to a constant. There isn't even
3245 anything wrong in general with writing 'a <= b' if A happens to
3246 be a constant. At any rate stylistic changes shouldn't
3247 be done like this without discussion.
3248
3249 2014-07-26 Andreas Schwab <schwab@linux-m68k.org>
3250
3251 * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
3252 (Fgarbage_collect): Reorder conditions that are written backwards.
3253 * data.c (cons_to_unsigned): Likewise.
3254 * dispnew.c (update_frame_1, sit_for): Likewise.
3255 * fileio.c (file_offset): Likewise.
3256 * filelock.c (read_lock_data, lock_file): Likewise.
3257 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
3258 Likewise.
3259 * font.c (font_intern_prop, font_style_symbolic): Likewise.
3260 * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
3261 * lread.c (read1): Likewise.
3262 * minibuf.c (read_minibuf_noninteractive): Likewise.
3263 * nsterm.m (x_set_frame_alpha): Likewise.
3264 * process.c (wait_reading_process_output): Likewise.
3265 * region-cache.c (delete_cache_boundaries): Likewise.
3266 * xterm.c (x_set_frame_alpha): Likewise.
3267
3268 2014-07-25 Paul Eggert <eggert@cs.ucla.edu>
3269
3270 * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
3271 Now static.
3272
3273 2014-07-26 Dmitry Antipov <dmantipov@yandex.ru>
3274
3275 * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
3276 because atimer expiration is absolute rather than relative.
3277
3278 2014-07-25 Eli Zaretskii <eliz@gnu.org>
3279
3280 * w32term.h (current_popup_menu, menubar_in_use):
3281 Move declarations from w32term.c.
3282
3283 2014-07-25 Martin Rudalics <rudalics@gmx.at>
3284
3285 * w32fns.c (menubar_in_use): No more static.
3286 * w32term.c (current_popup_menu, menubar_in_use): Declare.
3287
3288 2014-07-25 Dmitry Antipov <dmantipov@yandex.ru>
3289
3290 Move hourglass machinery to RIF.
3291 * dispextern.h (struct redisplay_interface): New members
3292 show_hourglass and hide_hourglass. Indent comments.
3293 (show_hourglass, hide_hourglass): Remove prototypes.
3294 * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
3295 (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
3296 (ns_redisplay_interface): Add them.
3297 * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
3298 * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
3299 (w32_arrow_cursor): New function to hack around non-GUI frames.
3300 (w32_redisplay_interface): Add new functions.
3301 * w32term.h (w32_arror_cursor): Add prototype.
3302 * xdisp.c (show_hourglass): New function, refactored out from
3303 platform-dependent code.
3304 (cancel_hourglass): Now call to RIF function.
3305 * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
3306 * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
3307 (x_redisplay_interface): Add new functions.
3308
3309 2014-07-24 Dmitry Antipov <dmantipov@yandex.ru>
3310
3311 Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
3312 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
3313 and complete previous change.
3314 * frame.c (adjust_frame_height): New function.
3315 (Fset_frame_height, Fset_frame_size): Use it.
3316 (x_set_frame_parameters): Take frame top margin into account.
3317
3318 2014-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3319
3320 * frame.c (Fset_frame_height): Take frame top margin into account.
3321 Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
3322 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
3323
3324 2014-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3325
3326 * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
3327 menubar_height as such. Tweak comment.
3328 [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
3329 scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
3330 All related users changed.
3331 (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
3332 * xterm.c (handle_one_xevent):
3333 * gtkutil.c (xg_event_is_for_menubar):
3334 * xfns.c (x_window) [USE_X_TOOLKIT]:
3335 * xmenu.c (set_frame_menubar, free_frame_menubar):
3336 Prefer to use FRAME_MENUBAR_HEIGHT.
3337
3338 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
3339
3340 * frame.c (Fframe_parameters): Always report frame height without
3341 menu and tool bar lines.
3342
3343 2014-07-21 Jan Djärv <jan.h.d@swipnet.se>
3344
3345 * nsterm.m (applicationDidFinishLaunching:): Call
3346 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
3347 (antialiasThresholdDidChange:): New method for EmacsApp.
3348
3349 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
3350
3351 * macfont.m (macfont_update_antialias_threshold): Remove static.
3352
3353 * macfont.h (macfont_update_antialias_threshold): Declare.
3354
3355 2014-07-21 Eli Zaretskii <eliz@gnu.org>
3356
3357 * w32select.c (setup_windows_coding_system):
3358 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
3359 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
3360
3361 * w16select.c (Fw16_get_clipboard_data):
3362 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
3363 coding_system.
3364
3365 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
3366 buffer position where we are to start the iteration.
3367 (handle_invisible_prop): Record in it->stop_charpos the position
3368 where the invisible text ends. (Bug#18035)
3369 (hscroll_window_tree): Don't try hscrolling windows whose cursor
3370 row has zero buffer position as their start position.
3371 Reported by martin rudalics <rudalics@gmx.at>.
3372
3373 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
3374 infinite looping in redisplay when display lines don't have enough
3375 space to display even a single character. (Bug#18036)
3376
3377 2014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3378
3379 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
3380 * xfns.c (x_window): Use it to allow xfree later.
3381 (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users
3382 where appropriate. Use bool for booleans and remove redundant checks.
3383 (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
3384 * xterm.c (x_free_frame_resources): Free shell_position.
3385
3386 2014-07-19 K. Handa <handa@gnu.org>
3387
3388 * xfaces.c (realize_x_face): Call font_load_for_lface with no
3389 mandatory font spec (Bug#17973).
3390
3391 2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
3392
3393 * font.c (font_score): Return the worst score if the size of
3394 ENTITY is wrong by more than a factor 2 (Bug#17973).
3395
3396 2014-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3397
3398 * frame.c (frame_unspecified_color): New function
3399 refactored out from ...
3400 (Fframe_parameters, Fframe_parameter): ... adjusted users.
3401 (x_fullscreen_adjust, set_frame_param): Move Windows-specific
3402 function to ...
3403 * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
3404 * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
3405 * lisp.h (set_frame_param): Remove prototype.
3406 * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
3407 * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
3408 inlined from here.
3409
3410 Prefer 'x_display_info *' to 'Display *' in X selection code.
3411 This helps to avoid unneeded calls to x_display_info_for_display.
3412 * xterm.h (struct selection_input_event): Record 'x_display_info *'
3413 instead of 'Display *'.
3414 (SELECTION_EVENT_DPYINFO): New macro.
3415 (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
3416 it as an lvalue. Mention this in comment.
3417 * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
3418 * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
3419 (selection_data_to_lisp_data, receive_incremental_selection):
3420 Convert to use 'x_display_info *'. Adjust users where appropriate.
3421 (lisp_data_to_selection_data): Likewise. Also pass 'struct
3422 selection data *' as last arg to not return values in args.
3423 (unexpect_property_change): Use common removal technique.
3424
3425 2014-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3426
3427 * print.c (print_preprocess): Adjust to match changed
3428 sub char-table structure and avoid crash (Bug#18038).
3429
3430 * data.c (wrong_choice): Not static any more.
3431 * lisp.h (wrong_choice): Add prototype.
3432 * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
3433 Declare namebuf as such. Tweak comment.
3434 [USE_GTK]: Likewise for tool_bar_position.
3435 (fset_tool_bar_position) [USE_GTK]: Ditto.
3436 (FRAME_TOOL_BAR_POSITION): New macro.
3437 * frame.c (x_report_frame_params):
3438 * gtkutil.c (update_frame_tool_bar):
3439 * xfns.c (Fx_create_frame): Use it.
3440 (x_set_tool_bar_position): Add meaningful diagnostic messages.
3441
3442 2014-07-16 Eli Zaretskii <eliz@gnu.org>
3443
3444 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
3445 buffer's default-directory only if it is a string. (Bug#17986)
3446
3447 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
3448
3449 More precise control over values of some buffer-local variables.
3450 * keyboard.c (Qvertical_scroll_bar):
3451 * frame.c (Qleft, Qright): Move to ...
3452 * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
3453 * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
3454 (syms_of_buffer): DEFSYM all of the above, attach special properties.
3455 Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
3456 vertical-scroll-bar, scroll-up-aggressively
3457 and scroll-down-aggressively.
3458 * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
3459 Add declarations.
3460 * nsfns.m, frame.h (Qleft, Qright):
3461 * nsterm.m (Qleft): Remove declarations.
3462 * gtkutil.c (toplevel): Include buffer.h.
3463 * data.c (wrong_choice, wrong_range): New functions.
3464 (store_symval_forwarding): Handle special properties of buffer-local
3465 variables and use functions from the above to signal error, if any.
3466
3467 * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
3468 values. Add comment.
3469 (struct frame): Re-arrange layout to avoid extra padding and use bit
3470 fields for output_method, want_fullscreen and vertical_scroll_bar_type.
3471 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
3472 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
3473 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
3474 Define as no-ops because there are no scroll bars anyway.
3475 * frame.c (make_frame, make_terminal_frame, make_initial_frame):
3476 Adjust users.
3477
3478 * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
3479 Add convenient setter.
3480 (font_put_frame_data, font_get_frame_data): Use it.
3481
3482 2014-07-15 Daiki Ueno <ueno@gnu.org>
3483
3484 * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
3485 pointer argument, before dereferencing.
3486 (XCHAR2B_BYTE2): Likewise.
3487
3488 2014-07-15 Dmitry Antipov <dmantipov@yandex.ru>
3489
3490 * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
3491 (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
3492 (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
3493 Use record_unwind_protect_int and avoid consing.
3494 (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
3495
3496 * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
3497
3498 2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
3499
3500 Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
3501 * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
3502 * emacs.c [MSDOS]:
3503 * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
3504 (main) [MSDOS]: Use SET_BINARY instead of setmode.
3505 * minibuf.c: Include binary-io.h instead of fcntl.h.
3506 (read_minibuf_noninteractive):
3507 Use set_binary_mode instead of handcrafted code.
3508 Don't call emacs_set_tty if emacs_get_tty failed.
3509 * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
3510 * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
3511 * w32.c (pipe2): Adjust eassert to include O_BINARY.
3512
3513 * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
3514 This works around a GCC compiler bug when Emacs is configured with
3515 --enable-gcc-warnings.
3516
3517 2014-07-14 Dmitry Antipov <dmantipov@yandex.ru>
3518
3519 * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
3520 or characters in string, respectively. Add comment.
3521 * fringe.c (Fdefine_fringe_bitmap):
3522 * fns.c (Fsubstring, substring_both): Use it.
3523 * keymap.c (Fdefine_key, Flookup_key):
3524 * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
3525
3526 * term.c (tty_menu_add_pane, tty_menu_add_selection):
3527 Use menu_item_width.
3528 (tty_menu_show): Simplify because tty_menu_create never return NULL.
3529
3530 2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
3531
3532 Improve behavior of 'bzr up; cd src; make -k'.
3533 * Makefile.in (top_srcdir): New var.
3534 (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
3535 Use '$(top_srcdir)' instead of '$(srcdir)/..';
3536 its expansion is a bit shorter.
3537 (../config.status): Actually build config.status instead of
3538 just complaining.
3539 (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
3540 New macros, copied and relocated from ../Makefile.in.
3541 ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
3542 (../config.status, Makefile): New dependencies and rules,
3543 copied with relocation from ../Makefile.in. This should be more
3544 likely to rebuild the build machinery properly if you do a 'make'
3545 in the src directory.
3546
3547 2014-07-12 Eli Zaretskii <eliz@gnu.org>
3548
3549 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
3550 than 1. (Bug#17962)
3551
3552 * w32fns.c (Fx_file_dialog): Mention in the doc string the
3553 behavior on Windows 7 and later when the function is repeatedly
3554 invoked with the same value of DIR. (Bug#17950)
3555
3556 * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
3557 string to match the one in w32fns.c.
3558
3559 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
3560 stdin to binary mode only if it is connected to a terminal.
3561
3562 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
3563
3564 Coalesce extern decls.
3565 * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
3566 * sysdep.c (emacs_get_tty, emacs_set_tty):
3567 Move duplicate extern decls from here ...
3568 * systty.h: ... to here, so that there's just one copy.
3569
3570 2014-07-11 Jan Djärv <jan.h.d@swipnet.se>
3571
3572 * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
3573
3574 * nsfns.m (Fns_popup_font_panel): Ditto.
3575
3576 2014-07-11 Eli Zaretskii <eliz@gnu.org>
3577
3578 * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
3579 not only on '\n'.
3580 [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
3581
3582 * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
3583 [DOS_NT]: Implement for WINDOWSNT.
3584
3585 * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
3586 unsigned.
3587
3588 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
3589
3590 * sysdep.c (suppress_echo_on_tty): New function.
3591 * minibuf.c (read_minibuf_noninteractive): Use it.
3592
3593 2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3594
3595 * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
3596 sysinfo failed. Adjust docstring.
3597
3598 2014-07-11 Eli Zaretskii <eliz@gnu.org>
3599
3600 Implement memory-info for MS-DOS.
3601 * dosfns.c (dos_memory_info): New function.
3602 * dosfns.h (dos_memory_info): Add prototype.
3603 * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
3604 * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
3605 of doing some of its job.
3606
3607 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
3608 reference termios structure members.
3609
3610 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
3611
3612 * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
3613
3614 * minibuf.c (top): Include systty.h. Declare external
3615 emacs_get_tty and emacs_set_tty.
3616 (Vread_hide_char): New lisp variable.
3617 (read_minibuf_noninteractive): Hide characters with
3618 Vread_hide_char if it is a character. (Bug#17839)
3619
3620 2014-07-10 Eli Zaretskii <eliz@gnu.org>
3621
3622 Implement memory-info for MS-Windows.
3623 * w32.c (w32_memory_info): New function.
3624 * w32.h (w32_memory_info): Prototype it.
3625 * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
3626
3627 2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3628
3629 * coding.h (struct coding_system): Remove 'error_positions' (unused)
3630 and 'errors' (set but unused) fields. Use bitfields for 'eol_seen',
3631 'mode', 'common_flags' and 'result' fields, adjust layout to avoid
3632 extra padding and shrink struct coding_system by 56 bytes (x86_64).
3633 * coding.c (decode_coding_utf_8, decode_coding_utf_16)
3634 (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
3635 (decode_coding_big5, decode_coding_charset, decode_coding)
3636 (encode_coding): Adjust users.
3637
3638 * alloc.c (Fmemory_info): New function.
3639
3640 2014-07-09 Paul Eggert <eggert@cs.ucla.edu>
3641
3642 * syntax.c (back_comment): Use more-natural location for label.
3643
3644 * font.c, font.h (font_unparse_fcname): Now static.
3645 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
3646
3647 2014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
3648
3649 Next minor cleanup of font subsystem.
3650 * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
3651 users) and FONT_FORMAT_INDEX (set by a few font drivers but never
3652 really used).
3653 (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
3654 unused.
3655 * ftfont.h (ftfont_font_format): Remove prototype.
3656 * ftfont.c (ftfont_font_format): Remove; now unused.
3657 (ftfont_open):
3658 * nsfont.m (nsfont_open):
3659 * w32font.c (w32font_open_internal):
3660 * w32uniscribe.c (uniscribe_open):
3661 * xfont.c (xfont_open):
3662 * xftfont.c (xftfont_open): All users changed.
3663
3664 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
3665 so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
3666
3667 2014-07-09 Eli Zaretskii <eliz@gnu.org>
3668
3669 * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
3670 x_produce_glyphs does when it generates a stretch glyph that
3671 represents a TAB. (Bug#17969)
3672
3673 * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
3674 and there is a display property at that position, don't call
3675 move_it_to to move to a position before window start. (Bug#17942)
3676 Fix condition for finding CHARPOS by the first call to move_it_to.
3677 (Bug#17944)
3678
3679 2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
3680
3681 * syntax.c (find_defun_start): Try the cache even
3682 if !open_paren_in_column_0_is_defun_start.
3683 (back_comment): If find_defun_start was pessimistic, use the
3684 scan_sexps_forward result to improve the cache (bug#16526).
3685
3686 2014-07-09 Eli Zaretskii <eliz@gnu.org>
3687
3688 * xdisp.c (redisplay_window): If redisplay of a window ends up
3689 with point in a partially visible line at end of the window, make
3690 sure the amended position of point actually has smaller Y
3691 coordinate; if not, give up and scroll the display. (Bug#17905)
3692
3693 * window.c (window_scroll_pixel_based): When point ends up at the
3694 last fully visible line, don't let move_it_to stop at the left
3695 edge of the line and dupe us into thinking point is inside the
3696 scroll margin.
3697
3698 * w32.c (network_interface_info): Make sure the argument is a
3699 Lisp string.
3700
3701 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
3702
3703 * process.c (read_and_dispose_of_process_output): Fix typo
3704 in previous patch: we want nonnegative fds, not nonzero fds.
3705
3706 2014-07-08 Dmitry Antipov <dmantipov@yandex.ru>
3707
3708 * chartab.c (char_table_translate): Move to...
3709 * character.h (char_table_translate): ... inline function here.
3710 Avoid Faref and assume that args are always valid. This helps to
3711 speedup search, which is especially important for a huge buffers.
3712 * lisp.h (char_table_translate): Remove prototype.
3713
3714 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
3715 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
3716 New function, with an intention to avoid code duplication between
3717 a few font drivers.
3718 * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
3719 Add prototype.
3720 * ftfont.c (ftfont_open):
3721 * macfont.m (macfont_open):
3722 * xftfont.c (xftfont_open): Use it.
3723
3724 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
3725
3726 * process.c: Add sanity checks for file descriptors (Bug#17844).
3727 (wait_reading_process_output, Fprocess_filter_multibyte_p):
3728 Check that infd is nonnegative before using it as an fd.
3729 (read_and_dispose_of_process_output, Fprocess_send_eof):
3730 Likewise, for outfd.
3731 (wait_reading_process_output): Omit unnecessary check of infd.
3732
3733 2014-07-07 Paul Eggert <eggert@cs.ucla.edu>
3734
3735 Minor fixups related to usage of the 'long' type.
3736 * gnutls.c (emacs_gnutls_handshake):
3737 * xfaces.c (dump_realized_face):
3738 Work even if 'long' is narrower than 'void *'.
3739 * termcap.c (scan_file):
3740 * xselect.c (x_decline_selection_request)
3741 (x_reply_selection_request, x_get_window_property):
3742 * xterm.c (x_set_frame_alpha):
3743 Remove unnecessary 'L' suffixes of integer constants.
3744 * xfns.c (hack_wm_protocols):
3745 * xselect.c (x_fill_property_data):
3746 * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
3747 Remove unnecessary casts to 'long'.
3748 (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
3749
3750 Minor ImageMagick safety fixes.
3751 * image.c (imagemagick_compute_animated_image):
3752 Remove useless assignment to local. Avoid problems if dest_width is 0.
3753 (imagemagick_load_image): Use int for pixel counts that can't
3754 exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns
3755 a row width greater than the image width (or greater than LONG_MAX!).
3756
3757 2014-07-04 K. Handa <handa@gnu.org>
3758
3759 * coding.c (MIN_CHARBUF_SIZE): Delete it.
3760 (MAX_CHARBUF_EXTRA_SIZE): New macro.
3761 (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
3762
3763 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3764
3765 * font.h (struct font_driver): Remove get_outline and free_outline;
3766 not used by any font driver.
3767 * ftfont.c (ftfont_driver):
3768 * macfont.m (macfont_driver):
3769 * nsfont.m (nsfont_driver):
3770 * w32font.c (w32font_driver):
3771 * w32uniscribe.c (uniscribe_font_driver):
3772 * xfont.c (xfont_driver): Related users changed.
3773 * xselect.c (x_get_window_property): Use convenient xmalloc.
3774 Call to xfree only if some data was really allocated.
3775
3776 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3777
3778 On MS-Windows, display busy cursor on all GUI frames.
3779 This is similar to what we have on X. Quickly tested by Dani Moncayo.
3780 * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
3781 (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
3782 Likewise.
3783 (hide_hourglass, show_hourglass): Redesign to match X counterparts.
3784 * xdisp.c (start_hourglass): Remove Windows-specific bits.
3785
3786 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3787
3788 Use convenient alists to manage per-frame font driver-specific data.
3789 * frame.h (struct frame): Rename font_data_list to...
3790 [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
3791 * font.h (struct font_data_list): Remove; no longer need a special
3792 data type.
3793 (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
3794 Adjust prototypes.
3795 * font.c (font_put_frame_data, font_get_frame_data)
3796 [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
3797 management.
3798 * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
3799 Related users changed.
3800 * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
3801 Prefer convenient xmalloc and xfree.
3802
3803 2014-07-03 Eli Zaretskii <eliz@gnu.org>
3804
3805 * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
3806 the window whose glyph row is being prepared and a flag whether it
3807 is for mode/header line. Make sure the glyph row's marginal areas
3808 are in sync with what the window wants.
3809 (Bug#17892)
3810
3811 * xdisp.c (display_line, display_mode_line):
3812 Call prepare_desired_row with additional arguments, as appropriate.
3813
3814 * dispextern.h (prepare_desired_row): Adjust prototype.
3815
3816 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3817
3818 * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
3819 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
3820 caused by xw_popup_dialog in daemon mode (Bug#17891).
3821
3822 2014-07-03 Eli Zaretskii <eliz@gnu.org>
3823
3824 * frame.c (do_switch_frame): When switching to another TTY frame,
3825 make sure FrameCols and FrameRows are in sync with the new frame's
3826 data. (Bug#17875)
3827
3828 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru>
3829
3830 Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
3831 * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
3832 min_char slots. Adjust comment.
3833 (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
3834 Add SUB_CHAR_TABLE_OFFSET member.
3835 (make_uninit_sub_char_table): New function.
3836 (toplevel): Add compile-time assert to verify suitable member layout
3837 in Lisp_Sub_Char_Table.
3838 * alloc.c (mark_char_table): Add extra argument to denote char table
3839 subtype. Adjust to match new layout of sub char-table.
3840 (mark_object): Always mark sub char-tables with mark_char_table.
3841 * chartab.c (make_sub_char_table, copy_sub_char_table)
3842 (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
3843 (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
3844 (map_sub_char_table_for_charset, uniprop_table_uncompress):
3845 All related users changed.
3846 * lread.c (read1): Adjust to match new layout of sub char-table.
3847 * print.c (print_object): Likewise (Bug#17898).
3848
3849 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
3850
3851 * keymap.c (get_keyelt): Simplify.
3852 (copy_keymap_item): Remove left-over code for when we had
3853 key-shortcut caches.
3854
3855 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
3856
3857 * nsterm.m (judge): EmacsScroller: Move dealloc code here.
3858 (dealloc): Remove for EmacsScroller.
3859
3860 * nsterm.h (EmacsScroller): Remove dealloc.
3861
3862 2014-06-30 Eli Zaretskii <eliz@gnu.org>
3863
3864 * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881)
3865
3866 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
3867
3868 * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
3869 when setNeedsDisplay is called so we don't trigger redisplay for every
3870 tool bar update.
3871
3872 * nsterm.m (any_help_event_p): New variable.
3873 (mouseMoved:): Set any_help_event_p to YES if help event is
3874 generated. Remove else with empty help event that triggered redisplay
3875 for every mouse move.
3876 (windowDidResignKey:): If any_help_event_p, generate empty help event.
3877
3878 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3879
3880 * xfns.c (Qsuppress_icon): Remove; no real users.
3881 (syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
3882 * w32fns.c (Qsuppress_icon): Remove, for the same reason.
3883 (syms_of_w32fns): Don't DEFSYM it.
3884
3885 2014-06-29 Glenn Morris <rgm@gnu.org>
3886
3887 * Makefile.in (ns-app): Mark as PHONY.
3888
3889 2014-06-28 Glenn Morris <rgm@gnu.org>
3890
3891 * Makefile.in (mostlyclean): There are no libXMenu11.a,
3892 liblw.a in this directory.
3893
3894 2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
3895
3896 * coding.c (encode_coding_utf_8): Correctly count produced_chars
3897 also in unibyte case. (Bug#17865)
3898
3899 2014-06-28 K. Handa <handa@gnu.org>
3900
3901 * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
3902 (MIN_CHARBUF_SIZE): New macro.
3903 (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
3904
3905 2014-06-27 Glenn Morris <rgm@gnu.org>
3906
3907 * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
3908 with an order-only dependence on bootstrap-emacs. (Bug#2151)
3909 (.el.elc): Replace suffix rule with pattern rule.
3910 (%.elc): New pattern rule, with order-only prerequisite.
3911 ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
3912 ($(lispsource)/loaddefs.el): Use an order-only prerequisite
3913 in place of BOOTSTRAPEMACS.
3914
3915 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3916
3917 * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
3918
3919 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
3920
3921 Consistently use validate_subarray to verify substring.
3922 * fns.c (validate_substring): Not static any more. Adjust to
3923 use ptrdiff_t, not EMACS_INT, because string and vector limits
3924 can't exceed ptrdiff_t even if EMACS_INT is wider.
3925 (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
3926 (secure_hash): Adjust user.
3927 * lisp.h (validate_subarray): Add prototype.
3928 * coding.c (Fundecodable_char_position):
3929 * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
3930 Use validate_subarray. Adjust comment to mention substring.
3931
3932 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
3933
3934 Do not allow out-of-range character position in Fcompare_strings.
3935 * fns.c (validate_subarray): Add prototype.
3936 (Fcompare_substring): Use validate_subarray to check ranges.
3937 Adjust comment to mention that the semantics was changed. Also see
3938 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
3939
3940 2014-06-24 Paul Eggert <eggert@cs.ucla.edu>
3941
3942 Be more consistent about the 'Qfoo' naming convention.
3943 * image.c (Fimagemagick_types):
3944 * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
3945 * process.c (Fmake_network_process):
3946 Rename C local identifier 'Qfoo to avoid giving the false
3947 impression that it stands for the symbol 'foo'.
3948
3949 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru>
3950
3951 Simplify and cleanup character conversion stuff.
3952 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
3953 Remove prototypes.
3954 * character.c (multibyte_char_to_unibyte)
3955 (multibyte_char_to_unibyte_safe): Remove; no longer used.
3956 * character.h (make_char): Remove; unused.
3957 (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
3958 (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
3959 * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
3960 * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
3961 * search.c, term.c, xdisp.c, xterm.c: Related users changed.
3962
3963 2014-06-22 Mario Lang <mlang@delysid.org>
3964
3965 * w32fns.c (Fw32_shell_execute): The the -> the.
3966
3967 2014-06-22 Dmitry Antipov <dmantipov@yandex.ru>
3968
3969 * xmenu.c (mouse_position_for_popup):
3970 * xselect.c (mouse_position_for_drop): Do not duplicate ...
3971 * xfns.c (x_relative_mouse_position): ... and prefer this function.
3972 * menu.c (Fx_popup_menu):
3973 * xselect.c (x_handle_dnd_message): Adjust users.
3974 * menu.h (mouse_position_for_popup): Remove prototype.
3975 * xterm.h (x_relative_mouse_position): Add prototype.
3976 * xterm.c (x_find_topmost_parent): Break from the loop and do not
3977 call XFree if XQueryTree returns zero.
3978
3979 2014-06-21 Eli Zaretskii <eliz@gnu.org>
3980
3981 * indent.c (Fvertical_motion): Doc fix.
3982 Move to the goal column, if any, with a single call to
3983 move_it_in_display_line, not in two calls. Doing this with two
3984 calls causes move_it_in_display_line apply the line-prefix
3985 handling twice instead of just once. (Bug#17823)
3986
3987 2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
3988
3989 Port to OS X ACLs (Bug#17810).
3990 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
3991 ACL_TYPE_ACCESS) doesn't work.
3992
3993 2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
3994
3995 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
3996 before checking key-translation-map (bug#17659).
3997
3998 2014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
3999
4000 * font.c (font_make_object): Avoid dangling pointer which may
4001 crash GC (Bug#17771).
4002
4003 2014-06-21 Eli Zaretskii <eliz@gnu.org>
4004
4005 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
4006 prototype of DGifCloseFile as appropriate for older and newer
4007 versions of giflib.
4008 (gif_close): New function, encapsulates the differences in the
4009 calling sequence of DGifCloseFile before v5.1.0 and after it.
4010 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
4011 error string where appropriate. (Bug#17790)
4012
4013 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
4014 macro execution, make sure point didn't move since last complete
4015 redisplay, as the condition for using the glyph matrix
4016 information. (Bug#17777)
4017
4018 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
4019
4020 Minor cleanup of fonset code.
4021 * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
4022 (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
4023 (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
4024 (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
4025 (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
4026 (set_fontset_fallback): Reorder extra slots and avoid unused slots.
4027 (free_realized_fontset): Remove because a no-op since 2008.
4028 (free_face_fontset): Adjust user.
4029 (syms_of_fontset): Shrink fontset by one extra slot.
4030
4031 2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
4032
4033 Omit redundant extern decls.
4034 Most of this patch is from Dmitry Antipov, in:
4035 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
4036 * commands.h (update_mode_lines):
4037 * frame.h (Qbackground_color, Qforeground_color)
4038 (x_set_menu_bar_lines):
4039 * ftfont.c (ftfont_font_format):
4040 * intervals.h (Qkeymap, Qfont):
4041 * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
4042 * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
4043 (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
4044 (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
4045 (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
4046 (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
4047 (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
4048 (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
4049 (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
4050 (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
4051 (Qtool_bar, Qheader_line):
4052 * macros.c (Fexecute_kbd_macro):
4053 * xdisp.c (Ftool_bar_height, Ftool_bar_height):
4054 * xterm.c (x_delete_terminal, XSetIMValues):
4055 * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
4056 (x_implicitly_set_name, popup_activated)
4057 (widget_store_internal_border):
4058 Remove redundant decls.
4059 * frame.c [USE_X_TOOLKIT]: Include widget.h.
4060 * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
4061 Remove _Noreturn, as make-docfile now does that for us.
4062 * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
4063 (Qregion_extract_function): New decl.
4064 * window.c, xfns.c: Include menu.h.
4065
4066 2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
4067
4068 * callint.c (Fcall_interactively): Fix up last change (bug#17701).
4069
4070 2014-06-17 Dmitry Antipov <dmantipov@yandex.ru>
4071
4072 * fileio.c (Fread_file_name): Do not pass redundant args and ...
4073 * callint.c (read_file_name): ... convert to static here.
4074 * lisp.h (Fread_file_name): Do not EXFUN it.
4075 (STRING_COPYIN): Remove; unused.
4076 * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
4077 (char_composable_p): ... static function. All users changed.
4078 * eval.c (toplevel): Remove redundant #include directives.
4079 * xterm.c (x_initialize): Add static to match prototype.
4080 * ccl.c (Fccl_execute_on_string):
4081 * font.c (fon_intern_prop): Use make_specified_string.
4082
4083 2014-06-16 Paul Eggert <eggert@cs.ucla.edu>
4084
4085 * Makefile.in (ns-app): Fix typo that broke build on OS X.
4086 Reported by David Caldwell in:
4087 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
4088
4089 2014-06-16 Dmitry Antipov <dmantipov@yandex.ru>
4090
4091 Do not ask for XRender extension each time XFT font is opened.
4092 * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
4093 * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment.
4094
4095 2014-06-15 Glenn Morris <rgm@gnu.org>
4096
4097 * Makefile.in: Use `make -C' rather than `cd && make' throughout.
4098
4099 2014-06-15 Eli Zaretskii <eliz@gnu.org>
4100
4101 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
4102 information if we are in the middle of executing a keyboard macro,
4103 since redisplay doesn't update the screen until the macro is
4104 finished. (Bug#17777)
4105
4106 * alloc.c (cleanup_vector): Don't dereference a font driver
4107 pointer if it is NULL. (Bug#17771)
4108
4109 2014-06-13 Glenn Morris <rgm@gnu.org>
4110
4111 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
4112 ($(lispsource)/international/charprop.el)
4113 ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
4114 ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
4115 ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
4116 GNU make automatically passes command-line arguments to sub-makes.
4117
4118 2014-06-13 Paul Eggert <eggert@cs.ucla.edu>
4119
4120 Avoid hangs in accept-process-output (Bug#17647).
4121 * lisp.h, process.c (wait_reading_process_input):
4122 Return int, not bool. All uses changed.
4123 * process.c (SELECT_CANT_DO_WRITE_MASK):
4124 Remove macro, replacing with ...
4125 (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
4126 All uses changed.
4127 (status_notify): New arg WAIT_PROC. Return int, not void.
4128 All uses changed.
4129
4130 2014-06-13 Eli Zaretskii <eliz@gnu.org>
4131
4132 * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
4133 the frame is the initial frame, because the hook is not set up
4134 then, and Emacs crashes.
4135 Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
4136
4137 2014-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
4138
4139 * keymap.c (silly_event_symbol_error): Don't recommend the use
4140 of strings.
4141
4142 2014-06-11 Eli Zaretskii <eliz@gnu.org>
4143
4144 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
4145 matching overlay strings with 'cursor' property against buffer
4146 positions traversed in the glyph row. (Bug#17744)
4147
4148 2014-06-11 Jan Djärv <jan.h.d@swipnet.se>
4149
4150 * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
4151 on Cocoa.
4152
4153 * nsterm.m (run): Always compile for Cocoa. Use runtime check to
4154 determine 10.9 (Bug#17751).
4155
4156 * macfont.m (macfont_draw): Positions were not freed.
4157
4158 2014-06-10 Dmitry Antipov <dmantipov@yandex.ru>
4159
4160 * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
4161 * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
4162 function. Also adjust comment.
4163 * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
4164
4165 * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
4166 * font.c (font_done_for_face):
4167 * xfaces.c (realize_non_ascii_face): Adjust user.
4168 * font.h (struct font_driver): Convert 'prepare_face' to return
4169 void because its return value is never used anyway.
4170 * xfont.c (xfont_prepare_face): Return void.
4171 * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
4172 (xftfont_done_face): Use xfree.
4173
4174 * dispextern.h (last_tool_bar_item): Remove declaration.
4175 * frame.h (struct frame): New member last_tool_bar_item.
4176 * frame.c (make_frame): Initialize it.
4177 * xdisp.c (toplevel): Remove last_tool_bar_item.
4178 (handle_tool_bar_click, note_tool_bar_highlight):
4179 * w32term.c (w32_read_socket, w32_initialize):
4180 * xterm.c (handle_one_xevent, x_initialize): Adjust users.
4181
4182 * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
4183 * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
4184
4185 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
4186
4187 Say (accept-process-output P)'s result pertains to P if P is non-nil.
4188 * process.c (Faccept_process_output)
4189 (wait_reading_process_output): Mention that if PROCESS is non-nil,
4190 the return value is about PROCESS, not about other processes.
4191
4192 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru>
4193
4194 Further adjustments to mark_object and friends.
4195 Now the mark_object's stack is just 32 bytes on a 64-bit
4196 system, which means extra 20% off the stack usage.
4197 * alloc.c (mark_save_value): As before, refactored out from ...
4198 (mark_object): ... adjusted user. Also add comment.
4199
4200 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
4201
4202 Fix core dump after a dropped X connection (Bug#17704).
4203 * sysdep.c (stuff_char): Don't abort merely because the selected frame
4204 is dead, as we may be shutting down.
4205
4206 2014-06-08 Glenn Morris <rgm@gnu.org>
4207
4208 * fileio.c (write-region-inhibit-fsync): Doc tweak.
4209
4210 * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
4211
4212 2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
4213
4214 If a C name must be extern on some platforms, make it extern on all.
4215 * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
4216 (load_color):
4217 * font.h (ftxfont_driver) [HAVE_XFT]:
4218 * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
4219 * lisp.h (get_frame_param):
4220 * menu.h (tty_menu_show):
4221 * process.h (conv_sockaddr_to_lisp, catch_child_signal):
4222 * termhooks.h (encode_terminal_code):
4223 * xterm.h (x_menu_wait_for_event):
4224 Always declare.
4225 * frame.c (get_frame_param):
4226 * fringe.c (max_used_fringe_bitmap):
4227 * ftxfont.c (ftxfont_driver):
4228 * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
4229 * menu.c (menu_items_inuse):
4230 * process.c (conv_sockaddr_to_lisp, catch_child_signal):
4231 * term.c (encode_terminal_code, tty_menu_show):
4232 * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
4233 * xfaces.c (load_color):
4234 * xmenu.c (x_menu_wait_for_event):
4235 Now always extern.
4236
4237 2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
4238
4239 Change object marking routines to minimize stack usage.
4240 This change moves a few cold paths from mark_object to NO_INLINE
4241 functions and adjusts symbol marking loop. According to GCC 4.8.2
4242 -Wstack-usage, this reduces mark_object's stack usage from 80 to
4243 48 bytes on a 64-bit system. For a long byte-force-recompile runs,
4244 stack usage at the mark phase is reduced up to 28%. Surprisingly,
4245 it also gains up to 3% in speed (with default '-O2 -g3' flags).
4246 * alloc.c (mark_compiled, mark_localized_symbol): New functions,
4247 refactored out from ...
4248 (mark_object): ... adjusted user. Also mark symbols in a tight
4249 inner loop.
4250 (mark_face_cache): Add NO_INLINE.
4251
4252 2014-06-08 Eli Zaretskii <eliz@gnu.org>
4253
4254 * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
4255 contains garbage on WINDOWSNT (which could potentially infloop at
4256 exit).
4257
4258 Minimize cursor motion during TTY menu updates.
4259 * term.c (tty_menu_display): Don't position cursor here.
4260 Instead, pass the cursor coordinates to update_frame_with_menu.
4261 (tty_menu_activate): Send the hide cursor command only once in an
4262 iteration through the outer 'while' loop.
4263
4264 * dispnew.c (update_frame_1): Accept an additional argument
4265 SET_CURSOR_P, and position the cursor at the end of the frame
4266 update only if that argument is non-zero. All callers changed to
4267 provide the additional argument as non-zero, except for
4268 update_frame_with_menu.
4269 (update_frame_with_menu): Accept 2 additional arguments ROW and
4270 COL; if they are non-negative, instruct update_frame_1 not to
4271 position the cursor, and instead position it according to ROW and COL.
4272
4273 * dispextern.h (update_frame_with_menu): Update prototype.
4274
4275 2014-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4276
4277 * callproc.c (call_process): Don't check read-only if we don't insert
4278 anything (bug#17666).
4279
4280 2014-06-08 Eli Zaretskii <eliz@gnu.org>
4281
4282 * dispnew.c (update_frame_with_menu): Set display_completed.
4283
4284 2014-06-07 Eli Zaretskii <eliz@gnu.org>
4285
4286 * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
4287 only for WINDOWSNT.
4288 * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
4289
4290 2014-06-06 Paul Eggert <eggert@cs.ucla.edu>
4291
4292 * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
4293 * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
4294
4295 2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
4296
4297 * window.c (Frecenter): Signal an error if window-buffer is not
4298 current-buffer.
4299
4300 * keyboard.c (make_lispy_position): Don't include a buffer position in
4301 mode/header-line mouse events.
4302
4303 * keyboard.c (read_char): Handle (t . <event>) in the second use of
4304 Vunread_command_events (bug#17650).
4305
4306 2014-06-06 Dmitry Antipov <dmantipov@yandex.ru>
4307
4308 * xterm.c (x_setup_pointer_blanking):
4309 Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
4310
4311 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru>
4312
4313 * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
4314 because it will be defined in generated config.h if needed.
4315
4316 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
4317
4318 Use terminal-specific hooks to display popup dialogs.
4319 * termhooks.h (struct terminal): New field popup_dialog_hook.
4320 * menu.c (emulate_dialog_with_menu): New function, refactored from ...
4321 (Fx_popup_dialog): ... adjusted user. Also remove old #if 0
4322 code and use popup_dialog_hook.
4323 * nsmenu.m (ns_popup_dialog): Make hook-compatible.
4324 * nsterm.h (ns_popup_dialog): Adjust prototype.
4325 * nsterm.m (ns_create_terminal):
4326 * w32term.c (w32_create_terminal):
4327 * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
4328 Setup popup_dialog_hook.
4329
4330 2014-06-04 Eli Zaretskii <eliz@gnu.org>
4331
4332 * w32heap.c (report_temacs_memory_usage): Improve the report by
4333 reporting the large blocks that are actually occupied at dump time.
4334
4335 * w32console.c (initialize_w32_display): Set the console
4336 menu_show_hook, otherwise TTY menus are broken on w32.
4337
4338 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
4339
4340 Use terminal-specific hooks to display menus.
4341 * termhooks.h (struct terminal): New field menu_show_hook.
4342 * menu.h (<anonymous enum>): Bit flags for menu hooks.
4343 (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
4344 Adjust prototypes.
4345 * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
4346 * nsmenu.m (ns_menu_show):
4347 * w32menu.c (w32_menu_show):
4348 * xmenu.c (x_menu_show):
4349 * term.c (tty_menu_show): Adjust to use bit flags.
4350 (set_tty_hooks): Set menu_show_hook.
4351 * xterm.c (x_create_terminal):
4352 * nsterm.m (ns_create_terminal):
4353 * msdos.c (initialize_msdos_display):
4354 * w32term.c (w32_create_terminal): Likewise.
4355
4356 2014-06-03 Juanma Barranquero <lekktu@gmail.com>
4357
4358 * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
4359
4360 2014-06-03 Eli Zaretskii <eliz@gnu.org>
4361
4362 * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
4363 (FD_SET): Don't define on WINDOWSNT.
4364
4365 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
4366
4367 * emacs.c: Include "sysselect.h", to define its inline functions.
4368 Problem reported by Glenn Morris in:
4369 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
4370
4371 Do not require libXt-devel when building with gtk.
4372 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
4373 dependency on libXt-devel.
4374 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
4375 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
4376 lwlib-widget.h now does this.
4377 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
4378
4379 2014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
4380
4381 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
4382 * process.c (add_read_fd, delete_read_fd, add_write_fd)
4383 (delete_write_fd, wait_reading_process_output):
4384 Remove now-redundant easserts.
4385 * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
4386 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4387 (fd_CLR, fd_ISSET, fd_SET): New inline functions.
4388 (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
4389
4390 2014-06-03 Eli Zaretskii <eliz@gnu.org>
4391
4392 * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
4393 HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
4394 (calloc): Don't undef, it is never defined.
4395 (HEAP_ENTRY_SHIFT): Remove unused macro.
4396
4397 * Makefile.in (C_HEAP_SWITCH): Remove.
4398 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
4399
4400 Fix MS-Windows build broken by menu changes on 2014-06-02.
4401 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
4402
4403 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
4404 Define instead of including ../lwlib/lwlib.h, which causes
4405 compilation errors due to missing X11 headers.
4406
4407 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
4408
4409 * process.c (wait_reading_process_output): Omit incorrect test of
4410 p->infd against zero. Add easserts for infd having a plausible value.
4411
4412 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
4413
4414 Adjust to match recent lwlib changes.
4415 * menu.h (xmalloc_widget_value): Replace by ...
4416 (make_widget_value): ... new prototype.
4417 * menu.c (xmalloc_widget_value): Replace by ...
4418 (make_widget_value): ... new function.
4419 (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
4420 * gtkutil.c (malloc_widget_value, free_widget_value):
4421 (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
4422 * keyboard.h (enum button_type, struct _widget_value):
4423 * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
4424 Likewise.
4425 * nsmenu.m (ns_update_menubar, ns_menu_show):
4426 * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
4427 * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
4428 * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
4429
4430 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
4431
4432 * image.c (x_query_frame_background_color)
4433 [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
4434 Fix --enable-gcc-warnings compilation without image libraries.
4435
4436 2014-06-02 Eli Zaretskii <eliz@gnu.org>
4437
4438 * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
4439 emulated break value only if it goes up.
4440 (sbrk): Add assertion that the INCREMENT argument is strictly
4441 zero. Improve and correct the commentary.
4442
4443 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4444
4445 Improve AIX-related merge from emacs-24.
4446 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
4447 * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
4448 not on AIX; since we're on the trunk we can use enums more broadly.
4449
4450 * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
4451
4452 2014-06-02 Jan Djärv <jan.h.d@swipnet.se>
4453
4454 * xterm.c (xg_scroll_callback): Remove position, for jump set portion
4455 to min(value, whole).
4456
4457 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4458
4459 Bring back the changes to GDB-visible symbols, but only on AIX.
4460 And only if it's not pre-4.2 GCC.
4461 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
4462 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
4463 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
4464 New macros.
4465
4466 2014-06-02 Eli Zaretskii <eliz@gnu.org>
4467
4468 * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
4469 with PT, not GPT. (Bug#16433)
4470
4471 Revert last changes to GDB-visible symbols.
4472 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
4473 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
4474 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
4475 Delete macros.
4476
4477 2014-06-02 Glenn Morris <rgm@gnu.org>
4478
4479 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
4480
4481 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4482
4483 Fix port to 32-bit AIX with xlc (Bug#17598).
4484 * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
4485 * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
4486 * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
4487 to work around a compiler bug in IBM xlc 12.1.
4488
4489 2014-06-02 Eli Zaretskii <eliz@gnu.org>
4490
4491 * xterm.c (x_update_window_end): Don't invalidate the entire
4492 mouse-highlight info, just signal frame_up_to_date_hook that mouse
4493 highlight needs to be redisplayed. (Bug#17588)
4494
4495 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4496
4497 Port the GDB-visible symbols to AIX.
4498 Without them, GDB doesn't work to debug Emacs, since the AIX linker
4499 optimizes away the relevant external symbols. Use enums instead;
4500 this suffices for the AIX port, which is 32-bit-only anyway.
4501 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
4502 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
4503 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
4504 New macros.
4505
4506 Include sources used to create macuvs.h.
4507 * Makefile.in ($(srcdir)/macuvs.h): New rule.
4508 * macuvs.h: Use automatically-generated header.
4509
4510 2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
4511
4512 Port signal-handling to DragonFly BSD (Bug#17646).
4513 * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
4514 Move implementations from callproc.c to sysdep.c.
4515 * process.h, syssignal.h (block_child_signal, unblock_child_signal):
4516 Move declarations from process.h to syssignal.h.
4517
4518 2014-06-01 Juanma Barranquero <lekktu@gmail.com>
4519
4520 * callint.c (Ffuncall_interactively): Add usage.
4521
4522 2014-06-01 Jan Djärv <jan.h.d@swipnet.se>
4523
4524 * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
4525
4526 2014-05-30 Eli Zaretskii <eliz@gnu.org>
4527
4528 * w32heap.c (malloc_before_dump, malloc_after_dump)
4529 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
4530 (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
4531 set errno where appropriate to emulate CRT functions.
4532
4533 2014-05-30 Dmitry Antipov <dmantipov@yandex.ru>
4534
4535 Debugging facility to check whether 'const char *' points to
4536 relocatable data of non-pure Lisp string.
4537 * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
4538 (mark_maybe_pointer): ... adjusted user.
4539 (relocatable_string_data_p): New function.
4540 * lisp.h (relocatable_string_data_p): Add prototype.
4541 * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
4542 the pointer to relocatable Lisp data is not used.
4543
4544 2014-05-30 Paul Eggert <eggert@cs.ucla.edu>
4545
4546 Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
4547 * atimer.c (block_atimers):
4548 * callproc.c (block_child_signal): Block SIGINT too;
4549 otherwise, its handler might now unblock signals that it shouldn't.
4550 * keyboard.c (read_char): Clear signal mask, since we may
4551 be in a SIGINT handler, and many signals may be masked.
4552 * keyboard.c (handle_interrupt):
4553 * sysdep.c (handle_arith_signal):
4554 Clear signal mask instead of just unblocking the signal that
4555 was received, since several signals may be blocked at this point.
4556
4557 2014-05-29 Eli Zaretskii <eliz@gnu.org>
4558
4559 * Makefile.in (TEMACS_POST_LINK): Remove target.
4560 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
4561 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
4562
4563 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
4564
4565 * xmenu.c (xdialog_show): Remove prototype, rename to
4566 x_dialog_show, remove 2nd arg because it's always zero
4567 and simplify accordingly.
4568 (xw_popup_dialog): Adjust user.
4569 * w32menu.c (w32_dialog_show): Adjust prototype, remove
4570 2nd arg because it's always zero and simplify accordingly.
4571 (w32_popup_dialog): Adjust user.
4572
4573 2014-05-29 Eli Zaretskii <eliz@gnu.org>
4574
4575 * w32heap.c (report_temacs_memory_usage): New function.
4576
4577 * unexw32.c (unexec) [ENABLE_CHECKING]:
4578 Call report_temacs_memory_usage.
4579
4580 * w32heap.h (report_temacs_memory_usage): Add prototype.
4581
4582 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
4583
4584 Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
4585 * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
4586
4587 2014-05-29 Eli Zaretskii <eliz@gnu.org>
4588
4589 * buffer.c (init_buffer): Accept an argument 'initialized'.
4590 [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
4591 mmap_regions and mmap_fd, to avoid referencing stale data from the
4592 dump phase. Add an assertion for buffer text of buffers created
4593 in temacs before this function is called. (Bug#17622)
4594 (mmap_regions_1, mmap_fd_1): Remove unused variables.
4595
4596 * lisp.h (init_buffer): Update prototype.
4597
4598 * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
4599
4600 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
4601
4602 * alloc.c (Fgarbage_collect): Fix compilation with
4603 GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
4604
4605 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
4606
4607 * frame.c, frame.h (frame_char_to_pixel_position)
4608 (frame_set_mouse_position): Now static, and made private in
4609 frame.c rather than public in frame.h.
4610
4611 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
4612
4613 Refactor mouse positioning stuff to avoid code duplication.
4614 * frame.h (frame_char_to_pixel_position): New function.
4615 (x_set_mouse_position): Rename to...
4616 (frame_set_mouse_position): ...new function.
4617 (frame_set_mouse_pixel_position): Add prototype.
4618 * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
4619 Rename to frame_set_mouse_pixel_position.
4620 * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
4621 Adjust users.
4622 * xterm.h, w32term.h ( x_set_mouse_position)
4623 (x_set_mouse_pixel_position): Remove prototypes.
4624
4625 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
4626
4627 On X, always make pointer visible when deleting frame (Bug#17609).
4628 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
4629 Pass frame as arg.
4630 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
4631 Adjust prototypes.
4632 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
4633 * keyboard.c (gobble_input): If there is no terminal input error,
4634 make sure the pointer is visible for all frames on this terminal.
4635 * xterm.c (x_free_frame_resources): Enable pointer visibility if
4636 it was previously disabled.
4637
4638 2014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
4639
4640 * data.c (Fzerop): Move to Elisp.
4641 (syms_of_data): Don't defsubr it.
4642 * keyboard.c (echo_keystrokes_p): New function.
4643 (read_char, record_menu_key, read_key_sequence): Use it.
4644
4645 * callint.c (Qfuncall_interactively): New var.
4646 (Qcall_interactively): Remove.
4647 (Ffuncall_interactively): New function.
4648 (Fcall_interactively): Use it.
4649 (syms_of_callint): Defsubr it.
4650
4651 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
4652
4653 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
4654 relocated from under us.
4655
4656 2014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
4657
4658 Use mmap(2) emulation for allocating buffer text on MS-Windows.
4659 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
4660 configure, not from HEAPSIZE.
4661 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
4662
4663 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
4664 for MinGW, since it no longer uses gmalloc.
4665
4666 * buffer.c: Do not define mmap allocations functions for Windows.
4667 Remove mmap_find which is unused. Remove mmap_set_vars which does
4668 nothing useful.
4669 [WINDOWSNT]: Include w32heap.h.
4670 (init_buffer): Always allocate new memory for buffers.
4671
4672 * emacs.c: Remove mmap_set_vars calls.
4673
4674 * image.c (free_image): Undef free for Windows because it is
4675 redirected to our private version.
4676
4677 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
4678 (copy_executable_and_dump_data): Remove dumping the heap section.
4679 (unexec): Restore using_dynamic_heap after dumping.
4680
4681 * w32heap.c (dumped_data_commit, malloc_after_dump)
4682 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
4683 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
4684 (mmap_free): New functions.
4685
4686 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
4687
4688 2014-05-27 Paul Eggert <eggert@cs.ucla.edu>
4689
4690 * image.c (imagemagick_load_image): Use MagickRealType for local
4691 'color_scale', instead of double, to avoid a GCC warning about
4692 double promotion.
4693
4694 * xfns.c (Fx_window_property): Remove unused local.
4695
4696 Don't kill already-reaped process (Bug#17561).
4697 * process.c (process_send_signal): Fix race condition where a
4698 subprocess was reaped by a signal handler between the check for
4699 liveness and calling 'kill', which meant that Emacs could in
4700 theory kill an innocent bystander process. Do the fix by blocking
4701 SIGCHLD in a critical section that checks liveness before killing.
4702
4703 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4704
4705 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
4706
4707 2014-05-26 Ken Brown <kbrown@cornell.edu>
4708
4709 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
4710 even if !CYGWIN (see bug#17510).
4711
4712 2014-05-26 Jan Djärv <jan.h.d@swipnet.se>
4713
4714 * nsfns.m (Fns_do_applescript): Surround NSApp run
4715 with calls to ns_init_events, ns_finish_events (Bug#17424).
4716
4717 * nsterm.h (ns_init_events, ns_finish_events): Declare.
4718
4719 * nsterm.m (ns_init_events, ns_finish_events): New functions.
4720 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
4721
4722 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
4723 with calls to ns_init_events, ns_finish_events (Bug#17424).
4724
4725 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4726
4727 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
4728 if we are iterating over an object that generates glyphs for
4729 marginal areas. (Bug#17585)
4730
4731 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
4732
4733 * xdisp.c (safe__call1, safe__eval): Now static.
4734
4735 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4736
4737 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
4738 (safe_call, safe__call1): Construct a va_list argument for safe_call.
4739 (safe_call1): Call safe_call instead of safe__call directly.
4740
4741 2014-05-26 Ken Brown <kbrown@cornell.edu>
4742
4743 * w32term.c (x_delete_display) [CYGWIN]: Don't free
4744 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
4745 once. (Bug#17510)
4746
4747 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
4748
4749 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
4750 (safe__call, safe__call1, safe__eval): New functions.
4751 (safe_call): Use it.
4752 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
4753 (display_mode_element): Same for `:eval'.
4754
4755 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
4756
4757 Fix port to 32-bit AIX (Bug#17540).
4758 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
4759 twice. _text already includes this offset.
4760 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
4761
4762 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4763
4764 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
4765 when closest_pos is identical to to_charpos, don't recurse, since
4766 we already tried that, and failed. (Bug#17539)
4767
4768 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
4769 unwinding when frame's faces were not initialized yet, increment
4770 the frame's image-cache reference count before calling
4771 x_free_frame_resources. Don't dereference
4772 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
4773
4774 2014-05-25 Jan Djärv <jan.h.d@swipnet.se>
4775
4776 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
4777 nsterm.m now.
4778
4779 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
4780 macfont.m, call draw with adjusted arguments so font drivers
4781 don't need to do that.
4782
4783 * macfont.m (macfont_draw): Merge changes from Macport.
4784
4785 2014-05-24 Eli Zaretskii <eliz@gnu.org>
4786
4787 * alloc.c (garbage_collect_1): New function, with all of the guts
4788 of Fgarbage_collect.
4789 (mark_stack): Accept an argument END and don't mark Lisp objects
4790 on the stack beyond the address given by END. Calculation of END
4791 was moved to Fgarbage_collect.
4792 (Fgarbage_collect): Calculate the end address of the stack portion
4793 that needs to be examined by mark_stack, and pass that address to
4794 garbage_collect_1, which will pass it to mark_stack.
4795 See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
4796 for more details about the underlying problems. In particular,
4797 this avoids dumping Emacs with the large hash-table whose value is
4798 held in purify-flag for most of the time loadup.el runs.
4799
4800 2014-05-24 Jan Djärv <jan.h.d@swipnet.se>
4801
4802 * xfns.c (x_window_property_intern): New function (code from
4803 x_window_property).
4804 (Fx_window_property): Call x_window_property_intern. If property
4805 not found and NILP (source) and outer window != inner window,
4806 check outer window for property (Bug#17537).
4807
4808 2014-05-22 Paul Eggert <eggert@cs.ucla.edu>
4809
4810 Supply malloc and alloc_size attributes for extern allocators.
4811 This documents the C API, and helps GCC generate a bit better code.
4812 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
4813 (ATTRIBUTE_MALLOC_SIZE): New macros.
4814 * gmalloc.c (malloc, realloc, calloc):
4815 * gtkutil.h (malloc_widget_value):
4816 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
4817 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
4818 Use them.
4819
4820 2014-05-21 Paul Eggert <eggert@cs.ucla.edu>
4821
4822 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
4823 * image.c (imagemagick_load_image): Port to hosts that do not use
4824 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
4825
4826 2014-05-21 Leo Liu <sdl.web@gmail.com>
4827
4828 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
4829
4830 2014-05-20 Michael Albinus <michael.albinus@gmx.de>
4831
4832 * dbusbind.c (xd_signature): Revert last 2 patches.
4833
4834 2014-05-19 Paul Eggert <eggert@cs.ucla.edu>
4835
4836 Allow any non-nil value to count as true in bool-vector.
4837 Likewise for xd_signature in dbusbind.c.
4838 This is more consistent with the usual practice in Emacs, which is
4839 that any non-nil value counts as true.
4840 * alloc.c (Fbool_vector): Don't require args to be t or nil.
4841 * dbusbind.c (xd_signature): Likewise, for booleans.
4842 * data.c, lisp.h (Qbooleanp):
4843 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
4844
4845 2014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
4846
4847 * lisp.h (CHECK_BOOLEAN): New function.
4848 * alloc.c (Fbool_vector): New function.
4849 (syms_of_alloc): Defsubr it.
4850 * data.c (Qbooleanp): New symbol.
4851 (syms_of_data): DEFSYM it.
4852 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
4853
4854 * font.c (font_matching_entity): Extract font-entity object
4855 from the vector of matching entities (Bug#17486).
4856
4857 2014-05-17 Paul Eggert <eggert@cs.ucla.edu>
4858
4859 Assume C99 or later (Bug#17487).
4860 * bytecode.c (B__dummy__): Remove.
4861 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
4862 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
4863 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
4864 * regex.c (DEBUG_PRINT): Assume varargs macros.
4865 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
4866
4867 2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
4868
4869 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
4870 memory for every buffer that was dumped.
4871
4872 2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
4873
4874 * fns.c (Freverse): Allow vectors, bool vectors and strings.
4875 (Fnreverse): Allow vectors and bool vectors.
4876
4877 2014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
4878
4879 Minor cleanup for terminal setup.
4880 * termhooks.h (create_terminal): Adjust prototype.
4881 * terminal.c (create_terminal): Pass output method and RIF as args.
4882 (init_initial_terminal):
4883 * nsterm.m (ns_create_terminal):
4884 * term.c (init_tty):
4885 * w32term.c (w32_create_terminal):
4886 * xterm.c (x_create_terminal): Adjust users.
4887 Avoid redundant NULL initializers and add comments.
4888
4889 2014-05-13 Paul Eggert <eggert@cs.ucla.edu>
4890
4891 * keyboard.c (Qdeactivate_mark): Now static.
4892
4893 2014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
4894
4895 If available, use Xfixes extension to do pointer blanking.
4896 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
4897 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
4898 (make_invisible_cursor): Move to...
4899 * xterm.c (make_invisible_cursor): ...here.
4900 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
4901 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
4902 (x_term_init): Call to x_setup_pointer_blanking.
4903 (XTtoggle_invisible_pointer): Use blanking specific to this display.
4904 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
4905
4906 2014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4907
4908 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
4909
4910 2014-05-12 Glenn Morris <rgm@gnu.org>
4911
4912 * fileio.c (Ffile_executable_p): Doc tweak.
4913
4914 2014-05-12 Jan Djärv <jan.h.d@swipnet.se>
4915
4916 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
4917 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
4918
4919 2014-05-08 Paul Eggert <eggert@cs.ucla.edu>
4920
4921 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
4922
4923 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
4924
4925 Fix initialization of minibuffer history variable (Bug#17430).
4926 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
4927 Move the initialization up to prevent any "value void" message.
4928
4929 2014-05-08 Samuel Bronson <naesten@gmail.com>
4930
4931 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
4932 are matched (bug#17413).
4933
4934 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
4935
4936 Stop tooltips pulling Emacs window to front (Bug#17408).
4937 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
4938 SetWindowPos invocations.
4939
4940 2014-05-08 Jan Djärv <jan.h.d@swipnet.se>
4941
4942 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
4943 not initialized (Bug#17398).
4944
4945 2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
4946
4947 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
4948
4949 2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
4950
4951 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
4952 [HAVE_NS]: Do not include png.h.
4953 (x_query_frame_background_color): New function.
4954 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
4955 (png_load_body): Coalesce duplicate code.
4956
4957 2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
4958
4959 Consult libpng-config more consistently (Bug#17339).
4960 * Makefile.in (PNG_CFLAGS): New var.
4961 (ALL_CFLAGS): Use it.
4962 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
4963 CFLAGS now handles this.
4964
4965 2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
4966
4967 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
4968 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
4969 because WCONTINUED is always defined now.
4970 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
4971
4972 2014-05-03 Eli Zaretskii <eliz@gnu.org>
4973
4974 * buffer.c (overlay_strings): Fix the wording of the commentary.
4975
4976 2014-05-01 Glenn Morris <rgm@gnu.org>
4977
4978 * floatfns.c (Fisnan):
4979 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
4980
4981 2014-05-01 Eli Zaretskii <eliz@gnu.org>
4982
4983 * term.c (tty_menu_activate): A better initialization for cursor
4984 coordinates.
4985
4986 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
4987
4988 * intervals.c: Tighten assertions.
4989 (create_root_interval): Make sure the interval is not empty.
4990 (intervals_equal): Use booleans.
4991 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
4992 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
4993 (balance_possible_root_interval): Simplify and use booleans.
4994 (split_interval_right, split_interval_left): Check LENGTH, and remove
4995 now redundant assertion.
4996 (adjust_intervals_for_insertion): Remove now redundant assertions.
4997 (delete_node, interval_deletion_adjustment)
4998 (adjust_intervals_for_deletion, merge_interval_right)
4999 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
5000 (reproduce_interval): Make sure the interval is not empty.
5001
5002 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
5003
5004 * term.c (tty_menu_activate): Don't assume row and col are initialized.
5005 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
5006 satisfaction that they would always be initialized.
5007
5008 2014-04-30 Eli Zaretskii <eliz@gnu.org>
5009
5010 * term.c (tty_menu_display): Move the cursor to the active menu item.
5011 (tty_menu_activate): Return the cursor to the active menu item
5012 after displaying the menu and after displaying help-echo.
5013 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
5014 for the details of why this is needed by screen readers and
5015 Braille displays.
5016
5017 2014-04-30 Glenn Morris <rgm@gnu.org>
5018
5019 * process.c (handle_child_signal):
5020 Handle systems without WCONTINUED. (Bug#15110, 17339)
5021
5022 2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
5023
5024 * window.c (struct saved_window): Remove mark.
5025 (Fset_window_configuration, save_window_save)
5026 (compare_window_configurations): Don't touch marks any more.
5027
5028 2014-04-28 Paul Eggert <eggert@cs.ucla.edu>
5029
5030 Use bits_word for gcmarkbits.
5031 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
5032 bits_word is typically a tad more efficient for mark bits than
5033 unsigned is, so use bits_word. All uses changed.
5034 * lisp.h (BITS_PER_INT): Remove; no longer used.
5035
5036 Avoid undefined behavior in signed left shift.
5037 This ports to GCC 4.9.0 with -fsanitize=undefined.
5038 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
5039 * data.c (Fash):
5040 * regex.c (extract_number):
5041 * lisp.h (make_number, XINT):
5042 Do not shift a 1 bit left into a sign bit.
5043 * alloc.c (struct cons_block, struct float_block): Use unsigned,
5044 not int, for gcmarkbits. All uses changed.
5045
5046 2014-04-25 Eli Zaretskii <eliz@gnu.org>
5047
5048 * search.c (Fnewline_cache_check): Don't try to count newlines
5049 outside the buffer's restriction, as find_newline doesn't support that.
5050
5051 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
5052
5053 * window.c (Fset_window_configuration): Deactivate the mark before
5054 unsetting the mark.
5055 (set_window_buffer): Ignore window_initialized.
5056 (window_initialized): Remove.
5057 * keyboard.c (Qdeactivate_mark): Not static any more.
5058 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
5059 Update all callers.
5060
5061 2014-04-23 Paul Eggert <eggert@cs.ucla.edu>
5062
5063 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
5064 and to clang 3.4, which have fixed the bug. This should let us
5065 run a bit faster on these platforms when address sanitization is
5066 in effect.
5067
5068 2014-04-22 Paul Eggert <eggert@cs.ucla.edu>
5069
5070 Port to GCC 4.9.0 with --enable-gcc-warnings.
5071 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
5072 All uses removed.
5073 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
5074 a way that also works with GCC 4.9.0.
5075
5076 * search.c (Fnewline_cache_check): Remove unused locals.
5077
5078 2014-04-22 Eli Zaretskii <eliz@gnu.org>
5079
5080 * search.c (find_newline1): New subroutine.
5081 (Fnewline_cache_check): New function.
5082 (syms_of_search): Defsubr it.
5083
5084 2014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
5085
5086 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
5087 * keyboard.c (unblock_input): Add comment.
5088 * xgselect.c (xg_select): Prevent Glib main loop recursion.
5089
5090 2014-04-22 Daniel Colascione <dancol@dancol.org>
5091
5092 * lread.c (readevalloop_eager_expand_eval): New function
5093 that can recurse into toplevel forms.
5094 (readevalloop): Call it.
5095 * lisp.h: Declare Qprogn.
5096 * callint.c (Qprogn): No longer static.
5097
5098 2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
5099
5100 * intervals.c (rotate_right, rotate_left): Fix up length computation.
5101 Also change identifiers to match the comments, and add more assertions
5102 (bug#16234).
5103
5104 2014-04-18 Paul Eggert <eggert@cs.ucla.edu>
5105
5106 * emacs.c (close_output_streams): Don't clear and restore errno.
5107
5108 2014-04-18 Jan Djärv <jan.h.d@swipnet.se>
5109
5110 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
5111 never becomes visible, i.e. using XMonad (Bug#17237).
5112
5113 2014-04-18 Eli Zaretskii <eliz@gnu.org>
5114
5115 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
5116 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
5117 (Fline_pixel_height): Don't assume that the current buffer and the
5118 selected window's buffer are one and the same. (Bug#17281)
5119
5120 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
5121 paragraph-start cache before the newline cache. (Bug#17269)
5122
5123 2014-04-17 Paul Eggert <eggert@cs.ucla.edu>
5124
5125 * term.c (tty_send_additional_strings): No need to fflush here,
5126 as callers fflush.
5127 (tty_set_terminal_modes): fflush after sending additional strings,
5128 not before.
5129
5130 2014-04-17 Daniel Colascione <dancol@dancol.org>
5131
5132 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
5133 New symbols.
5134 (tty_send_additional_strings): New function.
5135 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
5136 (syms_of_term): Intern tty-mode-set-strings and
5137 tty-mode-reset-strings.
5138
5139 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
5140
5141 * window.c (save_window_save): Lookup window_point_insertion_type in
5142 the right buffer (bug#15457).
5143 (Qwindow_point_insertion_type): New var.
5144 (syms_of_window): Initialize it.
5145
5146 2014-04-16 Eli Zaretskii <eliz@gnu.org>
5147
5148 Fix the MSDOS build.
5149 * unexcoff.c [MSDOS]: Include libc/atexit.h.
5150 (copy_text_and_data): Zero out the atexit chain pointer before
5151 dumping Emacs.
5152
5153 * termhooks.h (encode_terminal_code): Update prototype.
5154
5155 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
5156 visible for all DOS_NT ports, not just WINDOWSNT.
5157 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
5158
5159 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
5160 unless it is defined.
5161 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
5162
5163 * process.c (close_on_exec, accept4, process_socket): Move into
5164 the "ifdef subprocesses" part.
5165 (catch_child_signal): Condition by "ifdef subprocesses".
5166 (syms_of_process) <Qinternal_default_process_sentinel>
5167 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
5168
5169 * msdos.h: Add prototypes for new functions.
5170 (EINPROGRESS): Define.
5171 (O_CLOEXEC): Define to zero.
5172
5173 * msdos.c (check_window_system): Remove unnecessary an
5174 incompatible duplicate function.
5175 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
5176 New functions in support of new functionality.
5177
5178 * menu.c (single_menu_item): Add visual indication of submenu
5179 also for menus on MSDOS frames.
5180 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
5181
5182 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
5183 when async subprocesses aren't supported.
5184
5185 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
5186
5187 * emacs.c (close_output_streams): Zero out errno before calling
5188 close_stream.
5189
5190 * dired.c [MSDOS]: Include msdos.h.
5191
5192 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
5193 (DATA_START) [MSDOS]: Define.
5194 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
5195
5196 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
5197 Ifdef away for MSDOS.
5198 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
5199 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
5200 for MSDOS.
5201 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
5202 Use temporary file template that is compatible with mkostemp.
5203 Move vfork-related portions under #ifndef MSDOS.
5204 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
5205
5206 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
5207
5208 * buffer.c (Foverlays_at): Add argument `sorted'.
5209
5210 2014-04-16 Eli Zaretskii <eliz@gnu.org>
5211
5212 * insdel.c (invalidate_buffer_caches): When deleting or replacing
5213 text, invalidate the bidi_paragraph_cache upto and including the
5214 preceding newline.
5215
5216 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
5217
5218 Port to IRIX 6.5 (Bug#9684).
5219 * conf_post.h (INET6) [IRIX6_5]: Define.
5220 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
5221 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
5222
5223 2014-04-16 Eli Zaretskii <eliz@gnu.org>
5224
5225 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
5226 before passing it to system APIs.
5227
5228 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
5229
5230 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
5231 make sure stack.byte_string_start is not de-adjusted by pushhandler.
5232
5233 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
5234
5235 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
5236
5237 2014-04-15 Paul Eggert <eggert@cs.ucla.edu>
5238
5239 Remove DATA_SEG_BITS.
5240 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
5241 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
5242 cc, but that platform is so old that SGI itself stopped supporting
5243 it in December 2013. If you still need Emacs on IRIX, please
5244 either compile with GCC and port the undumping code, or run
5245 './configure --with-wide-int'.
5246 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
5247 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
5248 DEFINE_GDB_SYMBOL_START way to define it.
5249 (NONPOINTER_BITS): New macro.
5250 (EMACS_INT): Use it.
5251 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
5252 the problem and/or configuring --with-wide-int.
5253 (USE_LSB_TAG): Simplify, based on above changes.
5254 (gdb_DATA_SEG_BITS): Remove. All uses removed.
5255 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
5256
5257 2014-04-12 Eli Zaretskii <eliz@gnu.org>
5258
5259 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
5260 covered by a display string that ends in a newline, and that cases
5261 going back by DVPOS lines to hit the search limit, lift the limit
5262 and go back until DVPOS is reached. (Bug#17244)
5263
5264 * indent.c (Fvertical_motion): Handle correctly the case when the
5265 display string is preceded by an empty line.
5266
5267 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
5268 use S_IWRITE instead.
5269
5270 2014-04-11 Glenn Morris <rgm@gnu.org>
5271
5272 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
5273
5274 2014-04-11 Ken Brown <kbrown@cornell.edu>
5275
5276 * Makefile.in (EMACS_MANIFEST): Revert last change.
5277
5278 2014-04-10 Daniel Colascione <dancol@dancol.org>
5279
5280 * puresize.h (BASE_PURESIZE): Increase.
5281
5282 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
5283
5284 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
5285
5286 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
5287 region handling (and don't call signal_before_change) if
5288 inhibit_modification_hooks is set.
5289 (signal_before_change): Don't check inhibit_modification_hooks any more.
5290
5291 2014-04-08 Daniel Colascione <dancol@dancol.org>
5292
5293 * alloc.c (sweep_symbols, mark_object): Assert that symbol
5294 function cells contain valid lisp objects. (Modified version of
5295 patch from Dmitry).
5296
5297 * alloc.c (detect_suspicious_free): Split actual stack capturing
5298 out into new function for easier breakpoint setting.
5299 (note_suspicious_free): New function.
5300
5301 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
5302
5303 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
5304
5305 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
5306 (symbol_block_pinned): New var.
5307 (Fmake_symbol): Initialize `pinned'.
5308 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
5309 pinned and signal an error for un-purifiable objects.
5310 (pure_cons): Use it.
5311 (Fpurecopy): Use it, except for objects that can't be purified.
5312 (mark_pinned_symbols): New function.
5313 (Fgarbage_collect): Use it.
5314 (gc_sweep): Remove hack made unnecessary.
5315
5316 2014-04-07 Glenn Morris <rgm@gnu.org>
5317
5318 * keyboard.c (Fopen_dribble_file): Doc tweak.
5319
5320 2014-04-07 Ken Brown <kbrown@cornell.edu>
5321
5322 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
5323
5324 2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
5325
5326 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
5327 We have a substitute execinfo.h on hosts that lack it.
5328 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
5329 isn't optimized away.
5330
5331 2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
5332
5333 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
5334 * alloc.c (memory_full):
5335 * charset.c (syms_of_charset):
5336 * doc.c (Fsnarf_documentation):
5337 * emacs.c (main):
5338 * font.c (BUILD_STYLE_TABLE):
5339 * keyboard.c (make_lispy_event):
5340 * profiler.c (setup_cpu_timer):
5341 * xgselect.c (xg_select):
5342 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
5343 Use ARRAYELTS.
5344 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
5345 Replace the only use with ARRAYELTS (font_property_table).
5346 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
5347
5348 2014-04-03 Daniel Colascione <dancol@dancol.org>
5349
5350 * xterm.c (x_term_init):
5351 * xfns.c (best_xim_style):
5352 * xfaces.c (Fdump_colors):
5353 * w32fns.c (w32_default_color_map):
5354 * w32.c (init_environment, N_ENV_VARS):
5355 * unexcw.c (read_exe_header):
5356 * term.c (term_get_fkeys_1):
5357 * sysdep.c (init_baud_rate):
5358 * nsterm.m (ns_convert_key):
5359 * nsfns.m (get_geometry_from_preferences):
5360 * msdos.c (dos_set_window_size, init_environment):
5361 * macfont.m (mac_font_get_glyph_for_cid)
5362 (macfont_store_descriptor_attributes)
5363 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
5364 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
5365 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
5366 (syms_of_keyboard):
5367 * image.c (xpm_str_to_color_key):
5368 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
5369 * frame.c (x_set_frame_parameters):
5370 * fileio.c (Ffile_selinux_context):
5371 * emacs.c (sort_args):
5372 * dosfns.c (msdos_stdcolor_name):
5373 * dired.c (file_attributes):
5374 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
5375 Change expressions of the form sizeof(arr) / sizeof(arr[0])
5376 to ARRAYELTS (arr).
5377
5378 2014-04-02 Daniel Colascione <dancol@dancol.org>
5379
5380 * data.c (Ffset): Abort if we're trying to set a function call to
5381 a dead lisp object.
5382
5383 * lisp.h (ARRAYELTS): New macro.
5384
5385 * alloc.c: Include execinfo.h if available.
5386 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
5387 (suspicious_free_record): New structure.
5388 (suspicious_objects, suspicious_object_index)
5389 (suspicious_free_history, suspicious_free_history_index):
5390 New variables.
5391 (find_suspicious_object_in_range, detect_suspicious_free)
5392 (Fsuspicious_object): New functions.
5393 (cleanup_vector): Call find_suspicious_object_in_range.
5394
5395 2014-04-02 Martin Rudalics <rudalics@gmx.at>
5396
5397 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
5398 width from font width (Bug#17163).
5399
5400 * frame.c (x_set_frame_parameters): Calculate default values of
5401 new frame sizes only after all other frame parameters have been
5402 processed (Bug#17142).
5403
5404 2014-04-02 Ken Brown <kbrown@cornell.edu>
5405
5406 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
5407 (Bug#17112)
5408
5409 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5410
5411 * xterm.c (x_draw_image_glyph_string): Adjust image background
5412 width accordingly when its x position is adjusted. (Bug#17115)
5413
5414 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
5415
5416 * font.c (font_list_entities): Do not add empty vector to font cache.
5417 (font_matching_entity): Likewise. If matching entity is found, insert
5418 1-item vector with this entity instead of entity itself (Bug#17125).
5419
5420 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
5421
5422 2014-04-01 Paul Eggert <eggert@cs.ucla.edu>
5423
5424 * fns.c (validate_subarray): Rename from validate_substring,
5425 since it works for vectors too. New arg ARRAY. Optimize for the
5426 non-nil case. Instead of returning bool, throw an error if out of
5427 range, so that the caller needn't do that. All uses changed.
5428 Report original values if out of range.
5429 (Fsubstring, Fsubstring_no_properties, secure_hash):
5430 Also optimize the case where FROM is 0 or TO is the size.
5431
5432 2014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
5433
5434 * search.c (Freplace_match): Use make_specified_string.
5435 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
5436 to catch bogus override face of glyph strings.
5437 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
5438 Move common substring range checking code to...
5439 (validate_substring): ...this function.
5440
5441 2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
5442
5443 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
5444
5445 2014-03-30 Jan Djärv <jan.h.d@swipnet.se>
5446
5447 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
5448 bar is zero height, just return (Bug#16976).
5449 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
5450
5451 * nsterm.h (EmacsView): Add wait_for_tool_bar.
5452
5453 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
5454 is nil. If waiting for toolbar to complete, force a redraw.
5455
5456 2014-03-28 Glenn Morris <rgm@gnu.org>
5457
5458 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
5459 (emacs_bugreport): New variable.
5460 (usage_message): Use PACKAGE_BUGREPORT.
5461 (syms_of_emacs) <report-emacs-bug-address>: New variable.
5462
5463 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
5464
5465 2014-03-27 Paul Eggert <eggert@cs.ucla.edu>
5466
5467 Port recent signal-related changes to FreeBSD.
5468 Problem reported by Herbert J. Skuhra.
5469 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
5470 Move decls from here ...
5471 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
5472
5473 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5474
5475 * w32term.c (x_draw_image_glyph_string): Fix computation of height
5476 and width of image background when it is displayed with a 'box'
5477 face. (Bug#17115)
5478
5479 2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
5480
5481 More backward-compatible fix to char-equal core dump (Bug#17011).
5482 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
5483 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
5484
5485 2014-03-27 Juanma Barranquero <lekktu@gmail.com>
5486
5487 * image.c (init_svg_functions): When loading SVG-related libraries,
5488 free already loaded libraries if the initialization fails.
5489 (rsvg_handle_set_size_callback): Remove declaration, unused.
5490
5491 2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
5492
5493 Fix core dump in char-equal (Bug#17011).
5494 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
5495 unibyte buffers, as we can't tell whether the characters are
5496 actually unibyte.
5497
5498 * insdel.c (adjust_markers_for_delete): Remove unused local.
5499
5500 2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
5501
5502 Have (MARKER . ADJUSTMENT) undo records always be immediately
5503 after their corresponding (TEXT . POS) record in undo list.
5504 (Bug#16818)
5505 * lisp.h (record-delete): New arg record_markers.
5506 (record_marker_adjustment): No longer needed outside undo.c.
5507 * insdel.c (adjust_markers_for_delete): Move calculation of marker
5508 adjustments to undo.c's record_marker_adjustments. Note that
5509 fileio.c's decide_coding_unwind is another caller to
5510 adjust_markers_for_delete. Because it has undo list bound to t,
5511 it does not rely on adjust_markers_for_delete to record marker
5512 adjustments.
5513 (del_range_2): Swap call to record_delete and
5514 adjust_markers_for_delete so as undo marker adjustments are
5515 recorded before current deletion's adjustments, as before.
5516 (adjust_after_replace):
5517 (replace_range): Pass value for new record_markers arg to
5518 delete_record.
5519 * undo.c (record_marker_adjustment): Rename to
5520 record_marker_adjustments and made static.
5521 (record_delete): Check record_markers arg and call
5522 record_marker_adjustments.
5523 (record_change): Pass value for new record_markers arg to
5524 delete_record.
5525 (record_point): at_boundary calculation no longer needs to account
5526 for marker adjustments.
5527
5528 2014-03-26 Martin Rudalics <rudalics@gmx.at>
5529
5530 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
5531 (Bug#17077).
5532
5533 2014-03-26 Glenn Morris <rgm@gnu.org>
5534
5535 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
5536
5537 2014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
5538
5539 * buffer.c (struct sortvec): Add field `spriority'.
5540 (compare_overlays): Use it.
5541 (sort_overlays): Set it.
5542
5543 2014-03-26 Eli Zaretskii <eliz@gnu.org>
5544
5545 * xdisp.c (redisplay_window): If all previous attempts to find the
5546 cursor row failed, try a few alternatives before falling back to
5547 the top-most row of the window. Use row_containing_pos. (Bug#17047)
5548
5549 2014-03-26 Juanma Barranquero <lekktu@gmail.com>
5550
5551 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
5552 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
5553
5554 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
5555 variables on Windows.
5556
5557 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
5558
5559 * w32.c (unsetenv): Remove unused var `retval'.
5560 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
5561
5562 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
5563 (start_watching): Remove unused var `thr'.
5564
5565 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
5566 (find_child_console): Remove unnecesary var `thread_id'.
5567
5568 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
5569 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
5570
5571 2014-03-26 Glenn Morris <rgm@gnu.org>
5572
5573 * filelock.c (Flock_buffer): Doc tweak.
5574
5575 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
5576 * emacs.c (shut_down_emacs):
5577 * fileio.c (Finsert_file_contents, write_region):
5578 * filelock.c (top-level, syms_of_filelock):
5579 * insdel.c (prepare_to_modify_buffer_1):
5580 CLASH_DETECTION is always defined now.
5581
5582 2014-03-25 Eli Zaretskii <eliz@gnu.org>
5583
5584 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
5585 DLL handle, to speed up thread startup.
5586
5587 2014-03-25 Paul Eggert <eggert@cs.ucla.edu>
5588
5589 Handle sigmask better with nested signal handlers (Bug#15561).
5590 * atimer.c (sigmask_atimers): Remove.
5591 Remaining use rewritten to use body of this function.
5592 * atimer.c (block_atimers, unblock_atimers):
5593 * callproc.c (block_child_signal, unblock_child_signal):
5594 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
5595 New arg OLDSET. All callers changed.
5596 * atimer.c (block_atimers, unblock_atimers):
5597 * callproc.c (block_child_signal, unblock_child_signal):
5598 * keyboard.c (handle_interrupt):
5599 * sound.c (vox_configure, vox_close):
5600 Restore the old signal mask rather than unilaterally clearing bits
5601 from the mask, in case a handler is running within another
5602 handler. All callers changed.
5603 * lisp.h, process.c, process.h, term.c:
5604 Adjust decls and callers to match new API.
5605 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
5606 signal handlers aren't supposed to use floating point anyway.
5607 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
5608
5609 2014-03-23 Daniel Colascione <dancol@dancol.org>
5610
5611 Split gc_sweep into discrete functions for legibility and better
5612 stack traces.
5613
5614 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
5615 (sweep_vectors): Fix typo in comment.
5616 (sweep_conses, sweep_floats, sweep_intervals)
5617 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
5618 (gc_sweep): Call new functions, to which existing functionality is
5619 moved.
5620 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
5621
5622 2014-03-23 Juanma Barranquero <lekktu@gmail.com>
5623
5624 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
5625
5626 2014-03-23 Daniel Colascione <dancol@dancol.org>
5627
5628 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
5629 only if xic_style calls for it. This change allows Emacs to work
5630 with ibus. Also, don't leak resources if create_frame_xic fails,
5631 and stop caching xic_style across different displays.
5632 (supported_xim_styles): Make const.
5633 (best_xim_style): Remove first parameter: it's always just
5634 supported_xim_styles. Change to look at supported_xim_styles
5635 directly.
5636
5637 2014-03-23 Daniel Colascione <dancol@dancol.org>
5638
5639 * term.c (init_tty): Rearrange condition for clarity; print
5640 appropriate diagnostic.
5641
5642 2014-03-23 Daniel Colascione <dancol@dancol.org>
5643
5644 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
5645 array. (ASAN caught.)
5646
5647 2014-03-22 Glenn Morris <rgm@gnu.org>
5648
5649 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
5650
5651 2014-03-22 Daniel Colascione <dancol@dancol.org>
5652
5653 * process.c (conv_sockaddr_to_lisp): When extracting the string
5654 names of AF_LOCAL sockets, stop before reading uninitialized memory.
5655
5656 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5657
5658 Fix regression introduced by patch for Bug#10500.
5659 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
5660 * w32term.c (x_draw_image_relief): Likewise.
5661
5662 2014-03-21 Martin Rudalics <rudalics@gmx.at>
5663
5664 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
5665 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
5666 maximize a frame for odd default fonts.
5667
5668 2014-03-21 Glenn Morris <rgm@gnu.org>
5669
5670 * minibuf.c (history-length): Increase default from 30 to 100.
5671
5672 2014-03-21 Daniel Colascione <dancol@dancol.org>
5673
5674 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
5675 every time we switch to minibuffer.
5676
5677 * alloc.c (lisp_align_malloc, allocate_string_data)
5678 (allocate_vectorlike): Allow mmap allocation of lisp objects.
5679 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
5680
5681 2014-03-21 Eli Zaretskii <eliz@gnu.org>
5682
5683 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
5684 support more "verbs".
5685
5686 2014-03-21 Daniel Colascione <dancol@dancol.org>
5687
5688 Always prohibit dumping a dumped Emacs.
5689
5690 * emacs.c (might_dump): New variable.
5691 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
5692 * lisp.h (might_dump): Declare.
5693 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
5694
5695 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
5696
5697 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
5698
5699 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
5700
5701 * doc.c (store_function_docstring): Warn when we don't know where to
5702 put a docstring.
5703 (Fsubstitute_command_keys): Don't advertise the fact that
5704 text-properties are dropped, since we think it's a bug that we'll fix.
5705
5706 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
5707 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
5708 * frame.c (frame_garbaged): Make "docstring" more precise.
5709
5710 2014-03-20 Glenn Morris <rgm@gnu.org>
5711
5712 * charset.c (init_charset): When we cannot find the charsets directory,
5713 mention if EMACSDATA is set.
5714
5715 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
5716
5717 * fns.c (Frandom): Fix rare bug where the result isn't random.
5718
5719 Fix porting inconsistency about rounding to even.
5720 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
5721 This way, the unusual !HAVE_RINT case acts like the usual
5722 HAVE_RINT case, and we can fix the documentation accordingly.
5723
5724 2014-03-19 Eli Zaretskii <eliz@gnu.org>
5725
5726 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
5727 (w32_wnd_proc): Initialize the dwHoverTime member of
5728 TRACKMOUSEEVENT structure.
5729
5730 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
5731
5732 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
5733
5734 2014-03-16 Eli Zaretskii <eliz@gnu.org>
5735
5736 * search.c (find_newline): Speed up the function when using the
5737 newline cache, by halving the number of calls to
5738 region_cache_forward and region_cache_backward. (Bug#16830)
5739
5740 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
5741
5742 * buffer.c (Fset_buffer): Document return value (bug#17015).
5743
5744 2014-03-14 Martin Rudalics <rudalics@gmx.at>
5745
5746 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
5747 nil, always resize character wise to avoid potential loss of the
5748 mode line (Bug#16923 related).
5749
5750 2014-03-12 Martin Rudalics <rudalics@gmx.at>
5751
5752 * frame.c (x_set_frame_parameters): Always calculate new sizes
5753 pixelwise to avoid potential loss when rounding.
5754
5755 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
5756
5757 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
5758 * xterm.c (x_free_frame_resources): Free all allocated cursors.
5759
5760 2014-03-10 Eli Zaretskii <eliz@gnu.org>
5761
5762 * w32.c (fstatat): Don't add an extra slash if the argument ends
5763 with a slash: this fails the subsequent call to stat_worker on
5764 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
5765
5766 2014-03-09 Martin Rudalics <rudalics@gmx.at>
5767
5768 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
5769
5770 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
5771
5772 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
5773
5774 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
5775 when frame is only on one screen (Bug#14713).
5776
5777 2014-03-08 Eli Zaretskii <eliz@gnu.org>
5778
5779 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
5780 there's a valid wrap point in the display line, the last glyph
5781 cannot "just barely fit" on this row, because display_line doesn't
5782 let it. Instead, proceed as if the last glyph didn't fit, so that
5783 we eventually back up the iterator to the wrap point. This avoids
5784 delusional behavior of move_it_to, whereby it proceeds to the next
5785 display line, but sets current_x to zero for all the glyphs that
5786 without word-wrap would fit on the previous display line.
5787 One result was that visual-order cursor movement behaved erratically
5788 under word-wrap.
5789 (Fmove_point_visually): Add code to find the x coordinate of the
5790 last character before wrap point, under word-wrap on a TTY.
5791
5792 2014-03-07 Eli Zaretskii <eliz@gnu.org>
5793
5794 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
5795 also return value of MOVE_POS_MATCH_OR_ZV from
5796 move_it_in_display_line_to, when moving from beginning of line to
5797 point's position. (Bug#16961)
5798
5799 2014-03-07 Martin Rudalics <rudalics@gmx.at>
5800
5801 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
5802 * window.c (Fselect_window): Explain NORECORD and
5803 `buffer-list-update-hook' in doc-string.
5804
5805 2014-03-06 Martin Rudalics <rudalics@gmx.at>
5806
5807 * window.c (Fother_window_for_scrolling): Check that
5808 Vother_window_scroll_buffer is a buffer.
5809
5810 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
5811
5812 * xterm.c (xim_initialize): Always pass a copy of resource name
5813 to XRegisterIMInstantiateCallback and eassert whether return
5814 value is True. Passing copy is important because Xlib doesn't
5815 make its own copy and resource name argument usually points to
5816 SSDATA (Vx_resource_name), which may be changed from Lisp.
5817 (xim_close_display): For XUnregisterIMInstantiateCallback,
5818 always eassert return value and pass exactly the same values
5819 as were used for XRegisterIMInstantiateCallback.
5820 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
5821 sources to check why if you are interested.
5822
5823 2014-03-05 Martin Rudalics <rudalics@gmx.at>
5824
5825 * dispnew.c (change_frame_size_1): Add new_lines instead of
5826 new_height, the latter may be still zero if passed as such.
5827 * window.c (Fwindow_pixel_height): Mention bottom divider in
5828 doc-string.
5829
5830 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
5831
5832 Fix "resource temporarily unavailable" with xgselect
5833 (Bug#16925).
5834 * xgselect.c: Include <stdbool.h>.
5835 (xg_select) [!USE_GTK]: Don't lose track of errno.
5836
5837 Fix minor --enable-gcc-warnings issues.
5838 * widget.c (update_various_frame_slots, EmacsFrameResize):
5839 Avoid unused locals. Prefer 'if' to '#if' when either will do.
5840
5841 2014-03-04 Ken Brown <kbrown@cornell.edu>
5842
5843 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
5844 represent the actual adjustment needed for alignment.
5845
5846 2014-03-04 Eli Zaretskii <eliz@gnu.org>
5847
5848 * gmalloc.c (aligned_alloc): Don't allocate more memory than
5849 needed, and don't reallocate if the initial allocation already
5850 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
5851
5852 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5853
5854 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
5855 (Bug#16932)
5856
5857 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
5858
5859 * cmds.c (delete-char): Update docstring pointing out that the
5860 function ignores `delete-active-region' and `overwrite-mode'.
5861
5862 2014-03-03 Eli Zaretskii <eliz@gnu.org>
5863
5864 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
5865
5866 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
5867 allocated buffer due to alignment.
5868 (freehook): If the block to be freed was allocated by
5869 'aligned_alloc', find its real pointer before calling 'free'.
5870 (Bug#16901)
5871 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
5872 backtrace.
5873
5874 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
5875
5876 * font.c (toplevel): Adjust comment about font cache layout.
5877 (font_clear_cache): Fix to match real font cache layout.
5878 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
5879 (Fframe_font_cache) [FONT_DEBUG]: New function.
5880 (syms_of_font) [FONT_DEBUG]: Defsubr it.
5881
5882 Avoid crashes when X fonts are erroneously freed on reused X
5883 'Display *' connection data (Bug#16069). Note that X font
5884 resources still may be leaked, but currently there is no way
5885 to completely avoid it.
5886 * xterm.h (struct x_display_info): New member x_id. Add comments.
5887 * xterm.c (x_display_id): New variable.
5888 (x_term_init): Assign identifier to each opened X connection.
5889 * xfont.c (struct xfont): New member x_display_id.
5890 (xfont_open): Initialize it with frame's display id.
5891 (xfont_close): Check whether font's display id matches the one
5892 recorded for the given display. Adjust comment.
5893 * xftfont.c (struct xftfont_info):
5894 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
5895
5896 2014-03-01 Martin Rudalics <rudalics@gmx.at>
5897
5898 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
5899 * window.c (Fother_window_for_scrolling): Don't try to scroll a
5900 killed Vother_window_scroll_buffer.
5901 (Vother_window_scroll_buffer): Fix doc-string accordingly.
5902
5903 2014-03-01 Eli Zaretskii <eliz@gnu.org>
5904
5905 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
5906 that start with more than 2 slashes as UNCs. (Bug#16751)
5907
5908 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
5909
5910 Fix a few crashes and leaks when cloning C strings.
5911 * alloc.c, lisp.h (dupstring): New function.
5912 * gtkutil.c (xg_get_font):
5913 * term.c (tty_default_color_capabilities):
5914 * xsettings.c (store_monospaced_changed)
5915 (store_font_name_changed, parse_settings)
5916 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
5917 This avoids some unlikely crashes due to accessing freed storage,
5918 and avoids some minor memory leaks in the more-typical case.
5919
5920 2014-02-28 Martin Rudalics <rudalics@gmx.at>
5921
5922 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
5923 cursor when modeline can't be dragged (Bug#16647).
5924
5925 2014-02-28 Glenn Morris <rgm@gnu.org>
5926
5927 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
5928 from custom-delayed-init-variables. (Bug#11565)
5929
5930 2014-02-27 Martin Rudalics <rudalics@gmx.at>
5931
5932 More fixes for mouse glyph calculations (Bug#16647).
5933 * window.c (coordinates_in_window): In intersection of
5934 horizontal and vertical window dividers prefer the horizontal
5935 one. Add some extra parens to last fix.
5936 (window_relative_x_coord): Return x-coordinate for header and
5937 mode line too.
5938 * xdisp.c (remember_mouse_glyph): In text area don't extend
5939 glyph into mode line to show the vertical drag cursor there
5940 immediately. Subdivide mouse glyphs in right fringes to show a
5941 horizontal drag cursor as soon as we enter the "grabbable width"
5942 portion. Handle vertical border case separately. Do not
5943 subdivide window divider areas.
5944 (note_mouse_highlight): On bottom divider of bottommost windows
5945 show vertical drag cursor only when the minibuffer window can be
5946 resized.
5947
5948 2014-02-27 Eli Zaretskii <eliz@gnu.org>
5949
5950 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
5951 reset by the face of the object just displayed. See also bug#76.
5952 (get_next_display_element): If the string came from a display
5953 property, examine the box face attribute at it->position, not at
5954 it->current.pos, since the latter was not updated yet. (Bug#16870)
5955 (handle_face_prop): Improve commentary.
5956
5957 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
5958
5959 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
5960 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
5961
5962 2014-02-26 Martin Rudalics <rudalics@gmx.at>
5963
5964 Fixes around Bug#16647.
5965 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
5966 ON_BOTTOM_DIVIDER cases.
5967 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
5968 only if the window has no right divider.
5969 (Fcoordinates_in_window_p): Fix doc-string.
5970
5971 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
5972
5973 * lread.c (Funintern): Fix doc to match advertised calling convention.
5974
5975 2014-02-24 Daniel Colascione <dancol@dancol.org>
5976
5977 * keyboard.c (read_char): Close race that resulted in lost events.
5978
5979 2014-02-22 Glenn Morris <rgm@gnu.org>
5980
5981 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
5982 * window.c (window-resize-pixelwise): Doc fixes.
5983
5984 * process.c (Finternal_default_process_filter)
5985 (Finternal_default_process_sentinel): Doc tweaks.
5986
5987 2014-02-21 Glenn Morris <rgm@gnu.org>
5988
5989 * process.c (Fprocess_buffer, Faccept_process_output)
5990 (Finternal_default_process_filter, Finternal_default_process_sentinel):
5991 Doc fixes.
5992
5993 2014-02-21 Martin Rudalics <rudalics@gmx.at>
5994
5995 * window.c (Fwindow_scroll_bar_width): New function.
5996
5997 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
5998
5999 Pacify GCC when configuring with --enable-gcc-warnings.
6000 * xdisp.c (move_it_in_display_line_to) [lint]:
6001 Initialize recently-added local.
6002
6003 2014-02-21 Daniel Colascione <dancol@dancol.org>
6004
6005 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
6006
6007 2014-02-20 Eli Zaretskii <eliz@gnu.org>
6008
6009 * xdisp.c (init_iterator): Don't dereference a bogus face
6010 pointer. (Bug#16819)
6011 (try_cursor_movement): Don't use cursor position if
6012 set_cursor_from_row failed to compute it. This avoids assertion
6013 violations in MATRIX_ROW.
6014 (move_it_in_display_line_to): Save the iterator state in ppos_it
6015 only once per call. Reimplement the method used to return to the
6016 best candidate position if all the positions found in display line
6017 are beyond TO_CHARPOS. This cuts down the number of calls to
6018 bidi_shelve_cache, which moves a lot of stuff when lines are long
6019 and include bidirectional text. (Bug#15555)
6020
6021 2014-02-20 Glenn Morris <rgm@gnu.org>
6022
6023 * data.c (Fdefalias): Doc fix.
6024
6025 2014-02-19 Eli Zaretskii <eliz@gnu.org>
6026
6027 * xdisp.c (display_line): Fix horizontal scrolling of large images
6028 when fringes are turned off. This comes at a price of not
6029 displaying the truncation/continuation glyphs in this case.
6030 (Bug#16806)
6031
6032 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
6033 CreateDIBSection returns an error indication, zero out *ximg after
6034 destroying the image. This avoids crashes in memory allocations
6035 due to the fact that some of the callers also call
6036 x_destroy_x_image, which will attempt to free an already free'd
6037 block of memory.
6038
6039 2014-02-18 Martin Rudalics <rudalics@gmx.at>
6040
6041 * widget.c (update_various_frame_slots): Don't set
6042 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
6043
6044 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
6045
6046 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
6047
6048 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
6049
6050 temacs --daemon fix (Bug#16599).
6051 * emacs.c (main): Initialize daemon_pipe[1] here ...
6052 (syms_of_emacs): ... instead of here.
6053
6054 2014-02-16 Anders Lindgern <andlind@gmail.com>
6055
6056 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
6057 is set (Bug#16505).
6058
6059 2014-02-16 Daniel Colascione <dancol@dancol.org>
6060
6061 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
6062 (xd_get_connection_address): Use it.
6063 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
6064 xd_get_connection_address because the latter signals if the bus
6065 we're trying to close is already disconnected.
6066
6067 2014-02-13 Eli Zaretskii <eliz@gnu.org>
6068
6069 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
6070 argument to CreateThread. This avoids segfaults on Windows 9X.
6071 Reported by oslsachem <oslsachem@gmail.com>.
6072
6073 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
6074
6075 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
6076 * unexhp9k800.c (unexec_error): New function, to simplify the code.
6077 (check_lseek): New function, to report lseek errors.
6078 (save_data_space, update_file_ptrs, read_header, write_header)
6079 (copy_file, copy_rest, unexec): Use these news functions.
6080 (update_file_ptrs): Don't assume wraparound behavior when
6081 converting a large size_t value to off_t.
6082
6083 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
6084
6085 * composite.c (fill_gstring_header): Pass positions as C integers
6086 and move parameters checking to...
6087 (Fcomposition_get_gstring): ...this function. Handle case when
6088 buffer positions are in reversed order and avoid crash (Bug#16739).
6089 Adjust docstring.
6090 * buffer.c (validate_region): Mention current buffer in error message.
6091
6092 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
6093
6094 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
6095
6096 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
6097
6098 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
6099
6100 2014-02-11 Glenn Morris <rgm@gnu.org>
6101
6102 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
6103 Replace refs to "OpenStep" in messages.
6104
6105 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
6106
6107 Avoid "." at end of error diagnostics.
6108 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
6109 * font.c (Ffont_at):
6110 * nsfns.m (ns_display_info_for_name):
6111 * nsselect.m (Fx_own_selection_internal):
6112 * nsterm.m (performDragOperation:):
6113 Remove "." from end of diagnostic.
6114
6115 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
6116
6117 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
6118 unintuitive (bug#15824).
6119 (Fyes_or_no_p): Doc fix (bug#15456).
6120
6121 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
6122
6123 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
6124 and avoid warning.
6125 * eval.c (call_debugger): When exiting the debugger, do not allow
6126 max_specpdl_size less than actual binding depth (Bug#16603).
6127 (syms_of_eval): Adjust docstring.
6128
6129 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
6130
6131 * cmds.c (Fself_insert_command): Output a clearer error message on
6132 negative repetitions (bug#9476).
6133
6134 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
6135
6136 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
6137
6138 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
6139
6140 * minibuf.c (Fread_string): Doc clarification (bug#15422).
6141
6142 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
6143
6144 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
6145
6146 * keyboard.c (Frecursive_edit): Fix typo in docstring.
6147
6148 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
6149
6150 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
6151
6152 * keyboard.c (Frecursive_edit): Say more precicely how throwing
6153 `exit' works (bug#15865).
6154
6155 2014-02-07 Martin Rudalics <rudalics@gmx.at>
6156
6157 Constrain window box/body sizes and margin widths (Bug#16649).
6158 * xdisp.c (window_box_width): Don't return less than zero.
6159 (window_box_left_offset, window_box_right_offset): Don't return
6160 more than the window's pixel width.
6161 * window.c (window_body_height, window_body_width): Don't return
6162 negative value.
6163 (window_resize_apply): Adjust margin width, if necessary.
6164
6165 2014-02-07 Glenn Morris <rgm@gnu.org>
6166
6167 * nsterm.m (syms_of_nsterm): Doc fix.
6168
6169 2014-02-06 Eli Zaretskii <eliz@gnu.org>
6170
6171 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
6172 New variables: pointers through which to call the respective APIs.
6173 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
6174 (filename_from_ansi, sys_link, check_windows_init_file):
6175 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
6176 This is required on Windows 9X, where we dynamically load
6177 UNICOWS.DLL which has their non-stub implementations.
6178 (maybe_load_unicows_dll): Assign addresses to these 2 function
6179 pointers after loading UNICOWS.DLL.
6180
6181 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
6182 MultiByteToWideChar and WideCharToMultiByte through function
6183 pointers.
6184
6185 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
6186 New declarations.
6187
6188 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
6189
6190 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
6191 for OSX >= 10.9 if separate spaces are used.
6192 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
6193
6194 2014-02-06 Glenn Morris <rgm@gnu.org>
6195
6196 * buffer.c (cache-long-scans): Doc fix.
6197
6198 2014-02-05 Eli Zaretskii <eliz@gnu.org>
6199
6200 * w32fns.c (Fw32_shell_execute): Doc fix.
6201
6202 2014-02-05 Bastien Guerry <bzg@gnu.org>
6203
6204 * syntax.c (Fforward_word): Call Fconstrain_to_field with
6205 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
6206
6207 2014-02-05 Martin Rudalics <rudalics@gmx.at>
6208
6209 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
6210 outside the window (Bug#16649).
6211
6212 * xdisp.c (note_mouse_highlight): When entering a margin area show
6213 a non-text cursor (Bug#16647).
6214
6215 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
6216
6217 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
6218 It prompted a compile-time diagnostic on GNU/Linux.
6219 Simplify to remove the need for the label.
6220
6221 2014-02-04 Eli Zaretskii <eliz@gnu.org>
6222
6223 * w32menu.c (w32_popup_dialog): Don't condition the whole function
6224 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
6225 to show it; otherwise return 'unsupported--w32-dialog' to signal
6226 to the caller that emulation with menus is necessary.
6227 This resurrects code inadvertently deleted by the 2013-10-08 commit.
6228 (Bug#16636)
6229 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
6230
6231 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
6232 by HAVE_DIALOGS.
6233
6234 * menu.c (Fx_popup_dialog): Don't condition the call to
6235 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
6236 special symbol 'unsupported--w32-dialog', emulate the dialog with
6237 a menu by calling x-popup-menu.
6238
6239 * menu.h (Qunsupported__w32_dialog): New extern variable.
6240
6241 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
6242
6243 * keyboard.c (kbd_buffer_get_event): Read file notification events
6244 also in batch mode.
6245
6246 * xgselect.c (xg_select): Read glib events in any case, even if
6247 there are no file descriptors to watch for. (Bug#16519)
6248
6249 2014-02-03 Martin Rudalics <rudalics@gmx.at>
6250
6251 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
6252 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
6253 * w32term.c (w32_draw_window_divider): Handle first and last
6254 pixels specially.
6255 * w32term.h (w32_fill_area_abs): New function.
6256 * xdisp.c (x_draw_right_divider): Don't draw over bottom
6257 divider.
6258 * xfaces.c (realize_basic_faces): Handle new face ids.
6259 * xfns.c (Fx_create_frame): Call x_default_parameter for right
6260 and bottom divider width.
6261 * xterm.c (x_draw_window_divider): Handle first and last pixels
6262 specially.
6263
6264 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
6265
6266 * print.c (Fexternal_debugging_output): Add cast to pacify
6267 --enable-gcc-warnings.
6268 * eval.c (call_debugger): Grow specpdl if the debugger was
6269 entered due to specpdl overflow (Bug#16603) and allow more
6270 specpdl space for the debugger itself.
6271
6272 2014-02-02 Martin Rudalics <rudalics@gmx.at>
6273
6274 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
6275 (Bug#16619)
6276
6277 2014-02-01 Eli Zaretskii <eliz@gnu.org>
6278
6279 * w32fns.c (Ffile_system_info): Use WINAPI in the function
6280 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
6281
6282 * print.c (Fexternal_debugging_output): If the argument character
6283 is non-ASCII, encode it with the current locale's encoding before
6284 writing the result to the terminal. (Bug#16448)
6285
6286 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
6287 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
6288 for it. (Bug#16558)
6289
6290 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
6291
6292 * process.c (create_process): Reset SIGPROF handler in the child.
6293 * callproc.c (call_process): Likewise.
6294
6295 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
6296
6297 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
6298
6299 2014-01-29 Eli Zaretskii <eliz@gnu.org>
6300
6301 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
6302 of zero to print strings, GDB doesn't like it.
6303
6304 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
6305 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
6306 we still use correct addresses. (Bug#16576)
6307
6308 2014-01-27 K. Handa <handa@gnu.org>
6309
6310 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
6311 to preserve the code detection behavior of 24.3.
6312 * coding.h (struct coding_system): New member detected_utf8_bytes.
6313 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
6314 (decode_coding_gap): Use short cut for UTF-8 file reading only
6315 when coding->detected_utf8_bytes equals to coding->src_bytes.
6316 * fileio.c (Finsert_file_contents): Cancel the previous change.
6317
6318 2014-01-29 Martin Rudalics <rudalics@gmx.at>
6319
6320 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
6321 that are not visible.
6322
6323 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
6324
6325 * xmenu.c (create_and_show_popup_menu): Handle case when no key
6326 is grabbed (Bug#16565).
6327
6328 2014-01-28 Martin Rudalics <rudalics@gmx.at>
6329
6330 * xdisp.c (last_max_ascent): Re-remove after erroneously
6331 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
6332 from 2013-03-29.
6333 (move_it_to): Re-remove reference to last_max_ascent.
6334 (Fwindow_text_pixel_size): Add iterator's max_ascent and
6335 max_descent here instead of calling line_bottom_y.
6336 Fix doc-string.
6337
6338 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
6339
6340 * terminal.c (initial_free_frame_resources): New function.
6341 (init_initial_terminal): Install new hook to free face cache
6342 on initial frame and avoid memory leak. For details, see
6343 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
6344 * xfaces.c (free_frame_faces): Adjust comment.
6345
6346 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
6347
6348 * data.c (Fstring_to_number): Document results if unparsable
6349 (Bug#16551).
6350
6351 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
6352
6353 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
6354
6355 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
6356
6357 When decoding, prefer ptrdiff_t to int for buffer positions etc.
6358 * coding.c (detect_coding_utf_8, emacs_mule_char)
6359 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
6360 (check_utf_8, decode_coding):
6361 * coding.h (struct coding_system.errors):
6362 Use ptrdiff_t, not int, for integer values derived from buffer and
6363 string positions.
6364
6365 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
6366 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
6367 before invoking decode_coding_gap, since there's just one block.
6368
6369 2014-01-25 Martin Rudalics <rudalics@gmx.at>
6370
6371 Fix handling of face attributes in Fx_create_frame (Bug#16529).
6372 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
6373 too early. Again run change_frame_size before assigning menu-
6374 and tool-bar-lines.
6375
6376 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
6377
6378 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
6379 arrives, call x_check_fullscreen, in case the new display has a
6380 different resolution. (Bug#16517)
6381
6382 2014-01-25 Eli Zaretskii <eliz@gnu.org>
6383
6384 * term.c (read_menu_input): If the selected frame changes, exit
6385 the menu.
6386 (tty_menu_show): If the selected frame changes while we displayed
6387 a menu, throw to top level. (Bug#16479)
6388
6389 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
6390
6391 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
6392
6393 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
6394
6395 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
6396 * data.c (count_one_bits_word): Fix bug (negated comparison)
6397 when BITS_PER_ULL < BITS_PER_BITS_WORD.
6398
6399 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
6400
6401 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
6402 Avoid undefined behavior by initializing display property bit of a
6403 string processed by the bidirectional iterator. For details, see
6404 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
6405
6406 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
6407
6408 Minor cleanup of previous change.
6409 * image.c (imagemagick_error, Fimagemagick_types):
6410 Omit some recently-introduced and unnecessary casts and assignments.
6411
6412 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
6413
6414 Fix two memory leaks discovered with Valgrind.
6415 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
6416 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
6417
6418 2014-01-22 Martin Rudalics <rudalics@gmx.at>
6419
6420 Fixes in window size functions around Bug#16430 and Bug#16470.
6421 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
6422 (Fwindow_mode_line_height, Fwindow_header_line_height)
6423 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
6424 Minor doc-string adjustments.
6425 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
6426 Rewrite doc-strings.
6427 (window_body_height, window_body_width): Do not count partially
6428 visible lines/columns when PIXELWISE is nil (Bug#16470).
6429 (Qfloor, Qceiling): New symbols.
6430
6431 2014-01-21 Eli Zaretskii <eliz@gnu.org>
6432
6433 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
6434 when the image cache is not yet allocated. (Bug#16509)
6435
6436 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
6437
6438 * buffer.c (Fkill_buffer): When killing an indirect buffer,
6439 re-attach intervals to its base buffer (Bug#16502).
6440 * intervals.c (set_interval_object): Move from here...
6441 * intervals.h (set_interval_object): ... to here. Fix comments.
6442
6443 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
6444
6445 Avoid undefined behavior by initializing buffer redisplay bit.
6446 Problem reported by Dmitry Antipov in
6447 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
6448 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
6449
6450 Revert some of the CANNOT_DUMP fix (Bug#16494).
6451 * lread.c (init_lread): Fix typo: NILP, not !NILP.
6452
6453 2014-01-19 Eli Zaretskii <eliz@gnu.org>
6454
6455 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
6456 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
6457 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
6458 they are replaced by macros that expand into direct calls to the
6459 corresponding functions from GDI32.DLL.
6460 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
6461 variables in the Cygwin build, they are unused.
6462
6463 2014-01-19 K. Handa <handa@gnu.org>
6464
6465 * composite.c (composition_update_it): Fix previous change.
6466
6467 2014-01-18 Eli Zaretskii <eliz@gnu.org>
6468
6469 Fix file name handling on MS-Windows 9X.
6470 * w32.c (maybe_load_unicows_dll): New function.
6471
6472 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
6473 on, to make sure we can convert file names to and from UTF-8 on
6474 Windows 9X. This fixes a failure to start up because Emacs cannot
6475 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
6476
6477 * w32font.c [WINDOWSNT]: Include w32.h.
6478 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
6479 of implementing the same stuff.
6480 Remove now unused g_b_init_is_windows_9x.
6481
6482 * w32.h (maybe_load_unicows_dll): Add prototype.
6483
6484 2014-01-17 Eli Zaretskii <eliz@gnu.org>
6485
6486 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
6487 switch to single keyboard. Prevents daemon crashes when a new
6488 client connects while we show a TTY menu in an existing client.
6489 (Bug#16479)
6490
6491 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
6492
6493 Fix MinGW64 porting problem with _setjmp.
6494 Reported by Eli Zaretskii in:
6495 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
6496 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
6497 the old _setjmp and _longjmp. All uses changed.
6498
6499 2014-01-13 Daniel Colascione <dancol@dancol.org>
6500
6501 * textprop.c (Fremove_list_of_text_properties):
6502 Correctly handle reaching the end of the interval tree. (Bug#15344)
6503
6504 2014-01-13 Martin Rudalics <rudalics@gmx.at>
6505
6506 * xdisp.c (resize_mini_window): Round height to a multiple of
6507 frame's line height. Fix bug in calculation of window start
6508 position (Bug#16424).
6509
6510 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
6511
6512 * macfont.m: Include termchar.h.
6513 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
6514 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
6515 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
6516 *_WITH_GC_* to take face and f as parameters.
6517 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
6518 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
6519
6520 2014-01-13 Daniel Colascione <dancol@dancol.org>
6521
6522 Fix menu item updating in the presence of the Unity global menu
6523 GTK+ module.
6524
6525 * gtkutil.h (xg_have_tear_offs): Add frame parameter
6526 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
6527 tear-off.
6528 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
6529 updating menus; explain why.
6530 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
6531 problem it's supposed to solve and it interferes with detecting
6532 the presence of a global menu.
6533 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
6534 parameter.
6535
6536 2014-01-11 K. Handa <handa@gnu.org>
6537
6538 * composite.c (composition_update_it): Fix indexing of
6539 LGSTRING_CHAR (Bug#15984).
6540
6541 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
6542
6543 * unexw32.c (_start) [__MINGW64__]: Define to __start.
6544
6545 2014-01-11 Eli Zaretskii <eliz@gnu.org>
6546
6547 * xdisp.c (try_window_id): Don't use this function's optimizations
6548 if overlays in the buffer displayed by the window have changed
6549 since last redisplay. (Bug#16347)
6550 (message_dolog): Fix indentation.
6551
6552 2014-01-11 Martin Rudalics <rudalics@gmx.at>
6553
6554 * frame.c (frame_resize_pixelwise): Fix doc-string.
6555
6556 2014-01-10 Martin Rudalics <rudalics@gmx.at>
6557
6558 Fix handling of internal borders (Bug#16348).
6559 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
6560 Remove internal border width from pixel width of windows.
6561 (change_frame_size_1): Don't return early when frame's pixel
6562 size changes - we still have to record the new sizes in the
6563 frame structure.
6564 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
6565 also when toolbar gets larger.
6566 * window.c (check_frame_size): Include internal_border_width in
6567 check.
6568 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
6569 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
6570 In non-toolkit/non-GTK version clear internal border.
6571 * xterm.c (x_clear_under_internal_border): New function for
6572 non-toolkit/non-GTK version.
6573 (x_after_update_window_line): In non-toolkit/non-GTK version
6574 don't do that.
6575 (handle_one_xevent, x_set_window_size):
6576 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
6577 * xterm.h (x_clear_under_internal_border): Extern it.
6578
6579 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
6580
6581 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
6582 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
6583 it again.
6584
6585 2014-01-06 Eli Zaretskii <eliz@gnu.org>
6586
6587 * xdisp.c (redisplay_window): Don't skip window redisplay if the
6588 last value of point is not equal to buffer's point. (Bug#16129)
6589
6590 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
6591
6592 Spelling fixes.
6593 * nsterm.h (updateCollectionBehavior): Rename from
6594 updateCollectionBehaviour. All uses changed.
6595
6596 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
6597 * Makefile.in (SETFATTR): New macro.
6598 (temacs$(EXEEXT)): Use it.
6599
6600 2014-01-04 Martin Rudalics <rudalics@gmx.at>
6601
6602 Fix maximization behavior on Windows (Bug#16300).
6603 * w32fns.c (w32_fullscreen_rect): Don't handle
6604 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
6605 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
6606 of SetWindowPos. Restore last placement also when leaving
6607 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
6608 but the FULLSCREEN_BOTH case.
6609
6610 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
6611
6612 Port to C89.
6613 * data.c (arithcompare_driver):
6614 * fileio.c (Fcar_less_than_car):
6615 * fns.c (internal_equal):
6616 * frame.c (delete_frame):
6617 * lisp.h (enum More_Lisp_Bits):
6618 * lread.c (read1):
6619 Avoid C99 constructs that don't work in C89.
6620 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
6621 to port to C89, which doesn't have 'long long'.
6622 (count_trailing_zero_bits): Use them.
6623
6624 2014-01-03 Chong Yidong <cyd@gnu.org>
6625
6626 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
6627
6628 2014-01-02 Martin Rudalics <rudalics@gmx.at>
6629
6630 Further adjust frame/window scrollbar width calculations.
6631 * window.c (apply_window_adjustment):
6632 Set windows_or_buffers_changed.
6633 (Fwindow_scroll_bars): Return actual scrollbar width.
6634 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
6635 For non-toolkit builds again use 14 as minimum width and set
6636 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
6637 * xterm.c (XTset_vertical_scroll_bar): Take width from
6638 WINDOW_SCROLL_BAR_AREA_WIDTH.
6639 (x_new_font): Rename wid to unit. Base calculation of new
6640 scrollbar width on toolkit used and make it analogous to that of
6641 x_set_scroll_bar_default_width.
6642 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
6643 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
6644 of GetSystemMetrics.
6645 * w32term.c (w32_set_vertical_scroll_bar): Take width from
6646 WINDOW_SCROLL_BAR_AREA_WIDTH.
6647 (x_new_font): Make it correspond to changes in xterm.c.
6648
6649 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
6650
6651 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
6652 This is a cleaner way to fix the MinGW-w64 porting problem.
6653 Check for INTPTR_MAX misconfiguration.
6654
6655 2014-01-01 Eli Zaretskii <eliz@gnu.org>
6656
6657 * search.c (newline_cache_on_off, find_newline): In indirect
6658 buffers, use the newline cache of the base buffer.
6659
6660 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
6661 buffer, invalidate the caches of its base buffer. (Bug#16265)
6662
6663 * indent.c (width_run_cache_on_off, compute_motion): In indirect
6664 buffers, use the width-run cache of the base buffer.
6665
6666 * xdisp.c (redisplay_window): When the window displays an indirect
6667 buffer, and the character widths in the display table have
6668 changed, invalidate the width-run cache of the corresponding base
6669 buffer.
6670
6671 * fileio.c (Finsert_file_contents): When invalidating the newline
6672 cache, consider the case of inserting into indirect buffer.
6673
6674 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
6675 In indirect buffers, use the paragraph cache of the base buffer.
6676
6677 2013-12-31 Martin Rudalics <rudalics@gmx.at>
6678
6679 * window.c (grow_mini_window): Fix last change.
6680
6681 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
6682
6683 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
6684
6685 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
6686
6687 * w32term.c (w32_initialize): Use LCID and LOWORD.
6688
6689 * w32proc.c (create_child): Use pid_t for 5th argument.
6690 (IsValidLocale): Don't provide prototype for MinGW64.
6691 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
6692 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
6693
6694 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
6695 MinGW64 doesn't support.
6696
6697 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
6698
6699 * w32.c (set_named_security_info): New function.
6700 (acl_set_file): Fall back on set_named_security_info if
6701 set_file_security fails.
6702 (g_b_init_set_named_security_info_w)
6703 (g_b_init_set_named_security_info_a): New static variables.
6704 (globals_of_w32): Initialize them to zero.
6705 (set_named_security_info): Set them to non-zero if the
6706 corresponding API is available.
6707 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
6708 New function typedefs.
6709
6710 2013-12-31 Martin Rudalics <rudalics@gmx.at>
6711
6712 Some more fixes following pixelwise resize changes including one
6713 for Bug#16306.
6714 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
6715 of frame_resize_pixelwise.
6716 * widget.c (pixel_to_text_size): New function.
6717 (update_wm_hints): Have size hints respect value of
6718 frame_resize_pixelwise.
6719 (EmacsFrameResize): Alway process resize requests pixelwise.
6720 * window.c (grow_mini_window): Make sure mini window is at least
6721 one line tall.
6722 * xdisp.c (display_menu_bar): Make sure menubar extends till
6723 right end of frame.
6724 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
6725 (x_set_tool_bar_lines): Calculate pixelwise.
6726 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
6727 frame_resize_pixelwise.
6728
6729 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
6730
6731 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
6732 variables not used there.
6733
6734 2013-12-30 Eli Zaretskii <eliz@gnu.org>
6735
6736 * w32.c (sys_umask): New function. (Bug#16299)
6737
6738 2013-12-30 Martin Rudalics <rudalics@gmx.at>
6739
6740 * dispnew.c (change_frame_size_1): Take old width of root window
6741 from that window's pixel width. (Bug#16284)
6742
6743 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
6744
6745 Plain copy-file no longer chmods an existing destination (Bug#16133).
6746 * fileio.c (realmask): Now a static var, not a local.
6747 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
6748 Remove arg STATPTR. All uses changed.
6749 (Fcopy_file): Do not alter permissions of existing destinations,
6750 unless PRESERVE-PERMISSIONS (renamed from
6751 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
6752 Avoid race when testing for existing destinations and for
6753 when input and output files are the same.
6754 If changing the group fails, adjust both default and
6755 preserved permissions so that access is not granted to the
6756 wrong group.
6757 (Fset_default_file_modes, init_fileio): Update realmask.
6758 (Fdefault_file_modes): Use realmask instead of calling umask.
6759
6760 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
6761
6762 Fix pipe bug with OS X emacs --daemon (Bug#16262).
6763 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
6764 flags on the daemon pipe ends before execing.
6765
6766 2013-12-28 Eli Zaretskii <eliz@gnu.org>
6767
6768 * w32fns.c (Fx_create_frame): Error out if called from a TTY
6769 session. (Bug#14739)
6770
6771 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
6772
6773 * callproc.c (Vexec_path): Document that exec-directory is in it.
6774
6775 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
6776
6777 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
6778 default.
6779
6780 2013-12-27 Chong Yidong <cyd@gnu.org>
6781
6782 * data.c (Fsymbol_function): Doc fix.
6783
6784 2013-12-26 Martin Rudalics <rudalics@gmx.at>
6785
6786 Some more tinkering with Bug#16051.
6787 * window.c (resize_frame_windows): Don't let the size of the
6788 root window drop below the frame's default character size.
6789 Never ever delete any subwindows - let the window manager do the
6790 clipping.
6791
6792 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
6793 of toolbar lines needed when they exceed the height of the root
6794 window.
6795 (unwind_create_frame_1): New function.
6796 (Fx_create_frame): Generally inhibit calling the window
6797 configuration change hook here. Remove extra call to
6798 change_frame_size - it's not needed when we don't run the
6799 configuration change hook.
6800
6801 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
6802
6803 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
6804 On my Fedora 19 platform the core dumps were so big that
6805 my desktop became nearly catatonic.
6806 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
6807 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
6808 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
6809 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
6810 a clang-only syntax.
6811 * conf_post.h (__has_feature): New macro, if not already defined.
6812 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
6813 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
6814
6815 2013-12-25 Eli Zaretskii <eliz@gnu.org>
6816
6817 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
6818 is a file name. (Bug#16252)
6819
6820 2013-12-25 Chong Yidong <cyd@gnu.org>
6821
6822 * keyboard.c (Voverriding_terminal_local_map)
6823 (Voverriding_local_map): Doc fix.
6824
6825 * keymap.c (Vemulation_mode_map_alists): Doc fix.
6826
6827 2013-12-24 Eli Zaretskii <eliz@gnu.org>
6828
6829 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
6830 file name when it is submitted to ShellExecute. Simplify code.
6831 Don't test DOCUMENT for being a string, as that is enforced by
6832 CHECK_STRING. Doc fix.
6833
6834 2013-12-23 Eli Zaretskii <eliz@gnu.org>
6835
6836 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
6837 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
6838 redisplay_tool_bar does. Improve and fix commentary.
6839 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
6840 limits of the glyph matrices. (Bug#16051)
6841 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
6842 only when the new size is different from the old one, and the new
6843 size can be achieved given the frame height.
6844
6845 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
6846
6847 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
6848
6849 2013-12-23 Glenn Morris <rgm@gnu.org>
6850
6851 * lread.c (Fload): Mention load-prefer-newer in doc.
6852
6853 2013-12-22 Martin Rudalics <rudalics@gmx.at>
6854
6855 Handle Bug#16207 by being more restrictive when running hooks.
6856 * window.c (unwind_change_frame): New function.
6857 (Fset_window_configuration): Don't run configuration change hook
6858 while the frame configuration is unsafe. Call select_window
6859 twice.
6860
6861 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
6862
6863 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
6864
6865 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
6866
6867 * nsterm.h: Declare EmacsColor category.
6868
6869 * nsterm.m (NSColor): Implement EmacsColor category.
6870 (ns_get_color): Use colorUsingDefaultColorSpace.
6871 (ns_get_color, ns_term_init): Use colorForEmacsRed.
6872
6873 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
6874
6875 2013-12-21 Eli Zaretskii <eliz@gnu.org>
6876
6877 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
6878 having the PNG_NORETURN attribute, to avoid compiler warning in
6879 my_png_error.
6880
6881 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6882
6883 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
6884
6885 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
6886 fringe background extension.
6887 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
6888 because they are now always the same as `left' and `width',
6889 respectively. Remove code for the case that `width' and
6890 `sb_width' are different.
6891
6892 2013-12-20 Martin Rudalics <rudalics@gmx.at>
6893
6894 Remove scroll_bar_actual_width from frames.
6895 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
6896 * frame.c (Fscroll_bar_width): Return scroll bar area width.
6897 (x_figure_window_size):
6898 * nsterm.m (x_set_window_size):
6899 * widget.c (set_frame_size):
6900 * w32term.c (x_set_window_size):
6901 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
6902 scroll_bar_actual_width.
6903
6904 Convert scroll_bar members to integers on Windows.
6905 * w32term.h (struct scroll_bar): Convert top, left, width,
6906 height, start, end and dragging to integers.
6907 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
6908 scroll_bar members.
6909 * w32term.c (w32_set_scroll_bar_thumb)
6910 (w32_scroll_bar_handle_click): Remove XINT conversions for
6911 scroll_bar members. Treat bar->dragging as integer.
6912 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
6913 first element. Remove XINT conversions for scroll_bar members.
6914 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
6915 Remove XINT conversions for scroll_bar members.
6916
6917 Fix assignment for new window total sizes.
6918 * window.c (Fwindow_resize_apply_total): Assign values for
6919 minibuffer window.
6920
6921 2013-12-20 Chong Yidong <cyd@gnu.org>
6922
6923 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
6924 argument to `append'.
6925
6926 2013-12-19 Eli Zaretskii <eliz@gnu.org>
6927
6928 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
6929 current text face, for extending the face of the display margins.
6930 (Bug#16192)
6931
6932 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
6933 Doc fix. (Bug#16190)
6934
6935 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
6936
6937 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
6938 Remove.
6939
6940 * nsterm.m (Qfile, Qurl): New.
6941 (EV_MODIFIERS2): New macro.
6942 (EV_MODIFIERS): Use EV_MODIFIERS2.
6943 (ns_term_init): Remove font and color from DND, does not work on
6944 newer OSX, and other ports don't have them.
6945 (performDragOperation:): Handle modifiers used during drag.
6946 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
6947 Remove global Lisp variables used to communicate with ns-win.el.
6948 Remove font and color handling.
6949 (syms_of_nsterm): Defsym Qfile and Qurl.
6950
6951 2013-12-19 Anders Lindgren <andlind@gmail.com>
6952
6953 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
6954 (ns_constrain_all_frames, x_set_offset): Remove assignment to
6955 dont_constrain.
6956 (updateFrameSize:, windowWillResize:toSize:): Add trace.
6957 (constrainFrameRect): Remove special case nr_screens == 1.
6958 Don't constrain size to size of view.
6959
6960 * nsterm.h (ns_output): Remove dont_constrain.
6961
6962 2013-12-19 Anders Lindgren <andlind@gmail.com>
6963
6964 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
6965
6966 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
6967
6968 Minor fixes for recent openp changes.
6969 * lisp.h (GCPRO7): New macro.
6970 * lread.c (openp): Use bool for boolean; all callers changed.
6971 Protect save_string from GC. Don't assume that file descriptors
6972 are nonzero. Redo save_mtime comparison to avoid bogus GCC
6973 warning about uninitialized variable.
6974
6975 2013-12-18 Eli Zaretskii <eliz@gnu.org>
6976
6977 * w32fns.c (emacs_abort): Use intptr_t as argument of
6978 INT_BUFSIZE_BOUND, to avoid compiler warnings.
6979
6980 2013-12-18 Glenn Morris <rgm@gnu.org>
6981
6982 * lread.c (Fload): Pass load_prefer_newer to openp.
6983 Don't bother checking mtime if openp already did it.
6984 (openp): Add `newer' argument, to check all suffixes
6985 and find the newest file.
6986 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
6987 * callproc.c (call_process):
6988 * charset.c (load_charset_map_from_file):
6989 * emacs.c (init_cmdargs):
6990 * image.c (x_create_bitmap_from_file, x_find_image_file):
6991 * lisp.h (openp):
6992 * lread.c (Flocate_file_internal):
6993 * process.c (Fformat_network_address):
6994 * sound.c (Fplay_sound_internal):
6995 * w32.c (check_windows_init_file):
6996 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
6997
6998 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
6999
7000 2013-12-17 Eli Zaretskii <eliz@gnu.org>
7001
7002 * w32.c (getloadavg): Don't index samples[] array with negative
7003 indices. Recover from wall-clock time being set backwards.
7004
7005 * w32term.c (w32_initialize): Declare the argument of
7006 set_user_model as const.
7007
7008 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
7009 (w32_menu_show): Constify some arguments passed to MessageBox.
7010
7011 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
7012 to initialize Lisp objects.
7013
7014 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
7015 initialize Lisp objects.
7016
7017 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
7018 use variables used only on X under that condition.
7019
7020 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
7021 variables not used there.
7022
7023 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
7024
7025 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
7026 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
7027
7028 2013-12-16 Eli Zaretskii <eliz@gnu.org>
7029
7030 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
7031 code, revealed in presence of R2L characters, character
7032 compositions, and display vectors. A better fix for Bug#16148.
7033 (extend_face_to_end_of_line): Don't reference tool_bar_window in
7034 GTK and NS builds, they don't have this member of struct frame.
7035
7036 * dispextern.h (struct composition_it): Correct a comment for the
7037 'width' member.
7038
7039 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
7040
7041 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
7042 This prevents a compilation error on C compilers that do not
7043 default functions to return 'int' if not declared. Also, add
7044 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
7045 since it now uses inline functions.
7046
7047 2013-12-16 Eli Zaretskii <eliz@gnu.org>
7048
7049 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
7050 display margins on mode line, header line, and in the frame's
7051 tool-bar window. (Bug#16165)
7052
7053 2013-12-16 Andreas Schwab <schwab@suse.de>
7054
7055 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
7056
7057 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
7058
7059 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
7060 `CHECK_LIST_CONS'.
7061
7062 2013-12-16 Martin Rudalics <rudalics@gmx.at>
7063
7064 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
7065
7066 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
7067
7068 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
7069 intended to find bogus pointers in font objects (Bug#16140).
7070 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
7071 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
7072 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
7073 Disable for MS-Windows due to Bug#15876; apparently this
7074 requires more or less substantial changes in fontset code.
7075 * xfont.c (xfont_close):
7076 * xftfont.c (xftfont_close): Call x_display_info_for_display
7077 to check whether 'Display *' is valid (Bug#16093 and probably
7078 Bug#16069).
7079
7080 2013-12-15 Eli Zaretskii <eliz@gnu.org>
7081
7082 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
7083 Reported by Juanma Barranquero <lekktu@gmail.com>.
7084
7085 * process.c (Fprocess_send_eof): Don't crash if someone tries to
7086 open a pty on MS-Windows. (Bug#16152)
7087
7088 * emacs.c (decode_env_path): Fix bogus comparison against
7089 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
7090
7091 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
7092
7093 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
7094 (Fx_file_dialog): Add parentheses around && to silence warning.
7095
7096 * w32term.c (construct_drag_n_drop): Remove unused local variable.
7097
7098 2013-12-15 Eli Zaretskii <eliz@gnu.org>
7099
7100 * xdisp.c (extend_face_to_end_of_line): Extend background of
7101 non-default face in margin areas as well. (Bug#16151)
7102 (display_line): Call extend_face_to_end_of_line for continued
7103 lines as well, if the display margins have non-zero width.
7104 (set_glyph_string_background_width): When needed, set the
7105 extends_to_end_of_line_p flag on glyph strings to be drawn in
7106 margin areas, not only in the text area.
7107
7108 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
7109 startup.
7110
7111 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
7112
7113 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
7114 Don't worry about verify_error being t, since it has to be a list.
7115
7116 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
7117
7118 Use bool for boolean, focusing on headers.
7119 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
7120 No need to include <stdbool.h>, since conf_post.h does it now.
7121 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
7122 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
7123 (SET_PER_BUFFER_VALUE_P):
7124 * ccl.c, ccl.h (setup_ccl_program):
7125 * ccl.h (CHECK_CCL_PROGRAM):
7126 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
7127 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
7128 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
7129 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
7130 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
7131 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
7132 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
7133 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
7134 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
7135 (CHARSET_FAST_MAP_SET):
7136 * coding.c (decode_coding_ccl, encode_coding_ccl):
7137 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
7138 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
7139 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
7140 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
7141 (decode_coding_c_string):
7142 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
7143 * conf_post.h (has_attribute):
7144 * dispextern.h (trace_redisplay_p)
7145 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
7146 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
7147 (SET_GLYPH_FROM_CHAR_GLYPH)
7148 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
7149 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
7150 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
7151 (cursor_in_mouse_face_p):
7152 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
7153 (blank_row, prepare_desired_row)
7154 (build_frame_matrix_from_leaf_window, make_current)
7155 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
7156 (update_window, scrolling_window, update_frame_line):
7157 * disptab.h (GLYPH_FOLLOW_ALIASES):
7158 * editfns.c (Fformat):
7159 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
7160 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
7161 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
7162 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
7163 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
7164 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
7165 (FONT_DEFERRED_LOG):
7166 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
7167 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
7168 (FRAME_MOUSE_UPDATE):
7169 * fringe.c (Fdefine_fringe_bitmap):
7170 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
7171 (x_create_bitmap_from_xpm_data, xpm_load_image):
7172 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
7173 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
7174 (MERGE_INTERVAL_CACHE):
7175 * keymap.h (KEYMAPP):
7176 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
7177 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
7178 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
7179 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
7180 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
7181 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
7182 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
7183 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
7184 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
7185 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
7186 (SETUP_BUFFER_SYNTAX_TABLE):
7187 * systime.h (timespec_valid_p):
7188 * term.c (save_and_enable_current_matrix):
7189 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
7190 * xdisp.c (in_display_vector_p, display_tool_bar_line)
7191 (redisplay_internal, try_window_reusing_current_matrix)
7192 (sync_frame_with_window_matrix_rows, try_window_id)
7193 (display_menu_bar, display_tty_menu_item, display_mode_line)
7194 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
7195 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
7196 * xmenu.c (xmenu_show):
7197 * xterm.c (use_xim, x_term_init):
7198 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
7199 (struct x_bitmap_record):
7200 Use bool for booleans.
7201 * ccl.c (struct buffer_text):
7202 * ccl.h (struct ccl_program):
7203 * charset.h (struct charset):
7204 * cm.h (struct cm):
7205 * coding.h (struct iso_2022_spec, struct coding_system):
7206 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
7207 (struct glyph_string, struct face, struct face_cache)
7208 (struct bidi_string_data, struct bidi_it)
7209 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
7210 (struct image):
7211 * editfns.c (Fformat):
7212 * frame.h (struct frame):
7213 * fringe.c (struct fringe_bitmap):
7214 * intervals.h (struct interval):
7215 * keyboard.h (struct kboard):
7216 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
7217 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
7218 (struct Lisp_Buffer_Local_Value, union specbinding):
7219 * macfont.m (struct macfont_info):
7220 * process.h (struct Lisp_Process):
7221 * termchar.h (struct tty_display_info):
7222 * window.h (struct window):
7223 * xterm.h (struct x_output):
7224 Use bool_bf for boolean bit-fields.
7225 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
7226 All callers changed.
7227 * ccl.h (struct ccl_program): Remove unused members private_state,
7228 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
7229 eight_bit_control.
7230 (struct ccl_spec): Remove unused members cr_carryover,
7231 eight_bit_carryover.
7232 * conf_post.h: Include <stdbool.h>.
7233 (bool_bf): New type.
7234 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
7235 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
7236 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
7237 'do { ... } while (false)' brackets.
7238 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
7239 Args must now be expressions; all callers changed.
7240 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
7241 (PRODUCE_GLYPHS): Simplify use of boolean.
7242 * fileio.c (Fcopy_file):
7243 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
7244 * lisp.h (UNGCPRO): Return void, not int.
7245 (FOR_EACH_TAIL): Use void expression, not int expression.
7246 * region-cache.c: Reindent.
7247 * region-cache.h: Copy comments from region-cache.c, to fix
7248 incorrect remarks about booleans.
7249
7250 2013-12-14 Eli Zaretskii <eliz@gnu.org>
7251
7252 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
7253 when character at point is displayed from a display vector.
7254 (Bug#16148)
7255
7256 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
7257
7258 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
7259 now a list of certificate validation checks that will abort a
7260 connection with an error.
7261 (Fgnutls_boot): Document it and use it.
7262
7263 2013-12-14 Martin Rudalics <rudalics@gmx.at>
7264
7265 * w32term.c (w32_enable_frame_resize_hack): New variable.
7266 (x_set_window_size): Use it to hack frame resizing on Windows
7267 (Bug#16028).
7268
7269 2013-12-14 Eli Zaretskii <eliz@gnu.org>
7270
7271 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
7272 Windows-specific code to w32.c. Change error message text to
7273 match that of Posix platforms.
7274
7275 * w32.c (w32_copy_file): New function, most of the code copied and
7276 reworked from Fcopy_file. Improve error handling. Plug memory
7277 leak when errors are thrown. Support file names outside of the
7278 current codepage. (Bug#7100)
7279
7280 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
7281
7282 * lread.c (load_path_default): Prototype.
7283
7284 2013-12-13 Glenn Morris <rgm@gnu.org>
7285
7286 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
7287 (dump_path): Remove.
7288 (load-path-default): Remove `changed' argument.
7289 Do not set dump_path permanently. Simplify.
7290 (init_lread): Simplify.
7291 (syms_of_lread): Remove dump_path.
7292
7293 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
7294
7295 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
7296 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
7297 2013-12-12 font-related change to avoid Bug#16128, which
7298 is quite hard to fix without even more substantial changes.
7299
7300 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
7301
7302 * font.c (font_close_object): Check for live frame (Bug#16128).
7303
7304 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
7305
7306 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
7307 Return ptrdiff_t, not int, since it's a buffer size.
7308 Reindent/reparen some macros to a more Gnuish style.
7309
7310 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
7311
7312 Avoid undefined behavior with huge regexp interval counts.
7313 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
7314 since it's now specialized to interval counts. All uses changed.
7315 Do not assume wraparound on signed integer overflow.
7316 (regex_compile): Simplify based on the above changes.
7317
7318 2013-12-12 Eli Zaretskii <eliz@gnu.org>
7319
7320 Support file names on MS-Windows that use characters outside of
7321 the current system codepage. (Bug#7100)
7322
7323 * w32.c (get_file_security, set_file_security)
7324 (create_symbolic_link): Separate pointers and boolean flags for
7325 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
7326 non-zero, else the former.
7327 (codepage_for_filenames, filename_to_utf16, )
7328 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
7329 New functions.
7330 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
7331 characters.
7332 (normalize_filename): Lose the DBCS code, now works on UTF-8.
7333 Accept only one argument; all callers changed.
7334 (dostounix_filename): Remove the second argument, now works in
7335 UTF-8. All callers changed.
7336 (parse_root): Lose DBCS code.
7337 (get_long_basename, w32_get_short_filename, init_environment)
7338 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
7339 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
7340 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
7341 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
7342 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
7343 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
7344 otherwise.
7345 (ansi_encode_filename): New function.
7346 (get_emacs_configuration, get_emacs_configuration_options):
7347 Functions deleted.
7348 (add_volume_info, GetCachedVolumeInformation): Run the input file
7349 name through unixtodos_filename, to ensure it is stored and
7350 referenced in canonical form.
7351 (get_volume_info): Lose the DBCS code, now works in UTF-8.
7352 (logon_network_drive, sys_link, utime): Improve error handling.
7353 (sys_access): New function.
7354 (hashval, generate_inode_val): Unused functions deleted.
7355 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
7356 (check_windows_init_file): Convert error message from UTF-8 to
7357 ANSI codepage, for display in the message box.
7358 (globals_of_w32): Set w32_unicode_filenames according to the OS
7359 version.
7360
7361 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
7362 w32_unicode_filenames is non-zero, ANSI mode otherwise.
7363 (syms_of_w32term): Declare w32-unicode-filenames.
7364
7365 * w32proc.c (new_child, delete_child): Remove code that handled
7366 unused pending_deletion and input_file members of the child struct.
7367 (create_child, sys_spawnve): Convert all file names to ANSI
7368 codepage. Use ANSI APIs explicitly; forcibly fail if any file
7369 name cannot be encoded in ANSI codepage. Don't use
7370 unixtodos_filename, mirror slashes by hand.
7371 (record_infile, record_pending_deletion): Functions deleted.
7372 (Fw32_short_file_name): Call w32_get_short_filename instead of
7373 GetShortPathName.
7374
7375 * w32notify.c (add_watch): Work in Unicode mode when
7376 w32_unicode_filenames is non-zero, ANSI mode otherwise.
7377 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
7378 instead, do the same with Lisp primitives.
7379
7380 * w32fns.c (file_dialog_callback, Fx_file_dialog)
7381 (Fsystem_move_file_to_trash, Fw32_shell_execute)
7382 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
7383 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
7384 (Fw32_shell_execute): Improve error reporting.
7385 (Fdefault_printer_name): Ifdef away for Cygwin.
7386
7387 * w32.h (struct _child_process): Remove input_file and
7388 pending_deletion members that are no longer used.
7389 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
7390 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
7391 (ansi_encode_filename): New and updated prototypes.
7392
7393 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
7394 APIs explicitly.
7395 (unexec): Don't use dostounix_filename, it expects a file name in
7396 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
7397 ANSI encoding.
7398
7399 * fileio.c (Ffile_name_directory, file_name_as_directory)
7400 (directory_file_name, Fexpand_file_name)
7401 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
7402 arguments of dostounix_filename.
7403 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
7404 use MAX_UTF8_PATH for size of file-name strings.
7405 (emacs_readlinkat): Build an explicitly unibyte string for file
7406 names.
7407 (syms_of_fileio) <file-name-coding-system>:
7408 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
7409
7410 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
7411 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
7412 directories to UTF-8.
7413 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
7414 environment, and each element of the input PATH, to UTF-8.
7415
7416 * dired.c (file_attributes): Use build_unibyte_string explicitly
7417 to make Lisp strings from user and group names.
7418
7419 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
7420 decode_file.
7421
7422 * coding.c (decode_file_name, encode_file_name): New functions.
7423
7424 * termcap.c (tgetent): Adapt to the change in arguments of
7425 dostounix_filename.
7426
7427 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
7428 names.
7429
7430 * msdos.c (dostounix_filename, init_environment): Adapt to the
7431 change in arguments of dostounix_filename.
7432
7433 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
7434 [WINDOWSNT]: Encode file names passed to the image libraries in
7435 ANSI codepage.
7436
7437 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
7438 [WINDOWSNT]: Convert file names to the current ANSI codepage.
7439
7440 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
7441 arguments of dostounix_filename.
7442
7443 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
7444
7445 * font.h (struct font_entity) [HAVE_NS]: New field to record
7446 font driver which was used to create this entity.
7447 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
7448 frame where the font was opened.
7449 (font_close_object): Add prototype.
7450 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
7451 (font_close_object): Not static any more. Lost frame arg.
7452 Adjust comment and users.
7453 * alloc.c (cleanup_vector): Call font_close_object to adjust
7454 per-frame font counters correctly. If HAVE_NS, also call
7455 driver-specific cleanup for font-entity objects.
7456 * ftfont.c (ftfont_open):
7457 * nsfont.m (nsfont_open):
7458 * w32font.c (w32font_open_internal):
7459 * xfont.c (xfont_open):
7460 * xftfont.c (xftfont_open): Save frame pointer in font object.
7461 * macfont.m (macfont_open): Likewise.
7462 (macfont_descriptor_entity): Save driver pointer to be able
7463 to call its free_entity routine when font-entity is swept.
7464 * ftxfont.c (ftxfont_open): Add eassert because frame
7465 pointer should be saved by ftfont_driver.open.
7466
7467 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
7468
7469 * xterm.c (x_make_frame_visible): Restore hack which is needed when
7470 input polling is used. This is still meaningful for Cygwin, see
7471 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
7472 * keyboard.c (poll_for_input_1, input_polling_used):
7473 Define unconditionally.
7474 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
7475 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
7476 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
7477 (font_for_char): Prefer ptrdiff_t to int for buffer position.
7478 (face_for_char): Likewise. Rearrange eassert and return ASCII
7479 face for CHAR_BYTE8_P.
7480 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
7481
7482 2013-12-11 Ken Brown <kbrown@cornell.edu>
7483
7484 * dispextern.h (erase_phys_cursor):
7485 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
7486
7487 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
7488
7489 * nsterm.m (x_free_frame_resources):
7490 * term.c (tty_free_frame_resources):
7491 * xterm.c (x_free_frame_resources): Do not check for non-NULL
7492 face cache because it's implied by free_frame_faces anyway.
7493 * w32term.c (x_free_frame_resources): Likewise. Do not call
7494 free_frame_faces twice.
7495
7496 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
7497
7498 * editfns.c (Fformat_time_string): Mention %F in the doc.
7499
7500 2013-12-11 Martin Rudalics <rudalics@gmx.at>
7501
7502 * window.c (resize_frame_windows): Don't return immediately when
7503 the root window's size doesn't change - the minibuffer window
7504 may still have to be repositioned/resized.
7505 * xfns.c (Fx_create_frame): Always change the frame size after
7506 initializing the frame's faces.
7507 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
7508 change_frame_size should already have done it.
7509 (x_new_font): Assign new tool- and menu-bar heights.
7510 (x_set_window_size_1): Account for tool- and menu-bar heights
7511 (Bug#16013). Don't set pixel sizes since change_frame_size
7512 should already have done it.
7513
7514 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
7515
7516 Remove the option of using libcrypto.
7517 * Makefile.in (LIB_CRYPTO): Remove.
7518 (LIBES): Don't use it.
7519
7520 2013-12-11 Juri Linkov <juri@jurta.org>
7521
7522 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
7523 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
7524
7525 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
7526
7527 * xdisp.c (display_tool_bar_line): Don't extend on a previously
7528 drawn tool bar items (Bug#16058).
7529 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
7530
7531 2013-12-09 Ken Brown <kbrown@cornell.edu>
7532
7533 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
7534
7535 * lisp.h (get_frame_param): Adjust conditions for prototype
7536 declaration.
7537
7538 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
7539
7540 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
7541 Avoid unused macro warning if configured --without-xft.
7542
7543 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
7544
7545 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
7546
7547 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
7548
7549 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
7550
7551 * emacs.c (main): Call fixup_locale a second time for GNUstep.
7552
7553 2013-12-08 Martin Rudalics <rudalics@gmx.at>
7554
7555 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
7556
7557 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
7558
7559 Use libcrypto's checksum implementations if available, for speed.
7560 * Makefile.in (LIB_CRYPTO): New macro.
7561 (LIBES): Use it.
7562
7563 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
7564 The macro didn't conform to C99 due to type mismatch,
7565 which caused compilation failure with Sun C 5.12,
7566 and it was confusing anyway. Include window.h to declare
7567 redisplay_other_windows.
7568
7569 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
7570
7571 * window.c (set_window_buffer): Update mode line (bug#16084).
7572
7573 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
7574
7575 Fix minor problems found by static checking.
7576 * keyboard.c (poll_for_input_1, input_polling_used):
7577 Define only if HAVE_NTGUI.
7578 * xmenu.c (popup_activate_callback): Omit unnecessary
7579 check against USE_X_TOOLKIT, which must be defined here anyway.
7580 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
7581 Now static.
7582
7583 2013-12-07 Martin Rudalics <rudalics@gmx.at>
7584
7585 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
7586
7587 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
7588
7589 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
7590
7591 * nsterm.m (x_set_window_size): Remove fprintf.
7592 (init): Define always. Set applicationDidFinishLaunchingCalled
7593 for GNUstep.
7594 (applicationDidFinishLaunching:):
7595 Set applicationDidFinishLaunchingCalled.
7596 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
7597 not called.
7598
7599 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
7600
7601 Pixel resize changes for NS (Bug#16049).
7602 * nsterm.m (x_set_window_size): Change parameters rows/cols to
7603 height/width. row/cols are locals.
7604 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
7605 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
7606 (windowWillResize): Remove gsextra. Calculate extra as in
7607 updateFrameSize.
7608 (x_new_font): Don't change frame size if fullscreen.
7609 Change size pixelwise.
7610
7611 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
7612 comment in xfns.c. Change to pixelwise call.
7613
7614 2013-12-06 Eli Zaretskii <eliz@gnu.org>
7615
7616 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
7617 (Bug#16070)
7618
7619 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
7620
7621 * xterm.c (input_signal_count): Remove.
7622 (x_dispatch_event): Define unconditionally.
7623 (x_make_frame_visible): Process X events until the frame
7624 is really visible (Bug#16027).
7625 * xterm.h (x_dispatch_event): Declare unconditionally.
7626
7627 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
7628
7629 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
7630
7631 * nsterm.m (x_set_window_size): Handle pixelwise.
7632
7633 2013-12-05 Martin Rudalics <rudalics@gmx.at>
7634
7635 * w32term.c (x_new_font):
7636 * xterm.c (x_new_font): Calculate new frame size from new font
7637 size (Bug#16028).
7638
7639 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
7640
7641 * lisp.h (FOR_EACH_TAIL): New macro.
7642 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
7643
7644 * window.c (select_window): Call second wset_redisplay before we change
7645 selected_window (bug#16034).
7646
7647 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
7648
7649 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
7650
7651 2013-12-04 Eli Zaretskii <eliz@gnu.org>
7652
7653 * w32xfns.c: Include window.h, to avoid a compiler warning.
7654
7655 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
7656
7657 * window.c (window_scroll): Mark window for redisplay (bug#16034).
7658 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
7659 window_scroll takes care of it.
7660 (Fset_window_point, Fdelete_other_windows_internal)
7661 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
7662 (Fsplit_window_internal, Fdelete_window_internal)
7663 (Fresize_mini_window_internal, Fset_window_configuration)
7664 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
7665 cause redisplay instead of forcing a complete redisplay.
7666 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
7667 we're only affecting the selected_window.
7668
7669 2013-12-04 Eli Zaretskii <eliz@gnu.org>
7670
7671 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
7672 directional control characters. Update type and category
7673 determination according to the UBA from Unicode v6.3.
7674 (bidi_category_t): New category EXPLICIT_FORMATTING.
7675
7676 * dispextern.h (bidi_type_t): Update to include new bidirectional
7677 properties introduced with Unicode v6.3. (Bug#16043)
7678
7679 2013-12-04 Martin Rudalics <rudalics@gmx.at>
7680
7681 * xterm.c (XTflash): Fix coordinate of bottom area to flash
7682 (Bug#16044).
7683
7684 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
7685
7686 * font.c (font_list_entities): Remove dummy assignment.
7687 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
7688 used on graphic displays only. Remove unused 'font_encoder' member.
7689 (struct font_bitmap): Remove unused 'extra' member.
7690 * nsfont.m (nsfont_open):
7691 * w32font.c (w32font_open_internal):
7692 * ftfont.c (ftfont_get_bitmap): Adjust users.
7693
7694 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
7695
7696 Use bool for boolean.
7697 * tparam.c (tparam1):
7698 * undo.c (record_point, record_property_change):
7699 Use bool for boolean, for local vars that are always true or false.
7700
7701 Minor integer overflow fixes (Bug#16033).
7702 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
7703 This improves on the previous fix to this function.
7704 (window_resize_check): When summing up pixel counts, don't rely on
7705 undefined behavior if the sum overflows.
7706
7707 2013-12-03 Martin Rudalics <rudalics@gmx.at>
7708
7709 * window.c (Fset_window_new_pixel): Don't choke at negative
7710 argument value (Bug#16033).
7711
7712 * xfns.c (Fx_create_frame): Add another call to change_frame_size
7713 to avoid crash in window_box_height.
7714
7715 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
7716 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
7717 calculation.
7718 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
7719
7720 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
7721
7722 Minor integer overflow fixes.
7723 * window.c (Fset_window_new_pixel, grow_mini_window):
7724 * xdisp.c (Fwindow_text_pixel_size):
7725 Avoid undefined behavior on signed integer overflow.
7726 * xfns.c (x_set_mouse_color):
7727 Check that drag shape fits in 'unsigned', since that's what X wants.
7728
7729 2013-12-02 Eli Zaretskii <eliz@gnu.org>
7730
7731 Improve reporting of fatal exception on MS-Windows.
7732 * w32fns.c (my_exception_handler): New function.
7733 (globals_of_w32fns): Set it up as the unhandled exception
7734 handler. Initialize exception code and address to zeros.
7735 (emacs_abort): If the exception code and address are available,
7736 print them at the beginning of the backtrace. Fix the format of
7737 printing addresses (was producing 0x0x12345678 on XP).
7738 (Bug#15994)
7739
7740 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
7741
7742 * eval.c (Fbacktrace__locals): New function.
7743 (syms_of_eval): Defsubr it.
7744
7745 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
7746
7747 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
7748 Define here to unify between...
7749 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
7750 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
7751
7752 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7753
7754 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
7755
7756 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
7757 fringe background extension.
7758 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
7759 because they are now always the same as `left' and `width',
7760 respectively. Remove code for the case that `width' and
7761 `sb_width' are different.
7762
7763 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
7764
7765 Fix minor problems found by static checking.
7766 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
7767 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
7768 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
7769
7770 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
7771
7772 * image.c (imagemagick_compute_animated_image): Don't crash if we
7773 have an animation with different-sized images (bug#15313).
7774
7775 2013-11-30 Martin Rudalics <rudalics@gmx.at>
7776
7777 Remove some unused items introduced during pixelwise change.
7778 * window.c (window_resize_total_check): Remove unused function.
7779 * xdisp.c (remember_mouse_glyph): Remove unused label.
7780 (Ftool_bar_height): Move declaration inside #if.
7781 * xterm.c (x_set_window_size): Don't use r and c.
7782
7783 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
7784
7785 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
7786 `value' and `endp'.
7787
7788 * window.c (Fset_window_configuration): Comment out unused variables.
7789
7790 * w32term.c (w32_read_socket): Remove unused variable `buf'.
7791
7792 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
7793
7794 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
7795
7796 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
7797
7798 * gnutls.c (gnutls_audit_log_function): Only declare and define if
7799 HAVE_GNUTLS3 (Bug#16001).
7800
7801 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
7802 if interrupts are deferred (Bug#15801).
7803
7804 2013-11-30 Martin Rudalics <rudalics@gmx.at>
7805
7806 Support resizing frames and windows pixelwise.
7807 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
7808 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
7809 (struct glyph_matrix): Replace window_left_col and
7810 window_top_line by window_pixel_left and window_pixel_top.
7811 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
7812 Minor rewrite.
7813 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
7814 (draw_window_divider, move_it_to, x_draw_right_divider)
7815 (x_draw_bottom_divider, change_frame_size): Add or fix
7816 declarations.
7817 * dispnew.c (change_frame_size_1): Change prototype.
7818 (adjust_glyph_matrix, required_matrix_width)
7819 (adjust_frame_glyphs_for_window_redisplay): Use pixel
7820 values instead of lines and columns.
7821 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
7822 WINDOW_TOTAL_FRINGE_WIDTH.
7823 (handle_window_change_signal, do_pending_window_change)
7824 (init_display): Adjusts calls of change_frame_size.
7825 (change_frame_size, change_frame_size_1): Handle pixelwise
7826 changes.
7827 * frame.c (Qright_divider_width, Qbottom_divider_width):
7828 New Lisp objects.
7829 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
7830 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
7831 (x_set_internal_border_width, x_set_vertical_scroll_bars)
7832 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
7833 values.
7834 (set_frame_param): New function.
7835 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
7836 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
7837 (Ffringe_width, Fborder_width, Fright_divider_width)
7838 (Fbottom_divider_width): New functions, defsubr them.
7839 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
7840 New argument pixelwise.
7841 (struct frame_parm_table): New members Qright_divider_width and
7842 Qbottom_divider_width.
7843 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
7844 (x_report_frame_params): Handle Qright_divider_width and
7845 Qbottom_divider_width.
7846 (x_set_right_divider_width, x_set_bottom_divider_width):
7847 New functions.
7848 (frame_resize_pixelwise): New option.
7849 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
7850 new_pixelwise, right_divider_width and bottom_divider_width;
7851 remove total_lines; rename text_lines, text_cols, new_text_lines
7852 and new_text_cols to text_height, text_width, new_height and
7853 new_width respectively.
7854 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
7855 FRAME_TEXT_WIDTH respectively.
7856 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
7857 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
7858 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
7859 New macros.
7860 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
7861 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
7862 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
7863 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
7864 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
7865 (FRAME_TOTAL_COLS_ARG): Remove macro.
7866 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
7867 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
7868 (x_wm_set_size_hint): Handle frame pixel sizes.
7869 * indent.c (compute_motion, Fcompute_motion):
7870 Call window_body_width instead of window_body_cols.
7871 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
7872 (make_lispy_position): Handle right and bottom dividers.
7873 (Fsuspend_emacs): Pixelize call of change_frame_size.
7874 * keyboard.h: Extern Qright_divider, Qbottom_divider.
7875 * lisp.h: Extern set_frame_param.
7876 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
7877 x_set_window_size.
7878 (Fx_create_frame): Add entry for vertical_drag_cursor.
7879 Pixelize call of change_frame_size.
7880 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
7881 * nsterm.m (ns_update_window_end): Optionally draw right
7882 divider.
7883 (x_set_window_size): Add argument pixelwise.
7884 Call check_frame_size and change_frame_size with pixelwise zero.
7885 (ns_draw_window_divider): New function.
7886 (ns_redisplay_interface): Add ns_draw_window_divider.
7887 (updateFrameSize:): Call change_frame_size with pixelwise zero.
7888 (x_new_font): Call x_set_window_size with pixelwise zero.
7889 * print.c (print_object): For a window print its sequence
7890 number again.
7891 * term.c (Fresume_tty): Pixelize call of change_frame_size.
7892 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
7893 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
7894 (w32_createwindow): Use scroll bar area width.
7895 (w32_wnd_proc): Handle bottom divider width.
7896 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
7897 (Fx_create_frame): Default divider width parameters.
7898 Caclulate sizes pixelwise. Add vertical drag cursor support.
7899 (x_create_tip_frame): Default divider widths to zero.
7900 Pixelize call to change_frame_size.
7901 (Fx_show_tip): Add handling of divider widths. Pixelize window
7902 position and sizes.
7903 (Fw32_frame_rect): New function.
7904 (frame_parm_handler w32_frame_parm_handlers): Add divider
7905 widths.
7906 (Vx_window_vertical_drag_shape): Add variable.
7907 * w32inevt.c (resize_event, maybe_generate_resize_event):
7908 Pixelize change_frame_size calls.
7909 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
7910 call.
7911 * w32term.c (w32_draw_window_divider): New function.
7912 (x_update_window_end): Handle right divider.
7913 (w32_draw_fringe_bitmap, x_scroll_run)
7914 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
7915 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
7916 Calculate new frame sizes pixelwise.
7917 (x_new_font): Pixelize call to x_set_window_size.
7918 (x_check_fullscreen): Pixelize call to change_frame_size.
7919 (x_set_window_size_1, x_set_window_size): New argument
7920 pixelwise. Calculate pixelwise.
7921 (x_wm_set_size_hint): Use scroll bar area width.
7922 (w32_redisplay_interface): Add w32_draw_window_divider.
7923 * w32term.h (struct w32_output): Add vertical drag cursor.
7924 * widget.c (set_frame_size, update_wm_hints)
7925 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
7926 change_frame_size.
7927 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
7928 * window.c (sequence_number): Restore.
7929 (Fwindow_pixel_width, Fwindow_pixel_height)
7930 (Fwindow_mode_line_height, Fwindow_header_line_height)
7931 (window_pixel_to_total, Frun_window_scroll_functions)
7932 (Fset_window_new_pixel, window_resize_apply_total)
7933 (Fwindow_resize_apply_total): New functions.
7934 (window_body_height, window_body_width): Rename from
7935 window_body_lines. New argument PIXELWISE.
7936 Calculate pixelwise.
7937 (Fwindow_body_height, Fwindow_body_width): New argument
7938 PIXELWISE.
7939 (coordinates_in_window, window_relative_x_coord): Use window's
7940 pixel width instead of total width.
7941 (replace_window, recombine_windows): Initialize pixel values.
7942 (resize_root_window, resize_frame_windows, grow_mini_window)
7943 (shrink_mini_window): New argument PIXELWISE.
7944 Calculate pixelwise.
7945 (Fdelete_other_windows_internal, adjust_window_margins)
7946 (window_resize_check, window_resize_apply)
7947 (Fdelete_window_internal, Fresize_mini_window_internal)
7948 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
7949 (check_frame_size): Rename arguments. New argument PIXELWISE.
7950 Calculate pixelwise.
7951 (set_window_buffer): Make samebuf bool. Run configuration change
7952 hook only if buffer changed.
7953 (Fset_window_buffer): Rewrite doc-string.
7954 (make_window): Initialize new_pixel slot.
7955 (Fwindow_resize_apply): Check pixel size of root window.
7956 (Fsplit_window_internal): Call 2nd argument pixel_size.
7957 Calculate pixelwise.
7958 (Fscroll_left, Fscroll_right): Call window_body_width instead of
7959 window_body_cols.
7960 (save_window_data): New slots frame_text_width,
7961 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
7962 (saved_window): New slots pixel_left, pixel_top, pixel_height,
7963 pixel_width.
7964 (Fcurrent_window_configuration, Fset_window_configuration)
7965 (save_window_save, compare_window_configurations): Handle new
7966 slots in save_window_data and saved_window.
7967 (Fset_window_scroll_bars): Fix doc-string.
7968 (window_resize_pixelwise): New variable.
7969 (coordinates_in_window, Fcoordinates_in_window_p):
7970 Handle dividers.
7971 (make_parent_window): Adjust sequence_number.
7972 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
7973 New functions.
7974 * window.h (struct window): New members new_pixel, pixel_left,
7975 pixel_top, pixel_width, pixel_height. Restore sequence_number.
7976 (wset_new_pixel): New function.
7977 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
7978 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
7979 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
7980 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
7981 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
7982 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
7983 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
7984 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
7985 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
7986 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
7987 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
7988 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
7989 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
7990 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
7991 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
7992 Rewrite.
7993 (resize_frame_windows, grow_mini_window, shrink_mini_window)
7994 (window_body_width, check_frame_size): Adapt external declarations.
7995 * xdisp.c (last_max_ascent): New integer.
7996 (window_text_bottom_y): Handle bottom divider.
7997 (window_box_width, window_box_height): Calculate pixelwise.
7998 (get_glyph_string_clip_rects): Handle right divider.
7999 (remember_mouse_glyph): When windows are resized pixelwise
8000 proceed with width and height set to 1.
8001 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
8002 WINDOW_TOTAL_WIDTH.
8003 (move_it_to): Calculate and return maximum x position
8004 encountered.
8005 (Fwindow_text_pixel_size): New function.
8006 (resize_mini_window, update_tool_bar): Calculate pixelwise.
8007 (tool_bar_lines_needed): Rename to tool_bar_height.
8008 Calculate pixelwise.
8009 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
8010 Calculate pixelwise.
8011 (redisplay_tool_bar): Calculate pixelwise.
8012 (redisplay_window): Calculate pixelwise. Handle dividers.
8013 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
8014 (x_draw_vertical_border): Handle dividers.
8015 (define_frame_cursor1): Handle vertical drag cursor.
8016 (x_draw_right_divider, x_draw_bottom_divider): New functions.
8017 (expose_window): Calculate pixelwise. Handle dividers.
8018 (init_xdisp): Initialize pixel values.
8019 * xfaces.c (Qwindow_divider): New face.
8020 (realize_basic_faces): Realize it.
8021 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
8022 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
8023 (x_set_scroll_bar_default_width): Default actual width to 16.
8024 (Fx_create_frame): Set sizes pixelwise.
8025 (x_create_tip_frame): Default divider widths to zero.
8026 Pixelize call of change_frame_size.
8027 (Fx_show_tip): Handle divider widths. Initial pixel position
8028 and sizes.
8029 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
8030 (Vx_window_vertical_drag_shape): New option.
8031 * xmenu.c (free_frame_menubar): Pixelize call of
8032 x_set_window_size.
8033 * xterm.c (x_draw_window_divider): New function.
8034 (x_update_window_end): Optionally draw right divider.
8035 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
8036 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
8037 (handle_one_xevent, x_new_font): Calculate pixelwise.
8038 (x_set_window_size_1, x_set_window_size): New argument
8039 pixelwise. Calculate pixelwise.
8040 (x_wm_set_size_hint): Pixelize call of check_frame_size.
8041 (struct x_redisplay_interface): Add x_draw_window_divider.
8042 * xterm.h (struct x_output): Add vertical_drag_cursor.
8043
8044 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
8045
8046 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
8047 Set invisible frames's `redisplay' when a full redisplay is requested.
8048 (redisplay_window): Set must_be_updated_p instead (bug#15999).
8049 (redisplay_mode_lines): Don't set must_be_updated_p any more.
8050 (display_mode_lines): Set it here instead.
8051
8052 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
8053
8054 * dispextern.h (set_window_update_flags): Remove.
8055
8056 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
8057
8058 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
8059
8060 * xdisp.c (REDISPLAY_SOME_P): New macro.
8061 (redisplay_internal): Use it (bug#15999).
8062 (prepare_menu_bars, redisplay_window): Use it as well.
8063
8064 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
8065
8066 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
8067
8068 * w32font.c (g_b_init_get_char_width_32_w): New static var.
8069 (globals_of_w32font): Zero it out.
8070 (GetCharWidth32W_Proc): New function pointer.
8071 (get_char_width_32_w): New function.
8072 (compute_metrics): If get_glyph_outline_w returns an error, try
8073 get_char_width_32_w before declaring a failure. This avoids
8074 punishing raster (a.k.a. "bitmap") fonts by slowing down
8075 redisplay. (Bug#6364).
8076
8077 2013-11-29 Eli Zaretskii <eliz@gnu.org>
8078
8079 * xdisp.c (clear_mouse_face): Don't invalidate the entire
8080 mouse-highlight info, just signal frame_up_to_date_hook that mouse
8081 highlight needs to be redisplayed. (Bug#15913)
8082
8083 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
8084
8085 Fix minor problems found by static checking.
8086 * buffer.h (struct buffer_text, struct buffer):
8087 * frame.h (struct frame):
8088 * window.h (struct window):
8089 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
8090 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
8091 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
8092 no-longer-valid use of HAVE_MENUS.
8093 * xdisp.c (propagate_buffer_redisplay): Now static.
8094
8095 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
8096
8097 * xmenu.c (Fmenu_or_popup_active_p):
8098 * window.c (Fset_window_configuration):
8099 * menu.c (Fx_popup_menu, Fx_popup_dialog):
8100 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
8101 * fns.c (Fyes_or_no_p):
8102 * editfns.c (Fmessage_box, Fmessage_or_box):
8103 * alloc.c (make_save_ptr_ptr):
8104 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
8105
8106 * window.c (Fset_window_configuration): Move select_window later.
8107
8108 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
8109
8110 Refine redisplay optimizations to only redisplay *some* frames/windows
8111 rather than all of them.
8112 * xdisp.c (REDISPLAY_SOME): New constant.
8113 (redisplay_other_windows, wset_redisplay, fset_redisplay)
8114 (bset_redisplay, bset_update_mode_line): New functions.
8115 (message_dolog): Use bset_redisplay.
8116 (clear_garbaged_frames): Use fset_redisplay.
8117 (echo_area_display): Use wset_redisplay.
8118 (buffer_shared_and_changed): Remove.
8119 (prepare_menu_bars): Call Vpre_redisplay_function before updating
8120 frame titles. Compute the actual set of windows redisplayed.
8121 Don't update frame titles and menu bars for frames that don't need to
8122 be redisplayed.
8123 (propagate_buffer_redisplay): New function.
8124 (AINC): New macro.
8125 (redisplay_internal): Use it. Be more selective in the set of windows
8126 we redisplay. Propagate windows_or_buffers_changed to
8127 update_mode_lines a bit later to simplify the code.
8128 (mark_window_display_accurate_1): Reset window and buffer's
8129 `redisplay' flag.
8130 (redisplay_window): Do nothing if neither the window nor the buffer nor
8131 the frame needs redisplay.
8132 * window.h (struct window): Add `redisplay' field.
8133 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
8134 (redisplay_other_windows, window_list): New declarations.
8135 * window.c (select_window, Fset_window_start): Use wset_redisplay.
8136 (window_list): Not static any more.
8137 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
8138 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
8139 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
8140 * frame.c (Fmake_frame_visible): Don't redisplay everything.
8141 * frame.h (struct frame): Add `redisplay' field.
8142 Move `external_menu_bar' bitfield next to other bit-fields.
8143 (SET_FRAME_GARBAGED): Use fset_redisplay.
8144 (SET_FRAME_VISIBLE): Don't garbage the frame;
8145 Use redisplay_other_windows.
8146 * buffer.h (struct buffer): Add `redisplay' field.
8147 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
8148 (modify_overlay): Use bset_redisplay.
8149 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
8150
8151 2013-11-28 Eli Zaretskii <eliz@gnu.org>
8152
8153 Support w32 file notifications in batch mode.
8154 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
8155 invalid (which happens in batch mode). If non-interactive, call
8156 handle_file_notifications to store file notification events in the
8157 input queue. (Bug#15933)
8158
8159 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
8160
8161 * w32inevt.c (handle_file_notifications): Now external, not static.
8162
8163 * w32term.h (handle_file_notifications): Provide prototype.
8164
8165 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
8166 init_crit, since init_display, which does that otherwise, is not
8167 called.
8168
8169 2013-11-27 Glenn Morris <rgm@gnu.org>
8170
8171 * Makefile.in ($(lispsource)/international/charprop.el): New.
8172 (emacs$(EXEEXT)): Depend on charprop.el.
8173
8174 2013-11-27 Eli Zaretskii <eliz@gnu.org>
8175
8176 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
8177 deleting portions of the buffer under non-nil REPLACE argument.
8178 (Bug#15973)
8179
8180 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
8181 directory, watch it and not its parent.
8182 (add_watch): Allow empty string in FILE.
8183
8184 2013-11-27 Martin Rudalics <rudalics@gmx.at>
8185
8186 * window.c (Fset_window_start, window_resize_apply)
8187 (window_scroll): Reset window_end_valid (Bug#15957).
8188
8189 2013-11-27 Glenn Morris <rgm@gnu.org>
8190
8191 * Makefile.in (leimdir): Now in lisp source directory.
8192 ($(leimdir)/leim-list.el): Just use ../leim .
8193 * epaths.in (PATH_DUMPLOADSEARCH):
8194 * lread.c (load_path_default):
8195 * nsterm.m (ns_load_path): No more leim directory.
8196
8197 2013-11-26 Andreas Schwab <schwab@suse.de>
8198
8199 * .gdbinit (xgettype): Add cast.
8200
8201 2013-11-26 Glenn Morris <rgm@gnu.org>
8202
8203 Preload leim-list.el.
8204 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
8205 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
8206 is a single directory.
8207
8208 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
8209
8210 bool-vector-subsetp is now the normal direction (Bug#15912).
8211 * data.c (Fbool_vector_subsetp): Test whether the first argument
8212 is a subset of the second one, not the reverse. Add doc string.
8213
8214 Fix minor problems found by static checking.
8215 * lread.c (load_path_default): Now static.
8216 * textprop.c (text_property_stickiness): Be consistent about the
8217 test used when deciding whether to consider the previous character.
8218 This simplifies the code a bit.
8219
8220 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
8221
8222 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
8223
8224 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
8225 (syms_of_frame): Don't defsubr them.
8226
8227 2013-11-25 Glenn Morris <rgm@gnu.org>
8228
8229 * lread.c (load_path_default): Change the sense of the argument.
8230 (init_lread): When EMACSLOADPATH is set, do not ignore changes
8231 from dump_path. When it is not, avoid checking dump_path twice.
8232
8233 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
8234 uninstalled dump_path against installed Vload_path. (Bug#15964)
8235
8236 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
8237
8238 Export get_pos_property to Elisp.
8239 * editfns.c (Fget_pos_property): Rename from get_pos_property.
8240 (syms_of_editfns): Export it to Elisp.
8241
8242 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
8243
8244 2013-11-23 Romain Francoise <romain@orebokech.com>
8245
8246 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
8247 initialization here ...
8248 (syms_of_fileio): ... from here.
8249
8250 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
8251
8252 * lread.c (init_lread): Fix int/Lisp_Object mixup.
8253 Please use --enable-check-lisp-object-type.
8254
8255 2013-11-23 Glenn Morris <rgm@gnu.org>
8256
8257 * process.c (get_process): Explicit error for dead buffers.
8258
8259 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
8260
8261 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
8262
8263 2013-11-23 Glenn Morris <rgm@gnu.org>
8264
8265 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
8266 * lread.c (load_path_check): Take path to check as argument.
8267 (load_path_default): New, split from init_lread.
8268 (init_lread): Move calc of default load-path to load_path_default.
8269 Empty elements in EMACSLOADPATH now stand for the default.
8270 (load-path): Doc fix.
8271 * emacs.c (decode_env_path): Add option to treat empty elements
8272 as nil rather than ".".
8273 * callproc.c (init_callproc_1, init_callproc):
8274 * image.c (Vx_bitmap_file_path):
8275 * lisp.h (decode_env_path):
8276 * lread.c (Vsource_directory):
8277 Update for new argument spec of decode_env_path.
8278
8279 2013-11-22 Eli Zaretskii <eliz@gnu.org>
8280
8281 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
8282 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
8283
8284 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
8285
8286 Fix some dependency problems that cause unnecessary recompiles.
8287 Problem reported by RMS in
8288 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
8289 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
8290 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
8291 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
8292 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
8293 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
8294 (boostrap-clean): No need to remove stamp-oldxmenu.
8295
8296 Fix recently introduced bool vector overrun.
8297 This was due to an optimization that went awry.
8298 Reported by Glenn Morris in
8299 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
8300 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
8301 for empty vectors, undoing the 2013-11-18 change.
8302 * data.c (bool_vector_binop_driver): Rely on this.
8303 Fix bug that occasionally overran the destination.
8304 * lisp.h (struct Lisp_Bool_vector): Document this.
8305
8306 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
8307
8308 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
8309 to handle dialogs.
8310
8311 * nsterm.m (init, run, stop:): Comment out for now, does not work
8312 with dialogs.
8313
8314 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
8315
8316 * charset.c (syms_of_charset): Don't read past end of string.
8317
8318 2013-11-19 Glenn Morris <rgm@gnu.org>
8319
8320 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
8321
8322 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
8323
8324 Add hooks to run on gaining/losing focus. (Bug#15029)
8325 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
8326 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
8327 (syms_of_frame): Add focus-in-hook, focus-out-hook.
8328
8329 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
8330
8331 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
8332 The old names predated the API change that put destination at end.
8333
8334 Improve API of recently-added bool vector functions (Bug#15912).
8335 The old API had (bool-vector-count-matches A B)
8336 and (bool-vector-count-matches-at A B I), which gave the
8337 misleading impression that the two functions were variants, one
8338 with a location I. The new API has (bool-vector-count-population A)
8339 and (bool-vector-count-consecutive A B I) to make the distinction
8340 clearer. The first function no longer has a B argument, since the
8341 caller can easily determine the number of nils if the length and
8342 number of ts is known.
8343 * data.c (Fbool_vector_count_population): Rename from
8344 bool_vector_count_matches, and accept just 1 argument.
8345 (Fbool_vector_count_consecutive): Rename from
8346 Fbool_vector_count_matches_at.
8347
8348 Always allocate at least one bits_word per bool vector.
8349 See Daniel Colascione in:
8350 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
8351 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
8352 * data.c (bool_vector_binop_driver): Rely on this. Tune.
8353 * lisp.h (struct Lisp_Bool_vector): Document this.
8354
8355 2013-11-18 Eli Zaretskii <eliz@gnu.org>
8356
8357 * insdel.c (invalidate_buffer_caches): New function, consolidated
8358 from part of prepare_to_modify_buffer.
8359 (insert_from_gap, prepare_to_modify_buffer):
8360 * coding.c (code_convert_region, code_convert_string):
8361 Call invalidate_buffer_caches. (Bug#15841)
8362
8363 * lisp.h (invalidate_buffer_caches): Add prototype.
8364
8365 2013-11-17 Eli Zaretskii <eliz@gnu.org>
8366
8367 * w32term.c (x_update_window_end): Don't invalidate the entire
8368 mouse-highlight info, just signal frame_up_to_date_hook that mouse
8369 highlight needs to be redisplayed. (Bug#15913)
8370
8371 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
8372
8373 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
8374
8375 2013-11-16 Eli Zaretskii <eliz@gnu.org>
8376
8377 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
8378 while we are using Vprin1_to_string_buffer.
8379
8380 * keymap.c (describe_map): Don't crash if PT is 1 both before and
8381 after inserting the description string. (Bug#15907)
8382
8383 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
8384
8385 * data.c: Work around bogus GCC diagnostic about shift count.
8386 Reported by Eli Zaretskii in
8387 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
8388 (pre_value): New function.
8389 (count_trailing_zero_bits): Use it.
8390
8391 2013-11-15 Eli Zaretskii <eliz@gnu.org>
8392
8393 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
8394 assume C macros are not supported even under -g3 in these old GCC
8395 versions.
8396
8397 2013-11-15 Leo Liu <sdl.web@gmail.com>
8398
8399 * minibuf.c (Ftry_completion, Fall_completions)
8400 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
8401
8402 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
8403
8404 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
8405 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
8406 This avoids placing unnecessary constants into the Emacs code.
8407
8408 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8409
8410 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
8411 for Cygwin w32 build.
8412
8413 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
8414 for Cygwin w32 build. (Bug#15892)
8415
8416 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
8417
8418 Simplify, port and tune bool vector implementation.
8419 * alloc.c (bool_vector_exact_payload_bytes)
8420 (bool_vector_payload_bytes): Remove.
8421 (bool_vector_fill): Return its argument.
8422 * alloc.c (bool_vector_fill):
8423 * lread.c (read1):
8424 * print.c (print_object):
8425 Simplify by using bool_vector_bytes.
8426 * alloc.c (make_uninit_bool_vector):
8427 New function, broken out from Fmake_bool_vector.
8428 (Fmake_bool_vector): Use it. Use tail call.
8429 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
8430 * data.c (BITS_PER_ULL): New constant.
8431 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
8432 if long long versions don't exist.
8433 (shift_right_ull): New function.
8434 (count_one_bits_word): New function, replacing popcount_bits_word
8435 macro. Don't assume that bits_word is no wider than long long.
8436 (count_one_bits_word, count_trailing_zero_bits):
8437 Don't assume that bits_word is no wider than long long.
8438 * data.c (bool_vector_binop_driver, bool_vector_not):
8439 * fns.c (Fcopy_sequence):
8440 * lread.c (read1):
8441 Create an uninitialized destination, to avoid needless work.
8442 (internal_equal): Simplify.
8443 (Ffillarray): Prefer tail call.
8444 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
8445 contain at least one word.
8446 (bits_word_to_host_endian): Prefer if to #if. Don't assume
8447 chars are narrower than ints.
8448 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
8449 * fns.c (Fcopy_sequence):
8450 Simplify and tune.
8451 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
8452 Don't try to port to hosts where bits_word values have holes; the
8453 code wouldn't work there anyway. Verify this assumption, though.
8454 (bool_vector_bytes): New function.
8455 (make_uninit_bool_vector): New decl.
8456 (bool_vector_fill): Now returns Lisp_Object.
8457
8458 * xfns.c (xic_create_fontsetname):
8459 * xrdb.c (gethomedir): Prefer tail calls.
8460
8461 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
8462
8463 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
8464 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
8465
8466 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
8467 that requires a return value.
8468 (Fset_buffer_modified_p): Take advantage of this change to do
8469 a tail call.
8470
8471 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
8472
8473 * buffer.c (Frestore_buffer_modified_p): Sync it with
8474 Fset_buffer_modified_p.
8475 (Fforce_mode_line_update): New function, moved from subr.el.
8476 (Fset_buffer_modified_p): Use them.
8477 (syms_of_buffer): Defsubr Fforce_mode_line_update.
8478
8479 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
8480
8481 * search.c (find_newline): Rewrite to prefer offsets to pointers.
8482 This avoids undefined behavior when subtracting pointers into
8483 different aways. On my platform it also makes the code a tad
8484 smaller and presumably faster.
8485
8486 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
8487
8488 * keyboard.c (command_loop_1): Use region-extract-function.
8489 * insdel.c (Qregion_extract_function): Not static any more (can we
8490 stop pretending that these vars can benefit from being marked static?).
8491
8492 2013-11-09 Eli Zaretskii <eliz@gnu.org>
8493
8494 * search.c (find_newline): If buffer text is relocated during the
8495 "dumb loop", adjust C pointers into buffer text to follow suit.
8496 (Bug#15841)
8497
8498 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
8499
8500 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
8501 for conversion (Bug#15837).
8502
8503 2013-11-09 Eli Zaretskii <eliz@gnu.org>
8504
8505 * fileio.c (Finsert_file_contents): Invalidate the newline cache
8506 for the entire range of inserted characters. (Bug#15841)
8507
8508 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
8509
8510 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
8511 unspecified.
8512 (realize_default_face): Remove assignment to distant-foreground if
8513 unspecified (Bug#15815).
8514
8515 2013-11-08 Eli Zaretskii <eliz@gnu.org>
8516
8517 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
8518 cache-long-scans disabled, since we don't want to call
8519 prepare_to_modify_buffer (in insert_1_both) for each message we
8520 display.
8521
8522 * buffer.h (bset_cache_long_scans): New INLINE function, moved
8523 from buffer.c. Improve commentary to the buffer field setter
8524 functions.
8525
8526 * buffer.c (bset_cache_long_scans): Static function deleted.
8527 Improve commentary to the buffer field setter functions.
8528 (init_buffer_once): Default for cache-long-scans changed to t.
8529 (Bug#15797)
8530
8531 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
8532
8533 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
8534
8535 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
8536 This bug was introduced in my 2013-06-21 change, and caused
8537 struct Lisp_Sub_Char_Table objects to be given too many slots,
8538 which broke 'make -C admin/unidata'.
8539
8540 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
8541
8542 Import changes from mac-port 4.5.
8543 * macfont.m (mac_font_copy_default_descriptors_for_language)
8544 (mac_font_copy_default_name_for_charset_and_languages): Declare.
8545 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
8546 (macfont_language_default_font_names): New.
8547 (macfont_list): Rearrange language/charset code.
8548 (macfont_close): Don't check for macfont_info->cache.
8549 (mac_ctfont_create_preferred_family_for_attributes): New font
8550 selection code, call
8551 mac_font_copy_default_name_for_charset_and_languages.
8552 (mac_font_copy_default_descriptors_for_language)
8553 (mac_font_copy_default_name_for_charset_and_languages): New functions.
8554
8555 * macfont.h (kCTVersionNumber10_9): Define if not defined.
8556
8557 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
8558
8559 Port to C11 aligned_alloc, and fix some integer overflows.
8560 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
8561 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
8562 and use of posix_memalign replaced with aligned_alloc.
8563 (aligned_alloc): New function, defined or declared as needed.
8564 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
8565 Don't undef; configure.ac now does this.
8566 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
8567 (calloc, aligned_alloc): Check for integer overflow.
8568 (aligned_alloc): Rename from memalign. All uses changed.
8569 (memalign): New function, an alias for aligned_alloc.
8570
8571 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
8572
8573 * xdisp.c (redisplay_internal): Fix typo in last change.
8574
8575 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
8576
8577 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
8578
8579 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
8580
8581 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
8582 redisplay--mode-lines-cause.
8583 (redisplay_internal): Keep them uptodate. Remove redundant check of
8584 buffer_shared_and_changed.
8585 * *.[chm]: Number every assignment to update_mode_lines so we
8586 can track why it is set.
8587
8588 2013-11-06 Eli Zaretskii <eliz@gnu.org>
8589
8590 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
8591
8592 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
8593
8594 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
8595 can track why it is set.
8596
8597 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
8598
8599 Integer-related fixes for term.c etc.
8600 * dispextern.h (face_tty_specified_color): New function.
8601 * term.c (turn_on_face): Don't rely on undefined behavior when
8602 assigning an out-of-range value to 'long'.
8603 Simplify test for toggling highlight.
8604 (tty_capable_p): Omit last two (unused) args. All callers changed.
8605 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
8606 (read_menu_input, tty_menu_activate, tty_menu_show):
8607 * xfaces.c (x_supports_face_attributes_p)
8608 (tty_supports_face_attributes_p):
8609 Use bool for boolean. All callers changed.
8610 (tty_supports_face_attributes_p): Omit defaults for color indices;
8611 no longer needed. Simplify tail call.
8612
8613 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
8614
8615 * xdisp.c (prepare_menu_bars): Mark static.
8616 * lisp.h (prepare_menu_bars): Don't declare.
8617 * xselect.c (x_handle_selection_clear):
8618 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
8619
8620 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
8621
8622 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
8623 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
8624
8625 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
8626
8627 * keyboard.c (Fcommand_error_default_function): Rename from
8628 Fdefault_error_output.
8629
8630 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
8631
8632 * keyboard.c (Fdefault_error_output): New function, extracted from
8633 cmd_error_internal.
8634 (syms_of_keyboard): Use it for Vcommand_error_function.
8635
8636 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
8637
8638 * eval.c (handlerlist_sentinel): New variable (bug#15802).
8639 (init_eval): Use it to ensure handlerlist is non-NULL.
8640 (unwind_to_catch): Make sure we never set handlerlist to NULL.
8641 (Fsignal): Adjust NULLness test of handlerlist.
8642 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
8643
8644 2013-11-05 Eli Zaretskii <eliz@gnu.org>
8645
8646 * callproc.c (call_process): Call prepare_to_modify_buffer before
8647 decoding text read from the sub-process, as the decoded stuff will
8648 be inserted into the buffer. This will invalidate the various
8649 caches maintained for the buffer. (Bug#15148)
8650
8651 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
8652
8653 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
8654 string of glyphless-char-display.
8655
8656 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
8657
8658 * nsfns.m (ns_get_name_from_ioreg): New function.
8659 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
8660 OSX >= 10.9. Use ns_get_name_from_ioreg.
8661
8662 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
8663
8664 Simplify and port recent bool vector changes.
8665 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
8666 only in this file. Use a more-efficient implementation if the
8667 second argument is a power of 2.
8668 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
8669 Remove no-longer-necessary compile-time checks.
8670 (bool_vector_exact_payload_bytes): New function.
8671 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
8672 exact payload changed to call the new function. Do not assume
8673 that the arg or result fits in ptrdiff_t.
8674 (bool_vector_fill): New function.
8675 (Fmake_bool_vector): Use it. Don't assume bit counts fit
8676 in ptrdiff_t.
8677 (vroundup_ct): Don't assume arg fits in size_t.
8678 * category.c (SET_CATEGORY_SET): Remove. All callers now just
8679 invoke set_category_set.
8680 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
8681 All callers changed. Use bool_vector_set.
8682 * category.h (XCATEGORY_SET): Remove; no longer needed.
8683 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
8684 bool_vector_bitref.
8685 * data.c (Faref): Use bool_vector_ref.
8686 (Faset): Use bool_vector_set.
8687 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
8688 (Fbool_vector_not, Fbool_vector_count_matches)
8689 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
8690 * fns.c (concat): Use bool_vector_ref.
8691 (Ffillarray): Use bool_vector_fill.
8692 (mapcar1): Use bool_vector_ref.
8693 (sxhash_bool_vector): Hash words, not bytes.
8694 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
8695 a constant, since it's now used in #if.
8696 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
8697 unsigned char on unusual architectures, so that we no longer
8698 assume that the number of bits per bits_word is a power of two or
8699 is a multiple of 8 or of CHAR_BIT.
8700 (Qt): Add forward decl.
8701 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
8702 at least as strictly as bits_word.
8703 (bool_vector_data, bool_vector_uchar_data): New accessors.
8704 All data structure accesses changed to use them.
8705 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
8706 (bool_vector_set): New functions.
8707 (bool_vector_fill): New decl.
8708 (ROUNDUP): Move to alloc.c as described above.
8709
8710 Fix recent gnutls changes.
8711 * gnutls.c (Fgnutls_boot): Don't assume C99.
8712 * process.c (wait_reading_process_output): Fix typo in recent change.
8713
8714 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
8715
8716 * process.c (wait_reading_process_output, read_process_output)
8717 (send_process): Check gnutls_state is not NULL.
8718
8719 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
8720 (Fgnutls_boot): Set process gnutls_p later, after initialization.
8721
8722 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
8723
8724 * nsterm.m (init, run, stop:): New methods in EmacsApp for
8725 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
8726
8727 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
8728 OSX >= 10.9.
8729
8730 * nsfns.m (Fx_create_frame): Fix memory leak.
8731
8732 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
8733 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
8734 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
8735
8736 2013-11-04 Eli Zaretskii <eliz@gnu.org>
8737
8738 * xdisp.c (message3_nolog, message_with_string): Encode the string
8739 before writing it to the terminal in a non-interactive session.
8740
8741 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
8742 sure we concatenate them into a unibyte string.
8743
8744 * fileio.c (make_temp_name): Encode PREFIX, and decode the
8745 resulting temporary name before returning it to the caller.
8746 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
8747 is a unibyte string, convert NAME to a unibyte string to ensure
8748 that the result is also a unibyte string.
8749
8750 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
8751 create unibyte strings from default paths and directory/file
8752 names.
8753
8754 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
8755 string.
8756
8757 * callproc.c (init_callproc): Use build_unibyte_string to make
8758 sure we create unibyte strings from default paths and
8759 directory/file names.
8760
8761 * buffer.c (init_buffer): Don't store default-directory of
8762 *scratch* in multibyte form. The original problem which led to
8763 that is described in
8764 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
8765 but it was solved long ago. (Bug#15260)
8766
8767 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
8768
8769 Port to stricter C99 platforms.
8770 Especially, C99 prohibits nesting a struct X inside struct Y if
8771 struct X has a flexible array member.
8772 * alloc.c (struct sdata): New type.
8773 (sdata): Implement in terms of struct sdata.
8774 Remove u member; all uses replaced by next_vector, set_next_vector.
8775 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
8776 (SDATA_DATA_OFFSET): Now a constant, not a macro.
8777 (struct sblock): Rename first_data member to data, which is now
8778 a flexible array member. All uses changed.
8779 (next_vector, set_next_vector, large_vector_vec): New functions.
8780 (vector_alignment): New constant.
8781 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
8782 (struct large-vector): Now merely a NEXT member, since the old approach
8783 ran afoul of stricter C99. All uses changed to use
8784 large_vector_vec or large_vector_offset.
8785 (large_vector_offset): New constant.
8786 * dispnew.c: Include tparam.h, for tgetent.
8787 Do not include term.h; no longer needed.
8788 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
8789 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
8790 (struct Lisp_Vector): Use a flexible array member for contents,
8791 instead of a union with a member that is an array of size 1.
8792 All uses changed.
8793 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
8794 fact that the struct no longer contains a union.
8795 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
8796 (struct Lisp_Save_Value, struct Lisp_Free):
8797 Use unsigned, not int, for spacers, to avoid c99 warning.
8798 (union specbinding): Use unsigned, not bool, for bitfield, as
8799 bool is not portable to pre-C99 hosts.
8800
8801 2013-11-04 Glenn Morris <rgm@gnu.org>
8802
8803 * emacs.c (usage_message): Mention that `-L :...' appends.
8804
8805 2013-11-02 Glenn Morris <rgm@gnu.org>
8806
8807 * Makefile.in (abs_builddir): Remove.
8808 (bootstrap_exe): Use relative filename.
8809
8810 Use relative filenames in TAGS files.
8811 * Makefile.in (abs_srcdir): Remove it again.
8812 (.PHONY): Remove frc.
8813 (maintainer-clean): No more TAGS-LISP file.
8814 (TAGS): Pass relative file names to etags.
8815 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
8816
8817 * Makefile.in (abs_srcdir): New, set by configure.
8818 (lispdir): Remove.
8819 (maintainer-clean): Remove pointless echo. That should be in the
8820 top-level Makefile, if anywhere. Delete TAGS-LISP.
8821 (extraclean): No s/ and m/ directories for some time.
8822 (TAGS): Also depend on ctagsfiles3.
8823 Remove no-longer-defined S_FILE.
8824 Pass absolute filenames to etags once more.
8825 (TAGS-LISP): Replace lispdir with its expansion.
8826 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
8827 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
8828
8829 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
8830
8831 * xfaces.c (check_lface_attrs, realize_default_face):
8832 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
8833 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
8834
8835 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
8836
8837 * emacs.c (original_pwd): Remove global var by making it local.
8838 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
8839
8840 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
8841
8842 * xfaces.c: Declare color_distance.
8843 (QCdistant_foreground): New variable.
8844 (NEAR_SAME_COLOR_THRESHOLD): New define.
8845 (load_color2): New function.
8846 (load_color): Call load_color2.
8847 (load_face_colors): Call load_color2 and if distant-color is specified
8848 calculate distant and use distant-color if colors are near.
8849 (LFACE_DISTANT_FOREGROUND): New define.
8850 (merge_face_ref, Finternal_set_lisp_face_attribute)
8851 (Finternal_get_lisp_face_attribute)
8852 (x_supports_face_attributes_p): Handle distant-foreground similar to
8853 foreground.
8854 (syms_of_xfaces): DEFSYM QCdistant_foreground.
8855
8856 * dispextern.h (lface_attribute_index):
8857 Add LFACE_DISTANT_FOREGROUND_INDEX.
8858
8859 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
8860
8861 * image.c (pbm_next_char): New function.
8862 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
8863 (pbm_scan_number): Use it.
8864 (Qlibjpeg_version): New variable.
8865 (syms_of_image): DEFSYM and initialize it.
8866
8867 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
8868
8869 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
8870
8871 2013-10-31 Glenn Morris <rgm@gnu.org>
8872
8873 * emacs.c (original_pwd): New char.
8874 (main): If using --chdir, store original_pwd.
8875 (init_cmdargs): When setting Vinvocation_directory based on a
8876 relative argv[0], use original_pwd if set. (Bug#15768)
8877
8878 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
8879
8880 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
8881
8882 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
8883
8884 * insdel.c: Fix minor problems found by static checking.
8885 (Qregion_extract_function): Now static.
8886 (prepare_to_modify_buffer_1): Remove unused locals.
8887
8888 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
8889
8890 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
8891 (syms_of_xdisp): Declare pre-redisplay-function.
8892 (markpos_of_region): Remove function.
8893 (init_iterator, compute_stop_pos, handle_face_prop)
8894 (face_before_or_after_it_pos, reseat_to_string)
8895 (get_next_display_element, window_buffer_changed)
8896 (redisplay_internal, try_cursor_movement, redisplay_window)
8897 (try_window_reusing_current_matrix, try_window_id, display_line)
8898 (note_mode_line_or_margin_highlight, note_mouse_highlight)
8899 (display_string, mouse_face_from_buffer_pos): Remove region handling.
8900 * window.h (struct window): Remove field `region_showing'.
8901 * dispextern.h (struct it): Remove region_beg/end_charpos.
8902 (face_at_buffer_position, face_for_overlay_string)
8903 (face_at_string_position): Update prototypes.
8904 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
8905 (face_at_string_position): Remove `region_beg' and `region_end' args.
8906 * fontset.c (Finternal_char_font):
8907 * font.c (font_at, font_range): Adjust calls accordingly.
8908 * insdel.c (Qregion_extract_function): New var.
8909 (syms_of_insdel): Initialize it.
8910 (prepare_to_modify_buffer_1): Use it.
8911
8912 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
8913
8914 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
8915 * ftxfont.c (ftxfont_get_gcs):
8916 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
8917 * xfaces.c (x_free_colors, x_free_dpy_colors)
8918 (x_create_gc, unload_color):
8919 * xselect.c (x_property_data_to_lisp):
8920 * xsettings.c (parse_settings):
8921 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
8922 (get_bits_and_offset): Adjust definition.
8923 * frame.c (XParseGeometry): Adjust locals.
8924 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
8925 * regex.h (toplevel): Likewise for reg_syntax_t.
8926
8927 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
8928
8929 * eval.c (run_hook_with_args): Use FUNCTIONP.
8930
8931 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
8932
8933 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
8934 fields, drop 'allocated_p' member and use -1 for uninitialized value.
8935 * w32term.h (struct w32_output): Similarly but do not use -1 because...
8936 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
8937 on MS-Windows anyway.
8938 (free_face_colors): Define only if HAVE_X_WINDOWS and...
8939 (free_realized_face): ...adjust user.
8940 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
8941 white relief pixels to -1.
8942 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
8943 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
8944 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
8945
8946 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
8947
8948 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
8949 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
8950 in practice now. All callers changed.
8951
8952 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
8953
8954 * dispextern.h (struct face): Use bitfields for 'underline_type'
8955 and 'box' members. Remove set-but-unused members 'pixmap_w' and
8956 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
8957 'stipple' member. Move 'lface' member up to help...
8958 * xfaces.c (make_realized_face): ...this function to find and
8959 clear just the members that need clearing.
8960 (load_face_colors, realize_x_face):
8961 * xdisp.c (extend_face_to_end_of_line): Adjust user.
8962
8963 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
8964
8965 * xftfont.c (struct xftfont_info): Remove set-but-unused
8966 'screen' member.
8967 (xftfont_open): Adjust user.
8968 (xftfont_get_colors): Remove useless prototype.
8969
8970 2013-10-26 Eli Zaretskii <eliz@gnu.org>
8971
8972 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
8973 before passing them to 'unexec'. (Bug#15260)
8974
8975 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
8976
8977 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
8978
8979 2013-10-25 Eli Zaretskii <eliz@gnu.org>
8980
8981 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
8982 the changed signature of the font driver's 'close' method.
8983
8984 * w32font.h (w32font_close): Adjust the prototype to the change in
8985 function definition.
8986
8987 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
8988
8989 * w32uniscribe.c (uniscribe_close): Adapt the call to
8990 w32font_close to its new prototype.
8991
8992 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
8993
8994 Omit unused frame argument of font API's close function.
8995 * font.h (struct font): Drop frame argument. Adjust comment.
8996 * font.c (font_clear_cache, font_close_object): Adjust users.
8997 * ftfont.c (ftfont_close):
8998 * ftxfont.c (ftxfont_close):
8999 * macfont.m (macfont_close):
9000 * nsfont.m (nsfont_close):
9001 * w32font.c (w32font_close):
9002 * xfont.c (xfont_close):
9003 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
9004 tweak comments and make functions safe if called more than once for
9005 the same font object.
9006
9007 Perform font-specific cleanup when font object is swept by GC. See
9008 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
9009 * alloc.c (cleanup_vector): New function.
9010 (sweep_vector): Call it for each reclaimed vector object.
9011 * font.h (struct font): Adjust comment.
9012
9013 2013-10-24 Glenn Morris <rgm@gnu.org>
9014
9015 * Makefile.in (abs_top_srcdir): New, set by configure.
9016
9017 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
9018
9019 Adjust recent font-related changes to fix bug#15686.
9020 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
9021 is a live window system frame, mark its default font too.
9022
9023 2013-10-23 Glenn Morris <rgm@gnu.org>
9024
9025 * Makefile.in (RUN_TEMACS): Make relative (again).
9026 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
9027 (bootstrap-emacs$(EXEEXT)):
9028 Quote entities that might contain whitespace.
9029
9030 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
9031
9032 Port to Solaris 10 and its bundled GCC.
9033 Problem reported by Timothy C. Burt.
9034 * floatfns.c (isfinite, isnan): Redefine unconditionally.
9035
9036 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
9037
9038 Do not allow font caches to grow too large.
9039 * alloc.c (compact_font_cache_entry, compact_font_caches):
9040 New functions or stub if not HAVE_WINDOW_SYSTEM.
9041 (compact_undo_list): Factor out from Fgarbage_collect.
9042 Add comment.
9043 (mark_face_cache): Mark face font. Move down to avoid
9044 extra prototypes.
9045 (mark_terminals): Do not mark font cache here.
9046 (Fgarbage_collect): Call compaction functions described
9047 above. Adjust comment.
9048
9049 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
9050
9051 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
9052 chdir to HOME (bug#15607).
9053
9054 * nsterm.m (Qcocoa, Qgnustep): New variables.
9055 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
9056 (ns_get_color): Make selection color work for GNUstep also.
9057
9058 2013-10-18 Eli Zaretskii <eliz@gnu.org>
9059
9060 * keyboard.c (make_lispy_event): Remove GPM-specific code that
9061 handles mouse clicks. Instead, let GPM use the same code as all
9062 the other mice use. See the discussion starting at
9063 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
9064 for the details of the problem with the menu bar this fixes.
9065
9066 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
9067
9068 Remove port-specific display name lists to avoid extra
9069 complexity and data duplication with display info lists.
9070 * xterm.h (x_display_name_list): Remove declaration.
9071 * xterm.c (x_display_name_list): Remove.
9072 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
9073 * xfns.c (x_display_info_for_name, Fx_display_list):
9074 Likewise. Use x_display_list where appropriate.
9075 * w32term.h (w32_display_name_list): Remove declaration.
9076 * w32term.c (w32_display_name_list): Remove.
9077 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
9078 Adjust users.
9079 * w32fns.c (x_display_info_for_name, Fx_display_list):
9080 Likewise. Use x_display_list where appropriate.
9081 * nsterm.h (ns_display_name_list): Remove declaration.
9082 * nsterm.m (ns_display_name_list): Remove.
9083 (ns_term_init, syms_of_nsterm): Adjust users.
9084 * nsfns.m (ns_display_info_for_name, Fx_display_list):
9085 Likewise. Use x_display_list where appropriate.
9086 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
9087 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
9088 (mark_terminals): Mark per-terminal font cache.
9089
9090 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
9091
9092 Don't run timers in input-pending-p. Its new check-timers param
9093 provides the prior behavior. (Bug#15045).
9094 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
9095
9096 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 Make some functions static in non-Microsoft builds.
9099 On my platform (Fedora 19 x86-64), this shrinks the
9100 Emacs executable (text+data) by 0.25%.
9101 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
9102 (load_color) [!MSDOS]:
9103 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
9104 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
9105 * lisp.h (check_existing):
9106 * process.h (conv_sockaddr_to_lisp, network_interface_list)
9107 (network_interface_info) [!WINDOWSNT]:
9108 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
9109 Remove extern decls.
9110 * fileio.c (check_existing):
9111 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
9112 * process.c (conv_sockaddr_to_lisp, network_interface_list)
9113 (network_interface_info) [!WINDOWSNT]:
9114 * term.c (encode_terminal_code) [!WINDOWSNT]:
9115 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
9116 * xfaces.c (load_color) [!MSDOS]:
9117 Now static.
9118 * fileio.c (check_existing, check_executable, check_writable):
9119 * process.c (network_interface_list, network_interface_info):
9120 Move earlier, so that we don't need forward decls.
9121 * gnutls.c (fn_gnutls_transport_set_errno)
9122 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
9123 Remove; unused.
9124 * w32.c (init_environment): Use faccessat rather than
9125 check_existing, partly for consistency with the rest of the code
9126 in this file, partly so that check_existing can be static.
9127
9128 Make VALMASK visible to GDB even if clang is used (Bug#15574).
9129 * emacs.c (MAIN_PROGRAM): New macro.
9130 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
9131 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
9132
9133 bool vector int width fixes
9134 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
9135 (Fbool_vector_count_matches_at):
9136 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
9137 can exceed PTRDIFF_MAX, at least in theory.
9138 (Fbool_vector_count_matches_at):
9139 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
9140
9141 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
9142
9143 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
9144 (struct sockaddr): Add forward decl, for platforms that lack it.
9145
9146 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
9147
9148 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
9149 Qnil (Bug#15628).
9150
9151 2013-10-16 Eli Zaretskii <eliz@gnu.org>
9152
9153 * w32.c (network_interface_get_info, network_interface_list)
9154 (network_interface_info): New functions. (Bug#15610)
9155 (GetAdaptersInfo_Proc): New typedef.
9156 (get_adapters_info): New wrapper function.
9157 (globals_of_w32): Initialize g_b_init_get_adapters_info.
9158
9159 * process.h (network_interface_list, network_interface_info):
9160 New prototypes.
9161
9162 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
9163 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
9164 all systems. Return non-nil for systems that HAVE_NET_IF_H and
9165 for WINDOWSNT. Doc fix.
9166 (syms_of_process): Defsubr Snetwork_interface_list and
9167 Snetwork_interface_info unconditionally.
9168
9169 * menu.c (have_boxes): Fix redundant simulation of radio buttons
9170 in NS GUI sessions. (Bug#15629)
9171
9172 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
9173
9174 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
9175
9176 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
9177
9178 * print.c (print_object): Print " ..." when truncating bool vectors.
9179
9180 2013-10-15 Eli Zaretskii <eliz@gnu.org>
9181
9182 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
9183 standard mouse buttons.
9184
9185 * termhooks.h (struct input_event): Remove incorrect commentary.
9186
9187 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
9188
9189 Disallow bool vector operations on mixed-length operands.
9190 The old behavior left garbage in the result vector sometimes,
9191 and didn't seem to be useful.
9192 * data.c (Qwrong_length_argument): New static var.
9193 (wrong_length_argument): New function.
9194 (bool_vector_binop_driver): Check that args agree in length.
9195
9196 * keyboard.c, keyboard.h (all_kboards): Now static.
9197
9198 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
9199
9200 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
9201 note from the lispref.
9202
9203 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
9204
9205 * nsterm.h (struct ns_display_info): Remove set-but-unused
9206 member image_cache (image caches are per-terminal anyway).
9207 (FRAME_X_IMAGE_CACHE): Remove.
9208 * nsterm.m (ns_initialize_display_info): Adjust user.
9209
9210 2013-10-14 Eli Zaretskii <eliz@gnu.org>
9211
9212 * w32proc.c: Include mingw_time.h.
9213
9214 * w32.c: Include mingw_time.h.
9215
9216 Implement scrolling of TTY menus when the screen is too short.
9217
9218 * term.c (tty_menu_display): Accept an additional argument, the
9219 menu item from which to start displaying the menu. Account for
9220 the value of Y when limiting the menu to the number of available
9221 screen lines.
9222 (mi_result): New enumeration.
9223 (read_menu_input): Return enumerated value. When the y coordinate
9224 hits min_y or max_y, return scroll indication instead of wrapping
9225 around the menu.
9226 (tty_menu_activate): Handle the scrolling indications from
9227 read_menu_input. Compute the first menu item to display and pass
9228 it to tty_menu_display.
9229
9230 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
9231
9232 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
9233 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
9234 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
9235 Adjust to match the change described below.
9236 (struct terminal): Move must_write_spaces, line_ins_del_ok,
9237 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
9238 memory_below_frame members to...
9239 * termchar.h (struct tty_display_info): ...here because they're
9240 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
9241 * term.c (init_tty):
9242 * nsterm.m (ns_create_terminal):
9243 * w32term.c (w32_create_terminal):
9244 * xterm.c (x_create_terminal): Adjust users.
9245 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
9246 to filter out non-TTY frames. Adjust comment.
9247 (scrolling): Adjust user. Prefer eassert for debugging check.
9248
9249 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
9250
9251 * xfaces.c (PT_PER_INCH): Remove unused macro.
9252 * termhooks.h (struct terminal): Remove set-but-unused
9253 member fast_clear_end_of_line.
9254 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
9255 * nsterm.m (ns_create_terminal):
9256 * term.c (init_tty):
9257 * w32term.c (w32_create_terminal):
9258 * xterm.c (x_create_terminal): Adjust users.
9259
9260 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
9261
9262 * lisp.h (bool_vector_size): New function.
9263 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
9264 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
9265 (Fbool_vector_not, Fbool_vector_count_matches_at):
9266 Remove uses of 'eassume' that should no longer be needed,
9267 because they are subsumed by the 'eassume' in bool_vector_size.
9268
9269 2013-10-12 Eli Zaretskii <eliz@gnu.org>
9270
9271 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
9272 after inclusion of gif_lib.h, thus fixing compiler warnings caused
9273 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
9274
9275 2013-10-11 Eli Zaretskii <eliz@gnu.org>
9276
9277 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
9278 have different dimensions. (Bug#15575)
9279
9280 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
9281 visibility.
9282
9283 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
9284
9285 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
9286
9287 * term.c (tty_menu_show): Never return with unbalanced
9288 specpdl. Use eassert for debugging check. Adjust style.
9289
9290 2013-10-11 Eli Zaretskii <eliz@gnu.org>
9291
9292 * term.c (read_menu_input): Make selection of menu items
9293 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
9294 (tty_menu_activate): Fix off-by-one error when computing max_y.
9295
9296 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
9297
9298 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
9299 audit logging (only used with GnuTLS 3.x) and enable it.
9300
9301 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
9302
9303 * dispnew.c (redraw_frame): Remove useless #ifdef because
9304 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
9305 Also, move TTY fflush to...
9306 * term.c (tty_update_end): ...this function.
9307
9308 2013-10-11 Eli Zaretskii <eliz@gnu.org>
9309
9310 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
9311 the end of the frame's glyph matrix. (Bug#15575)
9312
9313 * term.c (tty_menu_display): Don't move cursor while overwriting
9314 frame's glyphs with menu items. Limit the number of items
9315 displayed to what can be shown on the available screen lines,
9316 excluding the echo area.
9317 (tty_menu_activate): Limit the Y coordinate allowed by
9318 read_menu_input to the last screen line used for menu display.
9319
9320 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
9321
9322 * lisp.h (eassume): New macro.
9323 Also, include <verify.h>, for 'assume'.
9324 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
9325 (vroundup, vector_nbytes):
9326 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
9327 (Fbool_vector_not, Fbool_vector_count_matches)
9328 (Fbool_vector_count_matches_at):
9329 Use eassume, not eassert.
9330 * casetab.c (set_identity, shuffle):
9331 * composite.c (composition_gstring_put_cache):
9332 * dispnew.c (update_frame_1):
9333 * ftfont.c (ftfont_shape_by_flt):
9334 * image.c (gif_load):
9335 * intervals.c (offset_intervals):
9336 * macfont.m (macfont_shape):
9337 Remove calls to 'assume' that are no longer needed, because
9338 --enable-gcc-warnings no longer generates bogus warnings
9339 when these calls are removed.
9340
9341 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
9342
9343 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
9344
9345 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
9346
9347 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
9348 (Qsubstitute_env_in_file_name): New var.
9349 (syms_of_fileio): Define it.
9350
9351 2013-10-10 Eli Zaretskii <eliz@gnu.org>
9352
9353 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
9354 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
9355 (Bug#15575)
9356
9357 * term.c (save_and_enable_current_matrix): Don't allocate and
9358 don't save margin areas.
9359 (restore_desired_matrix): Don't restore margin areas.
9360 (free_saved_screen): Don't free margin areas.
9361
9362 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
9363
9364 * image.c: Pacify --enable-gcc-warnings.
9365 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
9366 #define only if used.
9367
9368 2013-10-10 Eli Zaretskii <eliz@gnu.org>
9369
9370 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
9371 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
9372 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
9373 (gif_load): For giflib v5.x and later, display the error message
9374 produced by giflib when its functions fail.
9375 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
9376 (Bug#15531)
9377
9378 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
9379
9380 * keyboard.c (last_event_timestamp): Remove. For X selection and
9381 GTK popup menus, it may be obtained from per-frame X display info.
9382 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
9383 (process_special_events): Adjust users.
9384 * keyboard.h (last_event_timestamp): Remove declaration.
9385 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
9386 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
9387 * menu.h (xmenu_show): Adjust prototype.
9388 * menu.c (Fx_popup_menu): Adjust user.
9389 * xselect.c (x_own_selection, x_get_foreign_selection)
9390 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
9391
9392 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
9393
9394 * keyboard.c (init_kboard): Now static. Add arg
9395 to denote window system. Adjust comment.
9396 (init_keyboard): Adjust user.
9397 (allocate_kboard): New function.
9398 (syms_of_keyboard):
9399 * nsterm.m (ns_term_init):
9400 * term.c (init_tty):
9401 * w32term.c (w32_create_terminal):
9402 * xterm.c (x_term_init): Use it.
9403 * keyboard.h (init_kboard): Remove prototype.
9404 (allocate_kboard): Add prototype.
9405
9406 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
9407
9408 * image.c (GIFLIB_MAJOR): Ensure it's defined.
9409 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
9410
9411 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
9412
9413 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
9414
9415 2013-10-09 Eli Zaretskii <eliz@gnu.org>
9416
9417 * term.c (tty_menu_activate): Flush the output stream after
9418 showing the cursor, and don't mark the frame garbaged at exit from
9419 the function. Fixes redisplay glitches when moving from one menu
9420 to another.
9421
9422 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
9423
9424 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
9425 or throw error (Bug#15570).
9426
9427 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
9428
9429 * intervals.c (temp_set_point_both): Move test into 'eassert',
9430 for speed.
9431
9432 * lisp.h (eassert): Don't use 'assume'.
9433 Sometimes 'assume' wins in performance, and sometimes it loses,
9434 so it shouldn't be used all the time. Perhaps we need two
9435 flavors of 'eassert', one for where 'assume' is far more likely
9436 to help or to hurt; but that can be done later.
9437 Problem reported by Dmitry Antipov in
9438 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
9439 Also, don't include <verify.h>; no longer needed.
9440
9441 2013-10-09 Glenn Morris <rgm@gnu.org>
9442
9443 * eval.c (Fcond): Doc tweak.
9444
9445 2013-10-09 Eli Zaretskii <eliz@gnu.org>
9446
9447 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
9448 expressions with side effects to eassert. (Bug#15565)
9449
9450 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
9451
9452 * fns.c (hashfn_user_defined): Allow hash functions to return any
9453 Lisp_Object.
9454
9455 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
9456
9457 Fix minor problems found by static checking.
9458 * dispnew.c (save_current_matrix): Omit unnecessary casts.
9459 * dispnew.c (update_frame_with_menu): Mark debug local as used.
9460 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
9461 * keyboard.c (read_menu_command): Remove unused local.
9462 * lisp.h (read_menu_command): New decl.
9463 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
9464 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
9465 Return ptrdiff_t, not int.
9466 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
9467 not int, for benefit of xpalloc.
9468 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
9469 and xpalloc.
9470 (have_menus_p): Remove; unused.
9471 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
9472 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
9473 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
9474 Now static.
9475 (save_and_enable_current_matrix): Omit unnecessary casts.
9476 (read_menu_input): Omit local extern decl (now in lisp.h).
9477 Don't access uninitialized storage if mouse_get_xy fails.
9478 (tty_menu_activate): Mark local as initialized, for lint.
9479 (tty_menu_activate, tty_meny_show): Remove unused locals.
9480
9481 2013-10-08 Eli Zaretskii <eliz@gnu.org>
9482
9483 Support menus on text-mode terminals.
9484 * xterm.h (xw_popup_dialog): Add prototype.
9485
9486 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
9487 (xmenu_show): Block input here, instead in Fx_popup_menu.
9488 (xw_popup_dialog): New function, with X-specific bits of popup
9489 dialogs.
9490
9491 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
9492 New functions.
9493
9494 * window.c (Fset_window_configuration): Use run-time tests of the
9495 frame type instead of compile-time conditionals, when menu-bar
9496 lines are considered.
9497
9498 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
9499 (w32_popup_dialog): New prototypes.
9500
9501 * w32menu.c (Fx_popup_dialog): Function deleted.
9502 (w32_popup_dialog): New function, with w32 specific bits of popup
9503 dialogs. Block input here.
9504
9505 * w32inevt.c (w32_console_read_socket): Minor change to add
9506 debugging TTY events.
9507
9508 * w32fns.c (show_hourglass): If returning early because the frame
9509 is not a GUI frame, unblock input.
9510
9511 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
9512 (cursorY): New functions.
9513
9514 * termhooks.h (cursorX, cursorY): Prototypes of functions on
9515 WINDOWSNT, macros that call curX and curY elsewhere.
9516
9517 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
9518
9519 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
9520 specific function to hide and show cursor on a text-mode terminal.
9521 (tty_menu_struct, struct tty_menu_state): New structures.
9522 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
9523 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
9524 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
9525 (tty_menu_locate, save_and_enable_current_matrix)
9526 (restore_desired_matrix, screen_update, read_menu_input)
9527 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
9528 (tty_pop_down_menu, tty_menu_last_menubar_item)
9529 (tty_menu_new_item_coords, tty_menu_show): New functions.
9530 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
9531
9532 * nsterm.h (ns_popup_dialog): Adjust prototype.
9533
9534 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
9535 of in x-popup-menu.
9536 (ns_popup_dialog): Adapt order of arguments to the other
9537 *_menu_show implementations.
9538 (Fx_popup_dialog): Function deleted.
9539
9540 * msdos.c (x_set_menu_bar_lines): Delete unused function.
9541
9542 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
9543
9544 * menu.c (have_boxes): New function.
9545 (single_keymap_panes): Use it instead of a compile-time
9546 conditional.
9547 (single_menu_item): Use run-time tests of the frame type instead
9548 of compile-time conditionals.
9549 (encode_menu_string): New function.
9550 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
9551 the macro, since different types of frame need different encoding
9552 of menu items.
9553 (digest_single_submenu): Use run-time tests of frame type instead
9554 of, or in addition to, compile-time conditionals.
9555 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
9556 (Fx_popup_menu): Detect when the function is called from keyboard
9557 on a TTY. Don't barf when invoked on a text-mode frame.
9558 Check frame type at run time, instead of compile-time conditionals for
9559 invoking terminal-specific menu-show functions.
9560 Call tty_menu_show on text-mode frames.
9561 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
9562 run time to determine which alternative to invoke; support dialogs
9563 on TTYs.
9564
9565 * keyboard.h <Qmouse_movement>: Declare.
9566
9567 * keyboard.c <Qmouse_movement>: Now extern.
9568 <Qecho_keystrokes>: New static variable.
9569 (read_key_sequence): Accept an additional argument, a flag to
9570 prevent redisplay during reading of the key sequence. All callers
9571 changed.
9572 (read_menu_command): New function.
9573 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
9574 autosave.
9575 (toolkit_menubar_in_use): New function.
9576 (make_lispy_event): Use it instead of a compile-time test.
9577
9578 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
9579 window-system being available.
9580
9581 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
9582 to x-popup-dialog on the frame type, they all now support popup
9583 dialogs.
9584
9585 * dispnew.c (save_current_matrix): Save the margin areas.
9586 (restore_current_matrix): Restore margin areas.
9587 (update_frame_with_menu): New function.
9588
9589 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
9590 Add prototypes.
9591
9592 * alloc.c (make_save_ptr): Now compiled unconditionally.
9593
9594 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
9595
9596 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
9597 (redraw_frame, update_frame): Adjust users.
9598 * dispextern.h (set_window_update_flags): Adjust prototype.
9599 * xdisp.c (redisplay_internal): When updating all frames with zero
9600 windows_or_buffers_changed, assume that only the windows that shows
9601 current buffer should be really updated.
9602
9603 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
9604
9605 Do not allocate huge temporary memory areas and objects while encoding
9606 for file I/O, thus reducing an enormous memory usage for large buffers.
9607 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
9608 * coding.h (struct coding_system): New member raw_destination.
9609 * coding.c (setup_coding_system): Initialize it to zero.
9610 (encode_coding_object): If raw_destination is set, do not create
9611 dst_object. Add comment.
9612 * fileio.c (toplevel): New constant E_WRITE_MAX.
9613 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
9614 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
9615
9616 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
9617
9618 * nsterm.m (windowDidExitFullScreen:)
9619 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
9620
9621 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
9622
9623 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
9624 * keyboard.c (unblock_input_to): Don't process pending signals
9625 if a fatal error is in progress.
9626
9627 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
9628 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
9629 they're talking about words in Lisp bool vectors.
9630 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
9631 * data.c (popcount_bits_word): Rename from popcount_size_t.
9632 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
9633 All uses changed.
9634
9635 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
9636
9637 Improve support for popcount and counting trailing zeros (Bug#15550).
9638 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
9639 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
9640 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
9641 (popcount_size_t_msc, popcount_size_t_gcc):
9642 Remove; now done by Gnulib.
9643 (popcount_size_t): Now a macro that defers to Gnulib.
9644 (count_trailing_zero_bits): Return int, for consistency with
9645 Gnulib and because Emacs prefers signed to unsigned int.
9646 Don't assume that size_t is either unsigned int or unsigned long
9647 or unsigned long long.
9648 (size_t_to_host_endian): Do not assume that size_t is either
9649 exactly 32 or exactly 64 bits wide.
9650 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
9651 etc., so that it's now an enum constant, not a macro.
9652 No need to assume that it's either 32 or 64.
9653
9654 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
9655
9656 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
9657 on >= 10.7.
9658
9659 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
9660
9661 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
9662 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
9663
9664 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
9665
9666 emacs_read and emacs_write now use void *, not char *.
9667 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
9668 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
9669 Buffer arg is now void *, not char *. This matches plain
9670 'read' and 'write' better, and avoids a constraint violation
9671 on Solaris 9 with Oracle Studio.
9672
9673 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
9674
9675 * alloc.c (Fmake_string): For ASCII char initializer, prefer
9676 memset to explicit loop. Otherwise copy largest possible chunk
9677 from initialized to uninitialized part, thus allowing the longer
9678 memcpy runs and reducing the number of loop iterations.
9679
9680 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
9681
9682 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
9683 hide toolbar (Bug#15388).
9684 (windowDidEnterFullScreen:): If presentation options are zero,
9685 set them here (Bug#15388).
9686 (ns_update_auto_hide_menu_bar): Remove runtime check.
9687 Don't auto hide dock unless menubar is also auto hidden.
9688
9689 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
9690
9691 * editfns.c (message): Mention batch mode in doc string.
9692
9693 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
9694
9695 * nsterm.m (check_native_fs): Remove erroneous comment.
9696
9697 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
9698
9699 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
9700 uses find_newline instead of scan_newline and so doesn't move point.
9701
9702 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
9703
9704 Use hardware support for byteswapping on glibc x86 etc.
9705 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
9706 whereas the old swap64 needed 30.
9707 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
9708 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
9709 Use byteswap.h's macros to swap bytes.
9710 * lisp.h (swap16, swap32, swap64): Remove.
9711 All uses replaced by bswap_16, bswap_32, bswap_64.
9712
9713 * bytecode.c (exec_byte_code): Use some more volatile variables
9714 to work around local variables getting clobbered by longjmp.
9715 Port to pre-C99, which doesn't allow decls after stmts.
9716
9717 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
9718
9719 * lisp.h (eassert): Assume that COND is true when optimizing.
9720 In other words, take on the behavior of eassert_and_assume.
9721 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
9722 (eassert_and_assume): Remove. All uses replaced by eassert.
9723
9724 * xdisp.c (Qglyphless_char): Now static.
9725
9726 Adjust to merge from gnulib.
9727 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
9728 * lisp.h: Include <verify.h>, for 'assume'.
9729
9730 * eval.c (clobbered_eassert): New macro.
9731 (internal_catch, internal_condition_case)
9732 (internal_condition_case_1, internal_condition_case_2)
9733 (internal_condition_case_n): Use it instead of eassert
9734 when the argument contains locals clobbered by longjmp.
9735 Don't use clobbered locals outside of clobbered_eassert.
9736 (internal_lisp_condition_case): Use a volatile variable
9737 to work around a local variable's getting clobbered.
9738
9739 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
9740
9741 * lisp.h (struct handler): Merge struct handler and struct catchtag.
9742 (PUSH_HANDLER): New macro.
9743 (catchlist): Remove.
9744 (handlerlist): Always declare.
9745
9746 * eval.c (catchlist): Remove (merge with handlerlist).
9747 (handlerlist, lisp_eval_depth): Not static any more.
9748 (internal_catch, internal_condition_case, internal_condition_case_1)
9749 (internal_condition_case_2, internal_condition_case_n):
9750 Use PUSH_HANDLER.
9751 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
9752 handlerlist/catchlist.
9753 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
9754 handlerlist which can only handle a single condition-case handler at
9755 a time.
9756 (find_handler_clause): Simplify since we only a single branch here
9757 any more.
9758
9759 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
9760 and Bpophandler.
9761 (bcall0): New function.
9762 (exec_byte_code): Add corresponding cases. Improve error message when
9763 encountering an invalid byte-code. Let Bunwind_protect accept
9764 a function (rather than a list of expressions) as argument.
9765
9766 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
9767 and make them unconditional now that they're heap-allocated.
9768
9769 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
9770
9771 * charset.c (Fdecode_char, Fencode_char): Remove description of
9772 `restriction' arg. now that it's hidden by advertised-calling-convention.
9773
9774 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
9775
9776 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
9777 Remove unused variable (from mac-port).
9778 (macfont_draw): Use s->ybase for correct y position.
9779
9780 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
9781
9782 * frame.h (struct frame): Drop has_minibuffer member because...
9783 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
9784 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
9785
9786 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
9787
9788 * window.h (struct window): Prefer enum text_cursor_kinds to int
9789 for phys_cursor_type member. Move the latter, phys_cursor_width,
9790 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
9791 * window.c (replace_window, make_window): Adjust users.
9792
9793 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
9794
9795 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
9796 this module is never compiled otherwise.
9797
9798 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
9799
9800 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
9801 (Bug#15500).
9802
9803 2013-09-29 Eli Zaretskii <eliz@gnu.org>
9804
9805 * xdisp.c (get_next_display_element): Don't call face_for_font in
9806 a build configured --without-x. (Bug#15484)
9807
9808 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
9809
9810 * window.c (calc_absolute_offset): #elif should be #elif defined.
9811
9812 * frame.c (delete_frame): Block/unblock input to overcome race
9813 condition (Bug#15475).
9814
9815 2013-09-29 Andreas Politz <politza@hochschule-trier.de>
9816
9817 * frame.c (delete_frame): Record selected frame only after
9818 calling Qdelete_frame_functions (Bug#15477).
9819
9820 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
9821
9822 * nsterm.m (ns_selection_color): Remove.
9823 (ns_get_color): Check for ns_selection_(fg|bg)_color using
9824 NSColor selectedText(Background)Color. Only for COCOA.
9825 (ns_term_init): Remove assignment of ns_selection_color, logic
9826 moved to ns_get_color.
9827
9828 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
9829 NS_SELECTION_COLOR_DEFAULT.
9830 (NS_SELECTION_FG_COLOR_DEFAULT): New.
9831
9832 2013-09-28 Eli Zaretskii <eliz@gnu.org>
9833
9834 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
9835 frame' does not have the tool_bar_window member.
9836
9837 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
9838
9839 Signal error when reading an empty byte-code object (Bug#15405)
9840 * lread.c (read1): Signal error.
9841 * alloc.c (make_byte_code): eassert header size.
9842 (sweep_vectors): Change an int to size_t.
9843
9844 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
9845
9846 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
9847 instead of ints, as it's the usual style for offsetof constants. See:
9848 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
9849
9850 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
9851 This is ugly, but it should fix the performance problem for older
9852 GCC versions in the short run. I'll look into integrating the
9853 Gnulib module for popcount, as a better fix.
9854 See the thread starting in:
9855 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
9856 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
9857 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
9858 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
9859 (popcount_size_t): Use it.
9860
9861 2013-09-24 Daniel Colascione <dancol@dancol.org>
9862
9863 * process.c (Fnetwork_interface_info): Fix build break due to
9864 vector changes.
9865
9866 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
9867
9868 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
9869 Prefer signed to unsigned integers where either will do.
9870 No need for 'const' on locals that do not escape.
9871 Omit easserts with unnecessary and unportable assumptions about
9872 alignment. Avoid unnecessary casts to char *.
9873
9874 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
9875
9876 Use union for the payload of struct Lisp_Vector.
9877 This helps to avoid a few glitches dictated by C's aliasing rules.
9878 * lisp.h (struct Lisp_Vector): Use union for next and
9879 contents member. Adjust comment. Change related users.
9880 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
9881 Related users changed.
9882 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
9883 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
9884 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
9885 * xfaces.c, xfont.c, xmenu.c: Related users changed.
9886
9887 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
9888
9889 Optimize glyph row clearing and copying routines.
9890 * dispextern.h (struct glyph_row): Change layout of struct
9891 glyph_row to help copy_row_except_pointers. Adjust comment.
9892 * dispnew.c (null_row): Remove.
9893 (clear_glyph_row): Use offsetof and memset to find and clear
9894 just the members that need clearing. Adjust comment.
9895 (copy_row_except_pointers): Likewise for copying.
9896
9897 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
9898
9899 Some minor cleanups of recently-added bool vector code.
9900 * conf_post.h (assume): Always return void. Use lint version
9901 only if GCC and MSC versions don't apply.
9902 * conf_post.h (assume):
9903 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
9904 Depend on _MSC_VER, not __MSC_VER, for consistency with
9905 the rest of Emacs.
9906 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
9907 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
9908 (bool_vector_binop_driver, count_trailing_zero_bits)
9909 (size_t_to_host_endian): Now static, not static inline;
9910 the latter isn't needed with modern compilers and doesn't
9911 work with older compilers anyway.
9912
9913 * alloc.c (valgrind_p): Use bool for boolean.
9914
9915 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
9916
9917 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
9918 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
9919 (display_last_displayed_message_p, message_buf_print)
9920 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
9921 Use bool for boolean.
9922 * dispextern.h (cancel_line, init_desired_glyphs):
9923 Remove ancient leftover.
9924 (help_echo_showing_p, hourglass_shown_p):
9925 * lisp.h (noninteractive_need_newline): Adjust declaration.
9926
9927 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
9928
9929 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
9930 Move to...
9931 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
9932 ...this file and convert the latter to static. Adjust comment.
9933 (make_initial_frame):
9934 * window.c (init_window_once): Adjust user.
9935 * frame.h (last_nonminibuf_frame): Remove declaration.
9936 * lisp.h (selected_frame): Likewise.
9937 * msdos.c (the_only_display_info): Adjust comment.
9938
9939 2013-09-23 Eli Zaretskii <eliz@gnu.org>
9940
9941 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
9942 computing the end column of mouse-highlight that comes from
9943 display or overlay strings. (Bug#15437)
9944 (note_mouse_highlight): Adapt calculation of last argument to
9945 mouse_face_from_string_pos to the above change.
9946
9947 * conf_post.h (__has_builtin): Define to zero, if undefined, on
9948 all platforms, not just for clang.
9949
9950 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
9951
9952 * filelock.c (lock_file_1): Rearrange to remove compiler warning
9953 about excess arguments to snprintf.
9954
9955 * conf_post.h(assume): Use __builtin_unreachable for clang.
9956
9957 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
9958
9959 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
9960 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
9961
9962 2013-09-23 Daniel Colascione <dancol@dancol.org>
9963
9964 * alloc.c (USE_VALGRIND): New macro; on by default
9965 when ENABLE_CHECKING.
9966 (mark_maybe_object, mark_maybe_pointer)
9967 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
9968 valgrind purposes.
9969 (valgrind_p) [USE_VALGRIND]: New variable.
9970 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
9971
9972 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
9973
9974 * process.c (wait_reading_process_output): Change int pnamelen to
9975 socklen_t.
9976
9977 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
9978 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
9979 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
9980 argument to unsigned long to avoid warning.
9981 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
9982
9983 * conf_post.h (assume): Fix compiler error: x shall be cond.
9984
9985 2013-09-22 Daniel Colascione <dancol@dancol.org>
9986
9987 * xfns.c (x_get_monitor_attributes): Suppress unused variable
9988 warning when compiling without a window system.
9989
9990 2013-09-22 Daniel Colascione <dancol@dancol.org>
9991
9992 * data.c (Qbool_vector_p): New symbol.
9993 (bool_vector_spare_mask, popcount_size_t_generic)
9994 (popcount_size_t_msc, popcount_size_t_gcc)
9995 (popcount_size_t)
9996 (bool_vector_binop_driver)
9997 (count_trailing_zero_bits, size_t_to_host_endian)
9998 (Fbool_vector_exclusive_or)
9999 (Fbool_vector_union)
10000 (Fbool_vector_intersection, Fbool_vector_set_difference)
10001 (Fbool_vector_subsetp, Fbool_vector_not)
10002 (Fbool_vector_count_matches)
10003 (Fbool_vector_count_matches_at): New functions.
10004 (syms_of_data): Intern new symbol, functions.
10005 * alloc.c (bool_vector_payload_bytes): New function.
10006 (Fmake_bool_vector): Instead of calling Fmake_vector,
10007 which performs redundant initialization and argument checking,
10008 just call allocate_vector ourselves. Make sure we clear any
10009 terminating padding to zero.
10010 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
10011 instead of open-coding the size calculation.
10012 (vroundup_ct): New macro.
10013 (vroundup): Assume argument >= 0; invoke vroundup_ct.
10014 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
10015 * composite.c (composition_gstring_put_cache):
10016 Change lint_assume to assume.
10017 * conf_post.h (assume): New macro.
10018 (lint_assume): Remove.
10019 * dispnew.c (update_frame_1): Change lint_assume to assume.
10020 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
10021 to assume.
10022 * image.c (gif_load): Change lint_assume to assume.
10023 * lisp.h (eassert_and_assume): New macro.
10024 (Qbool_vector_p): Declare.
10025 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
10026 (swap16, swap32, swap64): New inline functions.
10027 * macfont.m (macfont_shape): Change lint_assume to assume.
10028 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
10029 * xsettings.c (parse_settings): Use new swap16 and
10030 swap32 from lisp.h instead of file-specific macros.
10031
10032 2013-09-22 Eli Zaretskii <eliz@gnu.org>
10033
10034 * xdisp.c (try_window_id): Don't abort if cursor row could not be
10035 found (which can legitimately happen when the glyph row at the
10036 window start is disabled in the current_matrix. (Bug#15365)
10037
10038 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
10039
10040 Fix syntax.h bug introduced by recent INLINE change.
10041 syntax.h defined an extern inline function SYNTAX_ENTRY that was
10042 conditionally compiled one way in some modules, and a different
10043 way in others. This doesn't work with extern inline functions,
10044 which must have the same definition in all modules, because the
10045 defining code might be shared across modules, depending on the
10046 implementation. Symptoms reported by Martin Rudalics in:
10047 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
10048 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
10049 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
10050 overriding the corresponding functions in syntax.h.
10051 * syntax.h (syntax_property_entry, syntax_property_with_flags)
10052 (syntax_property): New inline functions.
10053 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
10054 Rewrite in terms of these new functions.
10055
10056 2013-09-21 Eli Zaretskii <eliz@gnu.org>
10057
10058 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
10059 not chars_in_text, whose result depends on the multibyteness of
10060 the current buffer. (Bug#15426)
10061
10062 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
10063
10064 Port recent change to hosts where pointers aren't 'long'.
10065 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
10066 Don't assume that pointers are the same width as 'long'.
10067 Add a compile-time check that a pointer fits into two X slots.
10068
10069 A simpler, centralized INLINE.
10070 * conf_post.h (INLINE): Define only if not already defined.
10071 This allows us to use a single INLINE, defined by one file
10072 per executable.
10073 * emacs.c (INLINE): Define it.
10074 Also, include category.h, charset.h, composite.h, dispextern.h,
10075 syntax.h, systime.h, so that their INLINE definitions are expanded
10076 properly for Emacs.
10077 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
10078 * buffer.h, buffer.c (BUFFER_INLINE):
10079 * category.h, category.c (CATEGORY_INLINE):
10080 * character.h, character.c (CHARACTER_INLINE):
10081 * charset.h, charset.c (CHARSET_INLINE):
10082 * composite.h, composite.c (COMPOSITE_INLINE):
10083 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
10084 * frame.h, frame.c (FRAME_INLINE):
10085 * intervals.h, intervals.c (INTERVALS_INLINE):
10086 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
10087 * lisp.h, alloc.c (LISP_INLINE):
10088 * process.h, process.c (PROCESS_INLINE):
10089 * syntax.h, syntax.c (SYNTAX_INLINE):
10090 * systime.h, sysdep.c (SYSTIME_INLINE):
10091 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
10092 * window.h, window.c (WINDOW_INLINE):
10093 Remove. All uses replaced with INLINE.
10094
10095 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
10096
10097 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
10098 to avoid Bug#15398.
10099
10100 2013-09-19 Eli Zaretskii <eliz@gnu.org>
10101
10102 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
10103 'const char *' to avoid compiler warnings due to similar change in
10104 the prototype of x_get_string_resource.
10105
10106 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
10107
10108 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
10109 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
10110 going to replace static variables below. Adjust comments.
10111 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
10112 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
10113 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
10114 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
10115 Related users changed.
10116 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
10117 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
10118 last_mouse_movement_time, going to replace static variables below.
10119 Adjust comments.
10120 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
10121 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
10122 Remove.
10123 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
10124 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
10125 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
10126 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
10127 static variables below.
10128 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
10129 (last_mouse_scroll_bar): Remove.
10130 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
10131 (mouseExited): Related users changed.
10132
10133 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
10134
10135 Do not use external array to process X scroll bar messages.
10136 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
10137 (x_send_scroll_bar_event): Pack window pointer into two slots
10138 of XClientMessageEvent if we're 64-bit. Adjust comment.
10139 (x_scroll_bar_to_input_event): Unpack accordingly.
10140
10141 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
10142
10143 Ifdef away recent changes which aren't relevant to NS port.
10144 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
10145 [!HAVE_NS]: Declare as such.
10146 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
10147 [!HAVE_NS]: Define as such.
10148
10149 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
10150
10151 * frame.c (x_redo_mouse_highlight): New function
10152 to factor out common code used in W32 and X ports.
10153 * dispextern.h (x_redo_mouse_highlight): Add prototype.
10154 * xterm.h (struct x_display_info):
10155 * w32term.h (struct w32_display_info):
10156 * nsterm.h (struct ns_display_info): New members
10157 last_mouse_motion_frame, last_mouse_motion_x and
10158 last_mouse_motion_y, going to replace static variables below.
10159 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
10160 (redo_mouse_highlight): Remove.
10161 (note_mouse_movement, syms_of_xterm): Adjust user.
10162 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
10163 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
10164 (redo_mouse_highlight): Remove.
10165 (note_mouse_movement, syms_of_w32term): Adjust user.
10166 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
10167 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
10168 Remove.
10169 (note_mouse_movement, mouseMoved, syms_of_nsterm):
10170 * nsfns.m (compute_tip_xy): Adjust user.
10171
10172 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
10173
10174 * frame.c (x_mouse_grabbed): New function.
10175 * dispextern.h (x_mouse_grabbed): Add prototype.
10176 (last_mouse_frame): Remove declaration.
10177 * xterm.h (struct x_display_info):
10178 * w32term.h (struct w32_display_info):
10179 * nsterm.h (struct ns_display_info): New member
10180 last_mouse_frame, going to replace...
10181 * xdisp.c (last_mouse_frame): ...global variable.
10182 (note_tool_bar_highlight):
10183 * w32term.c (w32_mouse_position, w32_read_socket):
10184 * xterm.c (XTmouse_position, handle_one_xevent):
10185 Use x_mouse_grabbed.
10186 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
10187
10188 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10189
10190 * w32term.c (w32_read_socket): Avoid temporary
10191 variables in a call to x_real_positions.
10192 * xterm.c (handle_one_xevent): Likewise.
10193
10194 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10195
10196 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
10197 (x_icon_type): Remove prototype.
10198 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
10199 * frame.c (x_icon_type): Remove.
10200 * w32term.c (x_make_frame_visible, x_iconify_frame):
10201 * xterm.c (x_make_frame_visible, x_iconify_frame):
10202 Use x_set_bitmap_icon to factor out common code.
10203
10204 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10205
10206 * dispextern.h (check_x_display_info, x_get_string_resource):
10207 Declare here just once and unify the latter.
10208 * frame.c (check_x_display_info, x_get_string_resource):
10209 * nsterm.h (check_x_display_info):
10210 * xrdb.c (x_get_string_resource):
10211 * xterm.h (check_x_display_info): Remove prototypes.
10212 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
10213 * w32reg.c (x_get_string_resource): Likewise.
10214 (w32_get_rdb_resource): Adjust user.
10215
10216 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10217
10218 * xterm.h (struct x_display_info): New member
10219 x_pending_autoraise_frame, going to replace...
10220 * xterm.c (pending_autoraise_frame): ...static variable.
10221 (x_new_focus_frame, XTread_socket): Adjust users.
10222 * w32term.h (struct w32_display_info): New member
10223 w32_pending_autoraise_frame, going to replace...
10224 * w32term.c (pending_autoraise_frame): ...global variable.
10225 (x_new_focus_frame, w32_read_socket): Adjust users.
10226
10227 2013-09-17 Glenn Morris <rgm@gnu.org>
10228
10229 * xdisp.c (message_dolog): If we create *Messages*,
10230 switch it to messages-buffer-mode.
10231
10232 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
10233
10234 Don't overuse 'const' in types of locals.
10235 * bidi.c (bidi_count_bytes):
10236 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
10237 (xg_event_is_for_scrollbar):
10238 * xselect.c (x_handle_property_notify)
10239 (x_handle_selection_notify, x_handle_dnd_message):
10240 * xsettings.c, xsettings.h (xft_settings_event):
10241 * xterm.c (x_handle_net_wm_state, handle_one_event)
10242 (x_menubar_window_to_frame, x_detect_focus_change)
10243 (construct_mouse_click, note_mouse_movement)
10244 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
10245 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
10246 (handle_one_xevent, x_handle_net_wm_state):
10247 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
10248 (x_handle_dnd_message):
10249 Avoid unnecessary 'const', typically the second 'const' in
10250 'const foo * const arg', a 'const' that does not affect the API
10251 and doesn't significantly help the human reader.
10252
10253 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10254
10255 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
10256 only if Glib < 2.36.0.
10257 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
10258 * xsettings.c (init_gconf, init_gsettings): Do not check
10259 for g_type_init.
10260 * xterm.c (handle_one_xevent): Do not call to x_clear_area
10261 if GTK >= 2.7.0.
10262 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
10263
10264 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
10265
10266 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
10267 before calling g_type_init.
10268
10269 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
10270
10271 * nsterm.m (syms_of_nsterm): ... to here.
10272
10273 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
10274
10275 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
10276 (ignore_next_mouse_click_timeout): Use Time as X does.
10277 (handle_one_xevent): Avoid cast and use unsigned comparison.
10278
10279 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
10280
10281 Do not copy X event in handle_one_xevent except KeyPress case.
10282 Wnen XEvent is processed, it is unlikely to be changed except
10283 KeyPress case, so we can avoid copying and use const pointer to
10284 const data to make sure that an event is not changed elsewhere.
10285 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
10286 const' and do not create local copy except for the KeyPress event.
10287 Use casts to avoid a few glitches. Adjust formatting. Add comments.
10288 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
10289 (x_handle_net_wm_state, x_menubar_window_to_frame)
10290 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
10291 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
10292 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
10293 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
10294 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
10295 (x_handle_dnd_message):
10296 * xsettings.c (xft_settings_event):
10297 Use 'const XEvent * const' where appropriate.
10298 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
10299
10300 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
10301
10302 Fix X event waiting to handle multiple frames.
10303 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
10304 * xterm.c (pending_event_wait): Remove. Adjust users.
10305 (x_detect_focus_change): Pass frame arg.
10306 (handle_one_xevent): Find related frame early and clear per-frame
10307 wait_event_type only if this is an event for the relevant frame.
10308 (x_wait_for_event): Use per-frame wait_event_type.
10309
10310 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
10311
10312 * nsfns.m (Fx_create_frame): Fix font driver registration for
10313 GNUstep.
10314
10315 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
10316 for syms_of_macfont.
10317
10318 * nsterm.m: Include macfont.h.
10319 (ns_tmp_flags, ns_tmp_font): Remove.
10320 (ns_compute_glyph_string_overhangs): Check for driver Qns.
10321 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
10322 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
10323 (changeFont:): Fix code style. Check for font driver type when
10324 getiing font.
10325
10326 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
10327 (f)->descent.
10328
10329 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
10330 (nsfont_open): Set font driver type.
10331 Set font->ascent and font->descent. Figure out font instead of
10332 ns_tmp_font, and flags instead of ns_tmp_flags.
10333 Fix indentation. Remove call to ns_draw_text_decoration,
10334 moved to nsterm.
10335
10336 * nsfns.m: Include macfont.h.
10337 (Fx_create_frame): Register macfont driver, make a better default font.
10338 (Fns_popup_font_panel): Get font from macfont driver, if used.
10339
10340 * macfont.m, macfont.h, macuvs.h: New files.
10341
10342 * font.h: Declare syms_of_macfont.
10343
10344 * font.c (syms_of_font): Call syms_of_macfont.
10345
10346 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
10347
10348 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
10349
10350 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
10351 and it is always zero for others, so I assume that this is an ancient
10352 leftover which nobody will want to change any more.
10353 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
10354 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
10355 * frame.c (x_set_scroll_bar_width):
10356 * w32fns.c (w32_createscrollbar):
10357 * w32term.c (w32_set_vertical_scroll_bar):
10358 * xfns.c (x_set_scroll_bar_default_width):
10359 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
10360 (x_scroll_bar_expose): Related users changed.
10361
10362 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
10363
10364 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
10365 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
10366 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
10367 Define as such.
10368 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
10369 Define once here...
10370 * nsterm.h, w32term.h, xterm.h: ...and not here.
10371 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
10372 Remove unused Xisms.
10373 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
10374 these modules are never compiled otherwise.
10375
10376 2013-09-14 Eli Zaretskii <eliz@gnu.org>
10377
10378 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
10379 Doc fix. (Bug#15375)
10380
10381 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
10382
10383 Unify Fx_focus_frame between all ports.
10384 * frame.h (x_focus_frame): New prototype.
10385 * xfns.c (Fx_focus_frame): Remove.
10386 (syms_of_xfns): Do not defsubr it.
10387 (x_focus_frame): X implementation.
10388 * nsfns.m (Fx_focus_frame): Remove.
10389 (syms_of_nsfns): Do not defsubr it.
10390 (x_focus_frame): NS implementation.
10391 * w32term.c (Fx_focus_frame): Remove.
10392 (x_focus_on_frame): Rename to...
10393 (x_focus_frame): W32 implementation.
10394 * w32term.h (x_focus_on_frame): Remove prototype.
10395 * w32fns.c (Fx_focus_frame): Remove.
10396 (syms_of_w32fns): Do not defsubr it.
10397 * frame.c (Fx_focus_frame): Define here.
10398 (syms_of_frame): Defsubr here.
10399 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
10400
10401 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
10402
10403 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
10404 All of them are replaced with FRAME_DISPLAY_INFO, defined in
10405 each port to reference the port-specific window system data.
10406 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
10407 (FRAME_DISPLAY_INFO): Define.
10408 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
10409 (FRAME_DISPLAY_INFO): Define. Adjust users.
10410 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
10411 (FRAME_DISPLAY_INFO): Define. Adjust users.
10412 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
10413 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
10414 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
10415 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
10416 * xselect.c, xterm.c: All related users changed.
10417
10418 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
10419
10420 * xterm.h (x_window_to_frame, x_any_window_to_frame)
10421 (x_menubar_window_to_frame): Remove prototypes.
10422 * xfns.c (x_window_to_frame, x_any_window_to_frame)
10423 (x_menubar_window_to_frame, x_top_window_to_frame):
10424 Move from here...
10425 * xterm.c (x_window_to_frame, x_any_window_to_frame)
10426 (x_menubar_window_to_frame, x_top_window_to_frame):
10427 ...to here and convert all but the last to static.
10428
10429 2013-09-12 Eli Zaretskii <eliz@gnu.org>
10430
10431 * lisp.mk (lisp): Add w32-common-fns.elc.
10432
10433 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
10434
10435 * charset.c (char_charset): Document an exception for char-charset.
10436
10437 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
10438
10439 * xterm.h (x_display_info): New field last_user_time...
10440 * xterm.c (toplevel): ...to replace static last_user_time.
10441 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
10442
10443 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
10444
10445 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
10446 scroll bar values to prevent thumb from disappear and update comment.
10447
10448 2013-09-11 Glenn Morris <rgm@gnu.org>
10449
10450 * emacs.c (usage_message): Possessive apostrophe tweak.
10451
10452 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10453
10454 * nsterm.m (syms_of_nsterm): Use Qns.
10455 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
10456 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
10457 * xfns.c (x_display_info_for_name, Fx_open_connection):
10458 Remove old '#if 0' code.
10459 (syms_of_xfns): Use Qx.
10460 * termhooks.h (fullscreen_hook): Remove the leftover.
10461 (struct terminal): Fix typo in comment.
10462
10463 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10464
10465 Cleaning up a few X scroll bar bits.
10466 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
10467 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
10468 New member last_seen_part, going to replace...
10469 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
10470 (xt_action_hook) [USE_LUCID]: Adjust user.
10471 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
10472 Lucid-specific scroll bar support.
10473 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
10474 to int and adjust to use last_seen_part member.
10475 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
10476 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
10477 Initialize last_seen_part.
10478
10479 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
10480
10481 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
10482 insert-buffer-substring an empty string.
10483
10484 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
10485
10486 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
10487 avoiding a GCC warning.
10488
10489 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10490
10491 Ifdef away frame tool bar code when it is not really used.
10492 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
10493 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
10494 and minimize_tool_bar_window_p under the above.
10495 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
10496 (fset_tool_bar_window): Likewise.
10497 * dispnew.c (clear_current_matrices, clear_desired_matrices)
10498 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
10499 (change_frame_size_1):
10500 * window.c (window_from_coordinates, Frecenter): Adjust users.
10501 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
10502 code is not really used.
10503 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
10504 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
10505 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
10506 [!USE_GTK && !HAVE_NS]: Define as such.
10507 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
10508 (note_mouse_highlight, expose_frame):
10509 * xfns.c (x_set_tool_bar_lines):
10510 * xterm.c (handle_one_xevent): Adjust users.
10511
10512 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
10513
10514 Fix corruption with multiple emacsclient -t instances (Bug#15222).
10515 This bug was introduced by my 2013-08-26 patch, which incorrectly
10516 assumed that the terminfo implementation doesn't use termcap buffers.
10517 * term.c (init_tty) [TERMINFO]: Remove optimization, as
10518 these buffers apparently are used after all.
10519 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
10520 (struct tty_display_info): Define members termcap_term_buffer and
10521 termcap_strings_buffer even if TERMINFO.
10522
10523 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10524
10525 Fix last change.
10526 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
10527 'usage' docstring entry to pacify make-docfile.
10528
10529 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
10530
10531 Change comparison functions =, <, >, <=, >= to take many arguments.
10532 * data.c: Change comparison functions' interface and implementation.
10533 * lisp.h: Make arithcompare available for efficient two arg
10534 comparisons.
10535 * bytecode.c: Use arithcompare.
10536 * fileio.c: Use new interface.
10537
10538 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
10539
10540 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
10541
10542 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
10543
10544 * eval.c (Feval): Document the new use of `lexical'.
10545
10546 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
10547
10548 Review and drop old frame resize hack.
10549 * frame.h (struct frame): Remove force_flush_display_p.
10550 * dispnew.c (update_frame): Adjust user and don't call
10551 flush_frame here. The comment has said that there was an issues
10552 with redisplaying fringes, but I don't see any differences with
10553 and without this hack. Hopefully we can continue without it.
10554 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
10555 current frame matrices twice if resized_p is set.
10556
10557 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
10558
10559 Do not populate pure Xism x_sync to other ports.
10560 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
10561 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
10562 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
10563 * w32term.h (x_sync): Remove prototype.
10564
10565 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
10566
10567 Cleanup frame flushing.
10568 * dispextern.h (struct redisplay_interface):
10569 Drop flush_display_optional because flush_display is enough
10570 for X and flushing via RIF is just a no-op for others.
10571 * frame.h (flush_frame): New function.
10572 * dispnew.c (update_frame):
10573 * minibuf.c (read_minibuf):
10574 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
10575 Use it.
10576 * keyboard.c (detect_input_pending_run_timers): Do not flush
10577 all frames but selected one in redisplay_preserve_echo_area.
10578 * nsterm.m (ns_flush): Remove no-op.
10579 (ns_redisplay_interface): Adjust user.
10580 * w32term.h (x_flush): Remove no-op.
10581 (w32_redisplay_interface): Adjust user.
10582 * xterm.c (x_flush): Simplify because we do not flush all
10583 frames at once any more. Adjust comment.
10584 (x_redisplay_interface): Adjust user.
10585
10586 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
10587
10588 Port --without-x --enable-gcc-warnings to Fedora 19.
10589 * gfilenotify.c (globals_of_gfilenotify):
10590 Call g_type_init only if using an older glib version that needs it.
10591
10592 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
10593
10594 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
10595 (last_glyphless_glyph_merged_face_id): Remove declarations.
10596 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
10597 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
10598 (last_glyphless_glyph_merged_face_id): Now static.
10599 (merge_escape_glyph_face): New function, refactored from...
10600 (get_next_display_element): ...here.
10601 (merge_glyphless_glyph_face): New function, refactored from...
10602 (produce_glyphless_glyph): ...here...
10603 * term.c (produce_glyphless_glyph): ...and here.
10604
10605 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
10606
10607 * eval.c (eval_sub): Only call Ffunction if necessary.
10608
10609 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
10610
10611 Attempt to make redisplay more selective when changing cursor type.
10612 * frame.h (struct frame): New bitfield cursor_type_changed.
10613 * xdisp.c (cursor_type_changed): Remove.
10614 (try_cursor_movement, redisplay_window, try_window_id)
10615 (set_frame_cursor_types, try_window_reusing_current_matrix):
10616 Adjust to use per-frame bitfield.
10617 (redisplay_internal): Look for cursor type change on each visible
10618 frame and consider all frames if cursor type has been changed on
10619 the frame other than selected. If cursor type has been changed on
10620 selected frame only, do not use fast update.
10621
10622 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
10623
10624 Attempt to make redisplay more selective when changing fonts.
10625 * frame.h (struct frame): New bitfield fonts_changed.
10626 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
10627 (adjust_frame_glyphs): Add prototype.
10628 * dispnew.c (fonts_changed_p): Remove.
10629 (adjust_glyphs): Remove because we do not
10630 adjust matrices on all frames at once any more.
10631 (adjust_frame_glyphs): Block and unblock input here.
10632 (adjust_glyph_matrix): Use fonts_changed.
10633 (change_frame_size_1): Use adjust_frame_glyphs.
10634 * font.c (font_open_entity): Use fonts_changed.
10635 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
10636 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
10637 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
10638 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
10639 (shrink_mini_window, Fresize_mini_window_internal)
10640 (window_scroll_pixel_based, Fset_window_configuration)
10641 (apply_window_adjustment, Fset_window_vscroll):
10642 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
10643 Use adjust_frame_glyphs.
10644 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
10645 (try_window_reusing_current_matrix, try_window_id, display_line)
10646 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
10647 (redisplay_internal): Consider fonts_changed and adjust frame
10648 matrices for each frame only if the frame is visible. If font
10649 has been changed on some frame during full redisplay, retry
10650 only visible frames where the font has been actually changed.
10651
10652 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10653
10654 Cache current header and mode line height for each window.
10655 * window.h (struct window): New fields mode_line_height
10656 and header_line_height.
10657 * window.c (make_window): Initialize them.
10658 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
10659 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
10660 (current_mode_line_height, current_header_line_height):
10661 Remove declaration.
10662 * xdisp.c (current_mode_line_height, current_header_line_height):
10663 Remove.
10664 (pos_visible_p, init_xdisp): Adjust user.
10665 (redisplay_window): Invalidate mode_line_height and
10666 header_line_height if current and desired matrices do not agree.
10667
10668 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10669
10670 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
10671 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
10672
10673 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10674
10675 Make --without-x compatible with --enable-gcc-warnings.
10676 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
10677 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
10678 members under HAVE_WINDOW_SYSTEM.
10679 * keyboard.c (make_lispy_focus_out): Likewise.
10680 (record_menu_key): Move under HAVE_MENUS.
10681 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
10682 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
10683 (syms_of_xdisp): Adjust user.
10684 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
10685 (start_hourglass, cancel_hourglass):
10686 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
10687 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
10688 and CLEAR_FONT_TABLE_NFONTS.
10689 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
10690 Declare only if HAVE_WINDOW_SYSTEM.
10691 (lface_same_font_attributes_p, clear_face_gcs): Define only
10692 if HAVE_WINDOW_SYSTEM.
10693
10694 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10695
10696 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
10697 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
10698 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
10699
10700 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
10701
10702 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
10703
10704 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
10705
10706 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
10707 This fixes a type error on hosts where ptrdiff_t is wider than int.
10708
10709 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
10710
10711 * keyboard.c (read_key_sequence_vs): New function.
10712 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
10713 common code.
10714
10715 * callint.c (Fcall_interactively): Always return a vector for 'K'.
10716
10717 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
10718
10719 Makefile improvements.
10720 * Makefile.in (config.status): Don't use double-colon rules, as
10721 they are not portable according to POSIX. Fix shell typo with `;
10722 I guess this rule has never been tested?
10723 (VCSWITNESS): New macro, to override any environment var.
10724
10725 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
10726
10727 * xterm.h (struct x_display_info): Do not track X connection
10728 fd separately because it is always available from Display.
10729 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
10730 Adjust users.
10731
10732 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
10733
10734 * buffer.c (drop_overlay):
10735 * fileio.c (restore_point_unwind): Prefer unchain_marker to
10736 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
10737
10738 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
10739
10740 * buffer.c (Fmake_overlay, Fmove_overlay):
10741 * intervals.c (set_point_from_marker):
10742 * print.c (PRINTPREPARE): Prefer signal_error
10743 to plain error and report unsuitable marker too.
10744
10745 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
10746
10747 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
10748 for 'dragging' member.
10749 (struct x_output): Remove set-but-unused leftovers
10750 'left_before_move' and 'top_before_move'.
10751 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
10752 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
10753 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
10754 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
10755 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
10756 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
10757 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
10758 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
10759
10760 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
10761
10762 * nsfont.m (INVALID_GLYPH): New define.
10763 (nsfont_encode_char): Use INVALID_GLYPH.
10764 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
10765
10766 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10767
10768 * xterm.c (x_last_mouse_movement_time): Revert last change.
10769 This code should use XDisplayMotionBufferSize to check display's
10770 motion history first, and there are few other issues as well.
10771 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
10772 (handle_one_xevent): Adjust user.
10773
10774 2013-09-02 Martin Rudalics <rudalics@gmx.at>
10775
10776 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
10777 * frame.c (Flast_nonminibuf_frame): ... to here.
10778 (check_minibuf_window): Don't abort if no window was found
10779 (Bug#15247).
10780
10781 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10782
10783 Use XGetMotionEvents to ask the last mouse motion time from X server.
10784 * xterm.c (X_MOTION_HISTORY): Default to 1.
10785 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
10786 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
10787 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
10788 Ifdef away legacy code.
10789 (XTmouse_position, x_scroll_bar_report_motion):
10790 Use x_last_mouse_movement_time.
10791 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
10792 UnmapNotify event.
10793
10794 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10795
10796 * msdos.c (last_mouse_window): Move to...
10797 (dos_rawgetc): ...this function and adjust comment.
10798 * nsterm.m (last_window): Rename to last_mouse_window, move to...
10799 (mouseMoved): ...this function and adjust comment.
10800 * w32term.c (last_window): Likewise with...
10801 (w32_read_socket): ...this function.
10802 * xterm.c (last_window): Likewise with...
10803 (handle_one_xevent): ...this function.
10804
10805 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10806
10807 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
10808 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
10809 (handle_one_xevent): ...to here.
10810 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
10811 otherwise.
10812
10813 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10814
10815 * msdos.c (IT_set_terminal_window): Remove no-op.
10816 (initialize_msdos_display): Adjust terminal setup.
10817 * w32console.c (w32con_set_terminal_window): Remove no-op.
10818 (initialize_w32_display): Adjust terminal setup.
10819 * w32term.c (w32_set_terminal_window): Remove no-op.
10820 (w32_create_terminal): Adjust terminal setup.
10821 * xterm.c (XTset_terminal_window): Remove no-op.
10822 (x_create_terminal): Adjust terminal setup.
10823
10824 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
10825
10826 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
10827 Remove no-ops.
10828 (ns_create_terminal): Adjust terminal setup.
10829 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
10830 Remove no-ops.
10831 (w32_create_terminal): Adjust terminal setup.
10832 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
10833 Remove no-ops.
10834 (x_create_terminal): Adjust terminal setup.
10835
10836 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
10837
10838 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
10839 (CLIP_TEXT_POS_FROM_MARKER): New macro.
10840 * dispnew.c (buffer_posn_from_coords):
10841 * window.c (Fwindow_end, displayed_window_lines):
10842 * xdisp.c (redisplay_mode_lines): Use it.
10843
10844 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
10845
10846 * fontset.c (face_for_char): Check char in the current face font first
10847 if HAVE_NS (Bug#15138).
10848
10849 2013-08-31 Martin Rudalics <rudalics@gmx.at>
10850
10851 * window.c (temp_output_buffer_show): Make sure window returned
10852 by display_buffer is live (Bug#15213).
10853
10854 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
10855
10856 Minor cleanup to avoid forward declarations.
10857 * coding.h (struct ccl_spec): Remove forward declaration.
10858 * composite.h (toplevel): Include font.h.
10859 (struct composition_it, struct face, struct font_metrics):
10860 Remove forward declaration.
10861 * dispextern.h (struct image, struct atimer): Likewise.
10862 * emacsgtkfixed.h (struct frame): Likewise.
10863 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
10864 * font.h (struct font_driver, struct font, struct glyph_string)
10865 (struct face): Remove forward declaration.
10866 * fontset.h (struct face, struct font): Likewise.
10867 * frame.h (toplevel): Style cleanup.
10868 (enum output_method): Move to...
10869 * termhooks.h (enum output_method): ...here.
10870 (struct glyph, struct frame, struct ns_display_info)
10871 (struct x_display_info, struct w32_display_info):
10872 Remove forward declaration.
10873 * xterm.h (toplevel): Include termhooks.h.
10874 (struct font, struct window, struct glyph_matrix, struct frame)
10875 (struct input_event, struct face, struct image): Remove forward
10876 declaration.
10877 * gtkutil.h (struct _widget_value): Likewise.
10878 * keyboard.h (toplevel): Include termhooks.h.
10879 (struct input_event): Remove forward declaration.
10880
10881 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10882
10883 * intervals.c (set_point_from_marker): New function.
10884 * editfns.c (Fgoto_char):
10885 * process.c (Finternal_default_process_filter):
10886 * window.c (select_window_1): Use it.
10887 * buffer.h (set_point_from_marker): Add prototype.
10888
10889 2013-08-29 Eli Zaretskii <eliz@gnu.org>
10890
10891 * w32.c (term_winsock): Call release_listen_threads before calling
10892 WSACleanup.
10893 (_sys_wait_accept): Wait for accept event in a loop with a finite
10894 timeout, instead of waiting indefinitely. Will hopefully avoid
10895 hanging during exit because WSACleanup deadlocks waiting for the
10896 event object to be released. (Bug#14333)
10897
10898 * w32proc.c (release_listen_threads): New function, signals all
10899 the reader threads that listen for connections to stop waiting.
10900
10901 * w32.h (release_listen_threads): Add prototype.
10902
10903 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10904
10905 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
10906 field of new marker (for sanity and safety).
10907 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
10908 anyway because XMISCTYPE is a function and can't be an lvalue).
10909
10910 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10911
10912 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
10913 (x_after_update_window_line, x_scroll_bar_create)
10914 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
10915 (handle_one_xevent, x_clear_frame_area):
10916 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
10917 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
10918 * xterm.h (x_clear_area): Adjust prototype.
10919
10920 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10921
10922 Hook scanning and indentation functions to find_newline. This helps
10923 to avoid duplicated code and renders more respect to newline cache.
10924 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
10925 * cmds.c (Fforward_line):
10926 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
10927 Use find_newline and avoid unnecessary point movements.
10928 * search.c (scan_newline): Implement on top of find_newline.
10929
10930 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
10931
10932 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
10933 scoped code (bug#11258).
10934
10935 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
10936
10937 * nsterm.m (last_window): New variable.
10938 (EV_TRAILER2): New macro.
10939 (EV_TRAILER): Call EV_TRAILER2.
10940 (mouseMoved:): Add support for mouse-autoselect-window
10941 on nextstep (Bug#6888).
10942
10943 2013-08-28 Andreas Schwab <schwab@suse.de>
10944
10945 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
10946 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
10947 Remove unused macro definitions.
10948 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
10949 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
10950 Only define if emacs.
10951
10952 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
10953
10954 Prefer enum glyph_row_area to int where appropriate.
10955 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
10956 Fix comment.
10957 (window_box, window_box_width, window_box_left, window_box_left_offset)
10958 (window_box_right, window_box_right_offset): Adjust prototypes.
10959 * xdisp.c (window_box, window_box_width, window_box_left)
10960 (window_box_left_offset, window_box_right, window_box_right_offset):
10961 Use enum glyph_row_area. Adjust users and tweak comment where needed.
10962 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
10963 * nsterm.m (ns_clip_to_row):
10964 * w32term.c (w32_clip_to_row):
10965 * xterm.c (x_clip_to_row): Likewise.
10966
10967 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
10968
10969 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
10970 (Fprevious_overlay_change): Fast path for buffer with no overlays.
10971
10972 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
10973
10974 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
10975 for portability to hosts where /bin/sh has problems.
10976
10977 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
10978
10979 Redesign redisplay interface to drop global output_cursor.
10980 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
10981 (toplevel): Remove declaration of output_cursor.
10982 (set_output_cursor, x_cursor_to): Remove prototype.
10983 * window.h (struct window): New member output_cursor.
10984 (output_cursor_to): New function to replace RIF member.
10985 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
10986 (update_text_area, set_window_cursor_after_update): Use it.
10987 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
10988 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
10989 * nsterm.m (ns_update_window_begin, ns_update_window_end):
10990 * w32term.c (x_update_window_begin, x_update_window_end):
10991 * xterm.c (x_update_window_begin, x_update_window_end):
10992 Adjust to use per-window output cursor.
10993
10994 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
10995
10996 Simplify SELECT_TYPE-related code.
10997 Like EMACS_TIME, this portability layer is no longer needed, since
10998 Emacs has been using fd_set as a portability layer for some time.
10999 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
11000 (SELECT_TYPE): Remove. All uses changed to fd_set.
11001 (fd_set) [!FD_SET]: New typedef.
11002
11003 Simplify EMACS_TIME-related code.
11004 This portability layer is no longer needed, since Emacs has been
11005 using struct timespec as a portability layer for some time.
11006 * atimer.h, buffer.h, dispextern.h, xgselect.h:
11007 Include <time.h> rather than "systime.h"; that's all that's needed now.
11008 * dispnew.c: Include <timespec.h> rather than "systime.h";
11009 that's all that's needed now.
11010 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
11011 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
11012 TIMESPEC_RESOLUTION.
11013 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
11014 LOG10_TIMESPEC_RESOLUTION.
11015 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
11016 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
11017 (make_emacs_time): Remove. All used changed to make_timespec.
11018 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
11019 (current_timespec): Rename from current_emacs_time. All uses changed.
11020 (add_emacs_time): Remove. All uses changed to timespec_add.
11021 (sub_emacs_time): Remove. All uses change dot timespec_sub.
11022 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
11023 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
11024 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
11025 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
11026 (current_timespec): Rename from current_emacs_time. All uses changed.
11027 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
11028 changed to timespec_cmp.
11029 * xgselect.c: Include <timespec.h>, since our .h files don't.
11030
11031 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
11032
11033 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
11034 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
11035 Remove the leftovers.
11036 * gtkutil.c (toplevel): Do not declare Qxft but include
11037 font.h to do so.
11038 * image.c (toplevel): Do not declare Vlibrary_cache because
11039 it's already done in lisp.h.
11040
11041 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
11042
11043 * lisp.h (Mouse_HLInfo): Move from here...
11044 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
11045 (reset_mouse_highlight): New function.
11046 * msdos.c (dos_set_window_size, IT_update_begin)
11047 (internal_terminal_init):
11048 * nsterm.m (ns_update_window_end, x_free_frame_resources)
11049 (ns_initialize_display_info):
11050 * w32console.c (initialize_w32_display):
11051 * w32term.c (x_update_window_end, x_free_frame_resources)
11052 (w32_initialize_display_info):
11053 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
11054 * window.c (Fdelete_other_windows_internal):
11055 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
11056 * termchar.h (toplevel):
11057 * xterm.h (toplevel): Include dispextern.h.
11058
11059 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
11060
11061 Fix minor problems found by static checking.
11062 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
11063 (expect): Avoid nested-if warning.
11064 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
11065 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
11066 * nsterm.h, nsterm.m (ns_select):
11067 * xgselect.c, xgselect.h (xg_select):
11068 Adjust signature to better match pselect's.
11069 * nsterm.m (ns_select):
11070 Don't set *TIMEOUT, since pselect doesn't.
11071 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
11072 diagnostic about assigning const char * to it.
11073 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
11074
11075 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
11076
11077 * lread.c (substitute_object_recurse): Handle hash-tables as well
11078 (bug#15190).
11079
11080 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
11081
11082 Fix unlikely core dump in init_tty, and simplify terminfo case.
11083 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
11084 The old version incorrectly dumped core if malloc returned a
11085 buffer containing only non-NUL bytes.
11086 (init_tty): Do not allocate or free termcap buffers; the
11087 struct does that for us now.
11088 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
11089 (struct tty_display_info): Define members termcap_term_buffer and
11090 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
11091 use them. Allocate them directly in struct rather than indirectly
11092 via a pointer, to simplify init_tty.
11093
11094 * frame.c (check_minibuf_window): Initialize 'window' properly,
11095 so that Emacs reliably aborts later if 'window' is not initialized.
11096
11097 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
11098
11099 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
11100 of VoidSymbol (Bug#15154).
11101
11102 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11103
11104 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
11105 mouse_face_beg_y and mouse_face_end_y.
11106 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
11107 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
11108 Adjust users and update comment where appropriate.
11109
11110 2013-08-26 Martin Rudalics <rudalics@gmx.at>
11111
11112 * frame.c (check_minibuf_window): New function.
11113 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
11114 Call check_minibuf_window (Bug#15183).
11115
11116 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11117
11118 * window.h (struct window): Replace last_cursor with last_cursor_vpos
11119 because this is the only last cursor data we need to keep and consult.
11120 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
11121 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
11122 Adjust users.
11123
11124 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11125
11126 Fix recovering from possible decompression error.
11127 Since insert_from_gap doesn't always move point, we can't use PT as
11128 the position where the partially decompressed data ends, and
11129 should count how many bytes was produced so far.
11130 * decompress.c (struct decompress_unwind_data): Add nbytes member.
11131 (unwind_decompress): Really delete partially uncompressed data.
11132 (Fzlib_decompress_region): Take decompressed data size into account.
11133
11134 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11135
11136 * syntax.c (init_syntax_once): Adjust comment and do an early
11137 initialization of Qchar_table_extra_slots just once...
11138 * casetab.c (init_casetab_once):
11139 * category.c (init_category_once):
11140 * character.c (syms_of_character):
11141 * coding.c (syms_of_coding):
11142 * xdisp.c (syms_of_xdisp): ...and omit it here.
11143
11144 2013-08-24 Eli Zaretskii <eliz@gnu.org>
11145
11146 * xdisp.c (get_next_display_element): Don't apply to characters
11147 from a display vector the logic of setting it->end_of_box_run_p
11148 suitable for characters from a buffer. (Bug#15175)
11149
11150 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
11151 to handle directories, rather than '_utime' which doesn't.
11152 (Bug#15176)
11153
11154 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
11155
11156 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
11157 or fullscreen (Bug#14627).
11158
11159 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
11160
11161 System-dependent integer overflow fixes.
11162 * process.c (Fset_process_window_size): Signal an error if
11163 the window size is outside the range supported by the lower level.
11164 * sysdep.c (set_window_size): Return negative on error,
11165 nonnegative on success, rather than -1, 0, 1 on not in system,
11166 failure, success. This is simpler. Caller changed.
11167 (serial_configure): Remove unnecessary initialization of local.
11168 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
11169 size fits in unsigned long; this isn't true on some 32-bit hosts.
11170 Avoid buffer overrun if some future version of /proc/meminfo has a
11171 variable name longer than 20 bytes.
11172 (system_process_attributes) [__FreeBSD__]:
11173 Don't assume hw.availpages fits in 'int'.
11174
11175 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
11176
11177 Don't let very long directory names overrun the stack.
11178 Fix some related minor problems involving "//", vfork.
11179 * callproc.c (encode_current_directory): New function.
11180 (call_process): Don't append "/"; not needed.
11181 * fileio.c (file_name_as_directory_slop): New constant.
11182 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
11183 this can save the caller having to alloca.
11184 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
11185 Use SAFE_ALLOCA, not alloca.
11186 (directory_file_name, Fexpand_file_name): Leave leading "//"
11187 alone, since it can be special even on POSIX platforms.
11188 * callproc.c (call_process):
11189 * process.c (Fformat_network_address):
11190 * sysdep.c (sys_subshell):
11191 Use encode_current_directory rather than rolling our own.
11192 (create_process): No need to encode directory; caller does that now.
11193 * process.h (encode_current_directory): New decl.
11194 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
11195 Rework to avoid 'goto xyzzy;'.
11196
11197 2013-08-23 Eli Zaretskii <eliz@gnu.org>
11198
11199 * xdisp.c (handle_face_prop): If the default face was remapped use
11200 the remapped face for strings from prefix properties. (Bug#15155)
11201
11202 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
11203
11204 Minor cleanup for redisplay interface and few related functions.
11205 * frame.h (enum text_cursor_kinds): Move from here...
11206 * dispextern.h (enum text_cursor_kinds): ...to here.
11207 (toplevel): Drop unnecessary declarations.
11208 (struct redisplay_interface): Use bool and enum text_cursor_kinds
11209 in update_window_end_hook and draw_window_cursor functions.
11210 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
11211 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
11212 * w32term.c (x_update_window_end, w32_draw_window_cursor):
11213 * xterm.c (x_update_window_end, x_draw_window_cursor):
11214 * xdisp.c (display_and_set_cursor, update_window_cursor)
11215 (update_cursor_in_window_tree, x_update_cursor): Use bool and
11216 enum text_cursor_kinds where appropriate.
11217
11218 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
11219
11220 Redesign redisplay interface to drop updated_row and updated_area.
11221 * dispextern.h (updated_row, updated_area): Remove declaration.
11222 (struct redisplay_interface): Pass glyph row and row area parameters
11223 to write_glyphs, insert_glyphs and clear_end_of_line functions.
11224 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
11225 Adjust prototypes.
11226 * dispnew.c (updated_row, updated_area): Remove.
11227 (redraw_overlapped_rows, update_window_line): Adjust user.
11228 (update_marginal_area, update_text_area): Likewise. Pass updated row
11229 as a parameter. Prefer enum glyph_row_area to int where appropriate.
11230 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
11231 Adjust users.
11232
11233 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
11234
11235 * process.c (flush_pending_output): Remove stub.
11236 All uses removed.
11237
11238 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
11239
11240 * callproc.c: Fix race that killed background processes (Bug#15144).
11241 (call_process): New arg TEMPFILE_INDEX. Callers changed.
11242 Record deleted process-id in critical section, not afterwards.
11243 Don't mistakenly kill process created by a call-process invocation
11244 that discards output and does not wait.
11245
11246 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
11247
11248 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
11249 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
11250 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
11251 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
11252 to shut up compiler in mark_object.
11253 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
11254
11255 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
11256
11257 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
11258 We can't portably rely on PTY_OPEN doing that, even if
11259 it calls posix_openpt with O_CLOEXEC.
11260
11261 2013-08-20 Kenichi Handa <handa@gnu.org>
11262
11263 * character.c (string_char): Improve commentary.
11264
11265 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
11266
11267 * image.c (SIGNATURE_DIGESTSIZE): Remove.
11268 (struct animation_cache): Make signature a flexible array member.
11269 All uses changed. This is a tad slower but may insulate us better
11270 from future changes to ImageMagick.
11271
11272 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
11273
11274 * image.c: Shrink memory needed for animation cache.
11275 (SIGNATURE_DIGESTSIZE): New constant.
11276 (struct animation_cache): Make 'signature' a fixed size array of bytes.
11277 (imagemagick_create_cache): Copy the signature. This saves
11278 several KB of memory that ImageMagick wastes per signature.
11279 Don't bother updating the update_time, as the caller does that now.
11280 (imagemagick_prune_animation_cache): Don't destroy the signature, as
11281 it's a fixed size struct member now.
11282 (imagemagick_get_animation_cache): Always destroy the signature,
11283 as it's now imagemagick_create_cache's responsibility to copy it.
11284 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
11285 and use memcmp rather than strcmp.
11286 eassert that ImageMagick returns a signature of the specified length.
11287
11288 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11289
11290 * image.c (imagemagick_get_animation_cache): Don't segfault on
11291 each invocation.
11292 (imagemagick_get_animation_cache): Revert to previous definition
11293 so that it actually works. But keep the memory leak fix.
11294 (imagemagick_get_animation_cache): Fix memory leak.
11295
11296 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
11297
11298 * image.c: Fix animation cache signature memory leak.
11299 Fix some other minor performance problems while we're at it.
11300 (imagemagick_create_cache): Clear just the members that
11301 need clearing. Don't set update_time, as caller does that now.
11302 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
11303 Simplify by using pointer-to-pointer instead of a prev pointer.
11304 (imagemagick_prune_animation_cache): Use make_emacs_time rather
11305 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
11306 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
11307 it's already a copy. Free the signature probe unless it's cached.
11308
11309 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
11310 This was introduced by my 2013-08-12 fix for Bug#15035.
11311
11312 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
11313
11314 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
11315 (imagemagick_prune_animation_cache): Now static.
11316
11317 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
11318
11319 * image.c (imagemagick_get_animation_cache): Don't segfault when
11320 pruning all entries.
11321
11322 2013-08-18 Ken Brown <kbrown@cornell.edu>
11323
11324 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
11325 static heap if ENABLE_CHECKING is defined.
11326 (max_bss_sbrk_ptr): New variable.
11327 (bss_sbrk): Use it.
11328 (report_sheap_usage): Report maximum static heap usage instead of
11329 ending static heap usage.
11330
11331 2013-08-17 Eli Zaretskii <eliz@gnu.org>
11332
11333 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
11334 of zlib_initialized according to the results of calling
11335 init_zlib_functions.
11336
11337 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
11338
11339 * image.c: Implement an ImageMagick per-image cache.
11340 (imagemagick_get_animation_cache): Fix a double-free error.
11341 (imagemagick_load_image): Remove the ping_wand code, which only
11342 apparently saved time on invalid animated images, and slowed down
11343 everything else. Optimize for the common case.
11344
11345 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
11346
11347 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
11348
11349 * editfns.c (insert_before_markers): Mention overlay in the doc string.
11350
11351 * marker.c (set_marker): Remove documentation of undefined behavior.
11352
11353 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11354
11355 * image.c (imagemagick_compute_animated_image): Animate correctly
11356 when sub-images are smaller than the main image.
11357 (imagemagick_compute_animated_image): Setting the iterator row to
11358 zero is apparently not allowed.
11359 (imagemagick_compute_animated_image): Allow images that say they
11360 have sub-images that are bigger than the main image, but just crop
11361 them.
11362
11363 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
11364
11365 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
11366
11367 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11368
11369 * image.c (imagemagick_compute_animated_image): Respect the GIF
11370 disposal methods.
11371
11372 2013-08-15 Ken Brown <kbrown@cornell.edu>
11373
11374 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
11375 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
11376 needed.
11377
11378 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
11379
11380 Fix minor problems found by static checking.
11381 * frame.c (delete_frame):
11382 * xdisp.c (next_element_from_display_vector):
11383 Avoid uninitialized local.
11384 * image.c (imagemagick_compute_animated_image): Port to C89.
11385 Prefer usual GNU indentation style for loops.
11386 Be more careful about bizarrely large sizes, by using ptrdiff_t
11387 instead of int.
11388
11389 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
11390
11391 Fix infinite frame selection loop (Bug#15025).
11392 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
11393
11394 2013-08-15 Eli Zaretskii <eliz@gnu.org>
11395
11396 * xdisp.c (compute_window_start_on_continuation_line):
11397 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
11398 to make sure we end up setting the window start at the leftmost
11399 visible character of the display line. This avoids funky
11400 horizontal shifting because the window start is not kept on the
11401 same position. (Bug#15090)
11402 (next_element_from_display_vector): Support 'box' face attribute
11403 in the face definitions of a display vector. (Bug#15099)
11404
11405 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11406
11407 * image.c (imagemagick_compute_animated_image): Implement animated
11408 images (bug#14700).
11409 (imagemagick_compute_animated_image): Fix some compilation
11410 warnings. Implement a very simple cache to make the animation
11411 usable at all, but it should be replaced with a per-image cache.
11412
11413 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
11414
11415 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
11416 to do `for' loops over alist values.
11417 * buffer.h (FOR_EACH_BUFFER):
11418 * process.c (FOR_EACH_PROCESS): Use it.
11419 (handle_child_signal, status_notify, Fget_buffer_process)
11420 (kill_buffer_processes): Use FOR_EACH_PROCESS.
11421
11422 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
11423
11424 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
11425 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
11426 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
11427 to xzalloc and so avoid redundant call to memset.
11428 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
11429 members because it is allocated with xzalloc and so already zeroed.
11430
11431 2013-08-14 Ken Brown <kbrown@cornell.edu>
11432
11433 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
11434 (Bug#15094).
11435
11436 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11437
11438 Utility function and macro to copy Lisp string to C string.
11439 * lisp.h (xlispstrdupa): New macro.
11440 (xlispstrdup): New prototype.
11441 * alloc.c (xlispstrdup): New function.
11442 * callint.c (Fcall_interactively):
11443 * fileio.c (Ffile_name_directory, Fexpand_file_name)
11444 (Fsubstitute_in_file_name):
11445 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
11446 * image.c (x_create_bitmap_from_file):
11447 * w32term.c (w32_term_init):
11448 * xterm.c (x_term_init): Use xlispstrdup.
11449
11450 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
11451
11452 * image.c (imagemagick_load_image): Make animated pictures work.
11453 There's still some problems with background color settings, though
11454 (bug#14700).
11455
11456 * decompress.c (unwind_decompress): Always restore point.
11457
11458 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
11459
11460 * marker.c (set_marker): Reformat documentation.
11461
11462 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
11463
11464 * xdisp.c (cursor_type_changed): Now static.
11465
11466 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
11467 Use changed. This avoids the need to call xmalloc and for the
11468 caller to call xfree, and avoids memory leaks in some situations.
11469
11470 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11471
11472 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
11473 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
11474 (redisplay_window): If window_end_valid is cleared due to non-zero
11475 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
11476 so do not call to try_cursor_movement for that window.
11477
11478 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11479
11480 * window.h (struct window): Convert window_end_pos and
11481 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
11482 (wset_window_end_pos, wset_window_end_vpos): Remove.
11483 * dispnew.c (adjust_glyph_matrix):
11484 * window.c (Fwindow_end, replace_window, set_window_buffer)
11485 (make_window):
11486 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
11487 (set_vertical_scroll_bar, redisplay_window, try_window)
11488 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
11489 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
11490 (note_mouse_highlight): Adjust users.
11491 (try_cursor_movement): Likewise. Convert old precondition to eassert.
11492 Add comment.
11493
11494 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11495
11496 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
11497 * image.c (imagemagick_filename_hint): Use `const char *' and
11498 prefer SSDATA to SDATA to avoid warnings.
11499
11500 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11501
11502 Cleanup window fringes, margins and scroll bars adjustments.
11503 * window.c (set_window_fringes, set_window_margins)
11504 (set_window_scroll_bars, apply_window_adjustment): New functions.
11505 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
11506 (Fset_window_scroll_bars): Use them.
11507
11508 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11509
11510 * window.h (struct window): Convert scroll_bar_width
11511 from Lisp_Object to integer. Adjust comment.
11512 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
11513 Adjust users.
11514 * window.c (wset_scroll_bar_width): Remove.
11515 (make_window): Initialize scroll_bar_width.
11516 (Fsplit_window_internal): Use direct assignment.
11517 (Fset_window_configuration, save_window_save):
11518 Convert Lisp_Object to integer and back where appropriate.
11519 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
11520 bar was actually changed, and mention this in docstring.
11521
11522 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
11523
11524 * decompress.c: Minor simplifications.
11525 (Fzlib_decompress_region): Don't bother verifying
11526 that avail_out <= UINT_MAX, as that was confusing.
11527 Mention the restriction in a comment instead.
11528 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
11529
11530 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
11531
11532 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
11533 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
11534
11535 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
11536
11537 * image.c (imagemagick_filename_hint): Check for errors in the
11538 alist structure.
11539
11540 2013-08-13 Eli Zaretskii <eliz@gnu.org>
11541
11542 * window.c (Fwindow_margins): Return nil when there's no marginal
11543 area, as per the documented API.
11544
11545 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
11546 Fmake_vector, as scroll bar's struct members are not all Lisp
11547 objects now. This avoids crashes in GC.
11548
11549 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
11550 bool, so its address could be taken.
11551
11552 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
11553
11554 * image.c (imagemagick_filename_hint): New function to possibly
11555 apply `image-content-type-suffixes'.
11556 (imagemagick_load_image): Use it.
11557
11558 2013-08-13 Eli Zaretskii <eliz@gnu.org>
11559
11560 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
11561 if loading zlib failed.
11562
11563 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
11564
11565 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
11566 2013-08-13 checkin below. Change bool to BOOL, rule is:
11567 All Obj-C code uses BOOL, except for interfaces callable from C.
11568
11569 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
11570
11571 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11572
11573 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
11574 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
11575 bool instead of BOOL.
11576 * w32term.h (struct scroll_bar): Convert fringe_extended_p
11577 from Lisp_Object to bitfield. Adjust comment.
11578 * w32term.c (x_scroll_bar_create): Adjust user.
11579 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
11580 * xterm.c (XTset_vertical_scroll_bar): Likewise.
11581 Use bool for boolean.
11582 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
11583 to `unsigned int' when defining a bitfield.
11584
11585 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
11586
11587 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
11588
11589 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11590
11591 * window.h (struct window): Convert left_margin_cols and
11592 right_margin_cols from Lisp_Objects to integers. Adjust comment.
11593 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
11594 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
11595 Adjust users.
11596 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
11597 Adjust comment.
11598 (showing_window_margins_p, update_window_line, update_frame_1):
11599 * fringe.c (draw_fringe_bitmap_1):
11600 * xdisp.c (window_box_width): Adjust users.
11601 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
11602 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
11603 Use direct assignment.
11604 (Fset_window_configuration, save_window_save, Fwindow_margins):
11605 Convert Lisp_Object to integer and back where appropriate.
11606 (Fset_window_margins): Adjust user. Return t if any margin
11607 was actually changed, and mention this in docstring.
11608
11609 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
11610
11611 * syntax.c (forward_word):
11612 * cmds.c (forward_char, backward_char): Mention the optional argument.
11613
11614 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11615
11616 * window.h (struct window): Convert left_fringe_width
11617 and right_fringe_width from Lisp_Objects to integers.
11618 Adjust comment.
11619 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
11620 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
11621 * window.c (wset_left_fringe_width, wset_right_fringe_width):
11622 Remove.
11623 (make_window): Initialize new integer fields to -1.
11624 (Fsplit_window_internal): Use direct assignment.
11625 (Fset_window_configuration, save_window_save):
11626 Convert Lisp_Object to integer and back where appropriate.
11627 (Fset_window_fringes): Adjust user. Return t if any fringe
11628 was actually changed, and mention this in docstring.
11629
11630 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11631
11632 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
11633 * nsfns.m (x_set_cursor_type):
11634 * w32fns.c (x_set_cursor_type):
11635 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
11636 * xdisp.c (set_frame_cursor_types): ...but in common code.
11637
11638 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11639
11640 * font.c (clear_font_cache): New function, stripped from...
11641 (Fclear_font_cache): ...here, which now uses the function
11642 above. Adjust comment.
11643 * font.h (clear_font_cache): Add prototype.
11644 * xfaces.c (clear_face_cache): Use clear_font_cache.
11645
11646 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11647
11648 * window.c (Fset_window_start): Compare `w', not `window' because
11649 `w' might not be equal to `window' after call to decode_live_window.
11650
11651 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
11652
11653 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
11654 This fixes a problem introduced by the Bug#15035 patch
11655 when using GPG. Reported by Herbert J. Skuhra.
11656
11657 2013-08-12 Eli Zaretskii <eliz@gnu.org>
11658
11659 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
11660 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
11661 not yet initialized.
11662
11663 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
11664
11665 * decompress.c (Fzlib_decompress_region): Support zlib
11666 decompression, too, and rename.
11667
11668 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
11669
11670 Minor zlib configuration tweaks.
11671 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
11672 Don't assume presence of fn_inflateInit2_ zlib internal function.
11673
11674 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
11675
11676 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
11677 include the zlib prefix.
11678
11679 2013-08-12 Eli Zaretskii <eliz@gnu.org>
11680
11681 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
11682 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
11683 define static variables that are pointers to zlib functions to be
11684 dynamically loaded.
11685 (init_zlib_functions) [WINDOWSNT]: New function.
11686 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
11687 New macros.
11688 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
11689 macros instead of invoking the zlib functions directly.
11690 (syms_of_decompress): DEFSYM Qzlib_dll.
11691 Staticpro Szlib_available_p.
11692
11693 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
11694
11695 Avoid looping over all frame windows to freeze and unfreeze.
11696 * window.h (struct window): Drop frozen_window_start_p.
11697 (freeze_window_starts): Drop prototype.
11698 * frame.h (struct frame): New frozen_window_starts flag.
11699 (FRAME_WINDOWS_FROZEN): New macro.
11700 * window.c (freeze_window_start, freeze_window_starts):
11701 Remove.
11702 (select_window, replace_window): Adjust users.
11703 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
11704 (window_frozen_p): New function.
11705 (redisplay_window): Use it.
11706
11707 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
11708
11709 Fix some fd issues when running subprocesses (Bug#15035).
11710 Fix bugs that can leak files or file descriptors on errors.
11711 Don't unlink open temp files, as that's hard for users to diagnose
11712 when things go awry (e.g., temp disk exhausted).
11713 Don't bother to lock temp files. Check for invalid recursion.
11714 * callproc.c (synch_process_fd): Remove. All uses removed.
11715 (synch_process_tempfile): New var or macro.
11716 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
11717 New constants.
11718 (record_kill_process): New arg, the temp name. All callers changed.
11719 (delete_temp_file): Now just a simple wrapper around unlink.
11720 (call_process_kill): New arg, the call_process_fd array.
11721 Close them all. Clear synch_process_pid. Remove the temp file,
11722 or arrange for it to be removed.
11723 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
11724 that's been moved to synch_process_tempfile. Caller changed.
11725 Do not remove the tempfile; that's now call_process_kill's
11726 responsibility.
11727 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
11728 call_process_kill; the caller now does that.
11729 (call_process_cleanup): Do not close the process fd; that's now
11730 call_process_kill's responsibility.
11731 (Fcall_process): Implement via new function call_process, which
11732 has most of the old body of Fcall_process, but with a different API.
11733 (call_process): New function that does not open or close filefd if
11734 it is nonnegative. Record which fds need to be closed, and let
11735 call_process_kill close (and remove the tempfile, on MSDOS) on error.
11736 Signal an error if invoked recursively (could be done via a hook).
11737 Simplify creation of the tempfile in the MSDOS case.
11738 Don't create the output file until after checking for the executable.
11739 Report any failure to open /dev/null.
11740 Don't open /dev/null for writing twice; once is enough.
11741 Don't create pipe if all output is being discarded or sent to file.
11742 Don't worry about setting up the coding system or reading from the
11743 pipe if all output is being discarded.
11744 Hoist fd_error local into top level, to lessen block nesting.
11745 Don't record deleted pid here; now done by Fcall_process_region.
11746 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
11747 and note its success in synch_process_tempfile.
11748 Do not leak resources when child_setup fails.
11749 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
11750 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
11751 (create_temp_file): Now returns open fd, with an additional
11752 Lisp_Object * argument to return the name. All callers changed.
11753 Do not close the file; rewind it instead, and leave it open for
11754 the caller. Do not lock the temp file. Unwind-protect the file
11755 and the file-descriptor.
11756 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
11757 If an asynchrounous process, record it here, not in call_process.
11758 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
11759 * eval.c (set_unwind_protect): New function.
11760 * fileio.c (write_region): New function, generalized from the
11761 old Fwrite_region. Do not lock temp files.
11762 (Fwrite_region): Use it.
11763 * lisp.h (set_unwind_protect, write_region): New decls.
11764 * process.c: Include <verify.h>.
11765 (make_process): Mark fds as initially closed.
11766 (deleted_pid_list): Now a list of pid-filename pairs.
11767 All uses changed.
11768 (close_process_fd): New function.
11769 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
11770 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
11771 New constants. Verify that their number matches PROCESS_OPEN_FDS.
11772 (create_process, create_pty, Fmake_serial_process)
11773 (server_accept_connection): Record which fds need to be closed,
11774 and let deactivate_process close them.
11775 (Fmake_network_process): Do not discard the unwind-protect
11776 until it's safe to do so.
11777 (deactivate_process): Close the fds opened by create_process etc.
11778 (Fprocess_send_eof): Adjust to new way of recording open fds.
11779 Report an error if /dev/null can't be opened, instead of aborting.
11780 * process.h (PROCESS_OPEN_FDS): New constant.
11781 (struct Lisp_Process): New member open_fds.
11782 (record_kill_process, record_deleted_pid): Adjust signatures.
11783 (record_deleted_pid): Move decl here ...
11784 * syswait.h (record_deleted_pid): ... from here.
11785
11786 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
11787
11788 * decompress.c: Fix bugs with large buffers and weird inputs.
11789 Tune a bit. Reindent as per usual Emacs style.
11790 (BUFFER_SIZE): Remove.
11791 (Fdecompress_gzipped_region): Do not mishandle input buffers with
11792 more than UINT_MAX bytes. Decompress into the gap instead of into
11793 an auto buffer, as this should avoid copying. Return nil if
11794 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
11795 set immediate_quit; we shouldn't trust zlib code that much.
11796
11797 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11798
11799 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
11800 errors, and really move the gap to where we want it.
11801
11802 * lisp.h: Include decompress.c support.
11803
11804 * emacs.c (main): Include decompress.c support.
11805
11806 * Makefile.in: Include -lz if present.
11807
11808 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
11809
11810 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
11811 (initWithTitle:): Initialize frame to 0.
11812 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
11813 (fillWithWidgetValue:frame:): Rename from
11814 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
11815
11816 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
11817 fillWithWidgetValue:frame:
11818
11819 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
11820 remove memory leak warnings.
11821
11822 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
11823 (ns_check_menu_open): Handle menu == nil. Remove assignment to
11824 menu_pending_title.
11825
11826 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
11827 (x_activate_menubar): Update the whole menu.
11828 (trackingNotification:): Call ns_check_menu_open if tracking ends.
11829 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
11830 current event is not NSSystemDefined (Bug#15001).
11831 Call ns_check_menu_open only if trackingMenu is 2.
11832 (menuDidClose:): New method, decrease trackingMenu.
11833 (fillWithWidgetValue:setDelegate:): New method.
11834 (fillWithWidgetValue:): Call the above.
11835
11836 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
11837
11838 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
11839
11840 Omit some unnecessary casts.
11841 Many of these go back to the old pre-C89 days, when they may have
11842 been needed, but we've been assuming C89 or later for a while now.
11843 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
11844 (live_float_p, live_misc_p, live_vector_p):
11845 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
11846 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
11847 (defvar_per_buffer):
11848 * callint.c (Fcall_interactively):
11849 * doc.c (Fsubstitute_command_keys):
11850 * filelock.c (get_boot_time):
11851 * frame.c (xrdb_get_resource):
11852 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
11853 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
11854 (xg_get_file_name_from_selector, menuitem_destroy_callback)
11855 (menuitem_highlight_callback, menu_destroy_callback)
11856 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
11857 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
11858 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
11859 (xg_tool_bar_help_callback, tb_size_cb):
11860 * image.c (xpm_alloc_color, png_read_from_memory)
11861 (png_read_from_file, png_load_body, our_memory_skip_input_data)
11862 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
11863 (syms_of_image):
11864 * keymap.c (describe_map):
11865 * nsfns.m (Fns_display_monitor_attributes_list):
11866 * nsmenu.m (process_dialog:):
11867 * nsterm.m (hold_event):
11868 * process.c (wait_reading_process_output):
11869 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
11870 * scroll.c (do_direct_scrolling, scrolling_1):
11871 * termcap.c (tgetent):
11872 * window.c (check_window_containing, add_window_to_list)
11873 (freeze_window_starts):
11874 * xdisp.c (compare_overlay_entries, vmessage):
11875 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
11876 (x_get_monitor_attributes_xrandr)
11877 (Fx_display_monitor_attributes_list, x_display_info_for_name)
11878 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
11879 * xfont.c (xfont_match, xfont_open):
11880 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
11881 (menubar_selection_callback, menu_position_func)
11882 (popup_selection_callback, create_and_show_popup_menu)
11883 (dialog_selection_callback, create_and_show_dialog):
11884 * xrdb.c (x_get_string_resource)
11885 (main) [TESTRM]:
11886 * xsmfns.c (x_session_check_input):
11887 * xterm.c (x_draw_glyphless_glyph_string_foreground)
11888 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
11889 (xaw_jump_callback, xaw_scroll_callback):
11890 Omit unnecessary casts.
11891
11892 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
11893
11894 Minor string-length refactoring.
11895 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
11896 * frame.c (make_monitor_attribute_list):
11897 Prefer build_string to strlen + make_string.
11898
11899 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
11900
11901 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
11902 don't check minor_code (Bug#14417).
11903
11904 2013-08-09 Eli Zaretskii <eliz@gnu.org>
11905
11906 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
11907 vertical positions instead. This avoids calling MATRIX_ROW with
11908 row numbers that are possibly beyond valid limits. (Bug#15064)
11909
11910 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
11911
11912 Use xstrdup and build_unibyte_string where applicable.
11913 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
11914 * xfns.c (x_window):
11915 * xrdb.c (x_get_customization_string):
11916 * xterm.c (xim_initialize):
11917 * w32fns.c (w32_window): Use xstrdup.
11918 (w32_display_monitor_attributes_list):
11919 * emacs.c (init_cmdargs):
11920 * keyboard.c (PUSH_C_STR):
11921 * nsfont.m (nsfont_open):
11922 * sysdep.c (system_process_attributes):
11923 * w32.c (system_process_attributes):
11924 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
11925
11926 2013-08-09 Eli Zaretskii <eliz@gnu.org>
11927
11928 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
11929 variables of these types so that GDB would know about them, as aid
11930 for debugging fatal exceptions. (Bug#15024) See also
11931 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
11932 discussions.
11933
11934 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
11935
11936 * nsterm.m (ns_update_begin): Don't change clip path if it would be
11937 larger than the NSWindow (Bug#14934).
11938
11939 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
11940
11941 Redesign redisplay interface to drop global variable updated_window.
11942 Always pass currently updated window as a parameter to update routines.
11943 * dispextern.h (updated_window): Remove declaration.
11944 (struct redisplay_interface): Pass window parameter to
11945 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
11946 and after_update_window_hook.
11947 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
11948 Adjust prototypes.
11949 * dispnew.c (updated_window): Remove.
11950 (redraw_overlapped_rows, update_marginal_area, update_text_area)
11951 (update_window_line): Adjust to match redisplay interface changes.
11952 * nsterm.m (ns_update_window_begin, ns_update_window_end)
11953 (ns_scroll_run, ns_after_update_window_line):
11954 * w32term.c (x_update_window_begin, x_update_window_end)
11955 (x_after_update_window_line, x_scroll_run):
11956 * xterm.c (x_update_window_begin, x_update_window_end)
11957 (x_after_update_window_line, x_scroll_run):
11958 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
11959 Likewise. Adjust comments where appropriate.
11960 (x_cursor_to): Simplify because this is always called during window
11961 update (but install debugging check anyway).
11962 (expose_window): Check must_be_updated_p flag to see whether this
11963 function is called during window update.
11964
11965 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
11966
11967 Do not reset window modification event counters excessively.
11968 These leftovers and poor man's tricky methods to catch extra
11969 redisplay's attention are no longer needed.
11970 * frame.c (set_menu_bar_lines_1):
11971 * minibuf.c (read_minibuf_unwind):
11972 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
11973 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
11974 (window_scroll_line_based, Fset_window_configuration):
11975 * xdisp.c (redisplay_window): Do not reset last_modified and
11976 last_overlay_modified counters.
11977
11978 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
11979
11980 * xselect.c (x_send_client_event): Set send_event and serial, memset
11981 data.l as it might be bigger than data.b. Use 24 bit mask to
11982 XSendEvent (Bug#15034).
11983
11984 2013-08-07 Eli Zaretskii <eliz@gnu.org>
11985
11986 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
11987 for TTY frames that are not the top frame on their console.
11988 (Bug#14616)
11989
11990 2013-08-07 Martin Rudalics <rudalics@gmx.at>
11991
11992 * w32term.c (w32fullscreen_hook): Really maximize frame when
11993 asked for (Bug#14841).
11994
11995 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
11996
11997 Prefer selected_window to Fselected_window, likewise for frames.
11998 * buffer.c (Fbuffer_swap_text):
11999 * data.c (Fvariable_binding_locus):
12000 * window.c (run_window_configuration_change_hook): Adjust users.
12001 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
12002 Use decode_live_frame.
12003
12004 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
12005
12006 Be more careful if selected window shows the buffer other than current,
12007 use window_outdated only if this is not so. This change should also
12008 address some weird issues discussed in Bug#13012.
12009 * window.h (window_outdated): New prototype.
12010 * window.c (window_outdated): Now here. Convert from static and
12011 always assume window's buffer.
12012 (Fwindow_end, Fwindow_line_height): Use it.
12013 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
12014 and always assume window's buffer.
12015 (redisplay_window): Adjust user.
12016 (redisplay_internal): Call to reconsider_clip_changes once and
12017 check whether mode line should be updated only if selected window
12018 shows current buffer.
12019 (run_window_scroll_functions): Use eassert for debugging check.
12020 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
12021
12022 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
12023
12024 * window.c (window_scroll, window_scroll_pixel_based)
12025 (window_scroll_line_based): Use bool for booleans.
12026
12027 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
12028
12029 * process.c: Fix minor off-by-one issues in descriptor counts.
12030 This shouldn't fix any real bugs, but it cleans up the code a bit.
12031 (max_process_desc, max_input_desc): -1, not 0, means none.
12032 All uses changed.
12033 (delete_input_desc): New function.
12034 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
12035 (deactivate_process): Scan backwards when recomuting max_process_desc;
12036 that should be faster.
12037 (init_process_emacs): Initialize max_input_desc.
12038
12039 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
12040
12041 Use region cache to speedup bidi_find_paragraph_start.
12042 * buffer.h (struct buffer): New member bidi_paragraph_cache.
12043 Rename cache_long_line_scans to cache_long_scans.
12044 * buffer.c (bset_cache_long_line_scans): Rename to
12045 bset_cache_long_scans.
12046 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
12047 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
12048 into account.
12049 (syms_of_buffer): Rename cache-long-line-scans to
12050 cache-long-scans. Adjust docstring.
12051 * search.c (newline_cache_on_off):
12052 * indent.c (width_run_cache_on_off): Adjust users.
12053 * bidi.c (bidi_paragraph_cache_on_off): New function.
12054 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
12055 * insdel.c (prepare_to_modify_buffer):
12056 Invalidate bidi_paragraph_cache if enabled.
12057
12058 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
12059
12060 Invalidate region caches only if buffer text is going to be changed.
12061 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
12062 (modify_text): ...new prototype.
12063 (prepare_to_modify_buffer_1): New prototype.
12064 * textprop.c (modify_region): Rename to...
12065 (modify_text_properties): ...new function.
12066 (add_text_properties_1, set_text_properties, Fremove_text_properties)
12067 (Fremove_list_of_text_properties): Adjust users.
12068 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
12069 (modify_text): ...new function.
12070 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
12071 (prepare_to_modify_buffer_1): ...new function.
12072 * casefiddle.c (casify_region):
12073 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
12074 (Ftranspose_regions): Use modify_text.
12075
12076 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
12077
12078 * lisp.mk (lisp): Add nadvice.elc.
12079
12080 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
12081
12082 New macro to iterate over live buffers similar to frames.
12083 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
12084 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
12085 Declare buffer-related variables here to offload lisp.h.
12086 * buffer.c (Vbuffer_alist): Adjust comment.
12087 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
12088 (other_buffer_safely):
12089 * data.c (store_symval_forwarding):
12090 * dispnew.c (Fframe_or_buffer_changed_p):
12091 * fileio.c (Fdo_auto_save):
12092 * filelock.c (unlock_all_files):
12093 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
12094
12095 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
12096
12097 Fix some minor races in hosts lacking mkostemp (Bug#15015).
12098 * callproc.c (create_temp_file):
12099 * filelock.c (create_lock_file):
12100 Assume mkostemp, since it's now provided by Gnulib.
12101
12102 2013-08-04 Eli Zaretskii <eliz@gnu.org>
12103
12104 * w32.c (mkostemp): New function.
12105 (mktemp): Remove, no longer used. Most of the code reused in
12106 mkostemp. (Bug#15015)
12107 (mktemp): Don't undef.
12108
12109 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
12110
12111 * dispnew.c (glyph_matrix_count, glyph_pool_count):
12112 Move under GLYPH_DEBUG and ENABLE_CHECKING.
12113 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
12114 (free_glyph_pool, check_glyph_memory): Likewise for
12115 all users. Adjust comments where appropriate.
12116
12117 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
12118
12119 * composite.h: Minor fixups.
12120 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
12121 to fix a misspelling, and change it to an inline function while
12122 we're at it (it need not be a macro). All uses changed.
12123 (composition_method, composition_valid_p):
12124 Rewrite to avoid assignments in if-conditions.
12125
12126 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
12127
12128 Do not use global Lisp_Object in composition macros.
12129 * composite.h (composition_temp): Remove declaration.
12130 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
12131 (composition_method, composition_valid_p): ...inline functions.
12132 (compose_region): Remove the leftover.
12133 * composite.c (composition_temp): Remove.
12134 (run_composition_function, update_compositions)
12135 (composition_compute_stop_pos, composition_adjust_point)
12136 (Ffind_composition_internal):
12137 * coding.c (handle_composition_annotation):
12138 * xdisp.c (handle_composition_prop, check_point_in_composition):
12139 Related users changed.
12140
12141 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
12142
12143 Drop FRAME_PTR typedef.
12144 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
12145 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
12146 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
12147 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
12148 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
12149 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
12150 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
12151 All related users changed.
12152
12153 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
12154
12155 * eval.c (default_toplevel_binding): New function.
12156 (Fdefvar): Use it.
12157 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
12158 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
12159 (syms_of_eval): Export them.
12160 * data.c (Fdefault_value): Micro cleanup.
12161 * term.c (init_tty): Use "false".
12162
12163 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
12164
12165 Fix X GC leak in GTK and raw (no toolkit) X ports.
12166 * xterm.c (x_free_frame_resources): If white and black relief
12167 GCs are allocated, always free them here.
12168 * xfns.c (x_make_gc): Omit redundant initialization.
12169 * widget.c (create_frame_gcs): Remove the leftover.
12170 (EmacsFrameDestroy): Do nothing because all GCs are now freed
12171 in x_free_frame_resources.
12172
12173 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
12174
12175 * nsterm.m (windowWillResize:toSize:): Only change title if
12176 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
12177 modifying it.
12178 (viewDidEndLiveResize): New method.
12179
12180 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
12181 inside NS_IMPL_COCOA.
12182
12183 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
12184
12185 * insdel.c (adjust_after_replace, replace_range, del_range_2):
12186 Do not check whether undo is enabled because record_insert and
12187 record_delete does that themselves.
12188
12189 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
12190
12191 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
12192 member which is not really used any more.
12193 (FRAME_XIC_BASE_FONTNAME): Remove.
12194 * xfns.c (xic_free_fontset): Adjust user.
12195 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
12196 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
12197 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
12198 (xdialog_show): Use eassert for debugging check.
12199 * w32term.c (x_unfocus_frame): Remove unused dummy function.
12200
12201 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
12202
12203 * fileio.c, fns.c (merge): Move extern decl from here ...
12204 * lisp.h (merge): ... to here.
12205
12206 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12207
12208 Fix last font-related change.
12209 * w32font.h (w32font_list_internal, w32font_match_internal):
12210 Fix prototype.
12211 * w32uniscribe.c (uniscribe_list, uniscribe_match)
12212 (uniscribe_list_family): Adjust to match font API change.
12213 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
12214 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
12215
12216 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12217
12218 * frame.h (FRAME_MOUSE_UPDATE):
12219 * nsterm.m (ns_frame_up_to_date): Omit redundant check
12220 whether hlinfo->mouse_face_mouse_frame is non-NULL.
12221
12222 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12223
12224 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
12225 * font.h (struct font_driver): Change list, match, and list_family
12226 functions to accept struct frame * as first arg.
12227 * font.c (font_score, font_compare, font_sort_entities):
12228 Remove prototypes.
12229 (font_sort_entities, font_list_entities, font_select_entity)
12230 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
12231 match font API change.
12232 * xfont.c (xfont_list, xfont_match, xfont_list_family):
12233 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
12234 * ftxfont.c (ftxfont_list, ftxfont_match):
12235 * xftfont.c (xftfont_list, xftfont_match):
12236 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
12237 * w32font.c (w32font_list, w32font_match, w32font_list)
12238 (w32font_list_internal, w32_font_match_internal): Likewise.
12239 * xfaces.c (Fx_family_fonts): Adjust user.
12240
12241 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12242
12243 Do not use pure Xism x_wm_set_icon_position in non-X ports.
12244 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
12245 only if HAVE_X_WINDOWS is in use.
12246 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
12247 * nsterm.m (x_wm_set_icon_position): Remove no-op.
12248 * w32term.c (x_wm_set_icon_position): Likewise.
12249 * w32fns.c (x_icon): Adjust user.
12250
12251 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12252
12253 * xterm.c (last_mouse_press_frame): Remove the
12254 leftover which is not really used any more.
12255 (handle_one_xevent, syms_of_xterm): Adjust users.
12256 (x_flush): Call XFlush once per each X display, not frame.
12257 This is better because this code always unconditionally skips
12258 non-X frames in Vframe_list and issues the only XFlush if we
12259 have more than one X frame on the same X display.
12260 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
12261 Use bool for booleans.
12262 (x_draw_glyph_string_background, cvt_string_to_pixel)
12263 (cvt_pixel_dtor): Drop unnecessary prototypes.
12264 * xterm.h (x_display_ok): Adjust prototype.
12265
12266 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
12267
12268 Drop unnecessary functions that deals with frame pixel size.
12269 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
12270 (x_pixel_height): Drop prototypes.
12271 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
12272 (x_pixel_height): Drop implementations.
12273 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
12274 which should be always valid for window frame.
12275 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
12276 * w32menu.c (Fx_popup_dialog):
12277 * xmenu.c (Fx_popup_dialog): Likewise for both.
12278
12279 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
12280
12281 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
12282 frame parameters and call to Fmodify_frame_parameters just once.
12283 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
12284 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
12285 and mention nil frame in docstring.
12286
12287 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
12288
12289 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
12290 (x_figure_window_size): Likewise. Adjust to return long.
12291 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
12292 (toplevel): Move Qterminal_live_p to...
12293 * terminal.c (toplevel): ...here, make it static, and...
12294 (syms_of_terminal): ...DEFSYM here.
12295 * frame.h (Qterminal_live_p): Remove declaration.
12296 (make_frame, x_figure_window_size): Adjust prototype.
12297 * nsfns.m (Fx_create_frame): Use long for window flags.
12298
12299 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
12300
12301 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
12302 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
12303 Do not assume that emacs_close (INT_MAX) is a no-op.
12304
12305 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
12306
12307 * xfaces.c (make_face_cache): For struct face_cache, prefer
12308 xmalloc to xzalloc and so avoid redundant call to memset.
12309 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
12310
12311 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
12312
12313 * fringe.c (draw_window_fringes, update_window_fringes)
12314 (compute_fringe_widths):
12315 * w32term.c (x_draw_glyph_string):
12316 * window.c (candidate_window_p, Frecenter):
12317 * xfaces.c (realize_basic_faces, realize_default_face)
12318 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
12319 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
12320 * xfns.c (x_set_cursor_color, xic_free_xfontset):
12321 * xmenu.c (Fx_menu_bar_open_internal):
12322 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
12323 * xsettings.c (xft_settings_event):
12324 * xterm.c (x_draw_glyph_string, x_had_errors_p):
12325 Use bool for booleans. Adjust style and comments where
12326 appropriate.
12327 * dispextern.h (draw_window_fringes, update_window_fringes)
12328 (compute_fringe_widths):
12329 * xterm.h (x_had_errors_p): Adjust prototype.
12330
12331 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
12332
12333 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
12334 CHECK_LIST. Rewrite the loop to avoid useless local variable.
12335
12336 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
12337
12338 * fns.c (toplevel): Remove comment before Fsafe_length because
12339 it checks for QUIT.
12340
12341 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
12342
12343 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
12344
12345 2013-07-28 Eli Zaretskii <eliz@gnu.org>
12346
12347 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
12348 frame which got the message is still alive, before dereferencing
12349 its pointer. (Bug#14970)
12350
12351 * frame.c (delete_frame): Test "this" frame's minibuffer window to
12352 be a live window, before using it as such. (Bug#14970)
12353
12354 2013-07-27 Eli Zaretskii <eliz@gnu.org>
12355
12356 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
12357 w32_detect_focus_change instead of doing part of its job by hand.
12358 This fixes the problem whereby FOCUS_OUT events were not sent to
12359 the event queue.
12360
12361 2013-07-26 Eli Zaretskii <eliz@gnu.org>
12362
12363 * process.c (Fprocess_list): Doc fix.
12364
12365 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
12366 being re-exposed only if it didn't ask to become visible.
12367 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
12368 was previously iconified. (Bug#14841)
12369 (x_iconify_frame): Mark the frame iconified.
12370
12371 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
12372
12373 Fix minor problems found by static checking.
12374 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
12375 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
12376
12377 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
12378
12379 * eval.c (set_specpdl_old_value): New function.
12380 (unbind_to): Minor simplification.
12381 (get_backtrace_frame): New function.
12382 (Fbacktrace_frame): Use it. Add `base' argument.
12383 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
12384 (syms_of_eval): Export backtrace-eval.
12385 * xterm.c (x_focus_changed): Simplify.
12386
12387 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
12388
12389 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
12390
12391 2013-07-24 Eli Zaretskii <eliz@gnu.org>
12392
12393 * xdisp.c (redisplay_window): Instead of moving point out of
12394 scroll margin, reject the force_start method, and try scrolling
12395 instead. (Bug#14780)
12396
12397 2013-07-24 Ken Brown <kbrown@cornell.edu>
12398
12399 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
12400 (Bug#14944).
12401
12402 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
12403
12404 * eval.c (Fprogn): Do not check that BODY is a proper list.
12405 This undoes the previous change. The check slows down the
12406 interpreter, and is not needed to prevent a crash. See
12407 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
12408
12409 2013-07-23 Glenn Morris <rgm@gnu.org>
12410
12411 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
12412
12413 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
12414
12415 Port to GNU/Linux systems with tinfo but not ncurses.
12416 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
12417 to decide whether ncurses is being used. Without this change,
12418 GCC complains about tgetent not being declared, on a system
12419 that has tinfo installed but ncurses not installed.
12420
12421 * eval.c (Fprogn): Check that BODY is a proper list.
12422
12423 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
12424 * data.c (Fsetq_default):
12425 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
12426 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
12427 (Fcondition_case):
12428 Tune by taking advantage of the fact that ARGS is always a list
12429 when a function is declared to have UNEVALLED args.
12430
12431 * emacsgtkfixed.c: Port to GCC 4.6.
12432 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
12433
12434 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
12435
12436 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
12437 here to silence compiler warnings.
12438
12439 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
12440
12441 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
12442 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
12443 from messing up Emacs's 'struct frame' (Bug#14923).
12444
12445 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
12446
12447 * alloc.c (make_save_ptr_ptr): Define this function.
12448 It was inadvertently omitted. It's needed only if
12449 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
12450
12451 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
12452
12453 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
12454 frame have focus (Bug#14895).
12455
12456 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
12457
12458 Avoid vfork-related deadlock more cleanly.
12459 * callproc.c (child_setup): When the child's exec fails, output
12460 the program name, as that's more useful. Use O_NONBLOCK to avoid
12461 deadlock.
12462 * process.c (create_process_1): Remove; no longer needed.
12463 (create_process): Remove timer hack; no longer needed, now that
12464 the child avoids deadlock.
12465
12466 2013-07-20 Glenn Morris <rgm@gnu.org>
12467
12468 * image.c (Fimage_flush): Fix doc typo.
12469
12470 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
12471
12472 Fix array bounds violation when pty allocation fails.
12473 * process.c (PTY_NAME_SIZE): New constant.
12474 (pty_name): Remove static variable; it's now auto.
12475 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
12476 Take pty_name as an arg rather than using a static variable.
12477 All callers changed.
12478 (create_process): Recover pty_flag from process, not from volatile local.
12479 (create_pty): Stay inside array even when pty allocation fails.
12480 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
12481
12482 * lread.c (Fload): Avoid initialization only when lint checking.
12483 Mention that it's needed only for older GCCs.
12484
12485 2013-07-20 Kenichi Handa <handa@gnu.org>
12486
12487 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
12488 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
12489
12490 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
12491
12492 * lread.c (Fload): Avoid uninitialized warning.
12493
12494 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
12495
12496 Fix some minor file descriptor leaks and related glitches.
12497 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
12498 (create_lock_file): Use write, not emacs_write.
12499 * image.c (slurp_file, png_load_body):
12500 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
12501 (server_accept_connection):
12502 Don't leak an fd on memory allocation failure.
12503 * image.c (slurp_file): Add a cheap heuristic for growing files.
12504 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
12505 as that's what the other routines do. Maybe input need not be
12506 blocked at all, but it's better to be consistent.
12507 Avoid undefined behavior when strlen is zero.
12508
12509 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
12510 (NSTATICS): Now a constant; doesn't need to be a macro.
12511
12512 2013-07-19 Richard Stallman <rms@gnu.org>
12513
12514 * coding.c (decode_coding_utf_8): Add simple loop for fast
12515 processing of ASCII characters.
12516
12517 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
12518
12519 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
12520
12521 2013-07-19 Eli Zaretskii <eliz@gnu.org>
12522
12523 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
12524 unportable 'struct x_display_info'.
12525 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
12526 is a portable type.
12527
12528 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
12529
12530 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
12531 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
12532 or fscanf fails.
12533 (system_process_attributes): Prefer plain char to unsigned char
12534 when either will do. Clean up properly if interrupted or if
12535 memory allocations fail. Don't assume sscanf succeeds.
12536 Remove no-longer-needed workaround to stop GCC from whining.
12537 Read command-line once, instead of multiple times. Check read status a
12538 bit more carefully.
12539
12540 Fix obscure porting bug with varargs functions.
12541 The code assumed that int is treated like ptrdiff_t in a vararg
12542 function, which is not a portable assumption. There was a similar
12543 -- though these days less likely -- porting problem with various
12544 assumptions that pointers of different types all smell the same as
12545 far as vararg functions is conserved. To make this problem less
12546 likely in the future, redo the API to use varargs functions.
12547 * alloc.c (make_save_value): Remove this vararg function.
12548 All uses changed to ...
12549 (make_save_int_int_int, make_save_obj_obj_obj_obj)
12550 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
12551 New functions.
12552 (make_save_ptr): Rename from make_save_pointer, for consistency with
12553 the above. Define only on platforms that need it. All uses changed.
12554
12555 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
12556
12557 * keyboard.c: Try to fix typos in previous change.
12558 (DISPLAY_LIST_INFO): New macro.
12559 (kbd_buffer_get_event): Do not access members that are not present
12560 in X11. Revert inadvertent change of "!=" to "=".
12561
12562 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
12563
12564 * keyboard.c (kbd_buffer_get_event):
12565 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
12566 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
12567
12568 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
12569
12570 * filelock.c: Fix unlikely file descriptor leaks.
12571 (get_boot_time_1): Rework to avoid using emacs_open.
12572 This doesn't actually fix a leak, but is better anyway.
12573 (read_lock_data): Use read, not emacs_read.
12574
12575 * doc.c: Fix minor memory and file descriptor leaks.
12576 * doc.c (get_doc_string): Fix memory leak when doc file absent.
12577 (get_doc_string, Fsnarf_documentation):
12578 Fix file descriptor leak on error.
12579
12580 * term.c: Fix minor fdopen-related file descriptor leaks.
12581 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
12582 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
12583
12584 * charset.c: Fix file descriptor leaks and errno issues.
12585 Include <errno.h>.
12586 (load_charset_map_from_file): Don't leak file descriptor on error.
12587 Use plain record_xmalloc since the allocation is larger than
12588 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
12589 of entries.
12590 * eval.c (record_unwind_protect_nothing):
12591 * fileio.c (fclose_unwind):
12592 New functions.
12593 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
12594 The replacement doesn't block input, but that no longer seems
12595 necessary.
12596
12597 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
12598
12599 * lread.c: Fix file descriptor leaks and errno issues.
12600 (Fload): Close some races that leaked fds or streams when 'load'
12601 was interrupted.
12602 (Fload, openp): Report error number of last nontrivial failure to open.
12603 ENOENT counts as trivial.
12604 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
12605 New functions.
12606 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
12607 now that the function is always called with a nonnegative arg.
12608 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
12609 All uses replaced with ...
12610 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
12611
12612 A few more minor file errno-reporting bugs.
12613 * callproc.c (Fcall_process):
12614 * doc.c (Fsnarf_documentation):
12615 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
12616 * process.c (set_socket_option):
12617 Don't let a constructor trash errno.
12618 * doc.c: Include <errno.h>.
12619
12620 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
12621
12622 * w32fns.c (unwind_create_tip_frame): Fix declaration.
12623
12624 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
12625
12626 Fix w32 bug with call-process-region (Bug#14885).
12627 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
12628 to Fcall_process when the input is empty. This simplifies the
12629 code a bit. It makes no difference on POSIXish platforms but
12630 apparently it fixes a bug on w32.
12631
12632 Fix bug where insert-file-contents closes a file twice (Bug#14839).
12633 * fileio.c (close_file_unwind): Don't close if FD is negative;
12634 this can happen when unwinding a zapped file descriptor.
12635 (Finsert_file_contents): Unwind-protect the fd before the point marker,
12636 in case Emacs runs out of memory between the two unwind-protects.
12637 Don't trash errno when closing FD.
12638 Zap the FD in the specpdl when closing it, instead of deferring
12639 the removal of the unwind-protect; this fixes a bug where a child
12640 function unwinds the stack past us.
12641
12642 New unwind-protect flavors to better type-check C callbacks.
12643 This also lessens the need to write wrappers for callbacks,
12644 and the need for make_save_pointer.
12645 * alloc.c (free_save_value):
12646 * atimer.c (run_all_atimers):
12647 Now extern.
12648 * alloc.c (safe_alloca_unwind):
12649 * atimer.c (unwind_stop_other_atimers):
12650 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
12651 * menu.c (cleanup_popup_menu) [HAVE_NS]:
12652 * minibuf.c (choose_minibuf_frame_1):
12653 * process.c (make_serial_process_unwind):
12654 * xdisp.c (pop_message_unwind):
12655 * xselect.c (queue_selection_requests_unwind):
12656 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
12657 * alloc.c (record_xmalloc):
12658 Prefer record_unwind_protect_ptr to record_unwind_protect with
12659 make_save_pointer.
12660 * alloc.c (Fgarbage_collect):
12661 Prefer record_unwind_protect_void to passing a dummy.
12662 * buffer.c (restore_buffer):
12663 * window.c (restore_window_configuration):
12664 * xfns.c, w32fns.c (do_unwind_create_frame)
12665 New wrapper. All record-unwind uses of wrappee changed.
12666 * buffer.c (set_buffer_if_live):
12667 * callproc.c (call_process_cleanup, delete_temp_file):
12668 * coding.c (code_conversion_restore):
12669 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
12670 * editfns.c (save_excursion_restore)
12671 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
12672 (save_restriction_restore):
12673 * eval.c (restore_stack_limits, un_autoload):
12674 * fns.c (require_unwind):
12675 * keyboard.c (recursive_edit_unwind, tracking_off):
12676 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
12677 * macros.c (pop_kbd_macro, restore_menu_items):
12678 * nsfns.m (unwind_create_frame):
12679 * print.c (print_unwind):
12680 * process.c (start_process_unwind):
12681 * search.c (unwind_set_match_data):
12682 * window.c (select_window_norecord, select_frame_norecord):
12683 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
12684 (fast_set_selected_frame):
12685 * xfns.c, w32fns.c (unwind_create_tip_frame):
12686 Return void, not a dummy Lisp_Object. All uses changed.
12687 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
12688 * callproc.c (call_process_kill):
12689 * fileio.c (restore_point_unwind, decide_coding_unwind)
12690 (build_annotations_unwind):
12691 * insdel.c (Fcombine_after_change_execute_1):
12692 * keyboard.c (read_char_help_form_unwind):
12693 * menu.c (unuse_menu_items):
12694 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
12695 * sound.c (sound_cleanup):
12696 * xdisp.c (unwind_redisplay):
12697 * xfns.c (clean_up_dialog):
12698 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
12699 Accept no args and return void, instead of accepting and returning
12700 a dummy Lisp_Object. All uses changed.
12701 * cygw32.c (fchdir_unwind):
12702 * fileio.c (close_file_unwind):
12703 * keyboard.c (restore_kboard_configuration):
12704 * lread.c (readevalllop_1):
12705 * process.c (wait_reading_process_output_unwind):
12706 Accept int and return void, rather than accepting an Emacs integer
12707 and returning a dummy object. In some cases this fixes an
12708 unlikely bug when the corresponding int is outside Emacs integer
12709 range. All uses changed.
12710 * dired.c (directory_files_internal_unwind):
12711 * fileio.c (do_auto_save_unwind):
12712 * gtkutil.c (pop_down_dialog):
12713 * insdel.c (reset_var_on_error):
12714 * lread.c (load_unwind):
12715 * xfns.c (clean_up_file_dialog):
12716 * xmenu.c, nsmenu.m (pop_down_menu):
12717 * xmenu.c (cleanup_widget_value_tree):
12718 * xselect.c (wait_for_property_change_unwind):
12719 Accept pointer and return void, rather than accepting an Emacs
12720 save value encapsulating the pointer and returning a dummy object.
12721 All uses changed.
12722 * editfns.c (Fformat): Update the saved pointer directly via
12723 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
12724 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
12725 (unwind_body): New function.
12726 (record_unwind_protect): First arg is now a function returning void,
12727 not a dummy Lisp_Object.
12728 (record_unwind_protect_ptr, record_unwind_protect_int)
12729 (record_unwind_protect_void): New functions.
12730 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
12731 * fileio.c (struct auto_save_unwind): New type.
12732 (do_auto_save_unwind): Use it.
12733 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
12734 * insdel.c (struct rvoe_arg): New type.
12735 (reset_var_on_error): Use it.
12736 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
12737 New constants.
12738 (specbinding_func): Remove; there are now several such functions.
12739 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
12740 (set_unwind_protect_ptr): New function.
12741 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
12742
12743 Be simpler and more consistent about reporting I/O errors.
12744 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
12745 Say "Read error" and "Write error", rather than "I/O error", or
12746 "IO error reading", or "IO error writing", when a read or write
12747 error occurs.
12748 * process.c (Fmake_network_process, wait_reading_process_output)
12749 (send_process, Fprocess_send_eof, wait_reading_process_output):
12750 Capitalize diagnostics consistently. Put "failed foo" at the
12751 start of the diagnostic, so that we don't capitalize the
12752 function name "foo". Consistently say "failed" for such
12753 diagnostics.
12754 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
12755 All callers changed. This is so it can use report_file_error.
12756 * sysdep.c (serial_open, serial_configure): Capitalize I/O
12757 diagnostics consistently as above.
12758
12759 * fileio.c (report_file_errno): Fix errno reporting bug.
12760 If the file name is neither null nor a pair, package it up as a
12761 singleton list. All callers changed, both to this function and to
12762 report_file_error. This fixes a bug where the memory allocator
12763 invoked by list1 set errno so that the immediately following
12764 report_file_error reported the wrong errno value.
12765
12766 Fix minor problems found by --enable-gcc-warnings.
12767 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
12768 * keyboard.c (kbd_buffer_get_event): Remove unused local.
12769
12770 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
12771
12772 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
12773 Set event->arg to Qt if switch-event shall be generated.
12774 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
12775
12776 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
12777
12778 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
12779 FOCUS_OUT_EVENT.
12780
12781 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
12782 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
12783 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
12784 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
12785 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
12786 and there is a focused frame.
12787 (head_table): Add focus-in and focus-out.
12788 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
12789 bind to handle-focus-in/out.
12790
12791 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
12792 (Fhandle_switch_frame): Call Fhandle_focus_in.
12793 (syms_of_frame): defsubr handle-focus-in/out.
12794
12795 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
12796
12797 Fix porting bug to older POSIXish platforms (Bug#14862).
12798 * sysdep.c (emacs_pipe): New function, that implements
12799 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
12800 This should port better to CentOS 5 and to Mac OS X 10.6.
12801 All calls to pipe2 changed.
12802
12803 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
12804 This makes the code easier to read and the executable a bit smaller.
12805 Do not replace all calls to Fcons that happen to create lists,
12806 just calls that are intended to create lists. For example, when
12807 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
12808 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
12809 Similarly for list2 through list5.
12810 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
12811 * bytecode.c (exec_byte_code):
12812 * callint.c (quotify_arg, Fcall_interactively):
12813 * callproc.c (Fcall_process, create_temp_file):
12814 * charset.c (load_charset_map_from_file)
12815 (Fdefine_charset_internal, init_charset):
12816 * coding.c (get_translation_table, detect_coding_system)
12817 (Fcheck_coding_systems_region)
12818 (Fset_terminal_coding_system_internal)
12819 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
12820 * composite.c (update_compositions, Ffind_composition_internal):
12821 * dired.c (directory_files_internal, file_name_completion)
12822 (Fsystem_users):
12823 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
12824 * doc.c (Fsnarf_documentation):
12825 * editfns.c (Fmessage_box):
12826 * emacs.c (main):
12827 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
12828 (Feval, eval_sub, Ffuncall, apply_lambda):
12829 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
12830 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
12831 (Fset_file_times, Finsert_file_contents)
12832 (Fchoose_write_coding_system, Fwrite_region):
12833 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
12834 * font.c (font_registry_charsets, font_parse_fcname)
12835 (font_prepare_cache, font_update_drivers, Flist_fonts):
12836 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
12837 * frame.c (make_frame, Fmake_terminal_frame)
12838 (x_set_frame_parameters, x_report_frame_params)
12839 (x_default_parameter, Fx_parse_geometry):
12840 * ftfont.c (syms_of_ftfont):
12841 * image.c (gif_load):
12842 * keyboard.c (command_loop_1):
12843 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
12844 (Fcopy_keymap, append_key, Fcurrent_active_maps)
12845 (Fminor_mode_key_binding, accessible_keymaps_1)
12846 (Faccessible_keymaps, Fwhere_is_internal):
12847 * lread.c (read_emacs_mule_char):
12848 * menu.c (find_and_return_menu_selection):
12849 * minibuf.c (get_minibuffer):
12850 * nsfns.m (Fns_perform_service):
12851 * nsfont.m (ns_script_to_charset):
12852 * nsmenu.m (ns_popup_dialog):
12853 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
12854 (Fx_own_selection_internal):
12855 * nsterm.m (append2):
12856 * print.c (Fredirect_debugging_output)
12857 (print_prune_string_charset):
12858 * process.c (Fdelete_process, Fprocess_contact)
12859 (Fformat_network_address, set_socket_option)
12860 (read_and_dispose_of_process_output, write_queue_push)
12861 (send_process, exec_sentinel):
12862 * sound.c (Fplay_sound_internal):
12863 * textprop.c (validate_plist, add_properties)
12864 (Fput_text_property, Fadd_face_text_property)
12865 (copy_text_properties, text_property_list, syms_of_textprop):
12866 * unexaix.c (report_error):
12867 * unexcoff.c (report_error):
12868 * unexsol.c (unexec):
12869 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
12870 (Fformat_mode_line, syms_of_xdisp):
12871 * xfaces.c (set_font_frame_param)
12872 (Finternal_lisp_face_attribute_values)
12873 (Finternal_merge_in_global_face, syms_of_xfaces):
12874 * xfns.c (x_default_scroll_bar_color_parameter)
12875 (x_default_font_parameter, x_create_tip_frame):
12876 * xfont.c (xfont_supported_scripts):
12877 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
12878 (menu_help_callback, xmenu_show):
12879 * xml.c (make_dom):
12880 * xterm.c (set_wm_state):
12881 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
12882 and similarly for list2 through list5.
12883
12884 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
12885
12886 * callproc.c (Fcall_process_region): Fix minor race and tune.
12887 (create_temp_file): New function, with the temp-file-creation part
12888 of the old Fcall_process_region. Use Fcopy_sequence to create the
12889 temp file name, rather than alloca + build_string, for simplicity.
12890 Don't bother to block input around the temp file creation;
12891 shouldn't be needed. Simplify use of mktemp.
12892 Use record_unwind_protect immediately after creating the temp file;
12893 this closes an unlikely race where the temp file was not removed.
12894 Use memcpy rather than an open-coded loop.
12895 (Fcall_process_region): Use the new function. If the input is
12896 empty, redirect from /dev/null rather than from a newly created
12897 empty temp file; this avoids unnecessary file system traffic.
12898
12899 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
12900
12901 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
12902 Simplify by making this case like the other two. This is a bit
12903 slower on obsolete hosts, but the extra complexity isn't worth it.
12904
12905 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
12906 * process.c (create_process) [!DOS_NT]:
12907 Remove now-unnecessary calls to emacs_close.
12908
12909 2013-07-13 Eli Zaretskii <eliz@gnu.org>
12910
12911 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
12912 returning early. (Bug#14850)
12913
12914 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
12915 and inhibit-iso-escape-detection attributes of 'undecided'.
12916 (Bug#14822)
12917
12918 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
12919
12920 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
12921 Reported by Herbert J. Skuhra in
12922 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
12923
12924 Don't lose top specpdl entry when memory is exhausted.
12925 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
12926 specpdl overflow here, to simplify callers; all callers changed.
12927 Always reserve an unused entry at the stack top; this avoids
12928 losing the top entry's information when memory is exhausted.
12929
12930 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
12931
12932 Clean up errno reporting and fix some errno-reporting bugs.
12933 * callproc.c (Fcall_process):
12934 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
12935 * process.c (create_process, Fmake_network_process):
12936 * unexaix.c (report_error):
12937 * unexcoff.c (report_error):
12938 Be more careful about reporting the errno of failed operations.
12939 The code previously reported the wrong errno sometimes.
12940 Also, prefer report_file_errno to setting errno + report_file_error.
12941 (Fcall_process): Look at openp return value rather than at path,
12942 as that's a bit faster and clearer when there's a numeric predicate.
12943 * fileio.c (report_file_errno): New function, with most of the
12944 old contents of report_file_error.
12945 (report_file_error): Use it.
12946 (Ffile_exists_p, Ffile_accessible_directory_p):
12947 Set errno to 0 when it is junk.
12948 * fileio.c (Faccess_file):
12949 * image.c (x_create_bitmap_from_file):
12950 Use faccessat rather than opening the file, to avoid the hassle of
12951 having a file descriptor open.
12952 * lisp.h (report_file_errno): New decl.
12953 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
12954
12955 Minor EBADF fixes.
12956 * process.c (create_process, wait_reading_process_output) [AIX]:
12957 Remove obsolete SIGHUP-related code, as Emacs no longer disables
12958 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
12959 a multithreaded environment anyway).
12960 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
12961
12962 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
12963
12964 * image.c (x_find_image_file): Don't close a remote file handle.
12965
12966 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
12967
12968 Fix races with threads and file descriptors.
12969 * callproc.c (Fcall_process_region):
12970 * dired.c (open_directory):
12971 * emacs.c (main, Fdaemon_initialized):
12972 * image.c (x_find_image_file):
12973 * inotify.c (Finotify_rm_watch):
12974 * lread.c (Flocate_file_internal):
12975 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
12976 * term.c (term_mouse_moveto, init_tty):
12977 * termcap.c (tgetent):
12978 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
12979 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
12980 * unexhp9k800.c, unexmacosx.c (unexec):
12981 * callproc.c (Fcall_process_region):
12982 Use emacs_close, not close.
12983 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
12984 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
12985 and posix_close function on current platforms (which all lack them).
12986 (emacs_close): Use it. This should fix the races on GNU/Linux and
12987 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
12988 and it should avoid closing random victim file descriptors on
12989 other platforms.
12990
12991 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
12992
12993 * inotify.c (uninitialized): Remove. All uses replaced by -1.
12994 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
12995 Touch up doc a bit.
12996
12997 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
12998 This is for .gdbinit xbacktrace.
12999
13000 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
13001 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
13002 (emacs_set_tty): Now static.
13003 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
13004 * term.c (tty_capable_p, tty_default_color_capabilities)
13005 (get_tty_terminal, term_mouse_movement)
13006 (handle_one_term_event, init_tty, maybe_fatal):
13007 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
13008 (tgetent, scan_file, name_match, compare_contin):
13009 * terminal.c (get_terminal):
13010 Use bool for boolean.
13011 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
13012 Prefer char to unsigned char if either will do.
13013 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
13014 (tty_write_glyphs): Prefer int to unsigned.
13015 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
13016 All callers changed.
13017 * termcap.c (tprint, main) [TEST]: Remove non-working test.
13018
13019 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
13020
13021 Port to C89.
13022 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
13023 (B__dummy__): New dummy symbol, to pacify C89.
13024 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
13025 they can't grok varargs macros.
13026 * dispnew.c (add_window_display_history)
13027 (add_frame_display_history):
13028 * print.c (print_object):
13029 * xdisp.c (debug_method_add):
13030 Use %p printf format only for void pointers.
13031 * emacs.c (usage_message): New constant, replacing ...
13032 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
13033 (main): Adjust to usage reorg.
13034 * fns.c (syms_of_fns):
13035 * profiler.c (syms_of_profiler):
13036 Don't use non-constant struct initializers.
13037 * gnutls.h (gnutls_initstage_t):
13038 * lisp.h (enum Lisp_Fwd_Type):
13039 * lread.c (lisp_file_lexically_bound_p):
13040 * xsettings.c (anonymous enum):
13041 Remove trailing comma.
13042 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
13043 * lisp.h (ENUM_BF): Use unsigned if pedantic.
13044 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
13045 (DEFUN): Use it.
13046 * regex.c (const_re_char): New type, to pacify strict C89.
13047 All uses of 'const re_char' replaced to use it.
13048 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
13049 with glibc when strict C89. This change is imported from gnulib.
13050 All uses changed.
13051 (_Restrict_arr_): Rename from __restrict_arr, similarly.
13052 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
13053 Omit GNU_LINUX implementation, since it requires long long.
13054 * xterm.c (x_draw_underwave):
13055 Do not assume the traditional order of struct's members.
13056 (x_term_init): Rewrite to avoid the need for non-constant structure
13057 initializers.
13058
13059 Syntax cleanup, mostly replacing macros with functions.
13060 This removes the need for the syntax_temp hack.
13061 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
13062 * syntax.c (SYNTAX_INLINE): New macro.
13063 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
13064 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
13065 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
13066 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
13067 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
13068 (SYNTAX_COMEND_FIRST): Now functions, not macros.
13069 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
13070 Now constants, not macros.
13071 (syntax_temp) [!__GNUC__]: Remove.
13072 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
13073 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
13074 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
13075 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
13076 Move here from syntax.h; now functions, not macros. Except for the
13077 last function, these are static since only syntax.c uses them.
13078 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
13079 All uses changed. Now a function, not a macro; use this fact
13080 to simplify the code.
13081 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
13082 compiler bugs; no longer relevant.
13083 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
13084 (SYNTAX_INLINE): New macro.
13085 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
13086 for the new functions. Use bool for boolean member.
13087 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
13088 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
13089 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
13090 (SETUP_BUFFER_SYNTAX_TABLE):
13091 Now extern inline functions, not macros.
13092 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
13093 Remove; all uses replaced by implementation.
13094 (syntax_temp) [!__GNUC__]: Remove decl.
13095 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
13096
13097 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
13098
13099 * emacs.c (main): Fix syntax error.
13100
13101 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
13102
13103 Timestamp fixes for undo (Bug#14824).
13104 * atimer.c (schedule_atimer):
13105 * fileio.c (Ffile_newer_than_file_p):
13106 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
13107 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
13108 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
13109 (syms_of_fileio): Remove Sclear_visited_file_name.
13110 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
13111 file doesn't exist; this avoids an ambiguity with negative timestamps.
13112 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
13113 * systime.h (make_emacs_time, invalid_emacs_time):
13114 Don't assume struct timespec layout; POSIX doesn't guarantee it.
13115 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
13116 * undo.c (record_first_change): Push (visited-file-modtime) onto
13117 undo list rather than reimplementing it by hand, incorrectly.
13118
13119 2013-07-09 Ken Brown <kbrown@cornell.edu>
13120
13121 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
13122
13123 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
13124
13125 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
13126
13127 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
13128
13129 Handle errno and exit status a bit more carefully.
13130 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
13131 number into an exit status. Instead, use EXIT_CANCELED.
13132 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
13133 * callproc.c (relocate_fd):
13134 * emacs.c (close_output_streams, main):
13135 * process.c (create_process):
13136 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
13137 Use emacs_perror for simplicity.
13138 * callproc.c (relocate_fd, main):
13139 * sysdep.c (sys_subshell):
13140 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
13141 (shut_down_emacs): Use emacs_write, not write.
13142 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
13143 * fileio.c (Fcopy_file, e_write):
13144 * nsterm.m (ns_select):
13145 * process.c (send_process):
13146 * sound.c (vox_write):
13147 Use emacs_write_sig, not emacs_write.
13148 * lisp.h (emacs_write_sig, emacs_perror): New decls.
13149 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
13150 New constants.
13151 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
13152 of write.
13153 (emacs_full_write): New function.
13154 (emacs_write): Rewrite to use it.
13155 (emacswrite_sig, emacs_perror): New functions.
13156 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
13157
13158 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
13159
13160 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
13161 on NS even if it is present. Pixmap on NS is a void*.
13162
13163 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
13164
13165 Port to Ubuntu 10 (Bug#14803).
13166 Problem reported by T.V. Raman.
13167 * process.c (close_on_exec, accept4, process_socket):
13168 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
13169
13170 2013-07-07 Eli Zaretskii <eliz@gnu.org>
13171
13172 * w32.c (sys_dup): Declare prototype.
13173
13174 * filelock.c:
13175 * emacs.c:
13176 * callproc.c [WINDOWSNT]: Include sys/socket.h.
13177
13178 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
13179
13180 Make file descriptors close-on-exec when possible (Bug#14803).
13181 This simplifies Emacs a bit, since it no longer needs to worry
13182 about closing file descriptors by hand in some cases.
13183 It also fixes some unlikely races. Not all such races, as
13184 libraries often open files internally without setting
13185 close-on-exec, but it's an improvement.
13186 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
13187 * callproc.c (Fcall_process) [!MSDOS]:
13188 * emacs.c (main) [!DOS_NT]:
13189 * nsterm.m (ns_term_init):
13190 * process.c (create_process):
13191 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
13192 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
13193 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
13194 Prefer mkostemp with O_CLOEXEC to mkstemp.
13195 * callproc.c (relocate_fd) [!WINDOWSNT]:
13196 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
13197 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
13198 now using pipe2.
13199 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
13200 Make the resulting file descriptor close-on-exec.
13201 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
13202 * lread.c (load_descriptor_list, load_descriptor_unwind):
13203 Remove; no longer needed. All uses removed.
13204 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
13205 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
13206 New functions.
13207 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
13208 (Fmake_network_process, Fnetwork_interface_list)
13209 (Fnetwork_interface_info, server_accept_connection):
13210 Make newly-created socket close-on-exec.
13211 * sysdep.c (emacs_open, emacs_fopen):
13212 Make new-created descriptor close-on-exec.
13213 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
13214 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
13215
13216 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
13217
13218 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
13219 for NS_IMPL_GNUSTEP.
13220
13221 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
13222
13223 Fix openp errno handling.
13224 * callproc.c (Fcall_process): Preserve openp errno around close.
13225 * lread.c (openp): Set errno when returning -1, as some callers
13226 expect this.
13227
13228 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
13229
13230 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
13231
13232 * nsterm.h (NSSavePanel): Update comment.
13233 (NSAPP_DATA2_RUNFILEDIALOG): Define.
13234 (ns_run_file_dialog): Declare.
13235
13236 * nsfns.m: Remove panelOK.
13237 (ns_fd_data): New.
13238 (ns_run_file_dialog): New function.
13239 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
13240 event loop, so file dialog is popped up by ns_run_file_dialog, called
13241 by sendEvent (Bug#14578).
13242 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
13243
13244 2013-07-06 Eli Zaretskii <eliz@gnu.org>
13245
13246 * xdisp.c (default_line_pixel_height): New function.
13247 (pos_visible_p, move_it_vertically_backward, try_scrolling)
13248 (try_cursor_movement, redisplay_window, try_window)
13249 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
13250
13251 * window.c (window_scroll_pixel_based):
13252 use default_line_pixel_height.
13253
13254 * dispextern.h (default_line_pixel_height): Add prototype.
13255
13256 * frame.c (x_set_line_spacing): Accept a float value for
13257 line-spacing parameter, per the documentation.
13258
13259 * data.c (Fmultibyte_string_p): Doc fix.
13260
13261 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
13262
13263 Use emacs_open more consistently when opening files.
13264 This handles EINTR more consistently now, and makes it easier
13265 to introduce other uniform changes to file descriptor handling.
13266 * sysstdio.h: New file.
13267 * buffer.c (mmap_init):
13268 * cygw32.c (chdir_to_default_directory):
13269 * dispnew.c (Fopen_termscript):
13270 * emacs.c (Fdaemon_initialized):
13271 * fileio.c (Fdo_auto_save):
13272 * image.c (slurp_file, png_load_body, jpeg_load_body):
13273 * keyboard.c (Fopen_dribble_file):
13274 * lread.c (Fload):
13275 * print.c (Fredirect_debugging_output):
13276 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
13277 * termcap.c (tgetent):
13278 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
13279 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
13280 * w32term.c (w32_initialize) [CYGWIN]:
13281 * xfaces.c (Fx_load_color_file):
13282 Use emacs_open instead of plain open, and emacs_fopen instead of
13283 plain fopen.
13284 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
13285 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
13286 * callproc.c (default_output_mode): New constant.
13287 (Fcall_process): Use it to call emacs_open instead of plain creat.
13288 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
13289 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
13290 (emacs_fopen): New function.
13291 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
13292 Include <lisp.h>, for emacs_open.
13293 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
13294
13295 Remove duplicate #include directives.
13296 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
13297 * xfaces.c:
13298 Don't include stdio.h twice.
13299 * buffer.c [USE_MMAP_FOR_BUFFERS]:
13300 Don't include sys/types.h or stdio.h twice.
13301 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
13302 * lread.c: Don't include coding.h twice.
13303 * nsfont.m: Don't include frame.h twice.
13304 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
13305 * ralloc.c: Don't include <unistd.h> twice.
13306 * xdisp.c: Don't include font.h twice.
13307 * xterm.c: Don't include fontset.h twice.
13308 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
13309
13310 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
13311
13312 Scale ImageMagick images more carefully.
13313 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
13314 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
13315 Be more careful about avoiding undefined behavior after
13316 integer overflow and division by zero.
13317
13318 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13319
13320 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
13321 (syms_of_w32fns): DEFSYM them.
13322 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
13323 (CCHDEVICENAME): Define macros if not defined.
13324 (struct MONITOR_INFO_EX): New struct.
13325 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
13326 (enum_display_monitors_fn): New variable.
13327 (globals_of_w32fns): Initialize it.
13328 (Fx_display_pixel_width, Fx_display_pixel_height)
13329 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
13330 multi-monitor setups in docstrings.
13331 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
13332 screen size by primary monitor's millimeter per pixel.
13333 (w32_monitor_enum, w32_display_monitor_attributes_list)
13334 (w32_display_monitor_attributes_list_fallback)
13335 (Fw32_display_monitor_attributes_list): New functions.
13336 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
13337
13338 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
13339 if not defined.
13340 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
13341
13342 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
13343
13344 * fileio.c (Qfile_notify_error): New error symbol.
13345
13346 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
13347 * inotify.c (inotify_callback, symbol_to_inotifymask)
13348 (Finotify_add_watch, Finotify_rm_watch): Use it.
13349 (inotifyevent_to_event): Exchange order of cookie and file name.
13350 (Finotify_add_watch): Adapt docstring.
13351
13352 * lisp.h (Qfile_notify_error): Declare.
13353
13354 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
13355
13356 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
13357 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
13358 Do not clear _malloc_thread_enabled_p, undoing the previous change,
13359 which did not work (see <http://bugs.gnu.org/14569#307>).
13360 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
13361 && (!noninteractive || initialized)). This attempts to thread
13362 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
13363
13364 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
13365
13366 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
13367 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
13368
13369 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
13370
13371 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
13372 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
13373 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
13374 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
13375
13376 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
13377
13378 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
13379 Define to __sys_siglist.
13380
13381 2013-07-02 Eli Zaretskii <eliz@gnu.org>
13382
13383 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
13384 word-wrap, so that overflow-newline-into-fringe would work in
13385 visual-line-mode. (Bug#2749)
13386 (move_it_in_display_line_to): When the last scanned display
13387 element fits exactly on the display line, and
13388 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
13389 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
13390 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
13391 finding buffer position that corresponds to pixel coordinates,
13392 e.g. in buffer_posn_from_coords.
13393
13394 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
13395
13396 * process.c (handle_child_signal): Call catch_child_signal if
13397 NS_IMPL_GNUSTEP.
13398
13399 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
13400
13401 Don't convert function pointers to void * and back.
13402 It isn't portable C, and it's easy enough to avoid.
13403 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
13404 (make_save_value): Add support for SAVE_FUNCPOINTER.
13405 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
13406 * print.c (print_object):
13407 Distinguish function from object pointers.
13408 * lisp.h (SAVE_FUNCPOINTER): New constant.
13409 (SAVE_SLOT_BITS): Adjust to it.
13410 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
13411 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
13412 (voidfuncptr): New typedef.
13413 (struct Lisp_Save_Value): New member data[0].funcpointer.
13414 (XSAVE_FUNCPOINTER): New function.
13415
13416 Simplify buildobj processing.
13417 * Makefile.in (buildobj.h): Make it a sequence of strings each
13418 followed by comma, rather than a single string. Put it into a
13419 .tmp file in case there's an error while generating it.
13420 (gl-stamp): Use .tmp for temp files.
13421 (mostlyclean): Clean .tmp files.
13422 * doc.c (buildobj): Move to just the routine that needs it.
13423 It's now an array of strings, so processing is simpler.
13424
13425 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
13426
13427 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
13428 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
13429 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
13430 Invoke malloc_enable_thread even when not interactive.
13431 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
13432 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
13433 in this case, since the underlying bug has now been fixed.
13434
13435 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
13436
13437 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
13438 unlinking it (bug#14691).
13439
13440 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
13441
13442 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
13443 before checking whether buffer is modified. This lets
13444 `kill-buffer-query-functions' cancel killing of the buffer or save
13445 its content before `kill-buffer' asks user the "Buffer %s
13446 modified; kill anyway?" question.
13447
13448 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
13449
13450 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
13451 Let the super performKeyEquivalent deal with them (Bug#14747).
13452
13453 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
13454
13455 * widget.c (resize_cb): Remove unused local.
13456
13457 Do not use GTK 3 if it exists but cannot be compiled.
13458 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
13459 * xterm.c (x_error_handler) [!USE_GTK]:
13460 Do not use GTK 3.
13461
13462 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
13463
13464 2013-06-30 Eli Zaretskii <eliz@gnu.org>
13465
13466 * intervals.c (get_local_map): Instead of aborting, clip POSITION
13467 to the valid range of values. (Bug#14753)
13468
13469 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
13470 when moving point by using the current glyph matrix. This avoids
13471 the need to force redisplay when this function is called in a
13472 loop.
13473
13474 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
13475
13476 Fix minor problems found by static checking.
13477 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
13478 Redo the latter's body to sidestep GCC parenthesization warnings.
13479 (setup_coding_system, detect_coding, detect_coding_system): Use them.
13480 * coding.c (detect_coding, detect_coding_system):
13481 * coding.h (struct undecided_spec):
13482 Use bool for boolean.
13483 * image.c (QCmax_width, QCmax_height): Now static.
13484 * xdisp.c (Fmove_point_visually): Remove unused local.
13485
13486 2013-06-29 Eli Zaretskii <eliz@gnu.org>
13487
13488 * xdisp.c (Fmove_point_visually): New function.
13489
13490 2013-06-28 Kenichi Handa <handa@gnu.org>
13491
13492 * coding.h (define_coding_undecided_arg_index): New enum.
13493 (coding_attr_index): New members
13494 coding_attr_undecided_inhibit_null_byte_detection,
13495 coding_attr_undecided_inhibit_iso_escape_detection,
13496 coding_attr_undecided_prefer_utf_8.
13497 (undecided_spec): New struct.
13498 (struct coding_system): New member `undecided' of the member
13499 `spec'.
13500
13501 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
13502 (detect_coding): Likewise.
13503 (detect_coding_system): Likewise.
13504 (Fdefine_coding_system_internal): New coding system properties
13505 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
13506 :prefer-utf-8.
13507 (syms_of_coding): Adjust for coding_arg_undecided_max.
13508
13509 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
13510
13511 * image.c (x_from_xcolors): Remove unused local.
13512
13513 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13514
13515 Defer image data transfer between X client and server until actual
13516 display happens.
13517
13518 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
13519 and `mask_img'.
13520
13521 * image.c (Destroy_Image): Remove.
13522 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
13523 `mask_p', and `colors_p'. All uses changed.
13524 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
13525 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
13526 New macros for `flags' arg to x_clear_image_1.
13527 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
13528 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
13529 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
13530 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
13531 (image_get_x_image, image_unget_x_image): New functions or macros.
13532 (image_background, image_background_transparent, x_to_xcolors)
13533 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
13534 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
13535 instead of Destroy_Image.
13536 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
13537 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
13538 (png_load_body, jpeg_load_body, tiff_load, gif_load)
13539 (imagemagick_load_image, svg_load_image): Use them instead of
13540 x_create_x_image_and_pixmap, and x_put_x_image followed by
13541 x_destroy_x_image, respectively.
13542 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
13543 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
13544 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
13545 background_transparent fields.
13546 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
13547 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
13548
13549 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
13550
13551 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
13552 This mostly consists of undoing recent changes.
13553 * callproc.c (Fcall_process):
13554 * process.c (create_process):
13555 Do not worry about catching SIGCHLD here, undoing previous change.
13556 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
13557 * process.c, process.h (catch_child_signal):
13558 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
13559 * process.c (catch_child_handler): Don't worry about being called
13560 lazily and do not assume caller has blocked SIGCHLD, undoing
13561 previous change. Move first-time stuff back to
13562 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
13563 tickle glib, as that causes Cygwin bootstrap to fail. Do not
13564 set lib_child_handler if it's already initialized, which may
13565 help avoid problems on GNUstep.
13566
13567 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
13568
13569 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
13570 * callproc.c (Fcall_process):
13571 * process.c (create_process):
13572 Make sure SIGCHLD is caught before we fork,
13573 since Emacs startup no arranges to catch SIGCHLD.
13574 * process.c (lib_child_handler): Initialize to null, not to
13575 dummy_handler.
13576 (catch_child_signal): Allow self to be called lazily.
13577 Do nothing if it's already been called.
13578 Assume caller has blocked SIGCHLD (all callers do now).
13579 * emacs.c (main): Do not catch SIGCHLD here; defer it until
13580 just before it's really needed.
13581 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
13582 since it hasn't been caught yet.
13583
13584 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
13585
13586 * image.c (compute_image_size): New function to implement
13587 :max-width and :max-height.
13588 (imagemagick_load_image): Use it.
13589
13590 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
13591
13592 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
13593 * callproc.c, process.h (block_child_signal, unblock_child_signal):
13594 Now extern.
13595 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
13596 * process.c (catch_child_signal): Block SIGCHLD while futzing with
13597 the SIGCHLD handler, since the code is not atomic and (due to glib)
13598 signals may be arriving now.
13599 * sysdep.c (init_signals): Do not catch child signals here;
13600 'main' now does that later, at a safer time.
13601
13602 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
13603
13604 Clean up SIGCHLD handling a bit (Bug#14569).
13605 * process.c, process.h (catch_child_signal):
13606 Now always extern, even if !NS_IMPL_GNUSTEP.
13607 * process.c (catch_child_signal): Move glib tickler here from
13608 init_process_emacs, so that it's done earlier in Emacs
13609 initialization. Also move the noninteractive && !initialized
13610 check here from init_process_emacs. This is all a bit cleaner for
13611 GNUish platforms, and I hope it works around the Cygwin bug.
13612 * sysdep.c (init_signals): Invoke catch_child_signal here, so
13613 that glib signal handling is tickled before glib creates threads.
13614
13615 * process.c (wait_reading_process_output): Avoid int overflow
13616 when reading more than 2 GiB total from a process.
13617
13618 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
13619
13620 * process.c (create_process): Handle a couple more cases,
13621 i.e., work even if new_argv and wait_child_setup[i] are cached.
13622 Use Fcall_process's style for volatile vars.
13623
13624 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
13625
13626 * process.c (create_process): Mark PROCESS volatile.
13627
13628 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
13629
13630 Use C99-style flexible array members if available.
13631 This avoids some subtle aliasing issues, which typically
13632 aren't a problem with GCC but may be a problem elsewhere.
13633 * alloc.c (sdata): New typedef, replacing the old struct sdata.
13634 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
13635 In either case, it uses a flexible array member rather than
13636 the old struct hack. All uses changed.
13637 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
13638 Adjust to sdata reorganization.
13639 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
13640 Use offsetof (struct, flex_array_member), not sizeof (struct), as
13641 that ports better to pre-C99 non-GCC.
13642 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
13643 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
13644 as the latter has changed.
13645 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
13646 and port better to pre-C99 GCC.
13647 * image.c (struct xpm_cached_color):
13648 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
13649 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
13650 Use FLEXIBLE_ARRAY_MEMBER.
13651 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
13652 Move decl to top level so it gets checked against implementation.
13653 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
13654 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
13655
13656 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
13657
13658 * syntax.c: Integer cleanups.
13659 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
13660 All uses that need 0-or-2 changed to:
13661 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
13662 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
13663 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
13664 (char_quoted, prev_char_comend_first, back_comment)
13665 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
13666 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
13667 Use bool for boolean.
13668 (update_syntax_table, skip_chars, skip_syntaxes):
13669 Prefer int to unsigned when either will do.
13670 (back_comment): Return boolean success flag, like forw_comment,
13671 instead of positive-or-minus-1 (which might have overflowed int anyway).
13672 Don't stuff ptrdiff_t into int.
13673 (syntax_spec_code, syntax_code_spec): Now const.
13674 (Fmatching_paren, scan_lists, scan_sexps_forward):
13675 Use enum syntaxcode for syntax code.
13676 (Fmatching_paren): Check that arg is a character, not just an integer.
13677 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
13678 (Finternal_describe_syntax_value): Omit no-longer-needed
13679 comparison to 0.
13680 (skip_chars): Use char, not unsigned char, when the distinction
13681 doesn't matter.
13682 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
13683 * bytecode.c (exec_byte_code):
13684 * syntax.c (syntax_spec_code, Fchar_syntax)
13685 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
13686 (init_syntax_once):
13687 * syntax.h (SYNTAX_WITH_FLAGS):
13688 Omit unnecessary casts.
13689
13690 2013-06-20 Eli Zaretskii <eliz@gnu.org>
13691
13692 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
13693 line dimensions here, to avoid race conditions with the main
13694 thread. (Bug#14062, bug#14630, bug#14669)
13695
13696 * w32term.c (w32_draw_window_cursor): Compute the header line and
13697 mode line dimensions here.
13698 <w32_system_caret_window, w32_system_caret_hdr_height>:
13699 <w32_system_caret_mode_height>: New variables.
13700
13701 * w32term.h: Declare them.
13702
13703 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
13704
13705 * alloc.c (die): Move "assertion failed" string here ...
13706 * lisp.h (eassert): ... from here. Also, suppress evaluation of
13707 COND when SUPPRESS_CHECKING. This shrinks the executable text
13708 size by 0.8% to 2.2% when configured with --enable-checking,
13709 depending on optimization flags (GCC 4.8.1 x86-64).
13710
13711 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
13712
13713 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
13714
13715 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
13716 base is 2; this is more accurate.
13717
13718 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
13719
13720 * sound.c (string_default): Move to !WINDOWSNT section.
13721 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
13722
13723 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
13724
13725 * sound.c: Integer cleanups.
13726 Remove unnecessary forward decls.
13727 (struct sound_device): The 'file' member is now a Lisp_Object, not
13728 a char *, so that we needn't invoke alloca on a huge size.
13729 (Fplay_sound_internal): Adjust to this.
13730 (string_default): New function.
13731 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
13732 Use it to adjust to the struct sound_device change.
13733 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
13734 (be2hs) [0]: Remove.
13735
13736 * syntax.c (skip_chars): Don't use uninitialized storage
13737 when searching a multibyte buffer for characters that are not in a
13738 unibyte string that contains non-ASCII characters.
13739
13740 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
13741
13742 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
13743 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
13744
13745 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
13746
13747 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
13748
13749 2013-06-18 Kenichi Handa <handa@gnu.org>
13750
13751 * font.c (Ffont_spec): Signal an error for an invalid font name
13752 (Bug#14648).
13753
13754 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
13755
13756 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
13757 In particular this ports to 32-bit sparc Sun cc.
13758 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
13759 array with a dummy element at specpdl[-1], so that its address can
13760 be taken portably.
13761 (unbind_to): Do not copy the binding; not needed, now that we
13762 copy old_value in the one place where the copy is needed.
13763 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
13764 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
13765 (union specbinding): Rename from struct specbinding. Redo layout
13766 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
13767 which is not portable. With Sun C 5.12 32-bit sparc, the
13768 declaration causes nargs to be an unsigned bitfield, a behavior
13769 that the C standard allows; but Emacs wants nargs to be signed.
13770 The overall type is now a union of structures rather than a
13771 structure of union of structures, and the 'kind' member is now a
13772 bitfield, so that the overall type doesn't grow. All uses changed.
13773 * process.c (Fmake_serial_process): Remove unnecessary initialization.
13774
13775 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
13776
13777 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
13778 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
13779
13780 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
13781
13782 2013-06-17 Eli Zaretskii <eliz@gnu.org>
13783
13784 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
13785 unless we know that the window w's frame is a frame object.
13786 Another attempt at solving bug#14062 and bug#14630.
13787
13788 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
13789
13790 * textprop.c (property_set_type): New enum.
13791 (add_properties): Allow appending/prepending text properties.
13792 (add_text_properties_1): Factored out of Fadd_text_properties.
13793 (Fadd_text_properties): Move all the code into
13794 add_text_properties_1.
13795 (Fadd_face_text_property): New function that calls
13796 add_text_properties_1.
13797
13798 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
13799
13800 Move functions from lisp.h to individual modules when possible.
13801 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
13802 * alloc.c (XFLOAT_INIT, set_symbol_name):
13803 * buffer.c (CHECK_OVERLAY):
13804 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
13805 (set_char_table_parent):
13806 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
13807 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
13808 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
13809 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
13810 (set_blv_valcell):
13811 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
13812 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
13813 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
13814 (backtrace_args, backtrace_debug_on_exit):
13815 * floatfns.c (CHECK_FLOAT):
13816 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
13817 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
13818 (set_hash_hash, set_hash_hash_slot, set_hash_index)
13819 (set_hash_index_slot):
13820 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
13821 * marker.c (CHECK_MARKER):
13822 * textprop.c (CHECK_STRING_OR_BUFFER):
13823 * window.c (CHECK_WINDOW_CONFIGURATION):
13824 Move here from lisp.h, and make these functions static rather than
13825 extern inline.
13826 * buffer.c (Qoverlayp):
13827 * data.c (Qsubrp):
13828 * fns.c (Qhash_table_p):
13829 * window.c (Qwindow_configuration_p):
13830 Now static.
13831 * lisp.h: Remove the abovementioned defns and decls.
13832
13833 Use functions, not macros, for XINT etc (Bug#11935).
13834 In lisp.h, prefer functions to function-like macros, and
13835 constants to object-like macros, when either will do. This:
13836 . simplifies use, as there's no more need to worry about
13837 arguments' side effects being evaluated multiple times.
13838 . makes the code easier to debug on some platforms.
13839 However, when using gcc -O0, keep using function-like macros
13840 for a few critical operations, for performance reasons.
13841 This sort of thing isn't needed with gcc -Og, but -Og
13842 is a GCC 4.8 feature and isn't widely-enough available yet.
13843 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
13844 Remove enum lsb_bits; no longer needed.
13845 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
13846 * buffer.c (Qoverlap):
13847 * data.c (Qsubrp):
13848 * fns.c (Qhash_table_p):
13849 Now extern, so lisp.h can use these symbols.
13850 * dispextern.h: Include character.h, for MAX_CHAR etc.
13851 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
13852 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
13853 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
13854 (GLYPH_CODE_P): Move here from lisp.h.
13855 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
13856 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
13857 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
13858 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
13859 XUNTAG now returns void *.
13860 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
13861 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
13862 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
13863 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
13864 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
13865 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
13866 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
13867 (lisp_h_XPNTR, lisp_h_XSYMBOL):
13868 New macros, renamed from their sans-lisp_h_ counterparts.
13869 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
13870 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
13871 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
13872 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
13873 If compiling via GCC without optimization, define these as macros
13874 in addition to inline functions.
13875 To disable this, compile with -DINLINING=0.
13876 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
13877 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
13878 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
13879 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
13880 (INTMASK, VALMASK): Now macros, since static values cannot be
13881 accessed from extern inline functions.
13882 (VALMASK): Also a constant, for benefit of old GDB.
13883 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
13884 is INTEGERP, which can fold it in.
13885 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
13886 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
13887 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
13888 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
13889 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
13890 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
13891 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
13892 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
13893 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
13894 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
13895 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
13896 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
13897 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
13898 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
13899 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
13900 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
13901 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
13902 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
13903 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
13904 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
13905 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
13906 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
13907 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
13908 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
13909 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
13910 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
13911 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
13912 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
13913 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
13914 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
13915 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
13916 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
13917 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
13918 Now functions.
13919 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
13920 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
13921 (VALMASK): Define in one place rather than in two, merging the
13922 USE_LSB_TAG parts; this is simpler.
13923 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
13924 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
13925 Move up, to avoid use before definition.
13926 Also include "globals.h" earlier, for the same reason.
13927 (make_natnum): New function.
13928 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
13929 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
13930 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
13931 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
13932 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
13933 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
13934 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
13935 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
13936 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
13937 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
13938 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
13939 (Qwindow_configuration_p, Qimage): New forward declarations.
13940 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
13941 (STRING_COPYIN): Remove; unused.
13942 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
13943 (xcar_addr, xcdr_addr): New functions. All uses changed.
13944 (IEEE_FLOATING_POINT): Now a constant, not a macro.
13945 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
13946 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
13947 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
13948 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
13949 (TYPE_RANGED_INTEGERP): Simplify.
13950 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
13951 (setlocale, fixup_locale, synchronize_system_messages_locale)
13952 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
13953 Now empty functions, not macros.
13954 (functionp): Return bool, not int.
13955 * window.c (Qwindow_configuration_p): Now extern,
13956 so window.h can use it.
13957 * window.h (Qwindowp): Move decl back to lisp.h.
13958
13959 2013-06-15 Eli Zaretskii <eliz@gnu.org>
13960
13961 * xdisp.c (Fline_pixel_height): New function, required for solving
13962 bug #14567.
13963
13964 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
13965
13966 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
13967
13968 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
13969
13970 * lread.c (syms_of_lread):
13971 * fns.c (Fprovide): Adjust to new format of after-load-alist.
13972
13973 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
13974
13975 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
13976
13977 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
13978
13979 * fileio.c (expand_file_name): Doc fix.
13980
13981 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
13982
13983 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
13984 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
13985 Wait for self, not for 0. This can't hurt on GNU or similar
13986 system, and may help with Cygwin.
13987
13988 * keyboard.c: Don't use PROP (...) as an lvalue.
13989 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
13990 Use set_prop (A, B), not PROP (A) = B.
13991
13992 2013-06-10 Eli Zaretskii <eliz@gnu.org>
13993
13994 * xdisp.c (get_it_property): Use it->window instead of generating
13995 a Lisp object from it->w.
13996
13997 2013-06-09 Eli Zaretskii <eliz@gnu.org>
13998
13999 * xdisp.c (get_it_property): If it->object is a buffer, pass to
14000 get-char-property the window that is being rendered, instead of
14001 the buffer, to support window-specific overlays. (Bug#14575)
14002 (compute_display_string_pos): When W is NULL, use the current
14003 buffer as the object to pass to get-char-property.
14004 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
14005 pointer member of the bidi iterator, since no window is pertinent
14006 to this function.
14007
14008 2013-06-08 Eli Zaretskii <eliz@gnu.org>
14009
14010 * bidi.c (bidi_fetch_char): Accept additional argument, the window
14011 being displayed, and pass it to compute_display_string_pos.
14012 (bidi_level_of_next_char, bidi_resolve_explicit_1)
14013 (bidi_paragraph_init): All callers changed.
14014
14015 * xdisp.c (init_from_display_pos, init_iterator)
14016 (handle_single_display_spec, next_overlay_string)
14017 (get_overlay_strings_1, reseat_1, reseat_to_string)
14018 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
14019 Set bidi_it.w member from it->w.
14020 (compute_display_string_pos): Accept additional argument, the
14021 window being displayed, and pass it to Fget_char_property.
14022 (Bug#14575)
14023
14024 * dispextern.h (struct bidi_it): New member w, the window being
14025 displayed.
14026 (compute_display_string_pos): Adjust prototype.
14027
14028 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
14029
14030 * xgselect.c: Remove unneeded include xterm.h.
14031
14032 * process.c (wait_reading_process_output): Check for NS before GLIB.
14033 GLIB may be linked in due to rsvg, but ns_select must be called.
14034
14035 * xgselect.c (xg_select): Remove call to window_system_available
14036 and g_main_context_pending at the top, so Gdk events (i.e. file
14037 notify) are processed when Emacs is started with -nw.
14038
14039 2013-06-07 Eli Zaretskii <eliz@gnu.org>
14040
14041 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
14042 (ctagsfiles3): New variable, includes only *.m files.
14043 (TAGS): Use an explicit language name in the regular expressions,
14044 to avoid transformation of '/SOMETHING' by MSYS to
14045 'c:\MSYS\SOMETHING'.
14046
14047 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
14048
14049 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
14050
14051 2013-06-06 Eli Zaretskii <eliz@gnu.org>
14052
14053 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
14054 still need to set the mouse pointer shape and activate help-echo.
14055 (Bug#14558)
14056
14057 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
14058
14059 A few porting etc. fixes for the new file monitor code.
14060 See the thread containing
14061 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
14062 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
14063 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
14064 (dir_monitor_callback, Fgfile_rm_watch):
14065 Use assq_no_quit instead of Fassoc, for speed.
14066 (dir_monitor_callback, Fgfile_rm_watch):
14067 eassert that the monitor is a fixnum.
14068 (dir_monitor_callback): No need for CDR_SAFE.
14069 Simplify building of lisp with alternative tails.
14070 (Fgfile_add_watch, Fgfile_rm_watch):
14071 Do not assume glib functions set errno reliably on failure.
14072 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
14073 and signal an error otherwise.
14074 (Fgfile_rm_watch): Prefer CONSP to !NILP.
14075 Use Fdelq instead of Fdelete, for speed.
14076
14077 2013-06-05 Eli Zaretskii <eliz@gnu.org>
14078
14079 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
14080 don't insist on being invoked on a highlighted tool-bar button.
14081 Avoids losing tool-bar functionality when mouse-highlight is nil.
14082 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
14083 Don't highlight when mouse-highlight is nil.
14084 (note_mouse_highlight): When mouse-highlight is nil, don't return
14085 right away; instead, run tool-bar and mode-line highlight
14086 subroutine, clear any existing highlight, and revert the mouse
14087 pointer to its default shape. (Bug#14558)
14088
14089 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
14090
14091 * lisp.mk (lisp): Add prog-mode.el.
14092
14093 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
14094
14095 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
14096 * process.c (dummy_handler): New function.
14097 (lib_child_handler): New static var.
14098 (handle_child_signal): Invoke it.
14099 (catch_child_signal): If a library has set up a signal handler,
14100 save it into lib_child_handler.
14101 (init_process_emacs): If using glib and not on Windows, tickle glib's
14102 child-handling code so that it initializes its private SIGCHLD handler.
14103 * syssignal.h (SA_SIGINFO): Default to 0.
14104 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
14105 31; it should no longer be needed now.
14106
14107 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
14108
14109 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
14110
14111 * gfilenotify.c (globals_of_gfilenotify): New function.
14112 (syms_of_gfilenotify): Move global initialization there.
14113
14114 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
14115
14116 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
14117
14118 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
14119 * keyboard.c (menu_bar_items, tool_bar_items):
14120 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
14121 not override local keymaps any more.
14122
14123 2013-06-04 Eli Zaretskii <eliz@gnu.org>
14124
14125 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
14126
14127 2013-06-03 Eli Zaretskii <eliz@gnu.org>
14128
14129 * w32console.c (initialize_w32_display): Return the dimensions of
14130 the console window via 2 additional arguments, not via the current
14131 frame. This avoids crashes due to overrunning the bounds of
14132 frame's decode_mode_spec_buffer, which is not resized following
14133 the change of the frame dimensions from the initial 10x10.
14134
14135 * w32term.h (w32_initialize_display_info): Adjust prototype.
14136
14137 * term.c (init_tty): Take dimensions of the frame from the values
14138 returned by initialize_w32_display.
14139
14140 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
14141 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
14142 (LIBES): Add $(GFILENOTIFY_LIBS).
14143
14144 * w32inevt.c (handle_file_notifications): Add dummy implementation
14145 for !HAVE_W32NOTIFY.
14146
14147 * w32term.c: Wrap code with HAVE_W32NOTIFY.
14148
14149 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
14150
14151 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
14152
14153 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
14154
14155 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
14156
14157 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
14158
14159 Fix minor problems found by static checking.
14160 * data.c (pure_write_error):
14161 Use xsignal2, not Fsignal, as Fsignal might return.
14162 * eval.c (set_backtrace_debug_on_exit): Now static.
14163 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
14164 No longer inline. EXTERN_INLINE is needed only for functions
14165 defined in .h files. Reindent function header as per GNU style.
14166 (backtrace_p, backtrace_top, backtrace_next):
14167 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
14168 compiler or linker. Add extern decls to pacify gcc -Wall.
14169 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
14170 Now static.
14171 * frame.c (free_monitors): Define only on platforms that need it.
14172 * nsterm.m (ns_term_init):
14173 * process.c (catch_child_signal):
14174 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
14175 defined on all porting targets these days.
14176 * process.c, process.h (catch_child_signal):
14177 Make it extern only if NS_IMPL_GNUSTEP is defined.
14178
14179 2013-06-03 Eli Zaretskii <eliz@gnu.org>
14180
14181 * w32.c (gettimeofday): Make the signature identical to prototype
14182 in nt/inc/sys/time.h.
14183
14184 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
14185
14186 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
14187 .gdbinit.
14188
14189 * keyboard.c (safe_run_hooks_error): Improve error message.
14190
14191 * data.c (pure_write_error): Add `object' argument.
14192 * puresize.h (CHECK_IMPURE): Use it.
14193
14194 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
14195
14196 * Makefile.in (NOTIFY_OBJ): New variable.
14197 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
14198
14199 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
14200 Call syms_of_gfilenotify.
14201
14202 * gfilenotify.c: New file.
14203
14204 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
14205 and Qfile_w32notify.
14206 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
14207 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
14208
14209 * lisp.h: Declare syms_of_gfilenotify.
14210
14211 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
14212
14213 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
14214
14215 Merge the specpdl and backtrace stacks. Make the structure of the
14216 specpdl entries more obvious via a tagged union of structs.
14217 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
14218 (enum specbind_tag): New enum.
14219 (struct specbinding): Make it a tagged union of structs.
14220 Add a case for backtrace records.
14221 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
14222 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
14223 (backtrace_debug_on_exit): New accessors.
14224 (struct backtrace): Remove.
14225 (struct catchtag): Remove backlist field.
14226 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
14227 Move to eval.c.
14228 (Flocal_variable_p): Speed up the common case where the binding is
14229 already loaded.
14230 * eval.c (backtrace_list): Remove.
14231 (set_specpdl_symbol, set_specpdl_old_value): Remove.
14232 (set_backtrace_args, set_backtrace_nargs)
14233 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
14234 (backtrace_next): New functions.
14235 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
14236 (unwind_to_catch, internal_lisp_condition_case)
14237 (internal_condition_case, internal_condition_case_1)
14238 (internal_condition_case_2, internal_condition_case_n): Don't bother
14239 with backtrace_list any more.
14240 (Fsignal): Adjust to new backtrace format.
14241 (grow_specpdl): Move up.
14242 (record_in_backtrace): New function.
14243 (eval_sub, Ffuncall): Use it.
14244 (apply_lambda): Adjust to new backtrace format.
14245 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
14246 data.c.
14247 (specbind): Adjust to new specpdl format. Simplify.
14248 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
14249 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
14250 backtrace format.
14251 (mark_backtrace): Remove.
14252 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
14253 * xdisp.c (redisplay_internal): Use record_in_backtrace.
14254 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
14255 Use mark_specpdl.
14256 * profiler.c (record_backtrace): Use get_backtrace.
14257 (handle_profiler_signal): Use backtrace_top_function.
14258 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
14259 accessor functions.
14260
14261 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
14262
14263 * process.h (catch_child_signal): Declare.
14264
14265 * process.c (catch_child_signal): New function.
14266 (init_process_emacs): Call it.
14267
14268 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
14269 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
14270 NS_IMPL_COCOA.
14271 (x_set_cursor_type): Remove declaration.
14272 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
14273 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
14274 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
14275 (ns_get_color): Use F suffix on float.
14276 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
14277 (ns_get_rgb_color): Remove.
14278 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
14279 (note_mouse_movement): x and y are CGFloat.
14280 (ns_draw_fringe_bitmap): Remove unused rowY.
14281 Change #if to COCOA && >= 10_6.
14282 (ns_draw_window_cursor): Remove unused overspill.
14283 (ns_draw_underwave): width and x are EamcsCGFloat.
14284 (ns_draw_box): thickness is CGFloat.
14285 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
14286 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
14287 if not in main thread.
14288 (ns_get_pending_menu_title, ns_check_menu_open)
14289 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
14290 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
14291 (sendFromMainThread:): New method.
14292 (changeFont:): size is CGFloat.
14293 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
14294 Disable warning about permanent text.
14295 (characterIndexForPoint:): Adjust return type depending on GNUstep
14296 version.
14297 (mouseDown:): delta is CGFloat.
14298 (updateFrameSize): Remove unised variable f.
14299 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
14300 Cast float to EmacsCGFloat.
14301 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
14302 also to -1 when restoring.
14303 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
14304 inside NS_IMPL_COCOA.
14305 (toggleFullScreen:): Put call to toggleFullScreen inside
14306 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
14307 (setPosition:portion:whole:): por is CGFloat.
14308 (getMouseMotionPart:window:x:y:): Add F suffix to float.
14309 (mouseDown:): Use CGFloat.
14310 (mouseDragged:): Remove unised variable edge.
14311 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
14312
14313 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
14314 of CGFloat differs.
14315 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
14316 when NS_IMPL_GNUSTEP.
14317 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
14318 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
14319 (EmacsToolbar): Add clearAll. Add tag argument to
14320 addDisplayItemWithImage.
14321 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
14322
14323 * nsselect.m (ns_get_local_selection): Remove unused variable type.
14324
14325 * nsmenu.m (ns_update_menubar): Make static.
14326 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
14327 (fillWithWidgetValue:): Add cast to SEL for setAction.
14328 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
14329 (update_frame_tool_bar): Update code for GNUstep.
14330 (clearAll): New method.
14331 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
14332 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
14333 Move identifierToItem setObject and activeIdentifiers addObject before
14334 call to insertItemWithItemIdentifier.
14335 (validateVisibleItems): Fix indentation.
14336 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
14337 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
14338 UtilityWindow to aStyle, remove call to setStyleMask.
14339
14340 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
14341
14342 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
14343 (ns_charset_covers, ns_get_covering_families, nsfont_open):
14344 Use F suffix on floats.
14345 (ns_char_width): Returns CGFloat.
14346 (ns_ascii_average_width): w is CGFloat instead of float.
14347 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
14348 DPSxshow.
14349 (ns_glyph_metrics): CGFloat instead of float.
14350
14351 * nsfns.m (x_set_foreground_color, x_set_background_color):
14352 Use EmacsCGFloat.
14353 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
14354 remove unused variables.
14355 (Fns_read_file_name): Keep track if panel is for save.
14356 Use ns_filename_from_panel/ns_directory_from_panel.
14357 (Fns_list_services): delegate only used for COCOA.
14358 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
14359 Just return the input if GNUstep.
14360 (x_screen_planes): Remove.
14361 (Fxw_color_values): Use EmacsCGFloat
14362 (Fns_display_monitor_attributes_list): Only get screen number for
14363 Cocoa.
14364 (getDirectory, getFilename): Remove from EmacsOpenPanel and
14365 EmacsSavePanel.
14366 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
14367 ns_directory_from_panel.
14368
14369 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
14370
14371 * process.c (handle_child_signal): Also use WCONTINUED.
14372 This is so that list-processes doesn't mistakenly list the process
14373 as stopped, when the process has actually been continued and is
14374 now running.
14375
14376 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
14377
14378 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
14379 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
14380 not already configured.
14381
14382 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
14383
14384 2013-05-29 Eli Zaretskii <eliz@gnu.org>
14385
14386 * Makefile.in (mostlyclean): Remove *.res files.
14387
14388 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
14389
14390 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
14391 a buffer (bug#8447).
14392
14393 2013-05-27 Eli Zaretskii <eliz@gnu.org>
14394
14395 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
14396 display vector, and we backtrack, handle the case that the
14397 previous character position is also displayed from a display
14398 vector or covered by a display string or image. (Bug#14476)
14399
14400 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
14401
14402 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
14403 (struct MonitorInfo, free_monitors): Remove.
14404 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
14405 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
14406 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
14407 Qframes, Qsource.
14408
14409 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
14410 (struct MonitorInfo, free_monitors): Remove.
14411 (ns_screen_name): Make static.
14412 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
14413 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
14414 Qframes, Qsource.
14415
14416 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
14417 (struct MonitorInfo): New struct.
14418 (free_monitors, make_monitor_attribute_list): Declare.
14419
14420 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
14421 New Lisp_Object:s.
14422 (free_monitors, make_monitor_attribute_list): New functions.
14423 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
14424 Qsource.
14425
14426 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
14427
14428 * callproc.c (call_process): Refine the doc string. (Bug#14045)
14429
14430 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
14431
14432 * keyboard.c: Apply keyboard decoding only to events that come directly
14433 from the tty, not from unread-command-events (bug#14368).
14434 (read_event_from_main_queue): New function, extracted from read_char.
14435 (read_decoded_char): Remove.
14436 (read_decoded_event_from_main_queue): New function to replace it.
14437 (read_char): Use it.
14438 (read_key_sequence): Use read_char rather than read_decoded_char.
14439
14440 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
14441
14442 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
14443
14444 * casetab.c (init_casetab_once): Fix last change (bug#14424).
14445
14446 2013-05-22 Kenichi Handa <handa@gnu.org>
14447
14448 The following changes are to fix the setting of
14449 buffer-file-coding-system on, for instance, C-x RET c unix RET
14450 _FILE_OF_DOS_EOL_TYPE_ RET.
14451
14452 * coding.h (struct coding_system): New member detected_utf8_chars.
14453
14454 * coding.c (detect_coding_utf_8): Count characters and check EOL
14455 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
14456 BOM is there.
14457 (setup_coding_system): Do not initialize coding->head_ascii.
14458 (check_ascii): Do not set coding->eol_seen but update it. Do not
14459 call adjust_coding_eol_type here.
14460 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
14461 If the eol-type of CODING is already specified, adjust the eol type
14462 of the found coding-system.
14463 (decode_coding_gap): Cancel previous change. Utilize the
14464 character numbers counted by detect_coding_utf_8. Fix detection
14465 of BOM for utf-8.
14466
14467 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
14468
14469 * search.c (looking_at_1): Only set last_thing_searched if the match
14470 changed the match-data (bug#14281).
14471
14472 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
14473
14474 * xdisp.c (reseat_at_previous_visible_line_start):
14475 Already declared in dispextern.h, so remove it here.
14476 (move_it_vertically_backward): Likewise.
14477
14478 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14479
14480 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
14481 (Fx_display_pixel_width, Fx_display_pixel_height)
14482 (Fx_display_mm_width, Fx_display_mm_height):
14483 Mention `display-monitor-attributes-list' in docstrings.
14484
14485 * nsfns.m (ns_get_screen): Remove function. All uses removed.
14486 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
14487 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
14488 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
14489 (Fx_display_backing_store, Fx_display_visual_class)
14490 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
14491 (Fx_display_grayscale_p, Fx_display_pixel_width)
14492 (Fx_display_pixel_height, Fx_display_planes)
14493 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
14494 (Fx_display_screens): Don't confuse X11 screens with NS screens.
14495 (Fx_display_mm_width, Fx_display_mm_height)
14496 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
14497 height for all physical monitors as in X11.
14498
14499 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
14500 Return pixel width or height for all physical monitors as in X11.
14501
14502 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
14503
14504 Port --enable-gcc-warnings to clang.
14505 * bytecode.c (exec_byte_code):
14506 * regex.c:
14507 Redo diagnostic pragmas to pacify clang, too.
14508 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
14509 * editfns.c (Fencode_time):
14510 * fileio.c (file_accessible_directory_p):
14511 * font.c (font_unparse_xlfd):
14512 Use '&"string"[index]' instead of '"string" + (index)'.
14513 * undo.c (user_error): Remove; unused.
14514
14515 2013-05-16 Eli Zaretskii <eliz@gnu.org>
14516
14517 * insdel.c (insert_1_both): Document the arguments, instead of
14518 referring to insert_1, which no longer exists.
14519
14520 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
14521 some window, increment windows_or_buffers_changed, so that
14522 *Messages* display in that window is updated. (Bug#14408)
14523
14524 * w32.c: Include epaths.h.
14525 (init_environment): Use cmdproxy.exe without leading directories.
14526 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
14527 case.
14528 (gettimeofday): Adjust signature and return value to Posix
14529 expectations.
14530
14531 * unexw32.c (open_output_file): Delete the existing emacs.exe
14532 before creating it, to break the hard link to the versioned
14533 executable.
14534
14535 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
14536 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
14537 (FIRSTFILE_OBJ): New variables.
14538 (W32_RES): Rename to EMACSRES. All users changed.
14539 (base_obj): Use $(CM_OBJ).
14540 (ALLOBJS): Use $(FIRSTFILE_OBJ).
14541 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
14542 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
14543 $(W32_RES_LINK) before $(LIBES).
14544 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
14545
14546 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
14547
14548 * makefile.w32-in (DOC): Use just "DOC".
14549
14550 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
14551
14552 * process.c: Export default filters and sentinels to Elisp.
14553 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
14554 New constants.
14555 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
14556 (Fset_process_sentinel, Fformat_network_address):
14557 Default to them instead of nil.
14558 (server_accept_connection): Sentinels can't be nil any more.
14559 (read_and_dispose_of_process_output): New function, extracted from
14560 read_process_output.
14561 (read_process_output): Use it; filters can't be nil.
14562 (Finternal_default_process_filter): New function, extracted from
14563 read_process_output.
14564 (exec_sentinel_unwind): Remove function.
14565 (exec_sentinel): Don't zilch sentinel while running.
14566 (status_notify): Sentinels can't be nil.
14567 (Finternal_default_process_sentinel): New function extracted from
14568 status_notify.
14569 (setup_process_coding_systems): Default filter is not nil any more.
14570 (syms_of_process): Export new Elisp functions and initialize
14571 new constants.
14572 * lisp.h (make_lisp_proc): New function.
14573
14574 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
14575
14576 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
14577
14578 2013-05-14 Eli Zaretskii <eliz@gnu.org>
14579
14580 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
14581 unless we know that the window w is a leaf window.
14582 Another attempt at solving bug#14062.
14583
14584 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
14585
14586 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
14587 fdesc (Bug#14375).
14588
14589 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
14590
14591 * image.c (gif_load): Check that subimages fit (Bug#14345).
14592
14593 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
14594
14595 * lread.c (skip_dyn_eof): New function.
14596 (read1): Use it to skip the end of a file in response to #@00.
14597
14598 * doc.c (get_doc_string): Slightly relax the sanity checking.
14599
14600 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
14601
14602 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
14603 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
14604 (MonitorInfo): New struct.
14605 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
14606 (Fns_display_monitor_attributes_list): New functions.
14607 (display-usable-bounds): Remove.
14608 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
14609 Qsource.
14610
14611 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
14612
14613 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
14614 (GTK_CHECK_VERSION): New macro, if not already defined.
14615 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
14616 replaced by GTK_CHECK_VERSION.
14617
14618 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
14619
14620 * xterm.h (GTK_PREREQ): New macro.
14621 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
14622 to use this macro instead, for consistency and clarity.
14623
14624 2013-05-08 Eli Zaretskii <eliz@gnu.org>
14625
14626 * xdisp.c (row_for_charpos_p): New function, with code of
14627 cursor_row_p, but accepts an additional argument CHARPOS instead
14628 of using a hardcoded PT.
14629 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
14630 (row_containing_pos): Call row_for_charpos_p instead of partially
14631 doing the same. Fixes cursor positioning under longlines-mode
14632 when longlines-show-effect includes more than one newline, when
14633 moving the cursor vertically up.
14634
14635 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
14636
14637 * makefile.w32-in (ACL_H): New macro.
14638 ($(BLD)/fileio.$(O)): Update dependencies.
14639
14640 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
14641
14642 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
14643 * Makefile.in (LIB_ACL): New macro.
14644 (LIBACL_LIBS): Remove.
14645 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
14646 * fileio.c: Include <acl.h>.
14647 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
14648 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
14649 !acl_errno_valid.
14650 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
14651 it ourselves.
14652
14653 * unexelf.c: Don't assume ElfW (Half) fits in int.
14654 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
14655 when dealing with ElfW (Half) values, since they can exceed 2**31
14656 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
14657 (entry_address): Omit unused NUM arg. All uses changed.
14658
14659 2013-05-07 Juri Linkov <juri@jurta.org>
14660
14661 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
14662 to the string converted from number with `Fnumber_to_string'.
14663 (Bug#14254)
14664
14665 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
14666
14667 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
14668 This fixes a problem introduced by my previous change.
14669
14670 2013-05-07 Glenn Morris <rgm@gnu.org>
14671
14672 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
14673
14674 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
14675
14676 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
14677
14678 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
14679
14680 Static checking by GCC 4.8.0.
14681 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
14682 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
14683 (x_get_monitor_attributes_fallback)
14684 (x_get_monitor_attributes_xinerama)
14685 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
14686 Define only if USE_GTK.
14687 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
14688 (x_get_monitor_attributes_fallback): Omit unused locals.
14689 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
14690 Use double, not float, to avoid mixed-mode floating point arithmetic.
14691
14692 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14693 Jan Djärv <jan.h.d@swipnet.se>
14694
14695 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
14696 (XINERAMA_CFLAGS): New macros.
14697 (ALL_CFLAGS, LIBES): Use them.
14698
14699 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
14700 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
14701 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
14702 (syms_of_xfns): DEFSYM them.
14703 (struct MonitorInfo): New struct.
14704 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
14705 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
14706 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
14707 (x_get_monitor_attributes_xinerama): New functions.
14708 (Fx_display_monitor_attributes_list): New primitive.
14709 (syms_of_xfns): Defsubr it.
14710
14711 * xterm.h (x_display_info): Add Xatom_net_workarea and
14712 Xatom_net_current_desktop.
14713
14714 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
14715 and dpyinfo->Xatom_net_current_desktop.
14716
14717 2013-05-06 Eli Zaretskii <eliz@gnu.org>
14718
14719 * xdisp.c (pos_visible_p): Use the special code for finding the
14720 beginning of a display property or overlay for any "replacing"
14721 display property, not just for display strings. This solves
14722 incorrect reporting of position by posn-at-point. (Bug#14241)
14723
14724 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
14725
14726 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
14727 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
14728 Verify that ElfW (Half) fits in int.
14729 (fatal): Use same signature as lisp.h.
14730 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
14731 configure and build with -DUNEXELF_DEBUG without worrying about
14732 other modules that use DEBUG.
14733 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
14734 possibly-wide integers now uses it instead of plain fprintf.
14735 (entry_address): New function, which avoids problems with 32-bit
14736 overflow on 64-bit hosts.
14737 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
14738 (round_up): Don't assume the remainder fits in int.
14739 (find_section): Use bool for boolean. Simplify debug code.
14740 (unexec): Don't assume file sizes fit in int or size_t.
14741 Omit unnecessary trailing newline in 'fatal' format.
14742 Use strerror rather than outputting decimal error number.
14743 Remove unused code when emacs is not defined;
14744 this file relies on Emacs now.
14745 Don't assume e_phnum and e_shnum are positive.
14746
14747 * regex.c: Fix problems when DEBUG is defined.
14748 (extract_number, extract_number_and_incr): Define regardless of
14749 whether DEBUG is defined; that's simpler and makes the code less
14750 likely to go stale in the normal case when DEBUG is not defined.
14751 Return int rather than taking an int * arg. All callers changed.
14752 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
14753 Remove, replacing with ...
14754 (DEBUG_PRINT): New macro. All callers changed.
14755 (DEBUG_COMPILES_ARGUMENTS): New macro.
14756 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
14757 (print_compiled_pattern, print_double_string) [DEBUG]:
14758 Use prototype rather than old-style definition.
14759 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
14760 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
14761 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
14762 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
14763 Don't assume ptrdiff_t, size_t, and long are the same width as int.
14764 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
14765 This matters only when DEBUG is defined.
14766
14767 2013-05-05 Eli Zaretskii <eliz@gnu.org>
14768
14769 * xdisp.c (set_iterator_to_next): Set the
14770 ignore_overlay_strings_at_pos_p flag only if we are _really_
14771 iterating over an overlay string, as indicated by the
14772 current.overlay_string_index member. (Bug#14306)
14773
14774 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
14775
14776 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
14777 to where it is used, to avoid autorelease issues (Bug#14050).
14778
14779 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
14780
14781 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
14782 * fileio.c (syms_of_fileio): Implement this.
14783 * filelock.c (create_lock_file): If symbolic links don't work, so
14784 we use a regular file as a lock file, do not fsync the lock file;
14785 it's not needed.
14786
14787 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
14788
14789 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
14790 (syms_of_minibuf): Adjust accodingly.
14791 * lread.c (Fread):
14792 * callint.c (Fcall_interactively): Adjust calls accordingly.
14793
14794 2013-05-04 Eli Zaretskii <eliz@gnu.org>
14795
14796 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
14797 w->contents is a buffer before computing everything else.
14798 Use parentheses to disambiguate last part of the condition.
14799
14800 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
14801 assertion violations. (Bug#14062)
14802
14803 2013-05-01 David Reitter <david.reitter@gmail.com>
14804
14805 * nsfns.m (ns_tooltip): Initialize.
14806
14807 2013-04-28 Eli Zaretskii <eliz@gnu.org>
14808
14809 * coding.c (decode_coding_gap): Don't remove the character before
14810 a newline unless it's a CR character. (Bug#14287)
14811
14812 2013-04-28 Dan Nicolaescu <dann@gnu.org>
14813
14814 * dispextern.h (struct face): Move enum face_underline_type
14815 earlier so that bitfields can be in the same word.
14816
14817 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
14818
14819 * nsfns.m (handlePanelKeys): New function.
14820 (EmacsOpenPanel:performKeyEquivalent:)
14821 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
14822 arrows/function/control and copy/paste keys (Bug#14296).
14823
14824 2013-04-27 Juri Linkov <juri@jurta.org>
14825
14826 * callint.c (Fcall_interactively): Call `Qread_number' for
14827 interactive code letter `n' instead of using duplicate code.
14828 (Bug#14254)
14829
14830 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
14831
14832 * systime.h (make_timeval): Declare as 'const'.
14833
14834 2013-04-27 Kenichi Handa <handa@gnu.org>
14835
14836 * font.c (font_open_entity): Always open a font of manageable
14837 size.
14838
14839 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
14840
14841 Port better to AIX (Bug#14258).
14842 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
14843 to pacify AIX xlc.
14844
14845 2013-04-24 Kenichi Handa <handa@gnu.org>
14846
14847 * coding.c (decode_coding_iso_2022): When an invalid escape
14848 sequence is encountered, reset the invocation and designation
14849 status to the safest one.
14850
14851 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
14852
14853 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
14854 Without this fix, "make distclean" leaves stamp-h1 behind.
14855
14856 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
14857
14858 * w32fns.c (w32_fullscreen_rect): New function to compute the
14859 window rectangle for the given fullscreen mode.
14860 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
14861 longer tunes the window size. This keeps the window's edges flush
14862 with the screen and allows the taskbar to hide itself in fullboth.
14863
14864 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
14865 window decorations and uses the entire screen.
14866
14867 * w32term.h (w32_fullscreen_rect) Add prototype.
14868 (struct w32_output): Replace normal_width, normal_height,
14869 normal_top, and normal_left members with a single normal_placement
14870 struct.
14871 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
14872 Remove macros.
14873 (FRAME_NORMAL_PLACEMENT): New macro.
14874
14875 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
14876
14877 * minibuf.c (Ftest_completion): Silence compiler warning.
14878
14879 2013-04-15 Eli Zaretskii <eliz@gnu.org>
14880
14881 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
14882 bug#14062.
14883
14884 * frame.h (WINDOW_FRAME): Protect macro and its argument with
14885 parentheses.
14886
14887 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
14888 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
14889 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
14890 parentheses where appropriate.
14891
14892 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
14893
14894 * keyboard.c (timer_start_idle): Remove no-longer-used local.
14895
14896 2013-04-14 Eli Zaretskii <eliz@gnu.org>
14897
14898 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
14899 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
14900 Mention in the doc string that setting these variables takes
14901 effect only after a call to set-window-buffer. (Bug#14200)
14902
14903 2013-04-13 Eli Zaretskii <eliz@gnu.org>
14904
14905 * indent.c (Fvertical_motion): Don't consider display strings on
14906 overlay strings as display strings on the buffer position we
14907 started from. This prevents vertical cursor motion from jumping
14908 more than one line when there's an overlay string with a display
14909 property at end of line.
14910 Reported by Karl Chen <Karl.Chen@quarl.org> in
14911 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
14912
14913 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
14914
14915 * window.c (select_window): `record_buffer' even if window is
14916 already selected (bug#14191).
14917
14918 2013-04-11 Eli Zaretskii <eliz@gnu.org>
14919
14920 * window.c (Fwindow_end): Test more flags, including the buffer's
14921 last_overlay_modified flag, to determine whether the window's
14922 display is really up-to-date. Prevents the function from
14923 returning a stale value. (Bug#14170)
14924 (Fwindow_line_height): Fix the test for up-to-date-ness of the
14925 current matrix.
14926
14927 2013-04-10 Eli Zaretskii <eliz@gnu.org>
14928
14929 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
14930 garbaged only if it is not already the top frame on its TTY.
14931 This prevents flickering due to constant redrawing of TTY frames when
14932 there are GUI frames open in the same session. (Bug#13864)
14933
14934 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
14935
14936 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
14937 of marking the idle timers directly.
14938
14939 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
14940
14941 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
14942 tables (bug#14054).
14943
14944 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
14945
14946 * window.c (select_window): Don't record_buffer while the invariant is
14947 temporarily broken (bug#14161).
14948
14949 * fns.c (Fdelq): Don't assume !NILP => CONSP.
14950
14951 2013-04-07 Eli Zaretskii <eliz@gnu.org>
14952
14953 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
14954
14955 2013-04-07 Romain Francoise <romain@orebokech.com>
14956
14957 Ignore additional platform-specific ACL errors (Bug#13702).
14958 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
14959 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
14960
14961 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
14962
14963 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
14964 f->output_data.ns.
14965
14966 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
14967
14968 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
14969 This bug was introduced by my 2013-02-25 change that simplified
14970 data_start configuration. Without this change, on GNU/Linux
14971 an Emacs configured with --enable-profiling fails immediately
14972 due to a profiler signal.
14973 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
14974 with these flags. On platforms where special flags are needed
14975 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
14976 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
14977 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
14978
14979 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
14980
14981 Get rid of some platform-specific functions examining window
14982 system and its capabilities. This is a partial rework of the
14983 2013-04-05 change.
14984 * lisp.h (have_menus_p): Remove prototype. This function is
14985 replaced with platform-independent window_system_available.
14986 (check_window_system): Move to...
14987 * frame.h (decode_window_system_frame, window_system_available):
14988 ...here, add new prototypes.
14989 * frame.c (window_system_available, decode_window_system_frame):
14990 New functions.
14991 (check_window_system): Platform-independent now.
14992 * xterm.h (x_in_use): Remove declaration.
14993 (check_x_frame):
14994 * w32term.h (check_x_frame):
14995 * nsterm.h (check_x_frame): Remove prototypes. This function
14996 is replaced with platform-independent decode_window_system_frame.
14997 * msdos.c (have_menus_p): Remove.
14998 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
14999 Remove platform-specific functions. Use check_window_system,
15000 decode_window_system_frame and check_ns_display_info where
15001 appropriate. Minor style and comment tweaks.
15002 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
15003 (check_x_frame): Likewise.
15004 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
15005 Likewise.
15006 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
15007 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
15008 * xmenu.c, xselect.c: All related users changed.
15009
15010 2013-04-03 Kenichi Handa <handa@gnu.org>
15011
15012 The following changes is to optimize the code for reading UTF-8
15013 files.
15014
15015 * coding.c (check_ascii): Rename from detect_ascii. Return value
15016 changed. Check EOL format. Do not call adjust_coding_eol_type
15017 here.
15018 (check_utf_8): New function.
15019 (adjust_coding_eol_type): Do nothing if already adjusted.
15020 (detect_coding): Compare the return value of check_ascii with
15021 coding->src_bytes. Call adjust_coding_eol_type if necessary.
15022 (decode_coding_gap): Optimize for valid UTF-8.
15023
15024 2013-03-21 Kenichi Handa <handa@gnu.org>
15025
15026 * coding.c (syms_of_coding): Cancel previous change.
15027
15028 * insdel.c (insert_from_gap): Fix previous change.
15029
15030 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
15031
15032 Consistently use platform-specific function to detect window system.
15033 * lisp.h (check_window_system): New prototype. This function is
15034 going to replace check_x, check_w32 and check_ns.
15035 (have_menus_p): Mention msdos.c in comment.
15036 * fontset.c (check_window_system_func): Remove. Adjust all users.
15037 * fontset.h (check_window_system_func): Remove prototype.
15038 * nsterm.h (check_ns):
15039 * xterm.h (check_x):
15040 * w32term.h (check_w32): Likewise.
15041 * menu.c (Fx_popup_menu): Use check_window_system.
15042 * msdos.c (check_window_system): Define for MS-DOS.
15043 * nsfns.m (check_window_system): Define for NS. Adjust all users.
15044 * w32fns.c (check_window_system): Likewise for MS-Windows.
15045 * xfns.c (check_window_system): Likewise for X.
15046 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
15047 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
15048
15049 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
15050
15051 Prefer < to > in range checks such as 0 <= i && i < N.
15052 This makes it easier to visualize quantities on a number line.
15053 This patch doesn't apply to all such range checks,
15054 only to the range checks affected by the 2013-03-24 change.
15055 This patch reverts most of the 2013-03-24 change.
15056 * alloc.c (xpalloc, Fgarbage_collect):
15057 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
15058 * character.c (string_escape_byte8):
15059 * charset.c (read_hex):
15060 * data.c (cons_to_unsigned):
15061 * dispnew.c (update_frame_1):
15062 * doc.c (Fsubstitute_command_keys):
15063 * doprnt.c (doprnt):
15064 * editfns.c (hi_time, decode_time_components):
15065 * fileio.c (file_offset):
15066 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
15067 * font.c (font_intern_prop):
15068 * frame.c (x_set_alpha):
15069 * gtkutil.c (get_utf8_string):
15070 * indent.c (check_display_width):
15071 * keymap.c (Fkey_description):
15072 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
15073 * lread.c (read1):
15074 * minibuf.c (read_minibuf_noninteractive):
15075 * process.c (wait_reading_process_output):
15076 * search.c (Freplace_match):
15077 * window.c (get_phys_cursor_glyph):
15078 * xdisp.c (redisplay_internal):
15079 * xsmfns.c (smc_save_yourself_CB):
15080 Prefer < to > for range checks.
15081 * dispnew.c (sit_for): Don't mishandle NaNs.
15082 This fixes a bug introduced in the 2013-03-24 change.
15083 * editfns.c (decode_time_components): Don't hoist comparison.
15084 This fixes another bug introduced in the 2013-03-24 change.
15085
15086 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
15087
15088 * frame.h (struct frame): Drop scroll_bottom_vpos
15089 member becaue all real users are dead long ago.
15090 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
15091 * xdisp.c (redisplay_internal): Adjust user.
15092
15093 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
15094
15095 * nsmenu.m (showAtX:Y:for:): setLevel to
15096 NSPopUpMenuWindowLevel (Bug#13998).
15097
15098 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
15099
15100 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
15101 (ns_check_pending_open_menu): Declare.
15102
15103 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
15104 (x_activate_menubar): Update the menu with title that matches
15105 ns_get_pending_menu_title, and call
15106 ns_check_pending_openmenu (Bug#12698).
15107 (menuWillOpen:): New method.
15108 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
15109
15110 * nsterm.m (menu_will_open_state, menu_mouse_point)
15111 (menu_pending_title): New varaibles.
15112 (ns_get_pending_menu_title, ns_check_menu_open)
15113 (ns_check_pending_open_menu): New functions.
15114
15115 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
15116
15117 * indent.c (current_column_bol_cache): Remove leftover which is not
15118 used in Fmove_to_column any more.
15119 (current_column, scan_for_column): Adjust users.
15120 * keyboard.c (last_point_position_buffer, last_point_position_window):
15121 Remove leftovers which are not used for recording undo any more.
15122 (command_loop_1, syms_of_keyboard): Adjust users.
15123 * xdisp.c (last_max_ascent): Remove leftover which is not used in
15124 redisplay_window any more.
15125 (move_it_to): Adjust user.
15126
15127 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
15128
15129 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
15130 Update dependencies.
15131
15132 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
15133
15134 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
15135 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
15136 forward references.
15137
15138 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
15139
15140 * window.h (struct window): Replace hchild, vchild and buffer slots
15141 with a single slot 'contents'. This is possible because each valid
15142 window may have either the child window (in vertical or horizontal
15143 combination) or buffer to display (for the leaf window). Using that,
15144 a lot of operations to traverse and/or change window hierarchies may
15145 be simplified. New member horizontal is used to distinguish between
15146 horizontal and vertical combinations of internal windows.
15147 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
15148 (WINDOW_VERTICAL_COMBINATION_P): New macros.
15149 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
15150 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
15151 Use contents slot, not buffer, where appropriate.
15152 (wset_combination): New function.
15153 (wset_buffer): Add eassert.
15154 (Fframe_first_window): Simplify the loop reaching first window.
15155 (Fwindow_buffer): Use WINDOW_LEAF_P.
15156 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
15157 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
15158 (unshow_buffer): Convert initial debugging check to eassert.
15159 (replace_window, recombine_windows, Fdelete_other_windows_internal)
15160 (make_parent_window, window_resize_check, window_resize_apply)
15161 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
15162 (Fset_window_configuration, delete_all_child_windows, save_window_save):
15163 Adjust to match struct window changes.
15164 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
15165 (mark_window_cursors_off, count_windows, get_leaf_windows)
15166 (foreach_window_1): Simplify the loop.
15167 * alloc.c (mark_object): Do not check for the leaf window because
15168 internal windows has no glyph matrices anyway.
15169 * dispnew.c (clear_window_matrices, showing_window_margins_p)
15170 (allocate_matrices_for_window_redisplay, fake_current_matrices)
15171 (allocate_matrices_for_frame_redisplay, free_window_matrices)
15172 (build_frame_matrix_from_window_tree, mirror_make_current)
15173 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
15174 (update_window_tree, set_window_update_flags): Simplify the loop.
15175 (sync_window_with_frame_matrix_rows): Enforce live window.
15176 Use contents slot, not buffer, where appropriate.
15177 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
15178 and WINDOW_HORIZONTAL_COMBINATION_P.
15179 (make_frame_visible_1): Simplify the loop.
15180 Use contents slot, not buffer, where appropriate.
15181 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
15182 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
15183 (expose_window_tree): Likewise.
15184 Use contents slot, not buffer, where appropriate.
15185 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
15186 to avoid deleted windows. Use contents slot instead of buffer.
15187 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
15188 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
15189 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
15190 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
15191
15192 2013-03-28 Eli Zaretskii <eliz@gnu.org>
15193
15194 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
15195 identify the reasons for assertion violations in bug#14062 and
15196 similar ones.
15197 (Fx_show_tip): Fix compilation error under
15198 "--enable-check-lisp-object-type". (Bug#14073)
15199
15200 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
15201 Reported by <rzl24ozi@gmail.com>.
15202
15203 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
15204
15205 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
15206 start marker...
15207 (unwind_with_echo_area_buffer): ...to restore it here.
15208 This is needed to ensure that...
15209 (redisplay_window): ...both window markers are valid here,
15210 which is verified by eassert.
15211 * editfns.c (save_excursion_save): Do not assume that
15212 selected_window always displays the buffer.
15213 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
15214 Fix comment.
15215
15216 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
15217
15218 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
15219 the upcase table.
15220
15221 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
15222
15223 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
15224
15225 2013-03-27 Eli Zaretskii <eliz@gnu.org>
15226
15227 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
15228 since MinGW's w32api headers do. This avoids compiler warnings.
15229
15230 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
15231 if already defined.
15232
15233 2013-03-26 Eli Zaretskii <eliz@gnu.org>
15234
15235 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
15236
15237 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
15238
15239 * gtkutil.c (style_changed_cb): Check if frame is live and an
15240 X frame (Bug#14038).
15241
15242 2013-03-26 Eli Zaretskii <eliz@gnu.org>
15243
15244 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
15245 Define only for _WIN32_WINNT less than 0x0500.
15246 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
15247 MinGW64.
15248 Move inclusion of time.h before sys/time.h, so that MinGW64 could
15249 see its own definitions of 'struct timeval' and 'struct timezone'.
15250
15251 Fix incompatibilities between MinGW.org and MinGW64 headers.
15252 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
15253
15254 * w32.c (REPARSE_DATA_BUFFER): Guard with
15255 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
15256
15257 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
15258
15259 * xterm.c: Include X11/XKBlib.h
15260 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
15261
15262 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
15263
15264 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
15265 written backwards.
15266 * blockinput.h (input_blocked_p): Likewise.
15267 * bytecode.c (exec_byte_code): Likewise.
15268 * callproc.c (call_process_kill, call_process_cleanup)
15269 (Fcall_process): Likewise.
15270 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
15271 (Fccl_execute_on_string): Likewise.
15272 * character.c (string_escape_byte8): Likewise.
15273 * charset.c (read_hex): Likewise.
15274 * cm.c (calccost): Likewise.
15275 * data.c (cons_to_unsigned): Likewise.
15276 * dired.c (directory_files_internal, file_name_completion):
15277 Likewise.
15278 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
15279 (sit_for): Likewise.
15280 * doc.c (Fsubstitute_command_keys): Likewise.
15281 * doprnt.c (doprnt): Likewise.
15282 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
15283 * emacsgtkfixed.c: Likewise.
15284 * fileio.c (file_offset, Fwrite_region): Likewise.
15285 * floatfns.c (Fexpt, fmod_float): Likewise.
15286 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
15287 Likewise.
15288 * font.c (font_intern_prop): Likewise.
15289 * frame.c (x_set_alpha): Likewise.
15290 * gtkutil.c (get_utf8_string): Likewise.
15291 * indent.c (check_display_width): Likewise.
15292 * intervals.c (create_root_interval, rotate_right, rotate_left)
15293 (split_interval_right, split_interval_left)
15294 (adjust_intervals_for_insertion, delete_node)
15295 (interval_deletion_adjustment, adjust_intervals_for_deletion)
15296 (merge_interval_right, merge_interval_left, copy_intervals)
15297 (set_intervals_multibyte_1): Likewise.
15298 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
15299 * keymap.c (Fkey_description): Likewise.
15300 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
15301 * lread.c (openp, read_integer, read1, string_to_number):
15302 Likewise.
15303 * menu.c (ensure_menu_items): Likewise.
15304 * minibuf.c (read_minibuf_noninteractive): Likewise.
15305 * print.c (printchar, strout): Likewise.
15306 * process.c (create_process, Faccept_process_output)
15307 (wait_reading_process_output, read_process_output, send_process)
15308 (wait_reading_process_output): Likewise.
15309 * profiler.c (make_log, handle_profiler_signal): Likewise.
15310 * regex.c (re_exec): Likewise.
15311 * regex.h: Likewise.
15312 * search.c (looking_at_1, Freplace_match): Likewise.
15313 * sysdep.c (get_child_status, procfs_ttyname)
15314 (procfs_get_total_memory): Likewise.
15315 * systime.h (EMACS_TIME_VALID_P): Likewise.
15316 * term.c (dissociate_if_controlling_tty): Likewise.
15317 * window.c (get_phys_cursor_glyph): Likewise.
15318 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
15319 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
15320 Likewise.
15321 * xfns.c (Fx_window_property): Likewise.
15322 * xmenu.c (set_frame_menubar): Likewise.
15323 * xselect.c (x_get_window_property, x_handle_dnd_message):
15324 Likewise.
15325 * xsmfns.c (smc_save_yourself_CB): Likewise.
15326 * xterm.c (x_scroll_bar_set_handle): Likewise.
15327
15328 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
15329
15330 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
15331 to be optional or nil. Adjust comment and convert it to docstring.
15332 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
15333 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
15334
15335 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
15336
15337 Static checking by GCC 4.8-20130319.
15338 * image.c (gif_load): Assume pass < 3 to pacify GCC.
15339 * process.c (Fset_process_datagram_address)
15340 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
15341 * xdisp.c (get_char_face_and_encoding)
15342 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
15343 (get_glyph_face_and_encoding): Prepare face before possibly using it.
15344 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
15345
15346 2013-03-24 Ken Brown <kbrown@cornell.edu>
15347
15348 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
15349 fix compilation on 64-bit Cygwin, where underscores are not
15350 automatically prepended.
15351
15352 * w32term.c (w32_initialize): Silence compiler warning.
15353
15354 2013-03-23 Eli Zaretskii <eliz@gnu.org>
15355
15356 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
15357 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
15358 variables, to save and restore frame dimensions.
15359 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
15360 after returning from a 'fullscreen' configuration.
15361 use SendMessage instead of PostMessage to send the SC_RESTORE message,
15362 to avoid races between the main thread and the input thread.
15363
15364 * w32term.h (struct w32_output): New members normal_width,
15365 normal_height, normal_top, normal_left, and prev_fsmode.
15366 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
15367 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
15368 members of a frame.
15369
15370 * w32term.c (w32fullscreen_hook): Record last value of the frame's
15371 'fullscreen' parameter. Always record previous width and height
15372 of the frame, except when switching out of maximized modes, so
15373 that they could be restored correctly, instead of resetting to the
15374 default frame dimensions. Send SC_RESTORE command to the frame,
15375 unless we are going to send SC_MAXIMIZE, to restore the frame
15376 resize hints in the mouse pointer shown by the window manager.
15377 (Bug#14032)
15378
15379 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
15380
15381 * lisp.h (get_frame_param): Adjust conditions for prototype
15382 declaration.
15383
15384 2013-03-22 Ken Brown <kbrown@cornell.edu>
15385
15386 * unexcw.c: Drop unneeded inclusion of w32common.h.
15387 (report_sheap_usage): Declare.
15388 (read_exe_header): Add magic numbers for x86_64.
15389 (fixup_executable): Fix printf format specifier for unsigned long
15390 argument.
15391
15392 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
15393
15394 * frame.h (struct frame): Put menu_bar_window under #ifdef
15395 because this member is not needed when X toolkit is in use.
15396 (fset_menu_bar_window):
15397 * dispnew.c (clear_current_matrices, clear_desired_matrices)
15398 (free_glyphs, update_frame):
15399 * xdisp.c (expose_frame): Likewise.
15400 (display_menu_bar): Likewise. Remove redundant eassert.
15401 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
15402 toolkit is in use.
15403
15404 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
15405
15406 Use functions and constants to manipulate Lisp_Save_Value objects.
15407 This replaces code that used macros and strings and token-pasting.
15408 The change makes the C source a bit easier to follow,
15409 and shrinks the Emacs executable a bit.
15410 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
15411 (make_save_value): Change 1st arg from string to enum. All callers
15412 changed.
15413 (INTX): Remove.
15414 (mark_object): Use if, not #if, for GC_MARK_STACK.
15415 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
15416 (XSAVE_OBJECT): Now functions, not macros.
15417 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
15418 the constant was never used.
15419 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
15420 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
15421 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
15422 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
15423 New constants.
15424 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
15425 type3 with a single member save_type. All uses changed.
15426 (save_type, set_save_pointer, set_save_integer): New functions.
15427 * print.c (PRINTX): Remove.
15428
15429 * alloc.c: Remove redundant static declarations.
15430
15431 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
15432
15433 * window.h (struct window): Convert left_col, top_line, total_lines
15434 and total_cols from Lisp_Objects to integers. Adjust comments.
15435 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
15436 Remove.
15437 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
15438 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
15439 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
15440 Adjust users where appropriate.
15441
15442 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
15443
15444 * frame.h (struct frame): Drop resx and resy because the same data is
15445 available from window system-specific output context. Adjust users.
15446 (default_pixels_per_inch_x, default_pixels_per_inch_y):
15447 New functions to provide defaults when no window system available.
15448 (FRAME_RES_X, FRAME_RES_Y): New macros.
15449 (NUMVAL): Move from xdisp.c.
15450 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
15451 (Ffont_face_attributes, Fopen_font):
15452 * image.c (gs_load):
15453 * w32font.c (fill_in_logfont):
15454 * xdisp.c (calc_pixel_width_or_height):
15455 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
15456 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
15457
15458 2013-03-20 Kenichi Handa <handa@gnu.org>
15459
15460 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
15461 to 1 (temporary workaround until a bug related to ASCII
15462 optimization is fixed).
15463
15464 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
15465
15466 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
15467 Signal error if window is not internal. Adjust docstring.
15468 (delete_all_child_windows): Use combination_limit to save the buffer.
15469 (Fset_window_configuration): Adjust accordingly.
15470 * print.c (syms_of_print): Initialize debugging output not here...
15471 (init_print_once): ...but in a new function here.
15472 * lisp.h (init_print_once): Add prototype.
15473 * emacs.c (main): Add call to init_print_once. Adjust comments.
15474
15475 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
15476
15477 * window.c (window_resize_check, window_resize_apply)
15478 (window_from_coordinates, recombine_windows, set_window_buffer)
15479 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
15480 (Fsplit_window_internal, Fdelete_window_internal)
15481 (freeze_window_starts): Use bool for booleans.
15482 * window.h (window_frame_coordinates, resize_frame_windows)
15483 (freeze_window_starts, set_window_buffer): Adjust prototypes.
15484
15485 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
15486
15487 * dispnew.c (bitch_at_user): Use `user-error'.
15488
15489 2013-03-17 Ken Brown <kbrown@cornell.edu>
15490
15491 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
15492 as return type of image_background. (Bug#13981)
15493 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
15494
15495 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
15496
15497 * nsterm.m (updateFrameSize:): Change resize increments if needed.
15498 (ns_select): Don't return with result uninitialized.
15499
15500 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
15501 and getDirectory.
15502
15503 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
15504 New functions.
15505 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
15506 directories. If filename is nil, get directory name (Bug#13932).
15507 Use getFilename and getDirectory.
15508 (getFilename, getDirectory): New methods for EmacsSavePanel and
15509 EmacsOpenPanel.
15510 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
15511
15512 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
15513
15514 * coding.c (decode_coding_gap): Fix typo caught by static checking.
15515
15516 2013-03-15 Kenichi Handa <handa@gnu.org>
15517
15518 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
15519 (adjust_after_replace): Make it back to static. Delete the third
15520 arg text_at_gap_tail. Cancel the code for handling it.
15521
15522 * coding.h (struct coding_system): New member eol_seen.
15523
15524 * coding.c (detect_ascii): New function.
15525 (detect_coding): Set coding->head_ascii and coding->eol_seen only
15526 when the source bytes are actually scanned. On detecting for
15527 coding_category_utf_8_auto, call detect_ascii instead of scanning
15528 source bytes directly.
15529 (produce_chars): Call insert_from_gap with the new arg 0.
15530 (encode_coding): Likewise.
15531 (decode_coding_gap): Control ASCII optimization by the variable
15532 disable_ascii_optimization instead of #ifndef .. #endif.
15533 Deccode EOL format according to coding->eol_seen.
15534 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
15535 variable.
15536
15537 * lisp.h (adjust_after_replace): Cancel externing it.
15538 (insert_from_gap): Adjust prototype.
15539
15540 2013-03-15 Eli Zaretskii <eliz@gnu.org>
15541
15542 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
15543 FULLSCREEN_MAXIMIZED. (Bug#13935)
15544
15545 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
15546
15547 * region-cache.c (find_cache_boundary, move_cache_gap)
15548 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
15549 Simplify debugging check and convert to eassert. Adjust comment.
15550 (pp_cache): Put under ENABLE_CHECKING.
15551
15552 2013-03-14 Eli Zaretskii <eliz@gnu.org>
15553
15554 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
15555 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
15556 and WM_ACTIVATEAPP.
15557 (w32fullscreen_hook): If the frame is visible, reset
15558 f->want_fullscreen flag after changing the frame size. If the
15559 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
15560 (Bug#13953)
15561
15562 2013-03-13 Daniel Colascione <dancol@dancol.org>
15563
15564 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
15565 too so that these builds can use Cygwin's file conversion
15566 functions. (We've been building and linking cygw32.o all along
15567 and just not using it.)
15568
15569 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
15570
15571 File synchronization fixes (Bug#13944).
15572 * Makefile.in (LIB_FDATASYNC): New macro.
15573 (LIBES): Use it.
15574 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
15575 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
15576 Don't worry about HAVE_FSYNC, since a substitute fsync is
15577 available if the system lacks one.
15578 (Fwrite_regin): Retry fsync if interrupted.
15579
15580 2013-03-13 Eli Zaretskii <eliz@gnu.org>
15581
15582 * w32term.c (w32_read_socket): If the Emacs frame is being
15583 activated, call w32fullscreen_hook, to make sure the new frame
15584 dimensions are in effect. (Bug#13937)
15585
15586 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
15587
15588 * xdisp.c (init_iterator): Simplify because both character and byte
15589 positions are either specified or -1. Add eassert. Adjust comment.
15590 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
15591 character and byte positions can be obtained from marker.
15592
15593 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
15594
15595 Static checking by Sun C 5.12.
15596 * alloc.c (buffer_memory_full) [REL_ALLOC]:
15597 * bytecode.c (exec_byte_code):
15598 * dispnew.c (init_display):
15599 * eval.c (error):
15600 * fileio.c (Fsubstitute_in_file_name):
15601 * keyboard.c (Fevent_convert_list):
15602 * keymap.c (Fsingle_key_description):
15603 * term.c (maybe_fatal, fatal):
15604 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
15605 * xsmfns.c (Fhandle_save_session):
15606 Omit unreachable code.
15607 * keymap.c (map_keymap_char_table_item): Cast void * to
15608 a function pointer type; the C Standard requires this.
15609
15610 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
15611 Include <sys/param.h> unconditionally, as that works elsewhere and
15612 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
15613 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
15614 and FreeBSD now.
15615
15616 See ChangeLog.12 for earlier changes.
15617
15618 ;; Local Variables:
15619 ;; coding: utf-8
15620 ;; End:
15621
15622 Copyright (C) 2011-2014 Free Software Foundation, Inc.
15623
15624 This file is part of GNU Emacs.
15625
15626 GNU Emacs is free software: you can redistribute it and/or modify
15627 it under the terms of the GNU General Public License as published by
15628 the Free Software Foundation, either version 3 of the License, or
15629 (at your option) any later version.
15630
15631 GNU Emacs is distributed in the hope that it will be useful,
15632 but WITHOUT ANY WARRANTY; without even the implied warranty of
15633 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15634 GNU General Public License for more details.
15635
15636 You should have received a copy of the GNU General Public License
15637 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.