]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Gnus: fix XEmacs compilation
[gnu-emacs] / src / ChangeLog
1 2014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnutls.c (gnutls_ip_address_p): New function.
4 (Fgnutls_boot): Only send SNI if the host name is not an IP address.
5
6 2014-11-26 Toke Høiland-Jørgensen <toke@toke.dk> (tiny change)
7
8 * gnutls.c (Fgnutls_boot): Send the server name over (bug#18208).
9
10 2014-11-25 Paul Eggert <eggert@cs.ucla.edu>
11
12 Fix gnutls problems caught by static checking.
13 * gnutls.c (Fgnutls_boot): Remove unused local.
14 (Fgnutls_boot): Fix pointer signedness.
15
16 2014-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
17
18 * gnutls.c (gnutls_certificate_details): Don't include certain
19 certificate details on older gnutls versions (bug#19168).
20 (syms_of_gnutls): Export gnutls_peer_status_warning_describe.
21 (gnutls_certificate_details): Reversed check in last checkin.
22
23 2014-11-25 Teodor Zlatanov <tzz@lifelogs.com>
24
25 * gnutls.c (Fgnutls_peer_status): Check GNUTLS_INITSTAGE, not gnutls_p.
26 (Fgnutls_peer_status_warning_describe): Add function to describe a
27 peer verification warning symbol.
28 (Fgnutls_peer_status): Use it.
29 (Fgnutls_boot): Use it. Minor logging fixes.
30
31 2014-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
32
33 * gnutls.c: Fix compilation warnings given fix --enable-gcc-warnings.
34
35 2014-11-24 Glenn Morris <rgm@gnu.org>
36
37 * emacs.c (main) <--version>: Make use of PACKAGE_NAME.
38
39 * Makefile.in (emacs.res): Use ../nt rule, rather than duplicating it.
40 (ntsource, WINDRES, EMACS_MANIFEST): Remove, now unused.
41
42 2014-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
43
44 * gnutls.c: Fix Windows function definition of
45 gnutls_x509_crt_get_fingerprint.
46
47 * gnutls.c: Fix Windows return value for gnutls_pk_algorithm_get_name.
48
49 * gnutls.c (Fgnutls_boot): Save certificate for later inspection.
50
51 * process.h: Added more fields to Lisp_Process to track
52 certificate details.
53
54 * gnutls.c (gnutls_hex_string, gnutls_certificate_details)
55 (Fgnutls_peer_status): New functions to export TLS certificate
56 details to Emacs Lisp.
57
58 2014-11-23 Jan Djärv <jan.h.d@swipnet.se>
59
60 * gtkutil.c (gtk_adjustment_configure): Define for Gtk+ < 2.14.
61 (xg_set_toolkit_horizontal_scroll_bar_thumb): Remove wrong version
62 check for gtk_adjustment_configure (Bug#19149).
63 (gtk_adjustment_configure): Don't use 2.14 functions (Bug#19149).
64
65 2014-11-22 Glenn Morris <rgm@gnu.org>
66
67 * Makefile.in (emacs.res): Add dependency on icons/hand.cur. Use $<.
68
69 2014-11-22 Martin Rudalics <rudalics@gmx.at>
70
71 Don't shrink frame when using desktop-save-mode (Bug#19048).
72 * w32fns.c (x_set_tool_bar_lines): Always call
73 x_change_tool_bar_height (Bug#19048).
74 (x_change_tool_bar_height): Mark frame as garbaged since
75 adjust_frame_size might not have done that.
76 * xfns.c (x_set_tool_bar_lines): Always call
77 x_change_tool_bar_height (Bug#19048).
78 (x_change_tool_bar_height): Mark frame as garbaged since
79 adjust_frame_size might not have done that.
80
81 2014-11-21 Ulf Jasper <ulf.jasper@web.de>
82
83 * xml.c (parse_region): Take care of new optional parameter
84 'discard-comments' of 'libxml-parse(html|xml)-region'.
85 (Flibxml_parse_html_region, Flibxml_parse_xml_region): New
86 optional parameter 'discard-comments'.
87
88 2014-11-17 Paul Eggert <eggert@cs.ucla.edu>
89
90 Improve time stamp handling, and be more consistent about it.
91 * editfns.c (invalid_time): New function.
92 Use it instead of 'error ("Invalid time specification")'.
93 (time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
94 (decode_float_time, lisp_to_timespec, lisp_time_struct):
95 New functions.
96 (make_time_tail, make_time): Remove. All uses changed to use
97 new functions or plain list4i.
98 (disassemble_lisp_time): Return effective length if successful.
99 Check that LOW is an integer, if it's combined with other components.
100 (decode_time_components): Decode into struct lisp_time, not
101 struct timespec, so that we can support a wide set of times
102 regardless of whether time_t is signed. Decode plain numbers
103 as seconds since the Epoch, and nil as the current time.
104 (lisp_time_argument, lisp_seconds_argument, Ffloat_time):
105 Reimplement in terms of new functions.
106 (Fencode_time): Just use list2i.
107 (syms_of_editfns): Add time-add, time-subtract, time-less-p.
108 * keyboard.c (decode_timer): Don't allow the new formats (floating
109 point or nil) in timers.
110 * systime.h (LO_TIME_BITS): New constant. Use it everywhere in
111 place of the magic number '16'.
112 (struct lisp_time): New type.
113 (decode_time_components): Use it.
114 (lisp_to_timespec): New decl.
115
116 2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
117
118 * intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only'
119 text property.
120
121 * callint.c (Fcall_interactively): Pass in nil as argument to
122 Fbarf_if_buffer_read_only.
123
124 * fileio.c (Finsert_file_contents): Ditto.
125
126 * insdel.c (prepare_to_modify_buffer_1): Pass start region in.
127
128 * textprop.c (verify_interval_modification): Check buffer
129 readedness after the last interval.
130
131 * buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if
132 the text at POSITION (new optional argument) has the
133 `inhibit-read-only' text property set.
134
135 2014-11-16 Eli Zaretskii <eliz@gnu.org>
136
137 * window.c (window_scroll_pixel_based): Avoid truncation/rounding
138 errors in computing the number of pixels to scroll. Suggested by
139 Kelly Dean <kelly@prtime.org>. (Bug#19060)
140
141 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
142
143 * nsmenu.m (update_frame_tool_bar): If tool bar changes height,
144 call updateFrameSize.
145
146 * nsterm.m (setFrame:): Remove call to display (Bug#18757).
147
148 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
149
150 * nsfns.m (x_set_foreground_color, x_set_background_color)
151 (x_set_cursor_color, Fxw_color_values): Block/unblock input,
152 use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
153
154 2014-11-15 Jan Djärv <jan.h.d@swipnet.se>
155
156 * nsterm.m (ns_send_appdefined): Check for application defined
157 event on Cocoa (Bug#18993).
158 (run): Restore code before the previous 18993 fix.
159
160 2014-11-14 David Reitter <david.reitter@gmail.com>
161
162 * nsterm.m (run): Set timeout for event loop to prevent hang.
163 (Bug#18993)
164
165 2014-11-14 Paul Eggert <eggert@cs.ucla.edu>
166
167 * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1.
168
169 2014-11-14 Dmitry Antipov <dmantipov@yandex.ru>
170
171 * xfont.c (xfont_list_pattern): Do not allocate font entity object
172 for each candidate font but attempt to reuse it from previous improper
173 candidate, if any.
174
175 2014-11-13 Paul Eggert <eggert@cs.ucla.edu>
176
177 Avoid undefined behavior in color table hashing.
178 * image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
179 (ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function. All uses changed.
180 This function avoids undefined behavior with signed shift overflow.
181
182 2014-11-10 Eli Zaretskii <eliz@gnu.org>
183
184 * fileio.c (Finsert_file_contents): Invalidate buffer caches also
185 when the inserted text does not need decoding. (Bug#18982)
186
187 2014-11-10 Jan Djärv <jan.h.d@swipnet.se>
188
189 * nsterm.h (EmacsScroller): judge returns bool.
190
191 * nsterm.m (ns_set_vertical_scroll_bar): Release bar.
192 (ns_judge_scroll_bars): Only set removed if judge returns true.
193 (judge): Returns bool == condemned. Remove self from window.
194 (setPosition:portion:whole:): Remove raise SIGIO (Bug#18757).
195
196 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
197
198 * keyboard.c (command_loop_1): Record this-command in recent-keys.
199 (Frecent_keys): Rewrite. and add optional `include-cmds' arg.
200
201 2014-11-09 Jan Djärv <jan.h.d@swipnet.se>
202
203 * nsterm.m (ns_set_vertical_scroll_bar)
204 (ns_set_horizontal_scroll_bar): Cleanup merge error.
205
206 2014-11-09 Paul Eggert <eggert@cs.ucla.edu>
207
208 * xgselect.c (xg_select): Don't assume n_gfds is nonnegative
209 merely because tmo_in_millisec is nonnegative. The 1st call
210 to g_main_context_query could succeed while the 2nd one fails.
211
212 * frame.c (Fcan_run_window_configuration_change_hook): Return a value.
213
214 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
215
216 * nsterm.m (run): Only use non-system event loop if OSX version is
217 exactly 10.9 (Bug#18993).
218 (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
219 needed (Bug#18757).
220
221 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
222
223 * callproc.c (encode_current_directory): Support handling of file
224 names prepended by "/:". (Bug#18891)
225
226 2014-11-08 Alan Mackenzie <acm@muc.de>
227
228 * syntax.c (back_comment): Fix off-by-one error (bug#18022).
229
230 2014-11-08 Dima Kogan <dima@secretsauce.net>
231
232 * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
233
234 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
235
236 * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
237 raises an error. (Bug#18891)
238
239 2014-11-08 Martin Rudalics <rudalics@gmx.at>
240
241 * frame.c (adjust_frame_size): Call x_set_window_size only if
242 f->can_x_set_window_size is set.
243 (make_frame): Initialize f->can_x_set_window_size and
244 f->can_run_window_configuration_change_hook.
245 (Fcan_run_window_configuration_change_hook): New function.
246 * frame.h (frame): Split `official' into `can_x_set_window_size'
247 and `can_run_window_configuration_change_hook'.
248 * nsfns.m (Fx_create_frame): Set f->can_x_set_window_size.
249 * w32fns.c (Fx_create_frame, x_create_tip_frame): Set
250 f->can_x_set_window_size.
251 * window.c (run_window_configuration_change_hook): Return
252 immediately if either f->can_x_set_window_size or
253 f->can_run_window_configuration_change_hook are false.
254 (Fset_window_configuration): Instead of f->official set
255 f->can_x_set_window_size.
256 * xfns.c (Fx_create_frame, x_create_tip_frame): Set
257 f->can_x_set_window_size.
258
259 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
260
261 * nsterm.m (EmacsScroller.dealloc): Reinstate, removed at merge
262 cleanup from 2014-11-01 (Bug#18972).
263
264 2014-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
265
266 * keyboard.c: Call gui-set-selection instead of x-set-selection.
267 * xdisp.c (window-scroll-functions): Improve docstring.
268
269 2014-11-07 Paul Eggert <eggert@cs.ucla.edu>
270
271 Uniquify the 'size' symbol.
272 * frame.c (Qsize):
273 * w32notify.c (Qsize): Remove.
274 * lisp.h (Qsize): New decl.
275 * lread.c (Qsize): Now extern.
276 * w32notify.c (syms_of_w32notify): No need to defsym.
277
278 2014-11-07 Martin Rudalics <rudalics@gmx.at>
279
280 * dispnew.c (change_frame_size_1): Fix call of
281 adjust_frame_size.
282 * frame.c (Qsize, Qframe_position, Qframe_outer_size)
283 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
284 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
285 (Qtool_bar_size): New constants.
286 (frame_inhibit_resize, adjust_frame_size): New argument to
287 handle case where frame_inhibit_implied_resize is a list.
288 (Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
289 (Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
290 (x_set_right_divider_width, x_set_bottom_divider_width)
291 (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
292 (x_set_scroll_bar_width, x_set_scroll_bar_height):
293 Update callers.
294 (frame-inhibit-implied-resize): Rewrite doc-string.
295 * frame.h (frame_inhibit_resize, adjust_frame_size):
296 Fix external declarations.
297 (Qframe_position, Qframe_outer_size)
298 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
299 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
300 (Qtool_bar_size): Extern them.
301 * gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
302 (xg_height_or_width_changed): Remove.
303 (xg_frame_set_char_size): Adjust adjust_frame_size calls.
304 (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
305 (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
306 (xg_change_toolbar_position): Call adjust_frame_size directly.
307 * nsfns.m (x_set_internal_border_width, Fx_create_frame):
308 Fix calls of adjust_frame_size.
309 * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
310 (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls.
311 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
312 frame can get resized when tool-bar-lines parameter changes from
313 or to zero.
314 (Fw32_frame_menu_bar_size): Return fourth value.
315 (Fw32_frame_rect): Block input around system calls
316 (Fx_frame_geometry): New function.
317 * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
318 * w32term.c (x_new_font): Adjust adjust_frame_size call.
319 * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call.
320 * window.c (Fset_window_configuration): Adjust adjust_frame_size call.
321 * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
322 (Fx_create_frame): Adjust adjust_frame_size calls.
323 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
324 frame can get resized when tool-bar-lines parameter changes from
325 or to zero.
326 (Fx_frame_geometry): New function.
327 * xmenu.c (update_frame_menubar): On Lucid call
328 adjust_frame_size with one pixel less height to avoid that
329 repeatedly adding/removing the menu bar grows the frame.
330 (free_frame_menubar): On Motif arrange to optionally preserve
331 the old frame height when removing the menu bar.
332 * xterm.c (x_new_font): Adjust adjust_frame_size call.
333
334 2014-11-03 Eli Zaretskii <eliz@gnu.org>
335
336 * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
337 (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
338 frame; instead, print an error message.
339
340 2014-11-03 Jan Djärv <jan.h.d@swipnet.se>
341
342 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
343
344 2014-11-02 Jan Djärv <jan.h.d@swipnet.se>
345
346 * nsimage.m (allocInitFromFile:): Initialize bmRep.
347 (dealloc): Release bmRep.
348
349 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
350 imageListSetNext, imageListNext.
351
352 * nsimage.m (ImageList, imageListNext, imageListSetNext:)
353 (reference): Remove.
354 (allocInitFromFile:): Remove searching ImageList and calling
355 reference (Bug#18918).
356 (dealloc): Remove handling if ImageList.
357
358 2014-11-02 Andreas Schwab <schwab@linux-m68k.org>
359
360 * process.c (catch_child_signal): Fix incorrect assertion.
361
362 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
363
364 * macfont.m (macfont_draw):
365 * nsterm.m (ns_mouse_position, judge): Clean up merge conflict.
366
367 * macfont.m (macfont_glyph_extents): Turn off synthetic bold
368 if force_integral_p (i.e. no antialias).
369 (macfont_draw): Check ns_antialias_text, also turn off synthetic
370 bold if no antialias (Bug#18876).
371
372 * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
373 was given (Bug#18846).
374
375 * nsterm.h (ns_set_doc_edited): Declare taking no args.
376
377 * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
378 instead of in xdisp.c, function now takes void. (Bug#18884).
379
380 * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
381 (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
382
383 * nsterm.h (EmacsScroller): Replace Lisp_Object win with
384 struct window* (Bug#18889).
385 Remove getMouseMotionPart.
386 (ns_output): Make icon_top/left int.
387
388 * nsfns.m (x_icon): icon_top/left is int.
389
390 * nsterm.m (ns_mouse_position): Remove unused code.
391 (initFrame:window:, dealloc): Use window instead of win.
392 (getMouseMotionPart:window:x:y:): Remove, unused.
393 (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
394
395 2014-11-01 Eli Zaretskii <eliz@gnu.org>
396
397 * keyboard.c (readable_events): When FLAGS include
398 READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
399 This avoids returning non-nil from input-pending-p when only such
400 events are in the queue. (Bug#18856)
401
402 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
403
404 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
405 (NXPrimaryPboard, NXSecondaryPboard): Declare static.
406 (Qforeign_selection): Remove.
407 (ns_get_local_selection): Identation fix.
408 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
409
410 * nsselect.m (ns_get_local_selection): Remove calling of
411 functions in Vselection_converter_alist (Bug#18911).
412 (syms_of_nsselect): Remove Vselection_converter_alist.
413
414 2014-10-31 Dmitry Antipov <dmantipov@yandex.ru>
415
416 * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
417 and unnecessary initialization. Adjust comments.
418
419 2014-10-30 Eli Zaretskii <eliz@gnu.org>
420
421 * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
422 setting it to -1.
423 (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
424 index, not an absolute one, as that's what the function expects.
425
426 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru>
427
428 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
429 font on an initial frame when running as a daemon (Bug#18869).
430
431 * fontset.c (toplevel): Adjust comment to match 2014-06-19 change.
432
433 2014-10-30 Eli Zaretskii <eliz@gnu.org>
434
435 * fileio.c (Fexpand_file_name): Use make_unibyte_string, not
436 build_string, when importing a home directory. (Bug#18873)
437
438 * dispnew.c (buffer_posn_from_coords):
439 Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
440 account for the header-line height. (Bug#18839)
441
442 2014-10-28 Ulf Jasper <ulf.jasper@web.de>
443
444 * xml.c (parse_region): Do not forget the first document child.
445
446 2014-10-25 Jan Djärv <jan.h.d@swipnet.se>
447
448 * nsselect.m: pasteboard_changecount is new.
449 (ns_store_pb_change_count, ns_get_pb_change_count)
450 (ns_get_our_change_count_for): New functions.
451 (ns_string_to_pasteboard_internal): Correct comment.
452 type => gtype in eassert, Call ns_store_pb_change_count.
453 (Fns_own_selection_internal): Remove data, use value (Bug#18799).
454 (Fns_disown_selection_internal, Fns_selection_owner_p):
455 Replace Vselection_alist check, with change count check.
456 (Fns_get_selection): Initialize val to Qnil. Only get local
457 selection if change counts match (Bug#18799).
458 (nxatoms_of_nsselect): Initialize pasteboard_changecount.
459
460 2014-10-25 Noam Postavsky <npostavs@users.sourceforget.net>
461
462 * src/w32proc.c (create_child): If calling a quoted batch file,
463 pass NULL for exe. (Bug#18745)
464
465 2014-10-24 Eli Zaretskii <eliz@gnu.org>
466
467 * bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
468 (bidi_resolve_brackets): Use end of string position rather than ZV
469 when iterating over a string. (Bug#18815)
470
471 2014-10-24 Martin Rudalics <rudalics@gmx.at>
472
473 * keyboard.c (make_lispy_position): Return coordinates also when
474 on scroll bars, fringes, margins or not in a window.
475 * xdisp.c (show_mouse_face): Don't change cursor face during
476 mouse tracking.
477
478 2014-10-23 Martin Rudalics <rudalics@gmx.at>
479
480 * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
481 (frame_resize_pixelwise, frame_inhibit_implied_resize):
482 Fix doc-strings (Bug#18789).
483
484 2014-10-23 Paul Eggert <eggert@cs.ucla.edu>
485
486 * Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'.
487
488 2014-10-22 Eli Zaretskii <eliz@gnu.org>
489
490 Optimize redisplay of simple bracketed text.
491 * bidi.c (bidi_cache_reset_to): New function.
492 (bidi_cache_reset): Call it.
493 (bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
494 member to -1.
495 (bidi_resolve_explicit): Reset bracket_pairing_pos and
496 bracket_enclosed_type only if bracket_pairing_pos's value is not
497 ZV.
498 (MAX_BPA_STACK): Make sure the value is signed.
499 (PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
500 stop pushing values onto the stack.
501 (bidi_find_bracket_pairs): If the bracketed text is only on the
502 base embedding level, remove all the states cached by this
503 function from the cache, and return zero, so that the brackets in
504 this segment of text are processed as normal neutrals.
505 (bidi_resolve_brackets): Detect the brackets that are to be
506 processed as neutrals, and don't call bidi_find_bracket_pairs on
507 them. (Bug#18778)
508
509 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
510
511 * w32select.c (Fw32_selection_exists_p): Rename from
512 Fx_selection_exists_p.
513 (syms_of_w32select): Adjust accordingly.
514
515 * w16select.c (Fw16_selection_exists_p): Rename from
516 Fx_selection_exists_p.
517 (syms_of_win16select): Adjust accordingly.
518
519 * nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
520 (Fns_own_selection_internal): Tighten scoping.
521 (Fns_selection_exists_p): Rename from Fx_selection_exists_p.
522 (Fns_get_selection): Rename from Fx_get_selection_internal.
523 (Fns_get_selection_internal, Fns_store_selection_internal):
524 Remove functions.
525 (syms_of_nsselect): Adjust accordingly.
526
527 2014-10-21 Martin Rudalics <rudalics@gmx.at>
528
529 * w32fns.c (Fw32_frame_menu_bar_size): New function.
530 * w32term.c (x_set_window_size): Account for wrapped menu bar
531 lines when setting up frame height (Bug#15174 and Bug#18720).
532 (w32_add_wrapped_menu_bar_lines): New variable.
533
534 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
535
536 * xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
537 move point.
538
539 2014-10-20 Glenn Morris <rgm@gnu.org>
540
541 * Merge in all changes up to 24.4 release.
542
543 2014-10-19 Jan Djärv <jan.h.d@swipnet.se>
544
545 * gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
546 g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).
547
548 * xterm.h (x_output): Remove net_wm_state_hidden_seen.
549
550 * xterm.c (handle_one_xevent): Check return value from
551 x_handle_net_wm_state, remove net_wm_state_hidden_seen (Bug#18722).
552 (get_current_wm_state): Remove net_wm_state_hidden_seen setting.
553
554 * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
555 Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14 (Bug#18674).
556 (make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
557 Gtk+ >= 3.14 (Bug#18674).
558 (update_frame_tool_bar): Don't use gtk_misc_set_padding on
559 Gtk+ >= 3.14 (Bug#18674).
560
561 2014-10-18 Paul Eggert <eggert@cs.ucla.edu>
562
563 * gtkutil.c: Remove no-longer-used code.
564 (xg_update_menubar): Remove unused local and unnecessary call to
565 gtk_menu_item_get_submenu.
566 (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
567 (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
568 (TOOLBAR_TOP_WIDGET): Remove; no longer used.
569
570 2014-10-18 Jan Djärv <jan.h.d@swipnet.se>
571
572 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.
573
574 * xterm.h (handlebox_widget): Remove.
575
576 * xmenu.c (set_frame_menubar): Remove GTK block that calls
577 xg_have_tear_offs.
578
579 * gtkutil.h (xg_have_tear_offs): Remove declaration.
580
581 * gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
582 to handle Gtk versions.
583 (xg_get_file_with_chooser): Use them.
584 (xg_have_tear_offs, tearoff_remove, tearoff_activate):
585 Remove (create_menus): Remove teroff argument and code.
586 Remove call to gtk_menu_set_title.
587 (xg_update_menubar, xg_update_submenu): Remove tearoff code.
588 Adjust args to create_menus.
589 (xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
590 (xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
591 (xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
592 (xg_make_tool_item): Remove detach code.
593 (xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
594 (find_icon_from_name): New function.
595 (update_frame_tool_bar): Remove GtkStockItem code, move to
596 find_icon_from_name. Let stock be a list of icon names to try.
597 Only use gtk_image_new_from_stock on Gtk+ < 3.10.
598 Replace TOOLBAR_TOP_WIDGET.
599 (free_frame_tool_bar, xg_change_toolbar_position ):
600 Replace TOOLBAR_TOP_WIDGET.
601 (xg_initialize): Remove tearoff code.
602
603 2014-10-18 Eli Zaretskii <eliz@gnu.org>
604
605 * xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
606 pixel from the window's cursor glyph width, since X renders hollow
607 blocks 1 pixel wider than the 'width' parameter.
608
609 * xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
610 glyph->pixel_width; this is now done in xterm.c.
611
612 Fix reordering of bracket characters in isolates.
613 * bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
614 RESOLVED_ONLY; when non-zero, return from the cache only fully
615 resolved states. All callers changed.
616 (CANONICAL_EQU): New macro.
617 (PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
618 equivalent of the paired closing bracket character.
619 (bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
620 the default non-negative value, to be checked later in
621 bidi_resolve_brackets. Use CANONICAL_EQU to test candidate
622 characters against those pushed onto the BPA stack.
623 (bidi_record_type_for_neutral): New function.
624 (bidi_resolve_brackets): Record next_for_neutral and
625 prev_for_neutral when embedding level gets pushed. Force
626 resolution of bracket pairs when entering a level run that was not
627 yet BPA-resolved.
628 (bidi_resolve_neutral): Add assertions before calling
629 bidi_resolve_neutral_1.
630 (bidi_level_of_next_char): Remove the code that attempted to
631 resolve unresolved neutrals; that is now done by
632 bidi_resolve_neutral.
633
634 * w32select.c (owner_callback): Mark with ALIGN_STACK attribute.
635
636 2014-10-17 Eli Zaretskii <eliz@gnu.org>
637
638 * xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
639 1-pixel R2L characters.
640 Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
641 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.
642
643 2014-10-16 Eli Zaretskii <eliz@gnu.org>
644
645 * bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
646 useful.
647
648 2014-10-15 Paul Eggert <eggert@cs.ucla.edu>
649
650 * bidi.c (bidi_find_bracket_pairs): Initialize local var.
651 This pacifies GCC 4.9.1 with --enable-gcc-warnings.
652 It's not clear to me whether the initialization is needed,
653 but it can't hurt so I played it safe.
654
655 2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
656
657 * lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
658
659 2014-10-15 Eli Zaretskii <eliz@gnu.org>
660
661 Update the bidirectional reordering engine for Unicode 6.3 and 7.0.
662 * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level):
663 Remove variable.
664 (bidi_get_type): Return the isolate initiators and terminator types.
665 (bidi_isolate_fmt_char, bidi_paired_bracket_type)
666 (bidi_fetch_char_skip_isolates, find_first_strong_char)
667 (bidi_find_bracket_pairs, bidi_resolve_brackets): New functions.
668 (bidi_set_sos_type): Rename from bidi_set_sor_type and updated
669 for the new features.
670 (bidi_push_embedding_level, bidi_pop_embedding_level): Update to
671 push and pop correctly for isolates.
672 (bidi_remember_char): Modify to accept an additional argument
673 and record the bidi type according to its value.
674 (bidi_cache_iterator_state): Accept an additional argument to only
675 update an existing state. Handle the new members of struct bidi_it.
676 (bidi_cache_find): Arguments changed: no longer accepts a level,
677 instead accepts a flag telling it whether it is okay to return
678 unresolved neutrals.
679 (bidi_initialize): Initiate and staticpro the bracket-type uniprop
680 table. Initialize new isolate-related members.
681 (bidi_paragraph_init): Some code factored out into
682 find_first_strong_char.
683 (bidi_resolve_explicit_1): Function deleted, its code incorporated
684 into bidi_resolve_explicit.
685 (bidi_resolve_explicit): Support the isolate initiators and
686 terminator. Fix handling of embeddings and overrides according to
687 new UBA requirements. Record information about previously seen
688 characters here (moved from bidi_level_of_next_char).
689 (bidi_resolve_weak): Adapt to changes in struct members.
690 (FLAG_EMBEDDING_INSIDE, FLAG_OPPOSITE_INSIDE, MAX_BPA_STACK)
691 (STORE_BRACKET_CHARPOS, PUSH_BPA_STACK): New macros.
692 (bidi_resolve_neutral): Call bidi_resolve_brackets to handle the
693 paired bracket resolution. Handle isolate initiators and
694 terminator.
695 (bidi_type_of_next_char): Remove unneeded code for BN limit.
696 (bidi_level_of_next_char): Move the code that records information
697 about previous characters to bidi_resolve_explicit. Fix logic of
698 resolving neutrals and make sure their cache entries are updated.
699 Remove now unneeded special handling of PDF level.
700
701 * dispextern.h (struct glyph): Enlarge the width of resolved_level.
702 (BIDI_MAXDEPTH): New macro, renamed from BIDI_MAXLEVEL and
703 enlarged per Unicode 6.3.
704 (enum bidi_bracket_type_t): New data type.
705 (struct bidi_saved_info): Leave only 2 type members out of 4.
706 Remove bytepos.
707 (struct bidi_stack): Add members necessary to support isolating
708 sequences.
709 (struct bidi_it): Add new members necessary to support isolating
710 sequences and bracket pair resolution.
711
712 * xdisp.c (Fbidi_resolved_levels): New function.
713 (syms_of_xdisp): Defsubr it.
714 (append_glyph, append_composite_glyph, produce_image_glyph)
715 (append_stretch_glyph, append_glyphless_glyph): Convert aborts to
716 assertions.
717 (syms_of_xdisp) <inhibit-bidi-mirroring>: New variable.
718
719 * term.c (append_glyph, append_composite_glyph)
720 (append_glyphless_glyph): Convert aborts to assertions.
721
722 * .gdbinit (pgx): Display the character codepoint, resolved level,
723 and bidi type also for glyphless glyphs.
724
725 2014-10-15 Dmitry Antipov <dmantipov@yandex.ru>
726
727 Avoid unwanted point motion in Fline_beginning_position.
728 * lisp.h (scan_newline_from_point): Add prototype.
729 * search.c (scan_newline_from_point): New function, refactored from...
730 * cmds.c (Fforward_line): ...adjusted user.
731 * editfns.c (Fline_beginning_position): Use scan_newline_from_point
732 and simplify the former since the latter doesn't move point.
733
734 2014-10-14 Dmitry Antipov <dmantipov@yandex.ru>
735
736 Cleanup terminal handling code.
737 * dispextern.h (get_named_tty): Remove prototype but...
738 * termhooks.h (get_named_terminal): ...resurrect it under
739 more meaningful name.
740 (get_terminal): Likewise, but with...
741 (decode_live_terminal): ...this name.
742 (decode_tty_terminal): Add prototype.
743 * term.c (get_tty_terminal): Remove.
744 (get_named_tty): Remove.
745 (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
746 (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
747 Use decode_tty_terminal.
748 (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
749 * terminal.c (get_terminal): Refactor to...
750 (decode_terminal, decode_live_terminal): ...new functions.
751 (decode_tty_terminal): Replacement for get_tty_terminal.
752 (get_named_terminal): Likewise for get_named_tty.
753 * coding.c (Fset_terminal_coding_system_internal)
754 (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
755 (Fkeyboard_coding_system):
756 * composite.c (Fcomposition_get_gstring):
757 * dispnew.c (Fsend_string_to_terminal):
758 * frame.c (Fmake_terminal_frame):
759 * nsfns.m (check_ns_display_info):
760 * w32fns.c, xfns.c (check_x_display_info):
761 * xselect.c (frame_for_x_selection): Use decode_live_terminal.
762 * keyboard.c (handle_interrupt_signal, handle_interrupt)
763 (Fset_quit_char): Use get_named_terminal.
764 (Fset_output_flow_control, Fset_input_meta_mode):
765 Use decode_tty_terminal.
766
767 2014-10-13 Eli Zaretskii <eliz@gnu.org>
768
769 * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
770 between 32-bit and 64-bit MinGW builds. (Bug#18699)
771
772 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
773
774 Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
775 * process.c (accept4) [!HAVE_ACCEPT4]: New macro.
776
777 2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
778
779 * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
780 (bug#18638).
781
782 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
783
784 * editfns.c (dump_tz_string): No longer const.
785 It might be modified.
786
787 * nsmenu.m (clear): Assume OS X 10.6 or later.
788
789 2014-10-12 Jan Djärv <jan.h.d@swipnet.se>
790
791 * unexmacosx.c: Remove include ppc/reloc.h.
792 (unrelocate, copy_dysymtab): Remove PPC code.
793 (rebase_reloc_address): Remove, only used for PPC:
794
795 * nsterm.m: Always include macfont.h on COCOA.
796 (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
797 (ns_dumpglyphs_image, ns_check_menu_open)
798 (applicationDidFinishLaunching)
799 (antialiasThresholdDidChange:)
800 (keyDown:, toggleFullScreen:, setPosition:portion:whole:):
801 Remove checks for OSX <= 10.5/10.6.
802 (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
803 (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
804 GNUSTEP.
805
806 * nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
807 (NS_HAVE_NSINTEGER): Remove block.
808 Remove >= OSX 10.6 tests.
809
810 * nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
811 (x_activate_menubar, trackingNotification:): Remove check for
812 OSX >= 10.5.
813 (menuNeedsUpdate:): Remove check for OSX < 10.5.
814
815 * nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
816
817 * nsfns.m: Always include macfont.h on COCOA.
818 (ns_filename_from_panel, ns_directory_from_panel)
819 (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
820 (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
821
822 * macfont.m: Remove >= 1050 check.
823 (macfont_create_family_with_symbol)
824 (macfont_get_glyph_for_character)
825 (mac_font_get_glyphs_for_variants)
826 (mac_ctfont_create_available_families, syms_of_macfont):
827 Remove code for OSX < 10.6.
828 (mac_font_family_group, mac_font_family_compare): Remove, only used
829 for OSX < 10.6.
830
831 * macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
832 (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
833
834 * Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
835 comment.
836
837 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
838
839 Fix putenv race conditions with undefined behavior (Bug#8705).
840 Do all putenv calls before Emacs creates any threads.
841 Use a safer way to modify the TZ environment variable in the
842 presence of multiple threads. For further thread-safety,
843 prefer localtime_r and gmtime_r to localtime and gmtime,
844 and prefer struct tm's tm_gmtoff (if available) to calling
845 both localtime_r and gmtime_r.
846 * dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
847 (init_dbusbind): ... to this new function.
848 * emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
849 * xterm.c (x_term_init): Move xputenv call from here ...
850 (init_xterm): ... to this new function.
851 * emacs.c (main) [USE_GTK]: Call it before creating threads.
852 * editfns.c (HAVE_TM_GMTOFF): Default to false.
853 (dump_tz_string): New constant.
854 (init_editfns): Use it. This centralizes the dump_tz stuff.
855 Call set_time_zone_rule here, so that its xputenv is done
856 before Emacs goes multithreaded.
857 (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
858 thread-safe enough for Emacs.
859 (format_time_string, Fdecode_time, Fcurrent_time_string)
860 (Fcurrent_time_zone):
861 Prefer localtime_r and gmtime_r, which are more thread-safe, to
862 localtime and gmtime. Remove now-unnecessary calls to block_input.
863 (tm_gmtoff): New static function.
864 (Fdecode_time, Fcurrent_time_zone): Use it.
865 (Fencode_time): Use mktime_z, for better thread-safety.
866 (set_time_zone_rule): Now static. Rewrite to be mostly thread-safe,
867 i.e., not quite thread-safe but good enough for Emacs typical usage.
868 Do not reclaim storage that is in the environment; let it leak.
869 Always call tzset, since localtime_r does not.
870 * emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
871 This is now done in init_editfns.
872 * systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
873 New macros and declarations, for platforms lacking tzalloc & friends.
874
875 2014-10-09 Paul Eggert <eggert@cs.ucla.edu>
876
877 * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
878 On x86 platforms this works around GCC bug 63495
879 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
880 and more generally should fix a portability problem in Emacs.
881 Problem reported by Stefan Monnier in:
882 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
883
884 2014-10-08 Leo Liu <sdl.web@gmail.com>
885
886 Enhance terpri to allow conditionally output a newline. (Bug#18652)
887 * keymap.c (describe_vector_princ):
888 * keyboard.c (Fcommand_error_default_function): Adapt to change to
889 Fterpri.
890
891 * print.c (printchar_stdout_last): Declare.
892 (printchar): Record the last char written to stdout.
893 (Fterpri): Add optional argument ENSURE.
894
895 2014-10-08 Eli Zaretskii <eliz@gnu.org>
896
897 * w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
898 DELAY argument to change_frame_size, so that the frame size
899 changes, if any are needed, are delayed until the next redisplay.
900 This is to avoid a too early QUIT inside change_frame_size, when
901 it calls Lisp in frame_windows_min_size, in case one of the events
902 we've read sets the quit-flag. (Bug#18649)
903
904 * w32fns.c (check_x_display_info): Accept terminal objects as
905 argument, to follow what xfns.c does.
906
907 2014-10-07 Glenn Morris <rgm@gnu.org>
908
909 * Makefile.in ($(srcdir)/macuvs.h)
910 ($(lispsource)/international/charprop.el): Add explicit FORCE.
911
912 2014-10-07 Eli Zaretskii <eliz@gnu.org>
913
914 * decompress.c (init_zlib_functions): Move the message about zlib
915 being unavailable from here...
916 (Fzlib_decompress_region): ...to here. (Bug#18650)
917
918 2014-10-07 Dmitry Antipov <dmantipov@yandex.ru>
919
920 * font.c (Ffont_get_glyphs): Use validate_subarray and fix
921 the case where an optional string is used. Adjust docstring.
922
923 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
924
925 * lisp.mk (lisp): Remove w32-common-fns.elc.
926
927 2014-10-05 Paul Eggert <eggert@cs.ucla.edu>
928
929 * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
930 These were already defined in buffer.c, and the duplicate
931 definitions cause problems on platforms like 'gcc -fno-common'.
932 Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
933
934 2014-10-05 Jan Djärv <jan.h.d@swipnet.se>
935
936 * nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
937 if toolbar is visible.
938
939 * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
940 0.23 (Bug#18030).
941
942 * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
943 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
944 (ns_select, ns_read_socket): Use unwind_protect to decrease
945 apploopnr (Bug#18345).
946 (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
947 line height (Bug#17977).
948
949 * macfont.m: Fix indentation and import changes from macport 24.3.94.
950 (macfont_closest_traits_index): New function.
951 (macfont_closest_traits_index_p): Rename from
952 macfont_closest_traits_index.
953 (macfont_list): Use macfont_closest_traits_index_p.
954
955 2014-10-05 K. Handa <handa@gnu.org>
956
957 * coding.c (detect_coding_iso_2022): Set coding->rejected
958 correctly when an invalid escape sequence is found (Bug#18610).
959
960 2014-10-04 Jan Djärv <jan.h.d@swipnet.se>
961
962 * gtkutil.c (create_menus): Only add tearoffs to empty menus.
963 (xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
964 for add_tearoff_p.
965
966 2014-10-04 Martin Rudalics <rudalics@gmx.at>
967
968 * buffer.c (scroll_bar_width, scroll_bar_height):
969 Fix doc-strings.
970 * window.c (Fset_window_scroll_bars): Fix doc-string.
971 (Fwindow_scroll_bars): Have it return what the doc-string says.
972
973 2014-10-03 Eli Zaretskii <eliz@gnu.org>
974
975 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
976 iterator backwards, to resync the bidi iterator. (Bug#18584)
977
978 2014-10-03 Dmitry Antipov <dmantipov@yandex.ru>
979
980 Consistently use min and max macros from lisp.h.
981 * coding.c (min, max):
982 * font.c (MAX):
983 * unexhp9k800.c (min):
984 * unexw32.c (min, max): Use definitions from lisp.h.
985 * regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
986 Adjust users.
987 * gmalloc.c (min): Tiny style change.
988
989 * fileio.c (emacs_readlinkat, Finsert_file_contents):
990 * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
991
992 2014-10-03 Paul Eggert <eggert@cs.ucla.edu>
993
994 Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
995 * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
996 (X_ULONG_MAX): Move these macros to xterm.h.
997 (x_fill_property_data): Be more generous about allowing either
998 signed or unsigned data of the appropriate width.
999 * xterm.h (x_display_set_last_user_time): New function.
1000 All setters of last_user_time changd to use this function.
1001 If ENABLE_CHECKING, check that the times are in range.
1002
1003 2014-10-02 Eli Zaretskii <eliz@gnu.org>
1004
1005 * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
1006 'ssize_t'. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
1007
1008 2014-10-02 Jan Djärv <jan.h.d@swipnet.se>
1009
1010 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
1011 make a font_object from a tty frame (Bug#18573).
1012 (Finternal_set_lisp_face_attribute): Add FIXME comment.
1013
1014 2014-10-02 Dmitry Antipov <dmantipov@yandex.ru>
1015
1016 * alloc.c (mark_overlay): Assume that overlay boundaries are
1017 always markers. Add comment.
1018 * lread.c (read_internal_start): Use convenient validate_subarray.
1019 Adjust docstring.
1020 (Fread_from_string): Adjust docstring.
1021
1022 2014-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
1023
1024 * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
1025
1026 * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
1027 Rename from the "x-" prefix.
1028
1029 2014-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
1030
1031 * xselect.c (selection-converter-alist): Fix docstring.
1032
1033 2014-10-01 Eli Zaretskii <eliz@gnu.org>
1034
1035 * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
1036 argument passed by the caller, when we mirror all slashes into
1037 backslashes.
1038
1039 2014-10-01 Dmitry Antipov <dmantipov@yandex.ru>
1040
1041 * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
1042 Resurrect old code and fix compilation with GTK < 2.13.6.
1043
1044 2014-10-01 Paul Eggert <eggert@cs.ucla.edu>
1045
1046 Use AUTO_CONS instead of SCOPED_CONS, etc.
1047 * frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
1048 * lisp.h (AUTO_CONS): Rename from scoped_cons.
1049 (AUTO_LIST1): Rename from scoped_list1.
1050 (AUTO_LIST2): Rename from scoped_list2.
1051 (AUTO_LIST3): Rename from scoped_list3.
1052 (AUTO_LIST4): Rename from scoped_list4.
1053 (AUTO_STRING): Rename from SCOPED_STRING.
1054 * frame.h (AUTO_FRAME_ARG):
1055 * lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
1056 (AUTO_LIST4, AUTO_STRING):
1057 Prepend a new argument 'name'.
1058 Declare a variable instead of yielding a value.
1059 All uses changed.
1060 * lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
1061
1062 2014-09-30 Eli Zaretskii <eliz@gnu.org>
1063
1064 * w32fns.c (w32_createwindow): Accept an additional argument, an
1065 array of 2 values specifying the coordinates of the frame's
1066 top-left corner. Use these values instead of calling x_get_arg,
1067 which can cons Lisp objects, and therefore cannot be called except
1068 from the main thread. Remove redundant tests for the default
1069 values.
1070 (my_create_window): Move the calculation of the coordinates of the
1071 frame's top-left edge here. Pass them to the input thread via the
1072 second parameter of the WM_EMACS_CREATEWINDOW message.
1073 See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
1074 for the details.
1075
1076 2014-09-30 Eli Zaretskii <eliz@gnu.org>
1077
1078 * xdisp.c (cursor_row_fully_visible_p): Update commentary.
1079 (redisplay_window): Treat the frame's frozen_window_starts flag
1080 the same way as the optional_new_start flag for the window: only
1081 obey it if the glyph row showing point will be fully visible.
1082 Likewise when the window start is in a continuation line. If,
1083 after trying everything under the 'force_start' label, point is
1084 still not fully visible, give up and scroll the window.
1085 Add debugging traces. (Bug#18545)
1086
1087 * window.c (Frecenter): Set the window's redisplay flag.
1088
1089 2014-09-30 Eli Zaretskii <eliz@gnu.org>
1090
1091 * w32term.c (w32_read_socket): Don't use frame dimensions for
1092 resizing if GetClientRect returned an empty (0, 0, 0, 0)
1093 rectangle. Check the return value of GetClientRect, and don't use
1094 the results if it didn't succeed.
1095
1096 * dispnew.c (change_frame_size_1): Recompute the frame dimensions
1097 in columns and lines after correcting the pixel dimensions in
1098 check_frame_size.
1099 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
1100 negative values to xrealloc. (Bug#18528)
1101
1102 2014-09-30 Paul Eggert <eggert@cs.ucla.edu>
1103
1104 * alloc.c: Remove now-unnecessary check.
1105 Suggested by Dmitry Antipov in:
1106 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
1107
1108 * xterm.c (x_term_init): Allocate temps on stack, not on heap.
1109
1110 * frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
1111 to Ubuntu 14.04.1 x86-64.
1112
1113 Simplify stack-allocated Lisp objects, and make them more portable.
1114 The build_local_string macro was used in two ways: (1) string
1115 literals for which scoped allocation suffices, and (2) file name
1116 components, where it's not safe in general to assume bounded-size
1117 ASCII data. Simplify by defining a new macro SCOPED_STRING that
1118 allocates a block-scope string, and by using SCOPED_STRING for (1)
1119 and build_string for (2). Furthermore, actually use stack
1120 allocation only for objects known to have sufficient alignment.
1121 This simpler implementation means Emacs can make
1122 USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
1123 GC_MAKE_GCPROS_NOOPS.
1124 * lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
1125 for fewer differences among implementations.
1126 (struct Lisp_String): Now GCALIGNED.
1127 (USE_STACK_LISP_OBJECTS): Default to true, since the
1128 implementation no longer insists on a nonempty GCALIGNED.
1129 But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
1130 (SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
1131 separately. Move definiens to scoped_cons. The old definition
1132 was incorrect when GCALIGNED was defined to be empty.
1133 (union Aligned_String): New type.
1134 (USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
1135 implementation ports to compilers that don't align strictly enough.
1136 Don't worry about the union sizes; it's not worth bothering about.
1137 (scoped_cons, scoped_list1, scoped_list3, scoped_list4):
1138 Rewrite using USE_STACK_CONS.
1139 (scoped_cons): Assume the use of union Aligned_Cons.
1140 (lisp_string_size, make_local_string, build_local_string): Remove.
1141 Unless otherwise specified, all callers of build_local_string
1142 changed to use SCOPED_STRING.
1143 (SCOPED_STRING): New macro.
1144 * data.c (wrong_choice):
1145 * menu.c (single_menu_item):
1146 * process.c (Fformat_network_address):
1147 Hoist use of SCOPED_STRING out of a scope, so that its returned
1148 object lives long enough.
1149 * fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
1150 as the string might be long or might not be ASCII.
1151
1152 2014-09-29 Eli Zaretskii <eliz@gnu.org>
1153
1154 * msdos.c (internal_terminal_init): Bump version to 25.
1155
1156 2014-09-29 Dmitry Antipov <dmantipov@yandex.ru>
1157
1158 Keep stack-allocated Lisp objects fast rather than versatile.
1159 * lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
1160 (SCOPED_CONS_INITIALIZER): New macro.
1161 (scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
1162 (USE_LOCAL_ALLOCA): Remove.
1163 (local_cons, local_list1, local_list2, local_list3, local_list4):
1164 Remove. Stack overflow checking makes them too slow.
1165 (make_local_vector): Likewise. Also we just don't have enough
1166 users for it.
1167 (enum LISP_STRING_OVERHEAD): Remove.
1168 (local_string_init, local_vector_init): Remove prototypes.
1169 (make_local_string, build_local_string): Redesign to target short
1170 compile-time string constants, fall back to regular string allocation
1171 where appropriate.
1172 (lisp_string_size): New function.
1173 (verify_ascii) [ENABLE_CHECKING]: Add prototype.
1174 * alloc.c (local_string_init, local_vector_init): Remove.
1175 (verify_ascii) [ENABLE_CHECKING]: New function.
1176 * buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
1177 * fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
1178 * menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
1179 * xselect.c, xterm.c: All related users changed.
1180
1181 2014-09-28 Ken Brown <kbrown@cornell.edu>
1182
1183 * sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
1184 * gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
1185
1186 2014-09-27 Ken Brown <kbrown@cornell.edu>
1187
1188 Fix implementation of HYBRID_MALLOC on Cygwin.
1189 * sheap.c (bss_sbrk_buffer_end): Cast to void *.
1190 (bss_sbrk_buffer_beg): New variable. Use it...
1191 * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
1192 incorrect definition.
1193
1194 2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
1195
1196 * keyboard.c (track-mouse): Rename to internal--track-mouse.
1197 Make it into a function and change arg to be a function.
1198
1199 * lisp.mk (lisp): Add elisp-mode.elc.
1200
1201 2014-09-26 Paul Eggert <eggert@cs.ucla.edu>
1202
1203 * xfns.c (x_default_scroll_bar_color_parameter):
1204 Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
1205 to pacify --enable-gcc-warnings in non-scrollbar builds.
1206
1207 2014-09-26 Ken Brown <kbrown@cornell.edu>
1208
1209 * w32term.h (ALIGN_STACK): Fix the cpp condition.
1210
1211 2014-09-25 Eli Zaretskii <eliz@gnu.org>
1212
1213 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
1214 MinGW builds that use GCC before 4.2.
1215
1216 Default to stack objects on DOS_NT platforms as well.
1217 * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
1218 __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
1219
1220 * lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
1221
1222 * w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
1223 ALIGN_STACK attribute.
1224
1225 * w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
1226
1227 * w32uniscribe.c (add_opentype_font_name_to_list): Add the
1228 ALIGN_STACK attribute.
1229
1230 * w32font.c (add_font_name_to_list, add_font_entity_to_list)
1231 (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
1232
1233 2014-09-25 Martin Rudalics <rudalics@gmx.at>
1234
1235 * frame.c (frame_inhibit_resize):
1236 * widget.c (EmacsFrameResize):
1237 * window.c (resize_frame_windows, Fset_window_configuration):
1238 * xdisp.c (expose_frame):
1239 * xfns.c (x_change_tool_bar_height):
1240 * xmenu.c (update_frame_menubar):
1241 * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
1242 Remove code left dead after 2014-07-27 changes.
1243
1244 2014-09-25 Paul Eggert <eggert@cs.ucla.edu>
1245
1246 Fix local_cons etc. to not exhaust the stack when in a loop.
1247 Problem reported in:
1248 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
1249 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
1250 * charset.c (load_charset_map_from_file, Ffind_charset_region)
1251 (Ffind_charset_string):
1252 * chartab.c (uniprop_encode_value_numeric, uniprop_table):
1253 * data.c (wrong_range):
1254 * editfns.c (Fpropertize, format2):
1255 * emacs.c (init_cmdargs, decode_env_path):
1256 * fileio.c (auto_save_error):
1257 * fns.c (Fyes_or_no_p):
1258 * font.c (font_style_to_value, font_parse_xlfd)
1259 (font_parse_family_registry, font_delete_unmatched)
1260 (font_add_log):
1261 * fontset.c (Fset_fontset_font):
1262 * frame.c (x_get_arg):
1263 * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
1264 (read_char_minibuf_menu_prompt):
1265 * keymap.c (silly_event_symbol_error, describe_vector):
1266 * lread.c (load_warn_old_style_backquotes):
1267 * menu.c (single_menu_item):
1268 * minibuf.c (Fread_buffer):
1269 * process.c (status_message, Fformat_network_address)
1270 (server_accept_connection):
1271 * textprop.c (copy_text_properties):
1272 * xdisp.c (Fcurrent_bidi_paragraph_direction):
1273 * xfns.c (x_default_scroll_bar_color_parameter):
1274 * xfont.c (xfont_open):
1275 * xselect.c (x_clipboard_manager_error_1):
1276 * xterm.c (x_term_init):
1277 Put USE_LOCAL_ALLOCA at the start of the function.
1278 * fns.c (maybe_resize_hash_table): Use build_string instead of
1279 build_local_string, since we'd otherwise need a conditional
1280 USE_LOCAL_ALLOCA here, but this is just debugging output and is
1281 not worth the bother of optimization.
1282 * font.c (font_delete_unmatched): Remove by-hand code that
1283 observed MAX_ALLOCA limit, since it's now done automatically.
1284 * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
1285 since build_local_string needs its sa_alloc.
1286 * lisp.h (lisp_word_count): New function.
1287 (SAFE_ALLOCA_LISP): Use it.
1288 (USE_LOCAL_ALLOCA): New macro.
1289 (local_cons, make_local_vector, make_local_string):
1290 Observe the MAX_ALLOCA limit.
1291 (LISP_STRING_OVERHEAD): New constant.
1292 (make_local_string): Use it.
1293
1294 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
1295
1296 Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
1297 * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
1298 if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX
1299 and Solaris and it's likely to work on similar platforms.
1300
1301 Avoid signed integer overflow when converting Time to ptrdiff_t.
1302 * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
1303 New macros.
1304 (position_to_Time, Time_to_position): New functions.
1305 (gen_help_event, kbd_buffer_get_event): Use them.
1306 * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
1307 Go back to plain 'unsigned long', so that 'Time' is the same
1308 for both X and non-X builds; this is less likely to cause surprise.
1309 * termhooks.h: Remove compile-time check that Time and ptrdiff_t
1310 are the same size; this is no longer required.
1311
1312 * keyboard.c (make_lispy_event): Avoid unnecessary tests
1313 of bit 28 and of whether an unsigned value is negative.
1314 This simplifies the code a bit, and pacifies clang 3.4.
1315
1316 2014-09-24 Eli Zaretskii <eliz@gnu.org>
1317
1318 * systime.h (Time): Define as size_t, to be consistent with 64-bit
1319 Windows builds, where 'long' is a 32-bit type.
1320
1321 * w32inevt.h (w32_console_mouse_position): Update the argument
1322 types to use 'Time'.
1323
1324 * w32term.c (w32_mouse_position)
1325 (x_horizontal_scroll_bar_report_motion)
1326 (x_scroll_bar_report_motion): Update the argument types to use
1327 'Time'.
1328
1329 2014-09-24 Dmitry Antipov <dmantipov@yandex.ru>
1330
1331 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
1332 (struct input_event): ...unsigned bitfields. Likewise for
1333 `event_kind' member. Prefer unsigned for `code' and 'modifiers'.
1334 Use `timestamp' for HELP_EVENT position. Add compile-time assert.
1335 * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
1336 (kbd_buffer_get_event): Adjust users.
1337 (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
1338 (make_scroll_bar_position): New function, refactored out of...
1339 (make_lispy_event): ...adjusted user.
1340 * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
1341 * nsterm.m (ns_mouse_position, mouseUp):
1342 * term.c (term_mouse_position):
1343 * w32inevt.c (w32_console_mouse_position):
1344 * w32term.c (w32_mouse_position):
1345 * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
1346 (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
1347 Prefer enum and explicit enum members to integers and numeric values.
1348
1349 * chartab.c (uniprop_encode_value_numeric):
1350 * font.c (font_style_to_value): Use make_local_vector.
1351 (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
1352 * keymap.c (append_key): Use scoped_list1.
1353
1354 * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
1355 && __GNUC__ && !__clang__. Mention known problems. Adjust comment.
1356
1357 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
1358
1359 Fix some slow uses and misuses of strcat.
1360 * doc.c (get_doc_string):
1361 * gtkutil.c (get_utf8_string):
1362 * xsmfns.c (x_session_initialize):
1363 Avoid recomputation of string length.
1364 * ftfont.c (ftfont_spec_pattern):
1365 * xfns.c (xic_create_fontsetname):
1366 Don't assume output buffer is initially zero.
1367
1368 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
1369
1370 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
1371 All callers changed.
1372 * xterm.c (x_term_init): Use new functionality to avoid two needs
1373 to compute a string length.
1374
1375 * dispextern.h, xdisp.c (window_box_right_offset): Now static.
1376
1377 2014-09-23 Dmitry Antipov <dmantipov@yandex.ru>
1378
1379 Use known length of a Lisp string to copy it faster.
1380 * lisp.h (lispstrcpy): New function. Add comment.
1381 * callproc.c (child_setup):
1382 * dbusbind.c (xd_append_arg):
1383 * doc.c (get_doc_string):
1384 * font.c (Ffont_xlfd_name):
1385 * frame.c (xrdb_get_resource):
1386 * process.c (Fmake_network_process, network_interface_info):
1387 * w32fns.c (Fx_open_connection):
1388 * w32proc.c (sys_spawnve):
1389 * xfns.c (select_visual):
1390 * xfont.c (xfont_list):
1391 * xsmfns.c (x_session_initialize):
1392 * xterm.c (x_term_init): Use it.
1393
1394 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
1395
1396 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
1397 Problem reported by Dmitry Antipov in thread leading to:
1398 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
1399 This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
1400 the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
1401 remain unfixed.
1402 * callproc.c (call_process): Save and restore sa_avail.
1403 * lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
1404 (AVAIL_ALLOCA): New macro.
1405 (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
1406 Use it, and check against sa_avail rather than MAX_ALLOCA.
1407
1408 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
1409
1410 On OSX, do not free font-specific data more than once (Bug#18501).
1411 * macfont.m (macfont_close): Release and free font-specific data
1412 only if it wasn't previously freed.
1413
1414 2014-09-22 David Caldwell <david@porkrind.org> (tiny change)
1415
1416 * unexmacosx.c (dump_it): Improve error message.
1417
1418 2014-09-22 Juri Linkov <juri@jurta.org>
1419
1420 * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
1421 (Bug#10747, bug#18334)
1422
1423 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1424
1425 * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
1426 units in which the position is measured. (Bug#18493)
1427
1428 * xdisp.c (redisplay_internal): Force redisplay of all windows
1429 that show a buffer whose narrowing has changed. (Bug#18490)
1430
1431 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1432
1433 * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
1434 * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
1435 lines, draw the hollow-box and hbar cursors on the right side of
1436 cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for
1437 testing on X.
1438
1439 * xterm.c (x_draw_stretch_glyph_string):
1440 * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
1441 caused the block cursor to disappear on a TAB in R2L lines in
1442 every window except the leftmost one. Reported by Martin Rudalics
1443 <rudalics@gmx.at>.
1444
1445 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
1446
1447 Always use matched specpdl entry to record call arguments (Bug#18473).
1448 * lisp.h (record_in_backtrace): Adjust prototype.
1449 * eval.c (record_in_backtrace): Return current specpdl level.
1450 (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
1451 (eval_sub, Ffuncall): Record call arguments in matched specpdl
1452 entry and use that entry in call to backtrace_debug_on_exit.
1453 (apply_lambda): Likewise. Get current specpdl level as 3rd arg.
1454 (do_debug_on_call): Get current specpdl level as 2nd arg.
1455
1456 Prefer ptrdiff_t to int and avoid integer overflows.
1457 * fileio.c (make_temp_name):
1458 * font.c (font_parse_family_registry): Avoid integer
1459 overflow on string size calculation.
1460 * data.c (Faset): Likewise for byte index.
1461
1462 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1463
1464 Fix display of R2L lines in partial-width windows.
1465 * xdisp.c (init_iterator): Don't use it->bidi_p before it is
1466 assigned the correct value.
1467 (extend_face_to_end_of_line): Account for truncation and
1468 continuation glyphs in R2L rows when one of the fringes is not
1469 displayed.
1470 (display_line): Don't assign negative X offset to a row if we are
1471 going to produce a truncation glyph for it. When handling
1472 truncated R2L rows, consider the width of the left fringe instead
1473 of the right one.
1474 (produce_special_glyphs): Fix bogus assignments.
1475
1476 2014-09-22 Eli Zaretskii <eliz@gnu.org>
1477
1478 * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
1479 always set to a valid value. Make sure the size passed to alloca
1480 is always positive. (Bug#18516)
1481
1482 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
1483
1484 Avoid extra call to oblookup when interning symbols.
1485 * lisp.h (intern_driver): Add prototype.
1486 * lread.c (intern_driver): New function.
1487 (intern1, intern_c_string_1, Fintern):
1488 * font.c (font_intern_prop):
1489 * w32font.c (intern_font_name): Use it.
1490
1491 2014-09-21 Paul Eggert <eggert@cs.ucla.edu>
1492
1493 Minor improvements to new stack-allocated Lisp objects.
1494 * frame.h (FRAME_PARAMETER):
1495 Prefer scoped_list1 to local_list1 where either would do.
1496 * lisp.h (scoped_list4): New macro.
1497 (local_cons, local_list1, local_list2, local_list3, local_list4)
1498 (make_local_vector, make_local_string, build_local_string):
1499 Prefer functions to macros where either would do.
1500 * xdisp.c (build_desired_tool_bar_string):
1501 Prefer scoped_list4 to local_list4 where either would do.
1502
1503 2014-09-18 Dmitry Antipov <dmantipov@yandex.ru>
1504
1505 More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
1506 * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
1507 [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
1508 * frame.h (FRAME_PARAMETER): New macro.
1509 * dispnew.c (init_display):
1510 * fontset.c (Fset_fontset_font):
1511 * frame.c (x_default_parameter):
1512 * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
1513 * xfns.c (x_default_scroll_bar_color_parameter)
1514 (x_default_font_parameter, x_create_tip_frame): Use it.
1515 * editfns.c (Fpropertize): Use local_cons.
1516 * process.c (status_message): Use build_local_string.
1517 * xfont.c (xfont_open): Use make_local_string.
1518 * xdisp.c (build_desired_tool_bar_string): Use local_list4.
1519
1520 2014-09-18 Paul Eggert <eggert@cs.ucla.edu>
1521
1522 Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
1523 * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
1524 !__clang__. This works with GCC and with clang and is safer for
1525 compilers we don't know about.
1526 (local_cons): Rename parameter to make capture less likely.
1527
1528 2014-09-17 Samuel Bronson <naesten@gmail.com>
1529
1530 * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
1531
1532 2014-09-17 Paul Eggert <eggert@cs.ucla.edu>
1533
1534 Fix minor problems found by static checking.
1535 * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
1536 Remove; now unused.
1537 * buffer.h (decode_buffer): Doc and indentation fixes.
1538 * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
1539
1540 2014-09-17 Dmitry Antipov <dmantipov@yandex.ru>
1541
1542 Avoid clang-specific warnings.
1543 * buffer.c (init_buffer): Shut up -Wself-assign.
1544 * process.c (server_accept_connection): Shut up -Wunsequenced.
1545
1546 2014-09-16 Daniel Colascione <dancol@dancol.org>
1547
1548 * fns.c (sxhash): For symbols, use address as hash code.
1549
1550 2014-09-16 Dmitry Antipov <dmantipov@yandex.ru>
1551
1552 If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
1553 * charset.c (load_charset_map_from_file): Use scoped_list2
1554 and build_local_string.
1555 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
1556 * emacs.c (init_cmdargs, decode_env_path):
1557 * fileio.c (Fexpand_file_name):
1558 * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
1559 * frame.c (x_get_arg):
1560 * keyboard.c (safe_run_hooks_error):
1561 * lread.c (load_warn_old_style_backquotes):
1562 * xdisp.c (Fcurrent_bidi_paragraph_direction):
1563 * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
1564 * xselect.c (x_clipboard_manager_error_1)
1565 (x_clipboard_manager_save_all):
1566 * xterm.c (x_term_init): Use build_local_string.
1567
1568 Avoid more integer overflows on string size calculations.
1569 * category.c (Fmake_category_set):
1570 * xdisp.c (get_overlay_arrow_glyph_row):
1571 * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
1572
1573 2014-09-15 Eli Zaretskii <eliz@gnu.org>
1574
1575 * sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
1576 (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
1577 error message format. Use message_with_string to have non-ASCII
1578 file names properly displayed.
1579 (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
1580 when w32-unicode-filenames is non-nil, but not on Windows 9X,
1581 where these APIs are not available even in UNICOWS.DLL.
1582 Improve the format of error messages and include the file name in them
1583 where appropriate.
1584 (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
1585 call play-sound-functions, per documentation.
1586
1587 * w32.c (w32_get_long_filename, w32_get_short_filename):
1588 Constify the input file name arguments.
1589
1590 * w32.h (w32_get_long_filename, w32_get_short_filename):
1591 Update prototypes.
1592
1593 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru>
1594
1595 If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
1596 * lisp.h (local_cons, local_list1, local_list2, local_list3)
1597 [USE_LOCAL_ALLOCATORS]: New macros.
1598 [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
1599 (build_local_string): Avoid argument name expansion clash with
1600 make_local_string.
1601 * alloc.c (toplevel)
1602 [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
1603 Preprocessor guard to avoid impossible configuration.
1604 * charset.c (Ffind_charset_region, Ffind_charset_string):
1605 Use make_local_vector.
1606 * lread.c (read1, substitute_object_recurse): Use scoped_cons.
1607 * textprop.c (Fput_text_property, Fadd_face_text_property):
1608 Use scoped_list2.
1609 (copy_text_properties): Use local_cons and local_list3.
1610 * chartab.c (uniprop_table):
1611 * data.c (wrong_choice, wrong_range):
1612 * doc.c (get_doc_string):
1613 * editfns.c (format2):
1614 * fileio.c (Fexpand_file_name, auto_save_error):
1615 * fns.c (Fyes_or_no_p):
1616 * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
1617 * fontset.c (Fset_fontset_font):
1618 * keyboard.c (echo_add_key, echo_dash, parse_menu_item)
1619 (read_char_minibuf_menu_prompt):
1620 * keymap.c (silly_event_symbol_error, describe_vector):
1621 * menu.c (single_menu_item):
1622 * minibuf.c (Fread_buffer):
1623 * process.c (status_message, Fformat_network_address)
1624 (server_accept_connection): Use make_local_string and
1625 build_local_string. Prefer compound literals where appropriate.
1626
1627 2014-09-15 Daniel Colascione <dancol@dancol.org>
1628
1629 * fns.c (Fsort): Tweak sort docstring.
1630
1631 2014-09-15 Eli Zaretskii <eliz@gnu.org>
1632
1633 * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
1634 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
1635 set errno to EAGAIN instead, to allow the caller to retry the
1636 write after some waiting. Fixes deadlocks when Emacs exchanges a
1637 lot of data through the pipe. (Bug#18420)
1638
1639 * sound.c (Fplay_sound_internal): Encode the sound file name in
1640 the ANSI codepage. Expand it against data-directory, as per docs,
1641 not against the current directory. No need to make a local copy
1642 of the file name; pass the encoded file name directly to
1643 do_play_sound. (Bug#18463)
1644
1645 * w32.c (ansi_encode_filename): If w32_get_short_filename returns
1646 NULL, and the file name is not encodable in ANSI codepage, return
1647 the string with "?" replacement characters, which will fail the
1648 caller. This avoids returning a random value in that case.
1649
1650 2014-09-15 Martin Rudalics <rudalics@gmx.at>
1651
1652 * window.c (Fresize_mini_window_internal): Set w->total_lines
1653 from w->pixel_height (Bug#18422).
1654
1655 2014-09-15 Jan Djärv <jan.h.d@swipnet.se>
1656
1657 * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
1658 (toggleFullScreen:): Take frame_resize_pixelwise into account when
1659 setting resize increments (Bug#18435).
1660
1661 2014-09-15 Eli Zaretskii <eliz@gnu.org>
1662
1663 * xdisp.c (pos_visible_p): Properly save and restore the iterator
1664 state around the call to line_bottom, since it can move the
1665 iterator to another screen line. This fixes off-by-one errors in
1666 the reported row in some rare cases.
1667
1668 2014-09-14 Jan Djärv <jan.h.d@swipnet.se>
1669
1670 * callproc.c (init_callproc): Fix bug introduced at
1671 2014-09-07 (Bug#18474).
1672
1673 2014-09-13 Dmitry Antipov <dmantipov@yandex.ru>
1674
1675 Prefer ptrdiff_t to int and avoid integer overflows.
1676 * fileio.c (make_temp_name):
1677 * font.c (font_parse_family_registry): Avoid integer
1678 overflow on string size calculation.
1679 * data.c (Faset): Likewise for byte index.
1680
1681 2014-09-12 Detlev Zundel <dzu@member.fsf.org>
1682
1683 * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
1684
1685 2014-09-11 Dmitry Antipov <dmantipov@yandex.ru>
1686
1687 * lisp.h (make_local_string): Nitpick indent.
1688 * print.c (Fprin1_to_string): Remove unused GCPROs.
1689
1690 More debugging aids around GCPROs.
1691 * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
1692 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
1693 Minor restyle. If DEBUG_GCPRO, initialize extra fields.
1694
1695 * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
1696 bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
1697
1698 Remove redundant GCPROs around Ffuncall and Fapply calls.
1699 This is safe because Ffuncall protects all of its arguments by itself.
1700 * charset.c (map_charset_for_dump): Remove redundant GCPRO.
1701 * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
1702 (call6, call7): Likewise. Use compound literals where applicable.
1703 (run_hook_with_args_2): Use compound literal.
1704
1705 2014-09-11 Paul Eggert <eggert@cs.ucla.edu>
1706
1707 Pacify --enable-gcc-warnings when no window system is used.
1708 These warnings found that subscript error, so they seem worthwhile.
1709 * composite.c (char_composable_p): Simplify a bit.
1710 * frame.c (x_set_frame_parameters): Add an IF_LINT.
1711 * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
1712 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
1713 * window.c (set_window_scroll_bars):
1714 Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
1715 * frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
1716 Ignore -Wsuggest-attribute=const.
1717 * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
1718 (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
1719
1720 2014-09-10 Paul Eggert <eggert@penguin.cs.ucla.edu>
1721
1722 * charset.c (Fget_unused_iso_final_char): Fix subscript error.
1723 Use check_iso_charset_parameter instead of doing the checks by hand.
1724 (check_iso_charset_parameter): Move up. Check parameters a bit
1725 more carefully, and return true for 96-char sets. All callers changed.
1726
1727 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
1728
1729 Simplify lisp.h by removing the __COUNTER__ business.
1730 Problem reported by Dmitry Antipov in:
1731 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
1732 * lisp.h (make_local_vector, make_local_string)
1733 (build_local_string): Simplify by not bothering with __COUNTER__.
1734 The __COUNTER__ business wasn't working properly, and was needed
1735 only for hypothetical future expansion anyway.
1736
1737 2014-09-10 Alp Aker <alp.tekin.aker@gmail.com>
1738
1739 * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
1740 terms to determine bitmap color. (Bug#18437)
1741
1742 2014-09-10 Eli Zaretskii <eliz@gnu.org>
1743
1744 * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
1745 translation buffer.
1746
1747 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
1748
1749 * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
1750
1751 2014-09-10 Jan Djärv <jan.h.d@swipnet.se>
1752
1753 * xterm.c (handle_one_xevent): Detect iconified by looking at
1754 _NET_WM_STATE_HIDDEN.
1755
1756 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
1757
1758 * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
1759 These can generate a constant with the correct value but the wrong
1760 width, which doesn't work as a printf argument. All uses removed.
1761 Problem reported by Dmitry Antipov in:
1762 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
1763 (ENUMABLE): Remove; no longer needed.
1764 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
1765 Remove; no longer needed because of the above change.
1766 Each definiens moved to the only use.
1767
1768 Improve the experimental local and scoped allocation.
1769 * alloc.c (local_string_init, local_vector_init):
1770 New functions, defined if USE_LOCAL_ALLOCATORS.
1771 Mostly, these are moved here from lisp.h, as it's not
1772 clear it's worth making them inline.
1773 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
1774 (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
1775 USE_STACK_LISP_OBJECTS, not on a laundry list.
1776 (local_string_init, local_vector_init): New decls.
1777 (union Aligned_Cons): New type.
1778 (scoped_cons): Use it. Give up on the char trick, as it's a too
1779 much of a maintenance hassle; if someone wants this speedup
1780 they'll just need to convince their compiler to align properly.
1781 Conversely, use the speedup if struct Lisp_Cons happens to
1782 be aligned even without a directive. Better yet, help it along
1783 by using union Aligned_Cons rather than struct Lisp_Cons.
1784 (pointer_valid_for_lisp_object): Remove. This check is not
1785 necessary, since make_lisp_ptr is already doing it. All uses removed.
1786 (local_vector_init, local_string_init): Move to alloc.c.
1787 (build_local_vector): Remove this awkward macro, replacing with ...
1788 (make_local_vector): New macro, which acts more like a function.
1789 Use statement expressions and use __COUNTER__ to avoid macro
1790 capture. Fall back on functions if these features are not supported.
1791 (build_local_string, make_local_string): Likewise.
1792
1793 2014-09-09 Dmitry Antipov <dmantipov@yandex.ru>
1794
1795 * xterm.c (x_term_init): Consolidate duplicated code.
1796 [USE_LUCID]: Revert 2014-04-02 change (Bug#18403). Add comment.
1797 (x_delete_terminal): Do not close X connection fd (Bug#18403).
1798 Add eassert and mark dpyinfo as dead only if it was alive.
1799
1800 Add macros to allocate temporary Lisp objects with alloca.
1801 Respect MAX_ALLOCA and fall back to regular GC for large objects.
1802 * character.h (parse_str_as_multibyte): Move prototype to ...
1803 * lisp.h (parse_str_as_multibyte): ... here.
1804 (struct Lisp_Cons): Add GCALIGNED attribute if supported.
1805 (scoped_cons, scoped_list2, build_local_vector, build_local_string):
1806 New macros.
1807 (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
1808 (local_string_init): New functions.
1809 * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
1810 (init_alloc_once): Call it.
1811
1812 Cleanup last change and make all new stuff conditional.
1813 * lisp.h (build_local_string): Rename to ...
1814 (make_local_string): ... this macro.
1815 (build_local_string, scoped_list1, scoped_list3): New macros.
1816 (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
1817 and functions as such, use regular fallbacks otherwise.
1818 * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
1819 conditionally.
1820
1821 2014-09-08 Eli Zaretskii <eliz@gnu.org>
1822
1823 * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
1824 always make sure the marginal areas of the row are in sync with
1825 what the window wants. (Bug#18419)
1826
1827 * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
1828 existing binding of a variable, to avoid silently aborting
1829 commands that use specbind. (Bug#18331)
1830
1831 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
1832
1833 Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
1834 * coding.c (growable_destination): New function.
1835 (produce_chars): Use it for sanity checks. Do not fiddle with
1836 dst_end if the source and destination are both nil, as it's
1837 the caller's responsibility to avoid overlap.
1838 * keyboard.c (read_decoded_event_from_main_queue):
1839 The destination must be MAX_MULTIBYTE_LENGTH times the max source
1840 length, not 4 times, to prevent decode_coding_c_string from trying
1841 to reallocate a destination. This removes the need for the FIXME.
1842
1843 * callproc.c (exec_failed) [DOS_NT]: Define a dummy.
1844 All callers simplified. Add a comment about exec_failed, vfork,
1845 and alloca.
1846
1847 Adjust drag-and-drop fix when window is above top (Bug#18303).
1848 * xselect.c (x_fill_property_data): Don't let sign bit of negative
1849 XCDR bleed into XCAR's encoded value. Improve checks for
1850 out-of-range data while we're at it.
1851
1852 2014-09-07 Jan Djärv <jan.h.d@swipnet.se>
1853
1854 * xselect.c (x_fill_property_data): Handle negative XCDR when data
1855 is CONSP (Bug#18303).
1856
1857 2014-09-07 Eli Zaretskii <eliz@gnu.org>
1858
1859 * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
1860 'alloca' gets passed arguments larger than MAX_ALLOCA.
1861
1862 * font.c (MAX): Define if not defined elsewhere.
1863
1864 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
1865
1866 * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
1867 here for destination buffer, to work around what appears to be a
1868 bug in decode_coding_c_string when the source and destination are
1869 both C strings.
1870
1871 Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
1872 This follows up on the recent thread in emacs-devel on alloca; see:
1873 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
1874 This patch also cleans up alloca-related glitches noted while
1875 examining the code looking for unbounded alloca.
1876 * alloc.c (listn):
1877 * callproc.c (init_callproc):
1878 Rewrite to avoid need for alloca.
1879 * buffer.c (mouse_face_overlay_overlaps)
1880 (report_overlay_modification):
1881 * buffer.h (GET_OVERLAYS_AT):
1882 * coding.c (make_subsidiaries):
1883 * doc.c (Fsnarf_documentation):
1884 * editfns.c (Fuser_full_name):
1885 * fileio.c (Ffile_name_directory, Fexpand_file_name)
1886 (search_embedded_absfilename, Fsubstitute_in_file_name):
1887 * fns.c (Fmake_hash_table):
1888 * font.c (font_vconcat_entity_vectors, font_update_drivers):
1889 * fontset.c (fontset_pattern_regexp, Ffontset_info):
1890 * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
1891 (xrdb_get_resource, x_get_resource_string):
1892 * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
1893 * ftxfont.c (ftxfont_draw):
1894 * image.c (xbm_load, xpm_load, jpeg_load_body):
1895 * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
1896
1897 * keymap.c (Fdescribe_buffer_bindings, describe_map):
1898 * lread.c (openp):
1899 * menu.c (digest_single_submenu, find_and_call_menu_selection)
1900 (find_and_return_menu_selection):
1901 * print.c (PRINTFINISH):
1902 * process.c (Fformat_network_address):
1903 * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
1904 * search.c (search_buffer, Fmatch_data, Fregexp_quote):
1905 * sound.c (wav_play, au_play):
1906 * syntax.c (skip_chars):
1907 * term.c (tty_menu_activate, tty_menu_show):
1908 * textprop.c (get_char_property_and_overlay):
1909 * window.c (Fset_window_configuration):
1910 * xdisp.c (safe__call, next_overlay_change, vmessage)
1911 (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
1912 * xfaces.c (face_at_buffer_position):
1913 * xmenu.c (x_menu_show):
1914 Use SAFE_ALLOCA etc. instead of plain alloca, since the
1915 allocation size isn't bounded.
1916 * callint.c (Fcall_interactively): Redo memory_full check
1917 so that it can be done at compile-time on some platforms.
1918 * coding.c (MAX_LOOKUP_MAX): New constant.
1919 (get_translation_table): Use it.
1920 * callproc.c (call_process): Use SAFE_NALLOCA instead of
1921 SAFE_ALLOCA, to catch integer overflows on size calculation.
1922 (exec_failed) [!DOS_NT]: New function.
1923 (child_setup) [!DOS_NT]: Use it.
1924 * editfns.c (Ftranspose_regions):
1925 Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
1926 * editfns.c (check_translation):
1927 Allocate larger buffers on the heap.
1928 * eval.c (internal_lisp_condition_case):
1929 Check for MAX_ALLOCA overflow.
1930 * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
1931 (Fbase64_encode_region, Fbase64_decode_region):
1932 Avoid unnecessary calls to SAFE_FREE before 'error'.
1933 * buffer.c (mouse_face_overlay_overlaps):
1934 * editfns.c (Fget_pos_property, check_translation):
1935 * eval.c (Ffuncall):
1936 * font.c (font_unparse_xlfd, font_find_for_lface):
1937 * ftfont.c (ftfont_drive_otf):
1938 * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
1939 (menu_bar_items, tool_bar_items):
1940 * sound.c (Fplay_sound_internal):
1941 * xdisp.c (load_overlay_strings, dump_glyph_row):
1942 Use an ordinary auto buffer rather than alloca, since the
1943 allocation size is fixed and small.
1944 * ftfont.c: Include <c-strcase.h>.
1945 (matching_prefix): New function.
1946 (get_adstyle_property): Use it, to avoid need for alloca.
1947 * keyboard.c (echo_add_key):
1948 * keymap.c (describe_map): Use ptrdiff_t, not int.
1949 * keyboard.c (echo_add_key): Prefer sizeof to strlen.
1950 * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
1951 when counting bytes.
1952 * lisp.h (xlispstrdupa): Remove, replacing with ...
1953 (SAFE_ALLOCA_STRING): ... new macro with different API.
1954 This fixes a portability problem, namely, alloca result
1955 passed to another function. All uses changed.
1956 (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
1957 not MAX_ALLOCA - 1.
1958 * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
1959 (REGEX_ALLOCATE): New macros.
1960 (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
1961 (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
1962 Use them.
1963 * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
1964 by hand.
1965 (decode_mode_spec_coding): Store directly into buf rather than
1966 into an alloca temporary and copying the temporary to the buf.
1967
1968 2014-09-06 Eli Zaretskii <eliz@gnu.org>
1969
1970 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416)
1971
1972 2014-09-04 Jan D <jan.h.d@swipnet.se>
1973
1974 * xterm.c (x_term_init): Don't call x_session_initialize if running
1975 as a daemon (Bug#18375).
1976
1977 * xsmfns.c: Initialize ice_fd.
1978
1979 2014-09-04 Paul Eggert <eggert@cs.ucla.edu>
1980
1981 Less chatter in 'make' output.
1982 * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
1983 (am__v_at_, am__v_at_0, am__v_at_1): New macros, taken from Automake.
1984 ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
1985
1986 2014-09-03 Martin Rudalics <rudalics@gmx.at>
1987
1988 * buffer.c (scroll-bar-height): Fix typo in doc-string.
1989 * frame.c (Vdefault_frame_horizontal_scroll_bars):
1990 Remove variable.
1991 * nsfns.m (Fx_create_frame):
1992 * w32fns.c (Fx_create_frame):
1993 * xfns.c (Fx_create_frame): Default horizontal scroll bars to
1994 nil.
1995
1996 2014-09-03 Eli Zaretskii <eliz@gnu.org>
1997
1998 * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
1999 the reported row in the case of a window with a header line, by
2000 improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
2001 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384)
2002
2003 2014-09-03 Paul Eggert <eggert@cs.ucla.edu>
2004
2005 * eval.c (internal_lisp_condition_case): Don't overrun the stack
2006 when configured --with-wide-int on typical 32-bit platforms.
2007
2008 2014-09-03 Eli Zaretskii <eliz@gnu.org>
2009
2010 * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
2011 when HPOS is negative, for the benefit of R2L glyph rows whose
2012 newline overflows into the fringe.
2013
2014 2014-09-03 Ken Brown <kbrown@cornell.edu>
2015
2016 * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)
2017
2018 2014-09-02 Paul Eggert <eggert@cs.ucla.edu>
2019
2020 Minor cleanup of recent strlen-avoiding patch.
2021 * fileio.c (CHECK_LENGTH): Remove.
2022 Rewrite callers so that they don't need it.
2023 (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
2024 variable wasn't set.
2025
2026 2014-09-02 Dmitry Antipov <dmantipov@yandex.ru>
2027
2028 * fileio.c (CHECK_LENGTH): New macro.
2029 (Fexpand_file_name): Use it and get rid of a few more calls
2030 to strlen and strcat.
2031 * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
2032 * lisp.h (egetenv): ... because of a new inline function used to
2033 avoid calls to strlen for a compile-time constants.
2034
2035 * buffer.h (decode_buffer): New function.
2036 * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
2037 (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
2038 (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
2039 * data.c (Flocal_variables_p):
2040 * fileio.c (Fverify_visited_file_modtime):
2041 * marker.c (live_buffer): Use it.
2042
2043 2014-09-01 Dmitry Antipov <dmantipov@yandex.ru>
2044
2045 Avoid extra calls to strlen in filesystem I/O routines.
2046 * fileio.c (Fexpand_file_name): Avoid calls to strlen if
2047 the length of 'newdir' is known or may be precalculated.
2048 (file_accessible_directory_p): Prefer to pass Lisp_Object,
2049 not 'char *', and so use precalculated length.
2050 (Ffile_accessible_directory_p):
2051 * callproc.c (encode_current_directory, init_callproc):
2052 * charset.c (init_charset):
2053 * lread.c (load_path_check, load_path_default): Adjust users.
2054 * lisp.h (file_accessible_directory_p): Tweak prototype.
2055
2056 2014-09-01 Eli Zaretskii <eliz@gnu.org>
2057
2058 * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
2059 locales.
2060
2061 2014-09-01 Paul Eggert <eggert@cs.ucla.edu>
2062
2063 --enable-silent-rules now suppresses more chatter.
2064 * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
2065 (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
2066 (am__v_CCLD_1): New macros, taken from Automake.
2067 (.c.o, .m.o, temacs$(EXEEXT)): Use them.
2068
2069 Clean up extern decls a bit.
2070 * bytecode.c: Include blockinput.h and keyboard.h rather
2071 than rolling their APIs by hand.
2072 * emacs.c: Include regex.h and rely on its and lisp.h's API
2073 rather than rolling them by hand.
2074 * lastfile.c: Include lisp.h, to check this file's API.
2075 * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
2076 New decls.
2077 * regex.h (re_max_failures): New decl.
2078 * unexcw.c, unexmacosx.c, unexw32.c:
2079 Rely on lisp.h's API rather than rolling it by hand.
2080 * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
2081 Declare at top level, to pacify GCC -Wnested-externs.
2082
2083 2014-08-31 Eli Zaretskii <eliz@gnu.org>
2084
2085 * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
2086 clipping rectangle become negative (i.e. large positive, since
2087 it's an unsigned data type). This can happen in R2L hscrolled
2088 glyph rows, and caused us to draw the cursor glyph on the fringe.
2089 For the details, see
2090 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
2091
2092 2014-08-31 Ken Brown <kbrown@cornell.edu>
2093
2094 * gmalloc.c: Don't include <stdlib.h>. Declare system malloc and
2095 friends before defining hybrid_malloc and friends if HYBRID_MALLOC
2096 is defined. (Bug#18368)
2097
2098 2014-08-30 Paul Eggert <eggert@cs.ucla.edu>
2099
2100 Vector-sorting fixes (Bug#18361).
2101 It's not safe to call qsort or qsort_r, since they have undefined
2102 behavior if the user-specified predicate is not a total order.
2103 Also, watch out for garbage-collection while sorting vectors.
2104 * fns.c: Include <vla.h>.
2105 (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
2106 (sort_vector_compare): Remove, replacing with ....
2107 (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
2108 ... these new functions.
2109 (sort_vector): Rewrite to use the new functions.
2110 GCPRO locals, since the predicate can invoke the GC.
2111 Since it's in-place return void; caller changed.
2112 (merge): Use 'inorder', for clarity.
2113
2114 * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
2115 One can't hoist this out of the 'if', because intervening calls to
2116 newlocale, twolower, etc. can change errno.
2117
2118 2014-08-30 Eli Zaretskii <eliz@gnu.org>
2119
2120 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
2121 wording of the error messages.
2122 (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
2123 sets errno.
2124
2125 * w32proc.c (get_lcid_callback): Accept locale specifications
2126 without the country part, as in "enu" vs "enu_USA".
2127 (w32_compare_strings): Signal an error if a locale was specified,
2128 but couldn't be translated into a valid LCID.
2129
2130 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
2131
2132 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
2133
2134 2014-08-29 Paul Eggert <eggert@cs.ucla.edu>
2135
2136 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
2137 errno after towlower_l. errno's value is not specified after
2138 towlower_l. Instead, assume that towlower_l returns its argument
2139 on failure, which is portable in practice.
2140
2141 2014-08-29 Eli Zaretskii <eliz@gnu.org>
2142
2143 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
2144
2145 * w32proc.c (w32_compare_strings): Accept additional argument
2146 IGNORE_CASE. Set up the flags for CompareStringW to ignore case
2147 if requested. If w32-collate-ignore-punctuation is non-nil, add
2148 NORM_IGNORESYMBOLS to the flags.
2149 (LINGUISTIC_IGNORECASE): Define if not already defined.
2150 (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
2151
2152 * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
2153 change.
2154
2155 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
2156
2157 * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
2158 Define substitutes for platforms that lack them.
2159 (str_collate): Add arguments locale and ignore_case.
2160
2161 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
2162 Add optional arguments LOCALE and IGNORE-CASE.
2163
2164 * lisp.h (str_collate): Adapt argument list.
2165
2166 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru>
2167
2168 Add vectors support to Fsort.
2169 * fns.c (sort_vector, sort_vector_compare): New functions.
2170 (sort_list): Likewise, refactored out of ...
2171 (Fsort): ... adjusted user. Mention vectors in docstring.
2172 (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
2173 * alloc.c (make_save_int_obj): New function.
2174 * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
2175 (make_save_int_obj): Add prototype.
2176
2177 Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
2178 * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
2179 Conditionally define to match system's qsort_r signature.
2180 (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
2181
2182 2014-08-28 Ken Brown <kbrown@cornell.edu>
2183
2184 Add support for HYBRID_MALLOC, allowing the use of gmalloc before
2185 dumping and the system malloc after dumping. (Bug#18222)
2186
2187 * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
2188 Define as macros, expanding to hybrid_malloc, etc.
2189 (HYBRID_GET_CURRENT_DIR_NAME): New macro.
2190 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
2191 macro.
2192 * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
2193 full implementation on Cygwin. Remove Cygwin-specific code that
2194 is no longer needed.
2195 (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
2196 Redefine as macros expanding to gmalloc, grealloc, etc.
2197 (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
2198 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
2199 (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
2200 (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
2201 [HYBRID_MALLOC]:
2202 (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
2203 (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
2204 HAVE_POSIX_MEMALIGN)]: New functions.
2205 * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
2206 HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
2207 hybrid_aligned_alloc; declare.
2208 (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
2209 HAVE_POSIX_MEMALIGN)]: Define.
2210 (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
2211 * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
2212 Define as macro, expanding to gget_current_dir_name, and define
2213 the latter.
2214 * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
2215 malloc_enable_thread(). Don't initialize malloc.
2216 * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
2217 no longer defined on Cygwin).
2218 (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
2219 * sheap.c (bss_sbrk_buffer_end): New variable.
2220 * unexcw.c (__malloc_initialized): Remove variable.
2221 * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
2222 SYSTEM_MALLOC.
2223 * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
2224 Vmemory_full.
2225
2226 2014-08-28 Martin Rudalics <rudalics@gmx.at>
2227
2228 * w32term.c (w32_horizontal_scroll_bar_handle_click):
2229 In `event->y' return entire range (the size of the scroll bar minus
2230 that of the thumb).
2231 * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
2232 return entire range (the scaled size of the scroll bar minus
2233 that of the slider). In `portion' return the scaled position of
2234 the slider.
2235 (xaw_jump_callback): Restore part of code for vertical scroll
2236 bar broken in change from 2014-07-27.
2237 (xaw_scroll_callback): Provide incremental scrolling with
2238 horizontal scroll bars.
2239
2240 2014-08-28 Eli Zaretskii <eliz@gnu.org>
2241
2242 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
2243
2244 * indent.c (Fvertical_motion): Fix vertical motion up through a
2245 display property after a newline. (Bug#18276)
2246
2247 * xdisp.c (display_line): Don't assume that the call to
2248 reseat_at_next_visible_line_start ends up at a character
2249 immediately following the newline on the previous line.
2250 Avoids setting the ends_at_zv_p flag on screen lines that are not at or
2251 beyond ZV, which causes infloop in redisplay. For the details, see
2252 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
2253
2254 * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
2255 coordinate for hscrolled R2L screen lines. (Bug#18277)
2256
2257 2014-08-28 Paul Eggert <eggert@cs.ucla.edu>
2258
2259 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
2260 (Bug#18051).
2261
2262 2014-08-27 Eli Zaretskii <eliz@gnu.org>
2263
2264 * syntax.c (scan_lists): Don't examine positions before BEGV.
2265 (Bug#18339)
2266
2267 2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
2268
2269 Improve robustness of new string-collation code (Bug#18051).
2270 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
2271 (newlocale, wcscoll_l): Define substitutes for platforms that
2272 lack them, so as to simplify the mainline code.
2273 (str_collate): Simplify the code by assuming the above definitions.
2274 Use wcscoll_l, not uselocale, as uselocale is too fragile.
2275 For example, the old version left the Emacs in the wrong locale if
2276 wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
2277 result. Report an error if newlocale fails.
2278
2279 2014-08-27 Michael Albinus <michael.albinus@gmx.de>
2280
2281 * lisp.h (str_collate):
2282 * sysdep.c (str_collate): Return int.
2283 (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
2284
2285 2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2286
2287 Fix some glitches in previous change.
2288 * sysdep.c (stack_direction): Replace stack_grows_down
2289 to simplify calculation of stack boundaries.
2290 (handle_sigsegv): Check whether we really crash somewhere near
2291 to stack boundary, and handle fatal signal as usual if not.
2292 (init_sigsegv): Adjust accordingly.
2293 * keyboard.c (Vtop_level_message): Rename to
2294 Vinternal__top_level_message, as suggested by Stefan Monnier in
2295 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
2296 All related users changed.
2297
2298 2014-08-26 Dmitry Antipov <dmantipov@yandex.ru>
2299
2300 Handle C stack overflow caused by too nested Lisp evaluation.
2301 * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
2302 siglongjmp point to transfer control from SIGSEGV handler.
2303 * keyboard.c (return_to_command_loop, recover_top_level_message)
2304 [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
2305 (regular_top_level_message): New variable.
2306 (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
2307 exit from SIGSEGV handler and adjust message displayed by Vtop_level
2308 if appropriate.
2309 (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
2310 new variables described above.
2311 * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
2312 (stack_grows_down, sigsegv_stack, handle_sigsegv)
2313 [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
2314 (init_sigsegv): New function.
2315 (init_signals): Use it.
2316
2317 2014-08-25 Ken Brown <kbrown@cornell.edu>
2318
2319 * emacs.c (main): Remove use of obsolete macro
2320 G_SLICE_ALWAYS_MALLOC.
2321
2322 2014-08-25 Eli Zaretskii <eliz@gnu.org>
2323
2324 Implement locale-sensitive string collation for MS-Windows.
2325 * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
2326 New functions. (Bug#18051)
2327
2328 * w32.h (w32_compare_strings): Add prototype.
2329
2330 * w32.c <g_b_init_compare_string_w>: New global flag.
2331 (globals_of_w32): Initialize it.
2332
2333 * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
2334
2335 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
2336 [WINDOWSNT]: Call str_collate on MS-Windows.
2337
2338 2014-08-25 Dmitry Antipov <dmantipov@yandex.ru>
2339
2340 One more minor cleanup of font subsystem.
2341 * font.h (struct font_driver): Convert text_extents to
2342 return void because returned value is never actually used.
2343 * macfont.m (macfont_text_extents):
2344 * w32font.c (w32font_text_extents):
2345 * xftfont.c (xftfont_text_extents): Adjust to return void
2346 and assume that 'metrics' argument is always non-NULL.
2347 * ftfont.c (ftfont_text_extents):
2348 * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset.
2349
2350 2014-08-25 Paul Eggert <eggert@cs.ucla.edu>
2351
2352 Minor cleanups of str_collate fix (Bug#18051).
2353 * fns.c (str_collate): Move decl from here ...
2354 * lisp.h (str_collate): ... to here.
2355 * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
2356 Remove unnecessary casts. Use SAFE_NALLOCA to avoid
2357 potential problems with integer overflow. Don't assume
2358 setlocale succeeds. Remove unnecessary test before restoring
2359 locale via setlocale, and free the copied setlocale string
2360 when done with it.
2361
2362 2014-08-24 Michael Albinus <michael.albinus@gmx.de>
2363
2364 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
2365
2366 * sysdep.c (str_collate): New function. (Bug#18051)
2367
2368 2014-08-23 Karol Ostrovsky <karol.ostrovsky@gmail.com> (tiny change)
2369
2370 * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
2371 if the initial "rm -f" fails. This is for MinGW builds, where
2372 MS-Windows will not allow deleting the executable file of a
2373 running program.
2374
2375 2014-08-20 Eli Zaretskii <eliz@gnu.org>
2376
2377 * w32term.c (w32_scroll_bar_handle_click)
2378 (w32_horizontal_scroll_bar_handle_click)
2379 (x_scroll_bar_report_motion)
2380 (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
2381 SB_THUMBTRACK, use the 32-bit position information returned by
2382 GetScrollInfo, not the 16-bit information returned in the Windows
2383 message sent to us.
2384
2385 2014-08-19 Eli Zaretskii <eliz@gnu.org>
2386
2387 * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
2388 second coordinate ('y') reported for dragging the horizontal
2389 scroll bar thumb.
2390
2391 2014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2392
2393 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
2394 and text area-relative x-coordinates.
2395
2396 2014-08-17 Eli Zaretskii <eliz@gnu.org>
2397
2398 Avoid overwriting the reversed_p flags in the glyph matrices when
2399 init_iterator or start_display are called.
2400 * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
2401 the glyph row here.
2402 (tool_bar_height, redisplay_tool_bar, try_window)
2403 (try_window_reusing_current_matrix, try_window_id)
2404 (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
2405 reversed_p flag of the iterator's glyph row where the glyph row
2406 is going to be redrawn.
2407
2408 2014-08-16 Paul Eggert <eggert@cs.ucla.edu>
2409
2410 * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
2411
2412 2014-08-16 Martin Rudalics <rudalics@gmx.at>
2413
2414 * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
2415 of emacs_event return length from si.nPage to si.nMax.
2416 * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
2417 interchange start and end of thumb.
2418
2419 2014-08-15 Ken Brown <kbrown@cornell.edu>
2420
2421 * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
2422 ERRORCHECK mutexes. (Bug#18222)
2423
2424 2014-08-12 Martin Rudalics <rudalics@gmx.at>
2425
2426 * frame.c (set_menu_bar_lines_1): Remove.
2427 (set_menu_bar_lines): Call change_frame_size instead of
2428 set_menu_bar_lines_1.
2429
2430 2014-08-11 Jan Djärv <jan.h.d@swipnet.se>
2431
2432 * nsfns.m (Fx_create_frame): Call adjust_frame_size,
2433 set f->official.
2434
2435 2014-08-11 Glenn Morris <rgm@gnu.org>
2436
2437 * fileio.c: Revert 2013-01-31 change, which chose coding system for
2438 writing before backing up, since it causes a more serious problem
2439 than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
2440 (choose_write_coding_system): No longer callable from Lisp.
2441 Move last piece back here from Fwrite_region.
2442 (Fwrite_region, syms_of_fileio): Update for above changes.
2443
2444 2014-08-11 Martin Rudalics <rudalics@gmx.at>
2445
2446 * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
2447 (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
2448 (Fwindow_new_pixel, Fset_window_new_pixel)
2449 (Fset_window_new_total, Fset_window_new_normal)
2450 (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
2451 See also:
2452 http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
2453
2454 2014-08-11 Eli Zaretskii <eliz@gnu.org>
2455
2456 * fontset.c (Finternal_char_font): Recompute basic faces if the
2457 frame's face cache was cleared. (Bug#18162)
2458
2459 2014-08-11 Dmitry Antipov <dmantipov@yandex.ru>
2460
2461 Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
2462 * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
2463 base buffer's undo list.
2464
2465 2014-08-10 Reuben Thomas <rrt@sc3d.org>
2466
2467 Fix a couple of recent inadvertent breaks of the MSDOS port.
2468 * msdos.c: include required menu.h
2469 * term.c: set correct menu_show_hook on MSDOS.
2470
2471 2014-08-10 Martin Rudalics <rudalics@gmx.at>
2472
2473 Fix handling of menu bar line on TTY frames (Bug#18136)
2474 (Bug#18196).
2475 * dispnew.c (handle_window_change_signal):
2476 * keyboard.c (Fsuspend_emacs): Call change_frame_size with
2477 frame's menu bar lines subtracted from height.
2478 * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
2479 frames.
2480 (adjust_frame_size): Count in menu bar when setting FrameRows.
2481 (make_terminal_frame): When setting up the frame's lines and
2482 text height don't count in the menu bar.
2483 (Fmake_terminal_frame): Call adjust_frame_size with menu bar
2484 lines subtracted from height.
2485 (do_switch_frame): Set tty's FrameRows to number of total lines
2486 of frame.
2487 (Fframe_pixel_height, Fframe_pixel_width): If no window system
2488 is used, return total number of lines and columns.
2489 * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
2490 of FRAME_LINES.
2491 * term.c (OUTPUT, tty_set_terminal_modes)
2492 (tty_set_terminal_window, tty_set_scroll_region)
2493 (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
2494 (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
2495 Use FRAME_TOTAL_LINES instead of FRAME_LINES.
2496 (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
2497 Call change_frame_size with frame's menu bar lines subtracted
2498 from height.
2499 * w32console.c (w32con_clear_to_end, w32con_clear_frame)
2500 (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
2501 FRAME_LINES.
2502
2503 2014-08-09 Reuben Thomas <rrt@sc3d.org>
2504
2505 * alloc.c (Fmemory_info): Remove a stray brace.
2506
2507 * process.c: Fix a comment typo.
2508
2509 * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
2510
2511 2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
2512
2513 * widgetprv.h (EmacsFramePart): Remove font.
2514
2515 * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
2516 (resources, setup_frame_cursor_bits): Remove unused variables and
2517 functions, esp. wrt. font (Bug#18227).
2518
2519 2014-08-07 Paul Eggert <eggert@cs.ucla.edu>
2520
2521 * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
2522
2523 2014-08-07 Reuben Thomas <rrt@sc3d.org>
2524
2525 Refer to MS-DOS using the same name everywhere.
2526
2527 * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
2528 commit.
2529 * xfaces.c: ditto.
2530
2531 2014-08-05 Martin Rudalics <rudalics@gmx.at>
2532
2533 * w32term.c (w32_redeem_scroll_bar):
2534 * xterm.c (XTredeem_scroll_bar): Revert part of last change by
2535 not redeeming scroll bars that have been turned off.
2536
2537 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
2538
2539 * keyboard.c (safe_run_hooks): Follow the convenient style to bind
2540 inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See
2541 <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
2542 (safe_run_hook_funcall): Adjust accordingly.
2543
2544 2014-08-04 Martin Rudalics <rudalics@gmx.at>
2545
2546 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
2547 Condition correctly according to toolkit used.
2548 * frame.c (make_initial_frame, make_terminal_frame)
2549 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
2550 (Vdefault_frame_horizontal_scroll_bars): Correctly condition
2551 assignments according to presence of toolkit scrollbars.
2552 * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
2553 Condition correctly according to toolkit used.
2554 * window.c (set_window_scroll_bars): Set horizontal scroll bar
2555 only if toolkit supports it.
2556 * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
2557 present.
2558 * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
2559 non-toolkit builds.
2560 (XTredeem_scroll_bar): Always redeem scroll bar if present.
2561
2562 2014-08-04 Dmitry Antipov <dmantipov@yandex.ru>
2563
2564 * keyboard.c (safe_run_hook_funcall): Avoid consing around
2565 Vinhibit_quit and prefer internal_condition_case_n to pass args.
2566 (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
2567 (safe_run_hooks): Remove comment which is not relevant any more.
2568
2569 2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
2570
2571 Don't let big frames overrun the stack.
2572 * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
2573 Use SAFE_NALLOCA, not alloca.
2574
2575 Fix bug with clang + directory_files_internal + GC (Bug#16986).
2576 * dired.c (directory_files_internal): Use a volatile variable
2577 to prevent the compiler from optimizing away all copies of a local.
2578 I wonder how many other GC-related bugs like this lurk elsewhere?
2579
2580 Avoid 100% CPU utilization on ssh session exit (Bug#17691).
2581 * xterm.h (struct x_display_info): New member 'connection'.
2582 * xterm.c (x_term_init, x_delete_terminal): Set and use it,
2583 so that x_delete_terminal has a file descriptor to pass to
2584 delete_keyboard_wait_descriptor.
2585
2586 Don't mishandle year-9999 dates (Bug#18176).
2587 * editfns.c (decode_time_components): Store an invalid timespec
2588 on overflow, instead of returning false, so that the caller can
2589 distinguish overflow from other errors.
2590 (lisp_time_argument, lisp_seconds_argument): If the time is out
2591 of range, signal a time overflow instead of an invalid time spec.
2592 * keyboard.c (decode_timer): Treat time overflow like other
2593 timespec errors.
2594
2595 Avoid undefined behavior with signed left shift.
2596 Caught by 'gcc -fsanitize=undefined'.
2597 * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
2598 * dispnew.c (line_hash_code, scrolling):
2599 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
2600 Use 'unsigned', not 'int', for line hashes.
2601 (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
2602
2603 2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
2604
2605 Make compare-strings more compatible with old behavior (Bug#17903).
2606 * fns.c (Fcompare_strings): Silently bring too-large ends into range.
2607
2608 2014-08-02 Jan Djärv <jan.h.d@swipnet.se>
2609
2610 * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
2611 Don't add label between left and right buttons (Bug#18129).
2612
2613 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
2614
2615 Make functions static that no longer need to be extern.
2616 * frame.c, frame.h (set_menu_bar_lines):
2617 * keyboard.c (Qleftmost, Qrightmost):
2618 * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
2619 (x_set_internal_border_width):
2620 Now static.
2621
2622 2014-08-01 Eli Zaretskii <eliz@gnu.org>
2623
2624 Fix display of R2L lines when the last character fits only partially.
2625 See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
2626 for the details.
2627 * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
2628 R2L row is visible only partially, give the row a negative x
2629 offset.
2630 (display_line): Fix the calculation of the glyph whose pixel width
2631 is used to decide whether the last produced glyph fits on the
2632 line. When the last glyph fits only partially, give the row a
2633 negative x offset.
2634
2635 Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
2636 * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
2637 pixel width of the first glyph that is hscrolled from display.
2638 (display_line): In R2L glyph rows, don't give a negative offset to
2639 row->x when the first glyph begins before first_visible_x.
2640
2641 * xdisp.c (display_line): If called with iterator set up to write
2642 to a marginal area, delay the call to handle_line_prefix until we
2643 switch back to the text area. (Bug#18035)
2644
2645 * .gdbinit (xwindow): The members total_cols, total_lines,
2646 left_col, and top_line are C integers (and has been so for the
2647 last 1.5 years).
2648
2649 2014-08-01 Andreas Schwab <schwab@suse.de>
2650
2651 * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
2652 kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
2653
2654 2014-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2655
2656 * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
2657 (timerfd_callback): Ignore weird events with no data. Add tight
2658 assertions and comments.
2659 (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
2660 disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor.
2661
2662 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
2663
2664 * frame.c (x_set_frame_parameters): Fix typo in previous patch.
2665 I had confused && with ||.
2666
2667 2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
2668
2669 Simplify timerfd configuration and fix some minor glitches.
2670 * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
2671 (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
2672 Fall back on timer_create if timerfd_create fails at runtime.
2673 (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
2674 kernel primitives to do resolution. All uses removed.
2675 (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
2676 (turn_on_atimers): Clear timer_create-based timers too,
2677 for consistency.
2678
2679 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
2680 Without this change, the code can access the local variable 'width'
2681 even when it has not been initialized, and likewise for 'height';
2682 in either case this leads to undefined behavior.
2683
2684 2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2685
2686 * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
2687 necessary, put horizontal scroll bar resources as well. See
2688 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
2689 * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
2690
2691 2014-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2692
2693 * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
2694 background value to match the resource of its vertical counterpart.
2695
2696 2014-07-29 Martin Rudalics <rudalics@gmx.at>
2697
2698 * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
2699 FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
2700
2701 2014-07-28 Martin Rudalics <rudalics@gmx.at>
2702
2703 * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
2704 change that added the top margin height to the requested height
2705 and revert (undocumented) part of 2014-07-28 change that changed
2706 the logic of whether a size change occurred.
2707
2708 2014-07-28 Eli Zaretskii <eliz@gnu.org>
2709
2710 * .gdbinit (xwindow): The members total_cols, total_lines,
2711 left_col, and top_line are C integers (and has been so for the
2712 last 1.5 years).
2713
2714 * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
2715 now C integers.
2716
2717 2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
2718
2719 On GNU/Linux, use timerfd for asynchronous timers.
2720 * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
2721 (toplevel): Rename alarm_timer_ok to special_timer_available.
2722 [HAVE_TIMERFD]: Declare timerfd.
2723 [HAVE_CLOCK_GETRES]: Declare resolution.
2724 (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
2725 system timer resolution.
2726 (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
2727 (timerfd_callback) [HAVE_TIMERFD]: New function.
2728 (atimer_result, debug_timer_callback, Fdebug_timer_check)
2729 [ENABLE_CHECKING]: New function for the sake of automated tests.
2730 (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
2731 [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
2732 [ENABLE_CHECKING]: Defsubr test function.
2733 * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
2734 * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
2735 * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
2736
2737 Fix --without-x build and pacify --enable-gcc-warnings.
2738 Problems reported in Bug#18122 and Bug#18124.
2739 * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
2740 (frame_windows_min_size): Now static.
2741 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
2742 Define as no-op.
2743 (adjust_frame_size): Always declare prototype.
2744
2745 Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
2746 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
2747 * atimer.c (timerfd_callback): Always read expiration data.
2748 Add comment.
2749 (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
2750 * process.c (add_timer_wait_descriptor): Add timer descriptor
2751 to input_wait_mask and non_process_wait_mask as well.
2752
2753 2014-07-28 Paul Eggert <eggert@cs.ucla.edu>
2754
2755 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
2756
2757 2014-07-27 Jan Djärv <jan.h.d@swipnet.se>
2758
2759 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
2760 Reinstate code removed by the prevoius commit to this file.
2761
2762 2014-07-27 Martin Rudalics <rudalics@gmx.at>
2763
2764 * buffer.h (struct buffer): New fields scroll_bar_height and
2765 horizontal_scroll_bar_type.
2766 * buffer.c (bset_scroll_bar_height)
2767 (bset_horizontal_scroll_bar_type): New functions.
2768 (Fbuffer_swap_text): Handle old_pointm field.
2769 (init_buffer_once): Set defaults for scroll_bar_height and
2770 horizontal_scroll_bar_type.
2771 (syms_of_buffer): New variables scroll_bar_height and
2772 horizontal_scroll_bar_type.
2773 * dispextern.h (window_part): Rename ON_SCROLL_BAR to
2774 ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR.
2775 (set_vertical_scroll_bar): Remove prototype.
2776 (x_change_tool_bar_height): Add prototype.
2777 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
2778 (window_to_frame_vpos, update_frame_1, scrolling, init_display):
2779 Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
2780 and FRAME_LINES.
2781 (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
2782 (update_window): Start mode_line_row->y after horizontal scroll
2783 bar.
2784 (change_frame_size_1): Call adjust_frame_size.
2785 (init_display): When changing the size of a tty frame do not
2786 pass height of menu bar.
2787 (Qframe_windows_min_size): New symbol.
2788 * frame.h (struct frame): List tool bar fields after menu bar
2789 fields. Add official, total_lines, horizontal_scroll_bars,
2790 config_scroll_bar_height and config_scroll_bar_lines fields.
2791 (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
2792 (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
2793 (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
2794 (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
2795 (FRAME_WINDOWS_HEIGHT): New macros.
2796 (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
2797 (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
2798 (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
2799 horizontal scroll bar.
2800 (frame_inhibit_resize, adjust_frame_size)
2801 (frame_windows_min_size): Add declarations.
2802 (Qscroll_bar_height, Qhorizontal_scroll_bars)
2803 (x_set_scroll_bar_default_height, x_set_left_fringe)
2804 (x_set_right_fringe, x_set_vertical_scroll_bars)
2805 (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
2806 (x_set_scroll_bar_height): Add external declarations.
2807 * frame.c: (frame_inhibit_resize, frame_windows_min_size)
2808 (adjust_frame_size): New functions.
2809 (make_frame): Initial horizontal_scroll_bars field.
2810 Use SET_FRAME_LINES. Don't allow horizontal scroll bar in
2811 minibuffer window.
2812 (make_initial_frame, make_terminal_frame): No horizontal scroll
2813 bar in initial and terminal frames. Use adjust_frame_size.
2814 (Fframe_total_cols): Fix doc-string.
2815 (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
2816 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
2817 Rewrite using adjust_frame_size.
2818 (Qscroll_bar_height, Qhorizontal_scroll_bars)
2819 (Qframe_windows_min_size): New symbols.
2820 (x_set_frame_parameters): Remove call of check_frame_size.
2821 (x_report_frame_params): Return scroll_bar_height value.
2822 (x_set_left_fringe, x_set_right_fringe): New functions.
2823 (adjust_frame_height, x_set_internal_border_width)
2824 (x_set_fringe_width): Remove.
2825 (x_set_internal_border_width, x_set_vertical_scroll_bars)
2826 (x_set_scroll_bar_width, x_set_right_divider_width)
2827 (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
2828 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
2829 New functions.
2830 (x_figure_window_size): Rewrite to make frame display the
2831 expected number of lines.
2832 (Vdefault_frame_scroll_bars): Rewrite doc-string.
2833 (Vdefault_frame_horizontal_scroll_bars)
2834 (Vframe_initial_frame_tool_bar_height)
2835 (frame_inhibit_implied_resize): New variables.
2836 * fringe.c (compute_fringe_widths): Remove.
2837 * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
2838 (xg_create_horizontal_scroll_bar)
2839 (xg_update_horizontal_scrollbar_pos)
2840 (xg_set_toolkit_horizontal_scroll_bar_thumb)
2841 (xg_get_default_scrollbar_height)
2842 (xg_clear_under_internal_border): Extern.
2843 * gtkutil.c (xg_frame_resized): Don't call
2844 do_pending_window_change.
2845 (xg_frame_set_char_size): Use adjust_frame_size.
2846 (style_changed_cb): Call update_theme_scrollbar_height and
2847 x_set_scroll_bar_default_height.
2848 (x_wm_set_size_hint): Don't call check_frame_size.
2849 (update_theme_scrollbar_height)
2850 (xg_get_default_scrollbar_height)
2851 (xg_create_horizontal_scroll_bar)
2852 (xg_update_horizontal_scrollbar_pos)
2853 (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
2854 (xg_create_scroll_bar): Set horizontal slot of bar.
2855 (xg_initialize): Call update_theme_scrollbar_height.
2856 (xg_clear_under_internal_border): No more static.
2857 * insdel.c (adjust_suspend_auto_hscroll): New function.
2858 (adjust_markers_for_delete, adjust_markers_for_insert)
2859 (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
2860 * keyboard.c (readable_events, discard_mouse_events)
2861 (make_lispy_event): Handle horizontal scroll bar click events.
2862 (Fsuspend_emacs): When changing the size of a tty frame do not
2863 pass height of menu bar.
2864 (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
2865 (Qright, Qleftmost, Qrightmost): New symbols.
2866 * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
2867 FRAME_LINES.
2868 * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
2869 * nsfns.m (x_set_internal_border_width): New function.
2870 * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
2871 Remove extended fringe code.
2872 (x_set_window_size, x_new_font): Don't call
2873 compute_fringe_widths.
2874 * term.c (Fresume_tty): When changing the size of a tty frame do
2875 not pass height of menu bar.
2876 (clear_tty_hooks, set_tty_hooks):
2877 Clear horizontal_scroll_bar_hook.
2878 (init_tty): Frame has no horizontal scroll bars.
2879 * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
2880 scroll_bar_before_handle, scroll_bar_horizontal_handle,
2881 scroll_bar_after_handle, scroll_bar_left_arrow,
2882 scroll_bar_right_arrow, scroll_bar_to_leftmost and
2883 scroll_bar_to_rightmost entries.
2884 (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
2885 (struct terminal): Add set_horizontal_scroll_bar_hook.
2886 * w32console.c (initialize_w32_display):
2887 Clear horizontal_scroll_bar_hook.
2888 * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
2889 FRAME_X_DISPLAY.
2890 (x_clear_under_internal_border, x_set_internal_border_width):
2891 New functions.
2892 (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
2893 Set windows_or_buffers_changed when adding the menu bar.
2894 (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
2895 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
2896 (w32_createhscrollbar): New functions.
2897 (w32_createscrollbar): Rename to w32_createvscrollbar.
2898 (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
2899 (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
2900 WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
2901 Add WM_EMACS_SHOWCURSOR.
2902 (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
2903 case do not artificially impose WM size hints.
2904 Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
2905 by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
2906 cases.
2907 (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
2908 WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
2909 (unwind_create_frame_1): Remove.
2910 (Fx_create_frame): Make both scrollbars the system standard
2911 width and height. Use official field of frame structure to
2912 inhibit running window-configuration-change-hook.
2913 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
2914 pixelwise. Handle frame's official field.
2915 (w32_frame_parm_handlers): Remove x_set_fringe_width
2916 entries. Add x_set_scroll_bar_height,
2917 x_set_horizontal_scroll_bars, x_set_left_fringe and
2918 x_set_right_fringe.
2919 * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
2920 pass height of menu bar to change_frame_size.
2921 * w32menu.c (set_frame_menubar): Rewrite using
2922 frame_inhibit_resize.
2923 * w32term.h (struct w32_display_info):
2924 Add horizontal_scroll_bar_cursor and cursor_display_counter.
2925 (struct scroll_bar): Add horizontal.
2926 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
2927 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
2928 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
2929 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
2930 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
2931 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
2932 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
2933 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
2934 (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
2935 Define instead of WM_EMACS_CREATESCROLLBAR.
2936 (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
2937 WND_SCROLLBAR_INDEX.
2938 * w32term.c (horizontal_scroll_bar_min_handle)
2939 (horizontal_scroll_bar_left_border)
2940 (horizontal_scroll_bar_right_border): New integers.
2941 (x_set_frame_alpha): Replace x_highlight_frame by
2942 w32_focus_frame.
2943 (x_window_to_scroll_bar): New argument "type". Update callers
2944 accordingly.
2945 (w32_set_horizontal_scroll_bar_thumb)
2946 (x_horizontal_scroll_bar_report_motion)
2947 (w32_set_horizontal_scroll_bar)
2948 (w32_horizontal_scroll_bar_handle_click)
2949 (x_horizontal_scroll_bar_report_motion): New functions.
2950 (w32_mouse_position): Discriminate horizontal and vertical
2951 scrollbar cases.
2952 (my_create_scrollbar): Replace with two new functions
2953 my_create_vscrollbar and my_create_hscrollbar.
2954 (x_scroll_bar_create): New argument "horizontal".
2955 Update callers accordingly.
2956 (x_scroll_bar_remove, w32_condemn_scroll_bars)
2957 (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
2958 scroll bar case.
2959 (w32_read_socket): Handle WM_HSCROLL cae.
2960 (x_new_font): Don't recompute fringe widths.
2961 Use frame_inhibit_resize. Calculate new menu bar height iff we
2962 build without toolkit. Always clear under internal border.
2963 (x_set_window_size): Don't check frame size or recompute
2964 fringes. Reset fullscreen status before applying sizes.
2965 Always resize as requested by pixelwise argument. Don't call
2966 do_pending_window_change.
2967 (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
2968 (w32_initialize_display_info): Initialize dpyinfo's
2969 horizontal_scroll_bar_cursor entry.
2970 (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
2971 (w32_initialize): Init horizontal_scroll_bar_min_handle and
2972 horizontal_scroll_bar_left_border.
2973 (w32fullscreen_hook): Intermittently resize window to normal
2974 when switching from fullscreen to maximized state.
2975 (run_window_configuration_change_hook): Don't run it if frame is
2976 not official yet.
2977 (unwind_change_frame): Remove.
2978 (Fset_window_configuration): Rewrite using frame's official field.
2979 * widget.c (set_frame_size): Don't call compute_fringe_widths.
2980 (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
2981 * window.h (struct window): New fields old_pointm,
2982 horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
2983 scroll_bar_height and suspend_auto_hscroll.
2984 (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
2985 New functions.
2986 (sanitize_window_sizes): Extern.
2987 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
2988 (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
2989 (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
2990 (WINDOW_CONFIG_SCROLL_BAR_LINES)
2991 (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
2992 New macros.
2993 (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
2994 (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
2995 (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
2996 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
2997 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
2998 (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
2999 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
3000 (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
3001 * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
3002 (Fwindow_old_point, sanitize_window_sizes): New functions.
3003 (Qwindow_sanitize_window_sizes): New symbol.
3004 (window_body_height): Count in horizontal scroll bar.
3005 (set_window_hscroll, Fscroll_left, Fscroll_right):
3006 Set suspend_auto_hscroll slot.
3007 (Fwindow_inside_edges): Count fringes pixelwise.
3008 (coordinates_in_window, Fcoordinates_in_window_p):
3009 Consider horizontal scroll bar.
3010 (check_frame_size, adjust_window_margins): Remove functions and
3011 corresponding calls.
3012 (set_window_buffer): Initialize old_pointm and horizontal scroll bars.
3013 (temp_output_buffer_show): Reset hscroll related fields.
3014 Initialize old_pointm.
3015 (make_parent_window): Initialize old_pointm.
3016 (make_window): Initialize old_pointm, horizontal scroll bar type,
3017 and scroll bar height.
3018 (resize_frame_windows): Don't count top margin in new sizes.
3019 Don't use safe sizes when shrinking a frame; let the window
3020 manager do the clipping.
3021 (Fsplit_window_internal): Inherit horizontal scroll bar type and
3022 height.
3023 (Fdelete_window_internal): Unchain old_pointm marker.
3024 (window_scroll_pixel_based, Fscroll_other_window):
3025 Adjust old_pointm.
3026 (Fwindow_text_width, Fwindow_text_height): New argument
3027 "pixelwise".
3028 (struct saved_window): New fields, old_pointm, hscroll_whole,
3029 suspend_auto_hscroll, scroll_bar_height and
3030 horizontal_scroll_bar_type.
3031 (Fset_window_configuration, save_window_save): Set new fields of
3032 saved_window.
3033 (apply_window_adjustment): Don't call adjust_window_margins.
3034 (set_window_margins): Don't change margins if new sizes don't
3035 fit into window.
3036 (set_window_scroll_bars): New argument "horizontal_type".
3037 Handle horizontal scroll bars. Don't change scroll bars if they
3038 don't fit into window.
3039 (Fset_window_scroll_bars): New argument "horizontal_type".
3040 (Fwindow_scroll_bars): Return values for horizontal scroll bars.
3041 (compare_window_configurations): Compare horizontal scroll bar
3042 settings.
3043 * xdisp.c (window_text_bottom_y, window_box_height): Count in
3044 horizontal scroll bar height.
3045 (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
3046 instead of FRAME_LINES.
3047 (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
3048 ON_VERTICAL_SCROLL_BAR.
3049 (with_echo_area_buffer): Initialize old_pointm.
3050 (with_echo_area_buffer_unwind_data): Store old_pointm values in
3051 vector.
3052 (unwind_with_echo_area_buffer): Handle old_pointm.
3053 (update_tool_bar): Set do_update when the tool bar window has at
3054 least one line (since this is what the user sets).
3055 (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
3056 (redisplay_tool_bar): Return early when toolbar has zero lines.
3057 Call x_change_tool_bar_height. Don't use max_tool_bar_height.
3058 (hscroll_window_tree): Handle suspension of auto_hscroll and
3059 old_pointm.
3060 (set_horizontal_scroll_bar): New function.
3061 (redisplay_window): Set ignore_mouse_drag_p when tool bar has
3062 more than one line. Handle horizontal scroll bars.
3063 (note_mouse_highlight): Handle horizontal scrol bars.
3064 (expose_frame): Set dimensions of XRectangle from frame's text
3065 sizes.
3066 (Vvoid_text_area_pointer): Update doc-string.
3067 * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
3068 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
3069 (x_set_internal_border_width): New functions.
3070 (x_set_tool_bar_lines): Call x_change_tool_bar_height.
3071 (unwind_create_frame_1): Remove.
3072 (Fx_create_frame): Handle horizontal scroll bars. Use official
3073 field of frame structure to inhibit running
3074 window-configuration-change-hook.
3075 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
3076 pixelwise. Handle frame's official field.
3077 (x_frame_parm_handlers): Add x_set_scroll_bar_height,
3078 x_set_horizontal_scroll_bars, x_set_left_fringe,
3079 x_set_right_fringe.
3080 * xmenu.c (update_frame_menubar, free_frame_menubar):
3081 Use adjust_frame_size.
3082 * xterm.h (struct x_display_info):
3083 Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
3084 slots.
3085 (struct scroll_bar): Add horizontal slot.
3086 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
3087 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
3088 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
3089 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
3090 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
3091 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
3092 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
3093 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
3094 (x_clear_under_internal_border): Remove.
3095 * xterm.c (XTmouse_position): Handle horizontal scroll bars.
3096 (x_window_to_scroll_bar): New argument TYPE. Update callers.
3097 (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
3098 HORIZONTAL. Update callers.
3099 (horizontal_action_hook_id): New action hook id.
3100 (x_horizontal_scroll_bar_to_input_event)
3101 (x_create_horizontal_toolkit_scroll_bar)
3102 (xt_horizontal_action_hook)
3103 (x_set_toolkit_horizontal_scroll_bar_thumb)
3104 (XTset_horizontal_scroll_bar, x_net_wm_state)
3105 (x_horizontal_scroll_bar_report_motion): New functions.
3106 (xg_scroll_callback, x_scroll_bar_handle_click):
3107 Handle horizontal scroll bars.
3108 (SCROLL_BAR_HORIZONTAL_NAME): Define.
3109 (XTset_vertical_scroll_bar): Attempt to clear areas not covered
3110 by scroll bar.
3111 (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
3112 Handle horizontal scroll bars.
3113 (handle_one_xevent): Handle horizontal scroll bar events.
3114 Call x_net_wm_state.
3115 (x_set_window_size_1, x_wm_set_size_hint): Don't call
3116 check_frame_size.
3117 (x_set_window_size): Don't call check_frame_size and
3118 do_pending_window_change.
3119 (x_term_init): Init horizontal_scroll_bar_cursor display info.
3120 (x_create_terminal): Add set_horizontal_scroll_bar_hook.
3121 (x_scroll_bar_set_handle): Add some checks when calling
3122 x_clear_area.
3123
3124 2014-07-26 Paul Eggert <eggert@cs.ucla.edu>
3125
3126 Revert previous change.
3127 There is certainly nothing wrong with writing code like 'lo <= i
3128 && i <= hi', even if LO happens to a constant. There isn't even
3129 anything wrong in general with writing 'a <= b' if A happens to
3130 be a constant. At any rate stylistic changes shouldn't
3131 be done like this without discussion.
3132
3133 2014-07-26 Andreas Schwab <schwab@linux-m68k.org>
3134
3135 * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
3136 (Fgarbage_collect): Reorder conditions that are written backwards.
3137 * data.c (cons_to_unsigned): Likewise.
3138 * dispnew.c (update_frame_1, sit_for): Likewise.
3139 * fileio.c (file_offset): Likewise.
3140 * filelock.c (read_lock_data, lock_file): Likewise.
3141 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
3142 Likewise.
3143 * font.c (font_intern_prop, font_style_symbolic): Likewise.
3144 * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
3145 * lread.c (read1): Likewise.
3146 * minibuf.c (read_minibuf_noninteractive): Likewise.
3147 * nsterm.m (x_set_frame_alpha): Likewise.
3148 * process.c (wait_reading_process_output): Likewise.
3149 * region-cache.c (delete_cache_boundaries): Likewise.
3150 * xterm.c (x_set_frame_alpha): Likewise.
3151
3152 2014-07-25 Paul Eggert <eggert@cs.ucla.edu>
3153
3154 * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
3155 Now static.
3156
3157 2014-07-26 Dmitry Antipov <dmantipov@yandex.ru>
3158
3159 * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
3160 because atimer expiration is absolute rather than relative.
3161
3162 2014-07-25 Eli Zaretskii <eliz@gnu.org>
3163
3164 * w32term.h (current_popup_menu, menubar_in_use):
3165 Move declarations from w32term.c.
3166
3167 2014-07-25 Martin Rudalics <rudalics@gmx.at>
3168
3169 * w32fns.c (menubar_in_use): No more static.
3170 * w32term.c (current_popup_menu, menubar_in_use): Declare.
3171
3172 2014-07-25 Dmitry Antipov <dmantipov@yandex.ru>
3173
3174 Move hourglass machinery to RIF.
3175 * dispextern.h (struct redisplay_interface): New members
3176 show_hourglass and hide_hourglass. Indent comments.
3177 (show_hourglass, hide_hourglass): Remove prototypes.
3178 * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
3179 (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
3180 (ns_redisplay_interface): Add them.
3181 * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
3182 * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
3183 (w32_arrow_cursor): New function to hack around non-GUI frames.
3184 (w32_redisplay_interface): Add new functions.
3185 * w32term.h (w32_arror_cursor): Add prototype.
3186 * xdisp.c (show_hourglass): New function, refactored out from
3187 platform-dependent code.
3188 (cancel_hourglass): Now call to RIF function.
3189 * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
3190 * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
3191 (x_redisplay_interface): Add new functions.
3192
3193 2014-07-24 Dmitry Antipov <dmantipov@yandex.ru>
3194
3195 Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
3196 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
3197 and complete previous change.
3198 * frame.c (adjust_frame_height): New function.
3199 (Fset_frame_height, Fset_frame_size): Use it.
3200 (x_set_frame_parameters): Take frame top margin into account.
3201
3202 2014-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3203
3204 * frame.c (Fset_frame_height): Take frame top margin into account.
3205 Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
3206 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
3207
3208 2014-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3209
3210 * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
3211 menubar_height as such. Tweak comment.
3212 [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
3213 scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
3214 All related users changed.
3215 (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
3216 * xterm.c (handle_one_xevent):
3217 * gtkutil.c (xg_event_is_for_menubar):
3218 * xfns.c (x_window) [USE_X_TOOLKIT]:
3219 * xmenu.c (set_frame_menubar, free_frame_menubar):
3220 Prefer to use FRAME_MENUBAR_HEIGHT.
3221
3222 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
3223
3224 * frame.c (Fframe_parameters): Always report frame height without
3225 menu and tool bar lines.
3226
3227 2014-07-21 Jan Djärv <jan.h.d@swipnet.se>
3228
3229 * nsterm.m (applicationDidFinishLaunching:): Call
3230 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
3231 (antialiasThresholdDidChange:): New method for EmacsApp.
3232
3233 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
3234
3235 * macfont.m (macfont_update_antialias_threshold): Remove static.
3236
3237 * macfont.h (macfont_update_antialias_threshold): Declare.
3238
3239 2014-07-21 Eli Zaretskii <eliz@gnu.org>
3240
3241 * w32select.c (setup_windows_coding_system):
3242 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
3243 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
3244
3245 * w16select.c (Fw16_get_clipboard_data):
3246 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
3247 coding_system.
3248
3249 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
3250 buffer position where we are to start the iteration.
3251 (handle_invisible_prop): Record in it->stop_charpos the position
3252 where the invisible text ends. (Bug#18035)
3253 (hscroll_window_tree): Don't try hscrolling windows whose cursor
3254 row has zero buffer position as their start position.
3255 Reported by martin rudalics <rudalics@gmx.at>.
3256
3257 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
3258 infinite looping in redisplay when display lines don't have enough
3259 space to display even a single character. (Bug#18036)
3260
3261 2014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3262
3263 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
3264 * xfns.c (x_window): Use it to allow xfree later.
3265 (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users
3266 where appropriate. Use bool for booleans and remove redundant checks.
3267 (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
3268 * xterm.c (x_free_frame_resources): Free shell_position.
3269
3270 2014-07-19 K. Handa <handa@gnu.org>
3271
3272 * xfaces.c (realize_x_face): Call font_load_for_lface with no
3273 mandatory font spec (Bug#17973).
3274
3275 2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
3276
3277 * font.c (font_score): Return the worst score if the size of
3278 ENTITY is wrong by more than a factor 2 (Bug#17973).
3279
3280 2014-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3281
3282 * frame.c (frame_unspecified_color): New function
3283 refactored out from ...
3284 (Fframe_parameters, Fframe_parameter): ... adjusted users.
3285 (x_fullscreen_adjust, set_frame_param): Move Windows-specific
3286 function to ...
3287 * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
3288 * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
3289 * lisp.h (set_frame_param): Remove prototype.
3290 * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
3291 * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
3292 inlined from here.
3293
3294 Prefer 'x_display_info *' to 'Display *' in X selection code.
3295 This helps to avoid unneeded calls to x_display_info_for_display.
3296 * xterm.h (struct selection_input_event): Record 'x_display_info *'
3297 instead of 'Display *'.
3298 (SELECTION_EVENT_DPYINFO): New macro.
3299 (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
3300 it as an lvalue. Mention this in comment.
3301 * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
3302 * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
3303 (selection_data_to_lisp_data, receive_incremental_selection):
3304 Convert to use 'x_display_info *'. Adjust users where appropriate.
3305 (lisp_data_to_selection_data): Likewise. Also pass 'struct
3306 selection data *' as last arg to not return values in args.
3307 (unexpect_property_change): Use common removal technique.
3308
3309 2014-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3310
3311 * print.c (print_preprocess): Adjust to match changed
3312 sub char-table structure and avoid crash (Bug#18038).
3313
3314 * data.c (wrong_choice): Not static any more.
3315 * lisp.h (wrong_choice): Add prototype.
3316 * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
3317 Declare namebuf as such. Tweak comment.
3318 [USE_GTK]: Likewise for tool_bar_position.
3319 (fset_tool_bar_position) [USE_GTK]: Ditto.
3320 (FRAME_TOOL_BAR_POSITION): New macro.
3321 * frame.c (x_report_frame_params):
3322 * gtkutil.c (update_frame_tool_bar):
3323 * xfns.c (Fx_create_frame): Use it.
3324 (x_set_tool_bar_position): Add meaningful diagnostic messages.
3325
3326 2014-07-16 Eli Zaretskii <eliz@gnu.org>
3327
3328 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
3329 buffer's default-directory only if it is a string. (Bug#17986)
3330
3331 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
3332
3333 More precise control over values of some buffer-local variables.
3334 * keyboard.c (Qvertical_scroll_bar):
3335 * frame.c (Qleft, Qright): Move to ...
3336 * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
3337 * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
3338 (syms_of_buffer): DEFSYM all of the above, attach special properties.
3339 Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
3340 vertical-scroll-bar, scroll-up-aggressively
3341 and scroll-down-aggressively.
3342 * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
3343 Add declarations.
3344 * nsfns.m, frame.h (Qleft, Qright):
3345 * nsterm.m (Qleft): Remove declarations.
3346 * gtkutil.c (toplevel): Include buffer.h.
3347 * data.c (wrong_choice, wrong_range): New functions.
3348 (store_symval_forwarding): Handle special properties of buffer-local
3349 variables and use functions from the above to signal error, if any.
3350
3351 * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
3352 values. Add comment.
3353 (struct frame): Re-arrange layout to avoid extra padding and use bit
3354 fields for output_method, want_fullscreen and vertical_scroll_bar_type.
3355 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
3356 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
3357 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
3358 Define as no-ops because there are no scroll bars anyway.
3359 * frame.c (make_frame, make_terminal_frame, make_initial_frame):
3360 Adjust users.
3361
3362 * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
3363 Add convenient setter.
3364 (font_put_frame_data, font_get_frame_data): Use it.
3365
3366 2014-07-15 Daiki Ueno <ueno@gnu.org>
3367
3368 * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
3369 pointer argument, before dereferencing.
3370 (XCHAR2B_BYTE2): Likewise.
3371
3372 2014-07-15 Dmitry Antipov <dmantipov@yandex.ru>
3373
3374 * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
3375 (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
3376 (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
3377 Use record_unwind_protect_int and avoid consing.
3378 (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
3379
3380 * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
3381
3382 2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
3383
3384 Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
3385 * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
3386 * emacs.c [MSDOS]:
3387 * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
3388 (main) [MSDOS]: Use SET_BINARY instead of setmode.
3389 * minibuf.c: Include binary-io.h instead of fcntl.h.
3390 (read_minibuf_noninteractive):
3391 Use set_binary_mode instead of handcrafted code.
3392 Don't call emacs_set_tty if emacs_get_tty failed.
3393 * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
3394 * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
3395 * w32.c (pipe2): Adjust eassert to include O_BINARY.
3396
3397 * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
3398 This works around a GCC compiler bug when Emacs is configured with
3399 --enable-gcc-warnings.
3400
3401 2014-07-14 Dmitry Antipov <dmantipov@yandex.ru>
3402
3403 * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
3404 or characters in string, respectively. Add comment.
3405 * fringe.c (Fdefine_fringe_bitmap):
3406 * fns.c (Fsubstring, substring_both): Use it.
3407 * keymap.c (Fdefine_key, Flookup_key):
3408 * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
3409
3410 * term.c (tty_menu_add_pane, tty_menu_add_selection):
3411 Use menu_item_width.
3412 (tty_menu_show): Simplify because tty_menu_create never return NULL.
3413
3414 2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
3415
3416 Improve behavior of 'bzr up; cd src; make -k'.
3417 * Makefile.in (top_srcdir): New var.
3418 (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
3419 Use '$(top_srcdir)' instead of '$(srcdir)/..';
3420 its expansion is a bit shorter.
3421 (../config.status): Actually build config.status instead of
3422 just complaining.
3423 (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
3424 New macros, copied and relocated from ../Makefile.in.
3425 ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
3426 (../config.status, Makefile): New dependencies and rules,
3427 copied with relocation from ../Makefile.in. This should be more
3428 likely to rebuild the build machinery properly if you do a 'make'
3429 in the src directory.
3430
3431 2014-07-12 Eli Zaretskii <eliz@gnu.org>
3432
3433 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
3434 than 1. (Bug#17962)
3435
3436 * w32fns.c (Fx_file_dialog): Mention in the doc string the
3437 behavior on Windows 7 and later when the function is repeatedly
3438 invoked with the same value of DIR. (Bug#17950)
3439
3440 * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
3441 string to match the one in w32fns.c.
3442
3443 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
3444 stdin to binary mode only if it is connected to a terminal.
3445
3446 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
3447
3448 Coalesce extern decls.
3449 * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
3450 * sysdep.c (emacs_get_tty, emacs_set_tty):
3451 Move duplicate extern decls from here ...
3452 * systty.h: ... to here, so that there's just one copy.
3453
3454 2014-07-11 Jan Djärv <jan.h.d@swipnet.se>
3455
3456 * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
3457
3458 * nsfns.m (Fns_popup_font_panel): Ditto.
3459
3460 2014-07-11 Eli Zaretskii <eliz@gnu.org>
3461
3462 * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
3463 not only on '\n'.
3464 [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
3465
3466 * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
3467 [DOS_NT]: Implement for WINDOWSNT.
3468
3469 * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
3470 unsigned.
3471
3472 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
3473
3474 * sysdep.c (suppress_echo_on_tty): New function.
3475 * minibuf.c (read_minibuf_noninteractive): Use it.
3476
3477 2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3478
3479 * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
3480 sysinfo failed. Adjust docstring.
3481
3482 2014-07-11 Eli Zaretskii <eliz@gnu.org>
3483
3484 Implement memory-info for MS-DOS.
3485 * dosfns.c (dos_memory_info): New function.
3486 * dosfns.h (dos_memory_info): Add prototype.
3487 * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
3488 * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
3489 of doing some of its job.
3490
3491 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
3492 reference termios structure members.
3493
3494 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
3495
3496 * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
3497
3498 * minibuf.c (top): Include systty.h. Declare external
3499 emacs_get_tty and emacs_set_tty.
3500 (Vread_hide_char): New lisp variable.
3501 (read_minibuf_noninteractive): Hide characters with
3502 Vread_hide_char if it is a character. (Bug#17839)
3503
3504 2014-07-10 Eli Zaretskii <eliz@gnu.org>
3505
3506 Implement memory-info for MS-Windows.
3507 * w32.c (w32_memory_info): New function.
3508 * w32.h (w32_memory_info): Prototype it.
3509 * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
3510
3511 2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3512
3513 * coding.h (struct coding_system): Remove 'error_positions' (unused)
3514 and 'errors' (set but unused) fields. Use bitfields for 'eol_seen',
3515 'mode', 'common_flags' and 'result' fields, adjust layout to avoid
3516 extra padding and shrink struct coding_system by 56 bytes (x86_64).
3517 * coding.c (decode_coding_utf_8, decode_coding_utf_16)
3518 (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
3519 (decode_coding_big5, decode_coding_charset, decode_coding)
3520 (encode_coding): Adjust users.
3521
3522 * alloc.c (Fmemory_info): New function.
3523
3524 2014-07-09 Paul Eggert <eggert@cs.ucla.edu>
3525
3526 * syntax.c (back_comment): Use more-natural location for label.
3527
3528 * font.c, font.h (font_unparse_fcname): Now static.
3529 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
3530
3531 2014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
3532
3533 Next minor cleanup of font subsystem.
3534 * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
3535 users) and FONT_FORMAT_INDEX (set by a few font drivers but never
3536 really used).
3537 (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
3538 unused.
3539 * ftfont.h (ftfont_font_format): Remove prototype.
3540 * ftfont.c (ftfont_font_format): Remove; now unused.
3541 (ftfont_open):
3542 * nsfont.m (nsfont_open):
3543 * w32font.c (w32font_open_internal):
3544 * w32uniscribe.c (uniscribe_open):
3545 * xfont.c (xfont_open):
3546 * xftfont.c (xftfont_open): All users changed.
3547
3548 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
3549 so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
3550
3551 2014-07-09 Eli Zaretskii <eliz@gnu.org>
3552
3553 * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
3554 x_produce_glyphs does when it generates a stretch glyph that
3555 represents a TAB. (Bug#17969)
3556
3557 * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
3558 and there is a display property at that position, don't call
3559 move_it_to to move to a position before window start. (Bug#17942)
3560 Fix condition for finding CHARPOS by the first call to move_it_to.
3561 (Bug#17944)
3562
3563 2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
3564
3565 * syntax.c (find_defun_start): Try the cache even
3566 if !open_paren_in_column_0_is_defun_start.
3567 (back_comment): If find_defun_start was pessimistic, use the
3568 scan_sexps_forward result to improve the cache (bug#16526).
3569
3570 2014-07-09 Eli Zaretskii <eliz@gnu.org>
3571
3572 * xdisp.c (redisplay_window): If redisplay of a window ends up
3573 with point in a partially visible line at end of the window, make
3574 sure the amended position of point actually has smaller Y
3575 coordinate; if not, give up and scroll the display. (Bug#17905)
3576
3577 * window.c (window_scroll_pixel_based): When point ends up at the
3578 last fully visible line, don't let move_it_to stop at the left
3579 edge of the line and dupe us into thinking point is inside the
3580 scroll margin.
3581
3582 * w32.c (network_interface_info): Make sure the argument is a
3583 Lisp string.
3584
3585 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
3586
3587 * process.c (read_and_dispose_of_process_output): Fix typo
3588 in previous patch: we want nonnegative fds, not nonzero fds.
3589
3590 2014-07-08 Dmitry Antipov <dmantipov@yandex.ru>
3591
3592 * chartab.c (char_table_translate): Move to...
3593 * character.h (char_table_translate): ... inline function here.
3594 Avoid Faref and assume that args are always valid. This helps to
3595 speedup search, which is especially important for a huge buffers.
3596 * lisp.h (char_table_translate): Remove prototype.
3597
3598 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
3599 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
3600 New function, with an intention to avoid code duplication between
3601 a few font drivers.
3602 * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
3603 Add prototype.
3604 * ftfont.c (ftfont_open):
3605 * macfont.m (macfont_open):
3606 * xftfont.c (xftfont_open): Use it.
3607
3608 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
3609
3610 * process.c: Add sanity checks for file descriptors (Bug#17844).
3611 (wait_reading_process_output, Fprocess_filter_multibyte_p):
3612 Check that infd is nonnegative before using it as an fd.
3613 (read_and_dispose_of_process_output, Fprocess_send_eof):
3614 Likewise, for outfd.
3615 (wait_reading_process_output): Omit unnecessary check of infd.
3616
3617 2014-07-07 Paul Eggert <eggert@cs.ucla.edu>
3618
3619 Minor fixups related to usage of the 'long' type.
3620 * gnutls.c (emacs_gnutls_handshake):
3621 * xfaces.c (dump_realized_face):
3622 Work even if 'long' is narrower than 'void *'.
3623 * termcap.c (scan_file):
3624 * xselect.c (x_decline_selection_request)
3625 (x_reply_selection_request, x_get_window_property):
3626 * xterm.c (x_set_frame_alpha):
3627 Remove unnecessary 'L' suffixes of integer constants.
3628 * xfns.c (hack_wm_protocols):
3629 * xselect.c (x_fill_property_data):
3630 * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
3631 Remove unnecessary casts to 'long'.
3632 (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
3633
3634 Minor ImageMagick safety fixes.
3635 * image.c (imagemagick_compute_animated_image):
3636 Remove useless assignment to local. Avoid problems if dest_width is 0.
3637 (imagemagick_load_image): Use int for pixel counts that can't
3638 exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns
3639 a row width greater than the image width (or greater than LONG_MAX!).
3640
3641 2014-07-04 K. Handa <handa@gnu.org>
3642
3643 * coding.c (MIN_CHARBUF_SIZE): Delete it.
3644 (MAX_CHARBUF_EXTRA_SIZE): New macro.
3645 (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
3646
3647 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3648
3649 * font.h (struct font_driver): Remove get_outline and free_outline;
3650 not used by any font driver.
3651 * ftfont.c (ftfont_driver):
3652 * macfont.m (macfont_driver):
3653 * nsfont.m (nsfont_driver):
3654 * w32font.c (w32font_driver):
3655 * w32uniscribe.c (uniscribe_font_driver):
3656 * xfont.c (xfont_driver): Related users changed.
3657 * xselect.c (x_get_window_property): Use convenient xmalloc.
3658 Call to xfree only if some data was really allocated.
3659
3660 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3661
3662 On MS-Windows, display busy cursor on all GUI frames.
3663 This is similar to what we have on X. Quickly tested by Dani Moncayo.
3664 * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
3665 (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
3666 Likewise.
3667 (hide_hourglass, show_hourglass): Redesign to match X counterparts.
3668 * xdisp.c (start_hourglass): Remove Windows-specific bits.
3669
3670 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3671
3672 Use convenient alists to manage per-frame font driver-specific data.
3673 * frame.h (struct frame): Rename font_data_list to...
3674 [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
3675 * font.h (struct font_data_list): Remove; no longer need a special
3676 data type.
3677 (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
3678 Adjust prototypes.
3679 * font.c (font_put_frame_data, font_get_frame_data)
3680 [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
3681 management.
3682 * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
3683 Related users changed.
3684 * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
3685 Prefer convenient xmalloc and xfree.
3686
3687 2014-07-03 Eli Zaretskii <eliz@gnu.org>
3688
3689 * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
3690 the window whose glyph row is being prepared and a flag whether it
3691 is for mode/header line. Make sure the glyph row's marginal areas
3692 are in sync with what the window wants.
3693 (Bug#17892)
3694
3695 * xdisp.c (display_line, display_mode_line):
3696 Call prepare_desired_row with additional arguments, as appropriate.
3697
3698 * dispextern.h (prepare_desired_row): Adjust prototype.
3699
3700 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3701
3702 * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
3703 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
3704 caused by xw_popup_dialog in daemon mode (Bug#17891).
3705
3706 2014-07-03 Eli Zaretskii <eliz@gnu.org>
3707
3708 * frame.c (do_switch_frame): When switching to another TTY frame,
3709 make sure FrameCols and FrameRows are in sync with the new frame's
3710 data. (Bug#17875)
3711
3712 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru>
3713
3714 Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
3715 * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
3716 min_char slots. Adjust comment.
3717 (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
3718 Add SUB_CHAR_TABLE_OFFSET member.
3719 (make_uninit_sub_char_table): New function.
3720 (toplevel): Add compile-time assert to verify suitable member layout
3721 in Lisp_Sub_Char_Table.
3722 * alloc.c (mark_char_table): Add extra argument to denote char table
3723 subtype. Adjust to match new layout of sub char-table.
3724 (mark_object): Always mark sub char-tables with mark_char_table.
3725 * chartab.c (make_sub_char_table, copy_sub_char_table)
3726 (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
3727 (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
3728 (map_sub_char_table_for_charset, uniprop_table_uncompress):
3729 All related users changed.
3730 * lread.c (read1): Adjust to match new layout of sub char-table.
3731 * print.c (print_object): Likewise (Bug#17898).
3732
3733 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
3734
3735 * keymap.c (get_keyelt): Simplify.
3736 (copy_keymap_item): Remove left-over code for when we had
3737 key-shortcut caches.
3738
3739 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
3740
3741 * nsterm.m (judge): EmacsScroller: Move dealloc code here.
3742 (dealloc): Remove for EmacsScroller.
3743
3744 * nsterm.h (EmacsScroller): Remove dealloc.
3745
3746 2014-06-30 Eli Zaretskii <eliz@gnu.org>
3747
3748 * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881)
3749
3750 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
3751
3752 * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
3753 when setNeedsDisplay is called so we don't trigger redisplay for every
3754 tool bar update.
3755
3756 * nsterm.m (any_help_event_p): New variable.
3757 (mouseMoved:): Set any_help_event_p to YES if help event is
3758 generated. Remove else with empty help event that triggered redisplay
3759 for every mouse move.
3760 (windowDidResignKey:): If any_help_event_p, generate empty help event.
3761
3762 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3763
3764 * xfns.c (Qsuppress_icon): Remove; no real users.
3765 (syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
3766 * w32fns.c (Qsuppress_icon): Remove, for the same reason.
3767 (syms_of_w32fns): Don't DEFSYM it.
3768
3769 2014-06-29 Glenn Morris <rgm@gnu.org>
3770
3771 * Makefile.in (ns-app): Mark as PHONY.
3772
3773 2014-06-28 Glenn Morris <rgm@gnu.org>
3774
3775 * Makefile.in (mostlyclean): There are no libXMenu11.a,
3776 liblw.a in this directory.
3777
3778 2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
3779
3780 * coding.c (encode_coding_utf_8): Correctly count produced_chars
3781 also in unibyte case. (Bug#17865)
3782
3783 2014-06-28 K. Handa <handa@gnu.org>
3784
3785 * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
3786 (MIN_CHARBUF_SIZE): New macro.
3787 (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
3788
3789 2014-06-27 Glenn Morris <rgm@gnu.org>
3790
3791 * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
3792 with an order-only dependence on bootstrap-emacs. (Bug#2151)
3793 (.el.elc): Replace suffix rule with pattern rule.
3794 (%.elc): New pattern rule, with order-only prerequisite.
3795 ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
3796 ($(lispsource)/loaddefs.el): Use an order-only prerequisite
3797 in place of BOOTSTRAPEMACS.
3798
3799 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3800
3801 * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
3802
3803 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
3804
3805 Consistently use validate_subarray to verify substring.
3806 * fns.c (validate_substring): Not static any more. Adjust to
3807 use ptrdiff_t, not EMACS_INT, because string and vector limits
3808 can't exceed ptrdiff_t even if EMACS_INT is wider.
3809 (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
3810 (secure_hash): Adjust user.
3811 * lisp.h (validate_subarray): Add prototype.
3812 * coding.c (Fundecodable_char_position):
3813 * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
3814 Use validate_subarray. Adjust comment to mention substring.
3815
3816 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
3817
3818 Do not allow out-of-range character position in Fcompare_strings.
3819 * fns.c (validate_subarray): Add prototype.
3820 (Fcompare_substring): Use validate_subarray to check ranges.
3821 Adjust comment to mention that the semantics was changed. Also see
3822 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
3823
3824 2014-06-24 Paul Eggert <eggert@cs.ucla.edu>
3825
3826 Be more consistent about the 'Qfoo' naming convention.
3827 * image.c (Fimagemagick_types):
3828 * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
3829 * process.c (Fmake_network_process):
3830 Rename C local identifier 'Qfoo to avoid giving the false
3831 impression that it stands for the symbol 'foo'.
3832
3833 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru>
3834
3835 Simplify and cleanup character conversion stuff.
3836 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
3837 Remove prototypes.
3838 * character.c (multibyte_char_to_unibyte)
3839 (multibyte_char_to_unibyte_safe): Remove; no longer used.
3840 * character.h (make_char): Remove; unused.
3841 (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
3842 (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
3843 * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
3844 * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
3845 * search.c, term.c, xdisp.c, xterm.c: Related users changed.
3846
3847 2014-06-22 Mario Lang <mlang@delysid.org>
3848
3849 * w32fns.c (Fw32_shell_execute): The the -> the.
3850
3851 2014-06-22 Dmitry Antipov <dmantipov@yandex.ru>
3852
3853 * xmenu.c (mouse_position_for_popup):
3854 * xselect.c (mouse_position_for_drop): Do not duplicate ...
3855 * xfns.c (x_relative_mouse_position): ... and prefer this function.
3856 * menu.c (Fx_popup_menu):
3857 * xselect.c (x_handle_dnd_message): Adjust users.
3858 * menu.h (mouse_position_for_popup): Remove prototype.
3859 * xterm.h (x_relative_mouse_position): Add prototype.
3860 * xterm.c (x_find_topmost_parent): Break from the loop and do not
3861 call XFree if XQueryTree returns zero.
3862
3863 2014-06-21 Eli Zaretskii <eliz@gnu.org>
3864
3865 * indent.c (Fvertical_motion): Doc fix.
3866 Move to the goal column, if any, with a single call to
3867 move_it_in_display_line, not in two calls. Doing this with two
3868 calls causes move_it_in_display_line apply the line-prefix
3869 handling twice instead of just once. (Bug#17823)
3870
3871 2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
3872
3873 Port to OS X ACLs (Bug#17810).
3874 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
3875 ACL_TYPE_ACCESS) doesn't work.
3876
3877 2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
3878
3879 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
3880 before checking key-translation-map (bug#17659).
3881
3882 2014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
3883
3884 * font.c (font_make_object): Avoid dangling pointer which may
3885 crash GC (Bug#17771).
3886
3887 2014-06-21 Eli Zaretskii <eliz@gnu.org>
3888
3889 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
3890 prototype of DGifCloseFile as appropriate for older and newer
3891 versions of giflib.
3892 (gif_close): New function, encapsulates the differences in the
3893 calling sequence of DGifCloseFile before v5.1.0 and after it.
3894 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
3895 error string where appropriate. (Bug#17790)
3896
3897 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
3898 macro execution, make sure point didn't move since last complete
3899 redisplay, as the condition for using the glyph matrix
3900 information. (Bug#17777)
3901
3902 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
3903
3904 Minor cleanup of fonset code.
3905 * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
3906 (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
3907 (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
3908 (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
3909 (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
3910 (set_fontset_fallback): Reorder extra slots and avoid unused slots.
3911 (free_realized_fontset): Remove because a no-op since 2008.
3912 (free_face_fontset): Adjust user.
3913 (syms_of_fontset): Shrink fontset by one extra slot.
3914
3915 2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
3916
3917 Omit redundant extern decls.
3918 Most of this patch is from Dmitry Antipov, in:
3919 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
3920 * commands.h (update_mode_lines):
3921 * frame.h (Qbackground_color, Qforeground_color)
3922 (x_set_menu_bar_lines):
3923 * ftfont.c (ftfont_font_format):
3924 * intervals.h (Qkeymap, Qfont):
3925 * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
3926 * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
3927 (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
3928 (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
3929 (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
3930 (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
3931 (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
3932 (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
3933 (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
3934 (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
3935 (Qtool_bar, Qheader_line):
3936 * macros.c (Fexecute_kbd_macro):
3937 * xdisp.c (Ftool_bar_height, Ftool_bar_height):
3938 * xterm.c (x_delete_terminal, XSetIMValues):
3939 * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
3940 (x_implicitly_set_name, popup_activated)
3941 (widget_store_internal_border):
3942 Remove redundant decls.
3943 * frame.c [USE_X_TOOLKIT]: Include widget.h.
3944 * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
3945 Remove _Noreturn, as make-docfile now does that for us.
3946 * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
3947 (Qregion_extract_function): New decl.
3948 * window.c, xfns.c: Include menu.h.
3949
3950 2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
3951
3952 * callint.c (Fcall_interactively): Fix up last change (bug#17701).
3953
3954 2014-06-17 Dmitry Antipov <dmantipov@yandex.ru>
3955
3956 * fileio.c (Fread_file_name): Do not pass redundant args and ...
3957 * callint.c (read_file_name): ... convert to static here.
3958 * lisp.h (Fread_file_name): Do not EXFUN it.
3959 (STRING_COPYIN): Remove; unused.
3960 * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
3961 (char_composable_p): ... static function. All users changed.
3962 * eval.c (toplevel): Remove redundant #include directives.
3963 * xterm.c (x_initialize): Add static to match prototype.
3964 * ccl.c (Fccl_execute_on_string):
3965 * font.c (fon_intern_prop): Use make_specified_string.
3966
3967 2014-06-16 Paul Eggert <eggert@cs.ucla.edu>
3968
3969 * Makefile.in (ns-app): Fix typo that broke build on OS X.
3970 Reported by David Caldwell in:
3971 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
3972
3973 2014-06-16 Dmitry Antipov <dmantipov@yandex.ru>
3974
3975 Do not ask for XRender extension each time XFT font is opened.
3976 * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
3977 * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment.
3978
3979 2014-06-15 Glenn Morris <rgm@gnu.org>
3980
3981 * Makefile.in: Use `make -C' rather than `cd && make' throughout.
3982
3983 2014-06-15 Eli Zaretskii <eliz@gnu.org>
3984
3985 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
3986 information if we are in the middle of executing a keyboard macro,
3987 since redisplay doesn't update the screen until the macro is
3988 finished. (Bug#17777)
3989
3990 * alloc.c (cleanup_vector): Don't dereference a font driver
3991 pointer if it is NULL. (Bug#17771)
3992
3993 2014-06-13 Glenn Morris <rgm@gnu.org>
3994
3995 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
3996 ($(lispsource)/international/charprop.el)
3997 ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
3998 ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
3999 ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
4000 GNU make automatically passes command-line arguments to sub-makes.
4001
4002 2014-06-13 Paul Eggert <eggert@cs.ucla.edu>
4003
4004 Avoid hangs in accept-process-output (Bug#17647).
4005 * lisp.h, process.c (wait_reading_process_input):
4006 Return int, not bool. All uses changed.
4007 * process.c (SELECT_CANT_DO_WRITE_MASK):
4008 Remove macro, replacing with ...
4009 (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
4010 All uses changed.
4011 (status_notify): New arg WAIT_PROC. Return int, not void.
4012 All uses changed.
4013
4014 2014-06-13 Eli Zaretskii <eliz@gnu.org>
4015
4016 * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
4017 the frame is the initial frame, because the hook is not set up
4018 then, and Emacs crashes.
4019 Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
4020
4021 2014-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
4022
4023 * keymap.c (silly_event_symbol_error): Don't recommend the use
4024 of strings.
4025
4026 2014-06-11 Eli Zaretskii <eliz@gnu.org>
4027
4028 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
4029 matching overlay strings with 'cursor' property against buffer
4030 positions traversed in the glyph row. (Bug#17744)
4031
4032 2014-06-11 Jan Djärv <jan.h.d@swipnet.se>
4033
4034 * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
4035 on Cocoa.
4036
4037 * nsterm.m (run): Always compile for Cocoa. Use runtime check to
4038 determine 10.9 (Bug#17751).
4039
4040 * macfont.m (macfont_draw): Positions were not freed.
4041
4042 2014-06-10 Dmitry Antipov <dmantipov@yandex.ru>
4043
4044 * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
4045 * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
4046 function. Also adjust comment.
4047 * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
4048
4049 * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
4050 * font.c (font_done_for_face):
4051 * xfaces.c (realize_non_ascii_face): Adjust user.
4052 * font.h (struct font_driver): Convert 'prepare_face' to return
4053 void because its return value is never used anyway.
4054 * xfont.c (xfont_prepare_face): Return void.
4055 * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
4056 (xftfont_done_face): Use xfree.
4057
4058 * dispextern.h (last_tool_bar_item): Remove declaration.
4059 * frame.h (struct frame): New member last_tool_bar_item.
4060 * frame.c (make_frame): Initialize it.
4061 * xdisp.c (toplevel): Remove last_tool_bar_item.
4062 (handle_tool_bar_click, note_tool_bar_highlight):
4063 * w32term.c (w32_read_socket, w32_initialize):
4064 * xterm.c (handle_one_xevent, x_initialize): Adjust users.
4065
4066 * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
4067 * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
4068
4069 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
4070
4071 Say (accept-process-output P)'s result pertains to P if P is non-nil.
4072 * process.c (Faccept_process_output)
4073 (wait_reading_process_output): Mention that if PROCESS is non-nil,
4074 the return value is about PROCESS, not about other processes.
4075
4076 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru>
4077
4078 Further adjustments to mark_object and friends.
4079 Now the mark_object's stack is just 32 bytes on a 64-bit
4080 system, which means extra 20% off the stack usage.
4081 * alloc.c (mark_save_value): As before, refactored out from ...
4082 (mark_object): ... adjusted user. Also add comment.
4083
4084 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
4085
4086 Fix core dump after a dropped X connection (Bug#17704).
4087 * sysdep.c (stuff_char): Don't abort merely because the selected frame
4088 is dead, as we may be shutting down.
4089
4090 2014-06-08 Glenn Morris <rgm@gnu.org>
4091
4092 * fileio.c (write-region-inhibit-fsync): Doc tweak.
4093
4094 * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
4095
4096 2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
4097
4098 If a C name must be extern on some platforms, make it extern on all.
4099 * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
4100 (load_color):
4101 * font.h (ftxfont_driver) [HAVE_XFT]:
4102 * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
4103 * lisp.h (get_frame_param):
4104 * menu.h (tty_menu_show):
4105 * process.h (conv_sockaddr_to_lisp, catch_child_signal):
4106 * termhooks.h (encode_terminal_code):
4107 * xterm.h (x_menu_wait_for_event):
4108 Always declare.
4109 * frame.c (get_frame_param):
4110 * fringe.c (max_used_fringe_bitmap):
4111 * ftxfont.c (ftxfont_driver):
4112 * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
4113 * menu.c (menu_items_inuse):
4114 * process.c (conv_sockaddr_to_lisp, catch_child_signal):
4115 * term.c (encode_terminal_code, tty_menu_show):
4116 * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
4117 * xfaces.c (load_color):
4118 * xmenu.c (x_menu_wait_for_event):
4119 Now always extern.
4120
4121 2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
4122
4123 Change object marking routines to minimize stack usage.
4124 This change moves a few cold paths from mark_object to NO_INLINE
4125 functions and adjusts symbol marking loop. According to GCC 4.8.2
4126 -Wstack-usage, this reduces mark_object's stack usage from 80 to
4127 48 bytes on a 64-bit system. For a long byte-force-recompile runs,
4128 stack usage at the mark phase is reduced up to 28%. Surprisingly,
4129 it also gains up to 3% in speed (with default '-O2 -g3' flags).
4130 * alloc.c (mark_compiled, mark_localized_symbol): New functions,
4131 refactored out from ...
4132 (mark_object): ... adjusted user. Also mark symbols in a tight
4133 inner loop.
4134 (mark_face_cache): Add NO_INLINE.
4135
4136 2014-06-08 Eli Zaretskii <eliz@gnu.org>
4137
4138 * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
4139 contains garbage on WINDOWSNT (which could potentially infloop at
4140 exit).
4141
4142 Minimize cursor motion during TTY menu updates.
4143 * term.c (tty_menu_display): Don't position cursor here.
4144 Instead, pass the cursor coordinates to update_frame_with_menu.
4145 (tty_menu_activate): Send the hide cursor command only once in an
4146 iteration through the outer 'while' loop.
4147
4148 * dispnew.c (update_frame_1): Accept an additional argument
4149 SET_CURSOR_P, and position the cursor at the end of the frame
4150 update only if that argument is non-zero. All callers changed to
4151 provide the additional argument as non-zero, except for
4152 update_frame_with_menu.
4153 (update_frame_with_menu): Accept 2 additional arguments ROW and
4154 COL; if they are non-negative, instruct update_frame_1 not to
4155 position the cursor, and instead position it according to ROW and COL.
4156
4157 * dispextern.h (update_frame_with_menu): Update prototype.
4158
4159 2014-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4160
4161 * callproc.c (call_process): Don't check read-only if we don't insert
4162 anything (bug#17666).
4163
4164 2014-06-08 Eli Zaretskii <eliz@gnu.org>
4165
4166 * dispnew.c (update_frame_with_menu): Set display_completed.
4167
4168 2014-06-07 Eli Zaretskii <eliz@gnu.org>
4169
4170 * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
4171 only for WINDOWSNT.
4172 * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
4173
4174 2014-06-06 Paul Eggert <eggert@cs.ucla.edu>
4175
4176 * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
4177 * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
4178
4179 2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
4180
4181 * window.c (Frecenter): Signal an error if window-buffer is not
4182 current-buffer.
4183
4184 * keyboard.c (make_lispy_position): Don't include a buffer position in
4185 mode/header-line mouse events.
4186
4187 * keyboard.c (read_char): Handle (t . <event>) in the second use of
4188 Vunread_command_events (bug#17650).
4189
4190 2014-06-06 Dmitry Antipov <dmantipov@yandex.ru>
4191
4192 * xterm.c (x_setup_pointer_blanking):
4193 Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
4194
4195 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru>
4196
4197 * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
4198 because it will be defined in generated config.h if needed.
4199
4200 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
4201
4202 Use terminal-specific hooks to display popup dialogs.
4203 * termhooks.h (struct terminal): New field popup_dialog_hook.
4204 * menu.c (emulate_dialog_with_menu): New function, refactored from ...
4205 (Fx_popup_dialog): ... adjusted user. Also remove old #if 0
4206 code and use popup_dialog_hook.
4207 * nsmenu.m (ns_popup_dialog): Make hook-compatible.
4208 * nsterm.h (ns_popup_dialog): Adjust prototype.
4209 * nsterm.m (ns_create_terminal):
4210 * w32term.c (w32_create_terminal):
4211 * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
4212 Setup popup_dialog_hook.
4213
4214 2014-06-04 Eli Zaretskii <eliz@gnu.org>
4215
4216 * w32heap.c (report_temacs_memory_usage): Improve the report by
4217 reporting the large blocks that are actually occupied at dump time.
4218
4219 * w32console.c (initialize_w32_display): Set the console
4220 menu_show_hook, otherwise TTY menus are broken on w32.
4221
4222 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
4223
4224 Use terminal-specific hooks to display menus.
4225 * termhooks.h (struct terminal): New field menu_show_hook.
4226 * menu.h (<anonymous enum>): Bit flags for menu hooks.
4227 (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
4228 Adjust prototypes.
4229 * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
4230 * nsmenu.m (ns_menu_show):
4231 * w32menu.c (w32_menu_show):
4232 * xmenu.c (x_menu_show):
4233 * term.c (tty_menu_show): Adjust to use bit flags.
4234 (set_tty_hooks): Set menu_show_hook.
4235 * xterm.c (x_create_terminal):
4236 * nsterm.m (ns_create_terminal):
4237 * msdos.c (initialize_msdos_display):
4238 * w32term.c (w32_create_terminal): Likewise.
4239
4240 2014-06-03 Juanma Barranquero <lekktu@gmail.com>
4241
4242 * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
4243
4244 2014-06-03 Eli Zaretskii <eliz@gnu.org>
4245
4246 * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
4247 (FD_SET): Don't define on WINDOWSNT.
4248
4249 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
4250
4251 * emacs.c: Include "sysselect.h", to define its inline functions.
4252 Problem reported by Glenn Morris in:
4253 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
4254
4255 Do not require libXt-devel when building with gtk.
4256 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
4257 dependency on libXt-devel.
4258 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
4259 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
4260 lwlib-widget.h now does this.
4261 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
4262
4263 2014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
4264
4265 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
4266 * process.c (add_read_fd, delete_read_fd, add_write_fd)
4267 (delete_write_fd, wait_reading_process_output):
4268 Remove now-redundant easserts.
4269 * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
4270 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4271 (fd_CLR, fd_ISSET, fd_SET): New inline functions.
4272 (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
4273
4274 2014-06-03 Eli Zaretskii <eliz@gnu.org>
4275
4276 * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
4277 HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
4278 (calloc): Don't undef, it is never defined.
4279 (HEAP_ENTRY_SHIFT): Remove unused macro.
4280
4281 * Makefile.in (C_HEAP_SWITCH): Remove.
4282 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
4283
4284 Fix MS-Windows build broken by menu changes on 2014-06-02.
4285 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
4286
4287 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
4288 Define instead of including ../lwlib/lwlib.h, which causes
4289 compilation errors due to missing X11 headers.
4290
4291 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
4292
4293 * process.c (wait_reading_process_output): Omit incorrect test of
4294 p->infd against zero. Add easserts for infd having a plausible value.
4295
4296 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
4297
4298 Adjust to match recent lwlib changes.
4299 * menu.h (xmalloc_widget_value): Replace by ...
4300 (make_widget_value): ... new prototype.
4301 * menu.c (xmalloc_widget_value): Replace by ...
4302 (make_widget_value): ... new function.
4303 (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
4304 * gtkutil.c (malloc_widget_value, free_widget_value):
4305 (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
4306 * keyboard.h (enum button_type, struct _widget_value):
4307 * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
4308 Likewise.
4309 * nsmenu.m (ns_update_menubar, ns_menu_show):
4310 * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
4311 * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
4312 * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
4313
4314 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
4315
4316 * image.c (x_query_frame_background_color)
4317 [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
4318 Fix --enable-gcc-warnings compilation without image libraries.
4319
4320 2014-06-02 Eli Zaretskii <eliz@gnu.org>
4321
4322 * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
4323 emulated break value only if it goes up.
4324 (sbrk): Add assertion that the INCREMENT argument is strictly
4325 zero. Improve and correct the commentary.
4326
4327 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4328
4329 Improve AIX-related merge from emacs-24.
4330 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
4331 * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
4332 not on AIX; since we're on the trunk we can use enums more broadly.
4333
4334 * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
4335
4336 2014-06-02 Jan Djärv <jan.h.d@swipnet.se>
4337
4338 * xterm.c (xg_scroll_callback): Remove position, for jump set portion
4339 to min(value, whole).
4340
4341 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4342
4343 Bring back the changes to GDB-visible symbols, but only on AIX.
4344 And only if it's not pre-4.2 GCC.
4345 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
4346 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
4347 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
4348 New macros.
4349
4350 2014-06-02 Eli Zaretskii <eliz@gnu.org>
4351
4352 * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
4353 with PT, not GPT. (Bug#16433)
4354
4355 Revert last changes to GDB-visible symbols.
4356 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
4357 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
4358 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
4359 Delete macros.
4360
4361 2014-06-02 Glenn Morris <rgm@gnu.org>
4362
4363 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
4364
4365 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4366
4367 Fix port to 32-bit AIX with xlc (Bug#17598).
4368 * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
4369 * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
4370 * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
4371 to work around a compiler bug in IBM xlc 12.1.
4372
4373 2014-06-02 Eli Zaretskii <eliz@gnu.org>
4374
4375 * xterm.c (x_update_window_end): Don't invalidate the entire
4376 mouse-highlight info, just signal frame_up_to_date_hook that mouse
4377 highlight needs to be redisplayed. (Bug#17588)
4378
4379 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
4380
4381 Port the GDB-visible symbols to AIX.
4382 Without them, GDB doesn't work to debug Emacs, since the AIX linker
4383 optimizes away the relevant external symbols. Use enums instead;
4384 this suffices for the AIX port, which is 32-bit-only anyway.
4385 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
4386 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
4387 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
4388 New macros.
4389
4390 Include sources used to create macuvs.h.
4391 * Makefile.in ($(srcdir)/macuvs.h): New rule.
4392 * macuvs.h: Use automatically-generated header.
4393
4394 2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
4395
4396 Port signal-handling to DragonFly BSD (Bug#17646).
4397 * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
4398 Move implementations from callproc.c to sysdep.c.
4399 * process.h, syssignal.h (block_child_signal, unblock_child_signal):
4400 Move declarations from process.h to syssignal.h.
4401
4402 2014-06-01 Juanma Barranquero <lekktu@gmail.com>
4403
4404 * callint.c (Ffuncall_interactively): Add usage.
4405
4406 2014-06-01 Jan Djärv <jan.h.d@swipnet.se>
4407
4408 * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
4409
4410 2014-05-30 Eli Zaretskii <eliz@gnu.org>
4411
4412 * w32heap.c (malloc_before_dump, malloc_after_dump)
4413 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
4414 (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
4415 set errno where appropriate to emulate CRT functions.
4416
4417 2014-05-30 Dmitry Antipov <dmantipov@yandex.ru>
4418
4419 Debugging facility to check whether 'const char *' points to
4420 relocatable data of non-pure Lisp string.
4421 * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
4422 (mark_maybe_pointer): ... adjusted user.
4423 (relocatable_string_data_p): New function.
4424 * lisp.h (relocatable_string_data_p): Add prototype.
4425 * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
4426 the pointer to relocatable Lisp data is not used.
4427
4428 2014-05-30 Paul Eggert <eggert@cs.ucla.edu>
4429
4430 Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
4431 * atimer.c (block_atimers):
4432 * callproc.c (block_child_signal): Block SIGINT too;
4433 otherwise, its handler might now unblock signals that it shouldn't.
4434 * keyboard.c (read_char): Clear signal mask, since we may
4435 be in a SIGINT handler, and many signals may be masked.
4436 * keyboard.c (handle_interrupt):
4437 * sysdep.c (handle_arith_signal):
4438 Clear signal mask instead of just unblocking the signal that
4439 was received, since several signals may be blocked at this point.
4440
4441 2014-05-29 Eli Zaretskii <eliz@gnu.org>
4442
4443 * Makefile.in (TEMACS_POST_LINK): Remove target.
4444 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
4445 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
4446
4447 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
4448
4449 * xmenu.c (xdialog_show): Remove prototype, rename to
4450 x_dialog_show, remove 2nd arg because it's always zero
4451 and simplify accordingly.
4452 (xw_popup_dialog): Adjust user.
4453 * w32menu.c (w32_dialog_show): Adjust prototype, remove
4454 2nd arg because it's always zero and simplify accordingly.
4455 (w32_popup_dialog): Adjust user.
4456
4457 2014-05-29 Eli Zaretskii <eliz@gnu.org>
4458
4459 * w32heap.c (report_temacs_memory_usage): New function.
4460
4461 * unexw32.c (unexec) [ENABLE_CHECKING]:
4462 Call report_temacs_memory_usage.
4463
4464 * w32heap.h (report_temacs_memory_usage): Add prototype.
4465
4466 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
4467
4468 Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
4469 * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
4470
4471 2014-05-29 Eli Zaretskii <eliz@gnu.org>
4472
4473 * buffer.c (init_buffer): Accept an argument 'initialized'.
4474 [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
4475 mmap_regions and mmap_fd, to avoid referencing stale data from the
4476 dump phase. Add an assertion for buffer text of buffers created
4477 in temacs before this function is called. (Bug#17622)
4478 (mmap_regions_1, mmap_fd_1): Remove unused variables.
4479
4480 * lisp.h (init_buffer): Update prototype.
4481
4482 * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
4483
4484 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
4485
4486 * alloc.c (Fgarbage_collect): Fix compilation with
4487 GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
4488
4489 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
4490
4491 * frame.c, frame.h (frame_char_to_pixel_position)
4492 (frame_set_mouse_position): Now static, and made private in
4493 frame.c rather than public in frame.h.
4494
4495 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
4496
4497 Refactor mouse positioning stuff to avoid code duplication.
4498 * frame.h (frame_char_to_pixel_position): New function.
4499 (x_set_mouse_position): Rename to...
4500 (frame_set_mouse_position): ...new function.
4501 (frame_set_mouse_pixel_position): Add prototype.
4502 * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
4503 Rename to frame_set_mouse_pixel_position.
4504 * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
4505 Adjust users.
4506 * xterm.h, w32term.h ( x_set_mouse_position)
4507 (x_set_mouse_pixel_position): Remove prototypes.
4508
4509 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
4510
4511 On X, always make pointer visible when deleting frame (Bug#17609).
4512 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
4513 Pass frame as arg.
4514 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
4515 Adjust prototypes.
4516 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
4517 * keyboard.c (gobble_input): If there is no terminal input error,
4518 make sure the pointer is visible for all frames on this terminal.
4519 * xterm.c (x_free_frame_resources): Enable pointer visibility if
4520 it was previously disabled.
4521
4522 2014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
4523
4524 * data.c (Fzerop): Move to Elisp.
4525 (syms_of_data): Don't defsubr it.
4526 * keyboard.c (echo_keystrokes_p): New function.
4527 (read_char, record_menu_key, read_key_sequence): Use it.
4528
4529 * callint.c (Qfuncall_interactively): New var.
4530 (Qcall_interactively): Remove.
4531 (Ffuncall_interactively): New function.
4532 (Fcall_interactively): Use it.
4533 (syms_of_callint): Defsubr it.
4534
4535 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
4536
4537 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
4538 relocated from under us.
4539
4540 2014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
4541
4542 Use mmap(2) emulation for allocating buffer text on MS-Windows.
4543 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
4544 configure, not from HEAPSIZE.
4545 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
4546
4547 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
4548 for MinGW, since it no longer uses gmalloc.
4549
4550 * buffer.c: Do not define mmap allocations functions for Windows.
4551 Remove mmap_find which is unused. Remove mmap_set_vars which does
4552 nothing useful.
4553 [WINDOWSNT]: Include w32heap.h.
4554 (init_buffer): Always allocate new memory for buffers.
4555
4556 * emacs.c: Remove mmap_set_vars calls.
4557
4558 * image.c (free_image): Undef free for Windows because it is
4559 redirected to our private version.
4560
4561 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
4562 (copy_executable_and_dump_data): Remove dumping the heap section.
4563 (unexec): Restore using_dynamic_heap after dumping.
4564
4565 * w32heap.c (dumped_data_commit, malloc_after_dump)
4566 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
4567 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
4568 (mmap_free): New functions.
4569
4570 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
4571
4572 2014-05-27 Paul Eggert <eggert@cs.ucla.edu>
4573
4574 * image.c (imagemagick_load_image): Use MagickRealType for local
4575 'color_scale', instead of double, to avoid a GCC warning about
4576 double promotion.
4577
4578 * xfns.c (Fx_window_property): Remove unused local.
4579
4580 Don't kill already-reaped process (Bug#17561).
4581 * process.c (process_send_signal): Fix race condition where a
4582 subprocess was reaped by a signal handler between the check for
4583 liveness and calling 'kill', which meant that Emacs could in
4584 theory kill an innocent bystander process. Do the fix by blocking
4585 SIGCHLD in a critical section that checks liveness before killing.
4586
4587 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4588
4589 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
4590
4591 2014-05-26 Ken Brown <kbrown@cornell.edu>
4592
4593 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
4594 even if !CYGWIN (see bug#17510).
4595
4596 2014-05-26 Jan Djärv <jan.h.d@swipnet.se>
4597
4598 * nsfns.m (Fns_do_applescript): Surround NSApp run
4599 with calls to ns_init_events, ns_finish_events (Bug#17424).
4600
4601 * nsterm.h (ns_init_events, ns_finish_events): Declare.
4602
4603 * nsterm.m (ns_init_events, ns_finish_events): New functions.
4604 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
4605
4606 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
4607 with calls to ns_init_events, ns_finish_events (Bug#17424).
4608
4609 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4610
4611 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
4612 if we are iterating over an object that generates glyphs for
4613 marginal areas. (Bug#17585)
4614
4615 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
4616
4617 * xdisp.c (safe__call1, safe__eval): Now static.
4618
4619 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4620
4621 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
4622 (safe_call, safe__call1): Construct a va_list argument for safe_call.
4623 (safe_call1): Call safe_call instead of safe__call directly.
4624
4625 2014-05-26 Ken Brown <kbrown@cornell.edu>
4626
4627 * w32term.c (x_delete_display) [CYGWIN]: Don't free
4628 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
4629 once. (Bug#17510)
4630
4631 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
4632
4633 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
4634 (safe__call, safe__call1, safe__eval): New functions.
4635 (safe_call): Use it.
4636 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
4637 (display_mode_element): Same for `:eval'.
4638
4639 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
4640
4641 Fix port to 32-bit AIX (Bug#17540).
4642 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
4643 twice. _text already includes this offset.
4644 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
4645
4646 2014-05-26 Eli Zaretskii <eliz@gnu.org>
4647
4648 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
4649 when closest_pos is identical to to_charpos, don't recurse, since
4650 we already tried that, and failed. (Bug#17539)
4651
4652 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
4653 unwinding when frame's faces were not initialized yet, increment
4654 the frame's image-cache reference count before calling
4655 x_free_frame_resources. Don't dereference
4656 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
4657
4658 2014-05-25 Jan Djärv <jan.h.d@swipnet.se>
4659
4660 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
4661 nsterm.m now.
4662
4663 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
4664 macfont.m, call draw with adjusted arguments so font drivers
4665 don't need to do that.
4666
4667 * macfont.m (macfont_draw): Merge changes from Macport.
4668
4669 2014-05-24 Eli Zaretskii <eliz@gnu.org>
4670
4671 * alloc.c (garbage_collect_1): New function, with all of the guts
4672 of Fgarbage_collect.
4673 (mark_stack): Accept an argument END and don't mark Lisp objects
4674 on the stack beyond the address given by END. Calculation of END
4675 was moved to Fgarbage_collect.
4676 (Fgarbage_collect): Calculate the end address of the stack portion
4677 that needs to be examined by mark_stack, and pass that address to
4678 garbage_collect_1, which will pass it to mark_stack.
4679 See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
4680 for more details about the underlying problems. In particular,
4681 this avoids dumping Emacs with the large hash-table whose value is
4682 held in purify-flag for most of the time loadup.el runs.
4683
4684 2014-05-24 Jan Djärv <jan.h.d@swipnet.se>
4685
4686 * xfns.c (x_window_property_intern): New function (code from
4687 x_window_property).
4688 (Fx_window_property): Call x_window_property_intern. If property
4689 not found and NILP (source) and outer window != inner window,
4690 check outer window for property (Bug#17537).
4691
4692 2014-05-22 Paul Eggert <eggert@cs.ucla.edu>
4693
4694 Supply malloc and alloc_size attributes for extern allocators.
4695 This documents the C API, and helps GCC generate a bit better code.
4696 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
4697 (ATTRIBUTE_MALLOC_SIZE): New macros.
4698 * gmalloc.c (malloc, realloc, calloc):
4699 * gtkutil.h (malloc_widget_value):
4700 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
4701 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
4702 Use them.
4703
4704 2014-05-21 Paul Eggert <eggert@cs.ucla.edu>
4705
4706 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
4707 * image.c (imagemagick_load_image): Port to hosts that do not use
4708 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
4709
4710 2014-05-21 Leo Liu <sdl.web@gmail.com>
4711
4712 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
4713
4714 2014-05-20 Michael Albinus <michael.albinus@gmx.de>
4715
4716 * dbusbind.c (xd_signature): Revert last 2 patches.
4717
4718 2014-05-19 Paul Eggert <eggert@cs.ucla.edu>
4719
4720 Allow any non-nil value to count as true in bool-vector.
4721 Likewise for xd_signature in dbusbind.c.
4722 This is more consistent with the usual practice in Emacs, which is
4723 that any non-nil value counts as true.
4724 * alloc.c (Fbool_vector): Don't require args to be t or nil.
4725 * dbusbind.c (xd_signature): Likewise, for booleans.
4726 * data.c, lisp.h (Qbooleanp):
4727 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
4728
4729 2014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
4730
4731 * lisp.h (CHECK_BOOLEAN): New function.
4732 * alloc.c (Fbool_vector): New function.
4733 (syms_of_alloc): Defsubr it.
4734 * data.c (Qbooleanp): New symbol.
4735 (syms_of_data): DEFSYM it.
4736 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
4737
4738 * font.c (font_matching_entity): Extract font-entity object
4739 from the vector of matching entities (Bug#17486).
4740
4741 2014-05-17 Paul Eggert <eggert@cs.ucla.edu>
4742
4743 Assume C99 or later (Bug#17487).
4744 * bytecode.c (B__dummy__): Remove.
4745 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
4746 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
4747 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
4748 * regex.c (DEBUG_PRINT): Assume varargs macros.
4749 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
4750
4751 2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
4752
4753 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
4754 memory for every buffer that was dumped.
4755
4756 2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
4757
4758 * fns.c (Freverse): Allow vectors, bool vectors and strings.
4759 (Fnreverse): Allow vectors and bool vectors.
4760
4761 2014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
4762
4763 Minor cleanup for terminal setup.
4764 * termhooks.h (create_terminal): Adjust prototype.
4765 * terminal.c (create_terminal): Pass output method and RIF as args.
4766 (init_initial_terminal):
4767 * nsterm.m (ns_create_terminal):
4768 * term.c (init_tty):
4769 * w32term.c (w32_create_terminal):
4770 * xterm.c (x_create_terminal): Adjust users.
4771 Avoid redundant NULL initializers and add comments.
4772
4773 2014-05-13 Paul Eggert <eggert@cs.ucla.edu>
4774
4775 * keyboard.c (Qdeactivate_mark): Now static.
4776
4777 2014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
4778
4779 If available, use Xfixes extension to do pointer blanking.
4780 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
4781 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
4782 (make_invisible_cursor): Move to...
4783 * xterm.c (make_invisible_cursor): ...here.
4784 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
4785 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
4786 (x_term_init): Call to x_setup_pointer_blanking.
4787 (XTtoggle_invisible_pointer): Use blanking specific to this display.
4788 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
4789
4790 2014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4791
4792 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
4793
4794 2014-05-12 Glenn Morris <rgm@gnu.org>
4795
4796 * fileio.c (Ffile_executable_p): Doc tweak.
4797
4798 2014-05-12 Jan Djärv <jan.h.d@swipnet.se>
4799
4800 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
4801 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
4802
4803 2014-05-08 Paul Eggert <eggert@cs.ucla.edu>
4804
4805 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
4806
4807 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
4808
4809 Fix initialization of minibuffer history variable (Bug#17430).
4810 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
4811 Move the initialization up to prevent any "value void" message.
4812
4813 2014-05-08 Samuel Bronson <naesten@gmail.com>
4814
4815 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
4816 are matched (bug#17413).
4817
4818 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
4819
4820 Stop tooltips pulling Emacs window to front (Bug#17408).
4821 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
4822 SetWindowPos invocations.
4823
4824 2014-05-08 Jan Djärv <jan.h.d@swipnet.se>
4825
4826 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
4827 not initialized (Bug#17398).
4828
4829 2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
4830
4831 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
4832
4833 2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
4834
4835 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
4836 [HAVE_NS]: Do not include png.h.
4837 (x_query_frame_background_color): New function.
4838 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
4839 (png_load_body): Coalesce duplicate code.
4840
4841 2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
4842
4843 Consult libpng-config more consistently (Bug#17339).
4844 * Makefile.in (PNG_CFLAGS): New var.
4845 (ALL_CFLAGS): Use it.
4846 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
4847 CFLAGS now handles this.
4848
4849 2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
4850
4851 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
4852 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
4853 because WCONTINUED is always defined now.
4854 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
4855
4856 2014-05-03 Eli Zaretskii <eliz@gnu.org>
4857
4858 * buffer.c (overlay_strings): Fix the wording of the commentary.
4859
4860 2014-05-01 Glenn Morris <rgm@gnu.org>
4861
4862 * floatfns.c (Fisnan):
4863 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
4864
4865 2014-05-01 Eli Zaretskii <eliz@gnu.org>
4866
4867 * term.c (tty_menu_activate): A better initialization for cursor
4868 coordinates.
4869
4870 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
4871
4872 * intervals.c: Tighten assertions.
4873 (create_root_interval): Make sure the interval is not empty.
4874 (intervals_equal): Use booleans.
4875 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
4876 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
4877 (balance_possible_root_interval): Simplify and use booleans.
4878 (split_interval_right, split_interval_left): Check LENGTH, and remove
4879 now redundant assertion.
4880 (adjust_intervals_for_insertion): Remove now redundant assertions.
4881 (delete_node, interval_deletion_adjustment)
4882 (adjust_intervals_for_deletion, merge_interval_right)
4883 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
4884 (reproduce_interval): Make sure the interval is not empty.
4885
4886 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
4887
4888 * term.c (tty_menu_activate): Don't assume row and col are initialized.
4889 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
4890 satisfaction that they would always be initialized.
4891
4892 2014-04-30 Eli Zaretskii <eliz@gnu.org>
4893
4894 * term.c (tty_menu_display): Move the cursor to the active menu item.
4895 (tty_menu_activate): Return the cursor to the active menu item
4896 after displaying the menu and after displaying help-echo.
4897 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
4898 for the details of why this is needed by screen readers and
4899 Braille displays.
4900
4901 2014-04-30 Glenn Morris <rgm@gnu.org>
4902
4903 * process.c (handle_child_signal):
4904 Handle systems without WCONTINUED. (Bug#15110, 17339)
4905
4906 2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
4907
4908 * window.c (struct saved_window): Remove mark.
4909 (Fset_window_configuration, save_window_save)
4910 (compare_window_configurations): Don't touch marks any more.
4911
4912 2014-04-28 Paul Eggert <eggert@cs.ucla.edu>
4913
4914 Use bits_word for gcmarkbits.
4915 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
4916 bits_word is typically a tad more efficient for mark bits than
4917 unsigned is, so use bits_word. All uses changed.
4918 * lisp.h (BITS_PER_INT): Remove; no longer used.
4919
4920 Avoid undefined behavior in signed left shift.
4921 This ports to GCC 4.9.0 with -fsanitize=undefined.
4922 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
4923 * data.c (Fash):
4924 * regex.c (extract_number):
4925 * lisp.h (make_number, XINT):
4926 Do not shift a 1 bit left into a sign bit.
4927 * alloc.c (struct cons_block, struct float_block): Use unsigned,
4928 not int, for gcmarkbits. All uses changed.
4929
4930 2014-04-25 Eli Zaretskii <eliz@gnu.org>
4931
4932 * search.c (Fnewline_cache_check): Don't try to count newlines
4933 outside the buffer's restriction, as find_newline doesn't support that.
4934
4935 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
4936
4937 * window.c (Fset_window_configuration): Deactivate the mark before
4938 unsetting the mark.
4939 (set_window_buffer): Ignore window_initialized.
4940 (window_initialized): Remove.
4941 * keyboard.c (Qdeactivate_mark): Not static any more.
4942 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
4943 Update all callers.
4944
4945 2014-04-23 Paul Eggert <eggert@cs.ucla.edu>
4946
4947 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
4948 and to clang 3.4, which have fixed the bug. This should let us
4949 run a bit faster on these platforms when address sanitization is
4950 in effect.
4951
4952 2014-04-22 Paul Eggert <eggert@cs.ucla.edu>
4953
4954 Port to GCC 4.9.0 with --enable-gcc-warnings.
4955 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
4956 All uses removed.
4957 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
4958 a way that also works with GCC 4.9.0.
4959
4960 * search.c (Fnewline_cache_check): Remove unused locals.
4961
4962 2014-04-22 Eli Zaretskii <eliz@gnu.org>
4963
4964 * search.c (find_newline1): New subroutine.
4965 (Fnewline_cache_check): New function.
4966 (syms_of_search): Defsubr it.
4967
4968 2014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
4969
4970 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
4971 * keyboard.c (unblock_input): Add comment.
4972 * xgselect.c (xg_select): Prevent Glib main loop recursion.
4973
4974 2014-04-22 Daniel Colascione <dancol@dancol.org>
4975
4976 * lread.c (readevalloop_eager_expand_eval): New function
4977 that can recurse into toplevel forms.
4978 (readevalloop): Call it.
4979 * lisp.h: Declare Qprogn.
4980 * callint.c (Qprogn): No longer static.
4981
4982 2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
4983
4984 * intervals.c (rotate_right, rotate_left): Fix up length computation.
4985 Also change identifiers to match the comments, and add more assertions
4986 (bug#16234).
4987
4988 2014-04-18 Paul Eggert <eggert@cs.ucla.edu>
4989
4990 * emacs.c (close_output_streams): Don't clear and restore errno.
4991
4992 2014-04-18 Jan Djärv <jan.h.d@swipnet.se>
4993
4994 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
4995 never becomes visible, i.e. using XMonad (Bug#17237).
4996
4997 2014-04-18 Eli Zaretskii <eliz@gnu.org>
4998
4999 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
5000 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
5001 (Fline_pixel_height): Don't assume that the current buffer and the
5002 selected window's buffer are one and the same. (Bug#17281)
5003
5004 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
5005 paragraph-start cache before the newline cache. (Bug#17269)
5006
5007 2014-04-17 Paul Eggert <eggert@cs.ucla.edu>
5008
5009 * term.c (tty_send_additional_strings): No need to fflush here,
5010 as callers fflush.
5011 (tty_set_terminal_modes): fflush after sending additional strings,
5012 not before.
5013
5014 2014-04-17 Daniel Colascione <dancol@dancol.org>
5015
5016 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
5017 New symbols.
5018 (tty_send_additional_strings): New function.
5019 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
5020 (syms_of_term): Intern tty-mode-set-strings and
5021 tty-mode-reset-strings.
5022
5023 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
5024
5025 * window.c (save_window_save): Lookup window_point_insertion_type in
5026 the right buffer (bug#15457).
5027 (Qwindow_point_insertion_type): New var.
5028 (syms_of_window): Initialize it.
5029
5030 2014-04-16 Eli Zaretskii <eliz@gnu.org>
5031
5032 Fix the MSDOS build.
5033 * unexcoff.c [MSDOS]: Include libc/atexit.h.
5034 (copy_text_and_data): Zero out the atexit chain pointer before
5035 dumping Emacs.
5036
5037 * termhooks.h (encode_terminal_code): Update prototype.
5038
5039 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
5040 visible for all DOS_NT ports, not just WINDOWSNT.
5041 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
5042
5043 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
5044 unless it is defined.
5045 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
5046
5047 * process.c (close_on_exec, accept4, process_socket): Move into
5048 the "ifdef subprocesses" part.
5049 (catch_child_signal): Condition by "ifdef subprocesses".
5050 (syms_of_process) <Qinternal_default_process_sentinel>
5051 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
5052
5053 * msdos.h: Add prototypes for new functions.
5054 (EINPROGRESS): Define.
5055 (O_CLOEXEC): Define to zero.
5056
5057 * msdos.c (check_window_system): Remove unnecessary an
5058 incompatible duplicate function.
5059 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
5060 New functions in support of new functionality.
5061
5062 * menu.c (single_menu_item): Add visual indication of submenu
5063 also for menus on MSDOS frames.
5064 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
5065
5066 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
5067 when async subprocesses aren't supported.
5068
5069 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
5070
5071 * emacs.c (close_output_streams): Zero out errno before calling
5072 close_stream.
5073
5074 * dired.c [MSDOS]: Include msdos.h.
5075
5076 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
5077 (DATA_START) [MSDOS]: Define.
5078 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
5079
5080 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
5081 Ifdef away for MSDOS.
5082 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
5083 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
5084 for MSDOS.
5085 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
5086 Use temporary file template that is compatible with mkostemp.
5087 Move vfork-related portions under #ifndef MSDOS.
5088 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
5089
5090 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
5091
5092 * buffer.c (Foverlays_at): Add argument `sorted'.
5093
5094 2014-04-16 Eli Zaretskii <eliz@gnu.org>
5095
5096 * insdel.c (invalidate_buffer_caches): When deleting or replacing
5097 text, invalidate the bidi_paragraph_cache upto and including the
5098 preceding newline.
5099
5100 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
5101
5102 Port to IRIX 6.5 (Bug#9684).
5103 * conf_post.h (INET6) [IRIX6_5]: Define.
5104 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
5105 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
5106
5107 2014-04-16 Eli Zaretskii <eliz@gnu.org>
5108
5109 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
5110 before passing it to system APIs.
5111
5112 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
5113
5114 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
5115 make sure stack.byte_string_start is not de-adjusted by pushhandler.
5116
5117 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
5118
5119 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
5120
5121 2014-04-15 Paul Eggert <eggert@cs.ucla.edu>
5122
5123 Remove DATA_SEG_BITS.
5124 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
5125 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
5126 cc, but that platform is so old that SGI itself stopped supporting
5127 it in December 2013. If you still need Emacs on IRIX, please
5128 either compile with GCC and port the undumping code, or run
5129 './configure --with-wide-int'.
5130 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
5131 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
5132 DEFINE_GDB_SYMBOL_START way to define it.
5133 (NONPOINTER_BITS): New macro.
5134 (EMACS_INT): Use it.
5135 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
5136 the problem and/or configuring --with-wide-int.
5137 (USE_LSB_TAG): Simplify, based on above changes.
5138 (gdb_DATA_SEG_BITS): Remove. All uses removed.
5139 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
5140
5141 2014-04-12 Eli Zaretskii <eliz@gnu.org>
5142
5143 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
5144 covered by a display string that ends in a newline, and that cases
5145 going back by DVPOS lines to hit the search limit, lift the limit
5146 and go back until DVPOS is reached. (Bug#17244)
5147
5148 * indent.c (Fvertical_motion): Handle correctly the case when the
5149 display string is preceded by an empty line.
5150
5151 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
5152 use S_IWRITE instead.
5153
5154 2014-04-11 Glenn Morris <rgm@gnu.org>
5155
5156 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
5157
5158 2014-04-11 Ken Brown <kbrown@cornell.edu>
5159
5160 * Makefile.in (EMACS_MANIFEST): Revert last change.
5161
5162 2014-04-10 Daniel Colascione <dancol@dancol.org>
5163
5164 * puresize.h (BASE_PURESIZE): Increase.
5165
5166 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
5167
5168 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
5169
5170 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
5171 region handling (and don't call signal_before_change) if
5172 inhibit_modification_hooks is set.
5173 (signal_before_change): Don't check inhibit_modification_hooks any more.
5174
5175 2014-04-08 Daniel Colascione <dancol@dancol.org>
5176
5177 * alloc.c (sweep_symbols, mark_object): Assert that symbol
5178 function cells contain valid lisp objects. (Modified version of
5179 patch from Dmitry).
5180
5181 * alloc.c (detect_suspicious_free): Split actual stack capturing
5182 out into new function for easier breakpoint setting.
5183 (note_suspicious_free): New function.
5184
5185 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
5186
5187 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
5188
5189 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
5190 (symbol_block_pinned): New var.
5191 (Fmake_symbol): Initialize `pinned'.
5192 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
5193 pinned and signal an error for un-purifiable objects.
5194 (pure_cons): Use it.
5195 (Fpurecopy): Use it, except for objects that can't be purified.
5196 (mark_pinned_symbols): New function.
5197 (Fgarbage_collect): Use it.
5198 (gc_sweep): Remove hack made unnecessary.
5199
5200 2014-04-07 Glenn Morris <rgm@gnu.org>
5201
5202 * keyboard.c (Fopen_dribble_file): Doc tweak.
5203
5204 2014-04-07 Ken Brown <kbrown@cornell.edu>
5205
5206 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
5207
5208 2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
5209
5210 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
5211 We have a substitute execinfo.h on hosts that lack it.
5212 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
5213 isn't optimized away.
5214
5215 2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
5216
5217 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
5218 * alloc.c (memory_full):
5219 * charset.c (syms_of_charset):
5220 * doc.c (Fsnarf_documentation):
5221 * emacs.c (main):
5222 * font.c (BUILD_STYLE_TABLE):
5223 * keyboard.c (make_lispy_event):
5224 * profiler.c (setup_cpu_timer):
5225 * xgselect.c (xg_select):
5226 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
5227 Use ARRAYELTS.
5228 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
5229 Replace the only use with ARRAYELTS (font_property_table).
5230 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
5231
5232 2014-04-03 Daniel Colascione <dancol@dancol.org>
5233
5234 * xterm.c (x_term_init):
5235 * xfns.c (best_xim_style):
5236 * xfaces.c (Fdump_colors):
5237 * w32fns.c (w32_default_color_map):
5238 * w32.c (init_environment, N_ENV_VARS):
5239 * unexcw.c (read_exe_header):
5240 * term.c (term_get_fkeys_1):
5241 * sysdep.c (init_baud_rate):
5242 * nsterm.m (ns_convert_key):
5243 * nsfns.m (get_geometry_from_preferences):
5244 * msdos.c (dos_set_window_size, init_environment):
5245 * macfont.m (mac_font_get_glyph_for_cid)
5246 (macfont_store_descriptor_attributes)
5247 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
5248 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
5249 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
5250 (syms_of_keyboard):
5251 * image.c (xpm_str_to_color_key):
5252 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
5253 * frame.c (x_set_frame_parameters):
5254 * fileio.c (Ffile_selinux_context):
5255 * emacs.c (sort_args):
5256 * dosfns.c (msdos_stdcolor_name):
5257 * dired.c (file_attributes):
5258 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
5259 Change expressions of the form sizeof(arr) / sizeof(arr[0])
5260 to ARRAYELTS (arr).
5261
5262 2014-04-02 Daniel Colascione <dancol@dancol.org>
5263
5264 * data.c (Ffset): Abort if we're trying to set a function call to
5265 a dead lisp object.
5266
5267 * lisp.h (ARRAYELTS): New macro.
5268
5269 * alloc.c: Include execinfo.h if available.
5270 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
5271 (suspicious_free_record): New structure.
5272 (suspicious_objects, suspicious_object_index)
5273 (suspicious_free_history, suspicious_free_history_index):
5274 New variables.
5275 (find_suspicious_object_in_range, detect_suspicious_free)
5276 (Fsuspicious_object): New functions.
5277 (cleanup_vector): Call find_suspicious_object_in_range.
5278
5279 2014-04-02 Martin Rudalics <rudalics@gmx.at>
5280
5281 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
5282 width from font width (Bug#17163).
5283
5284 * frame.c (x_set_frame_parameters): Calculate default values of
5285 new frame sizes only after all other frame parameters have been
5286 processed (Bug#17142).
5287
5288 2014-04-02 Ken Brown <kbrown@cornell.edu>
5289
5290 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
5291 (Bug#17112)
5292
5293 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5294
5295 * xterm.c (x_draw_image_glyph_string): Adjust image background
5296 width accordingly when its x position is adjusted. (Bug#17115)
5297
5298 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
5299
5300 * font.c (font_list_entities): Do not add empty vector to font cache.
5301 (font_matching_entity): Likewise. If matching entity is found, insert
5302 1-item vector with this entity instead of entity itself (Bug#17125).
5303
5304 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
5305
5306 2014-04-01 Paul Eggert <eggert@cs.ucla.edu>
5307
5308 * fns.c (validate_subarray): Rename from validate_substring,
5309 since it works for vectors too. New arg ARRAY. Optimize for the
5310 non-nil case. Instead of returning bool, throw an error if out of
5311 range, so that the caller needn't do that. All uses changed.
5312 Report original values if out of range.
5313 (Fsubstring, Fsubstring_no_properties, secure_hash):
5314 Also optimize the case where FROM is 0 or TO is the size.
5315
5316 2014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
5317
5318 * search.c (Freplace_match): Use make_specified_string.
5319 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
5320 to catch bogus override face of glyph strings.
5321 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
5322 Move common substring range checking code to...
5323 (validate_substring): ...this function.
5324
5325 2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
5326
5327 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
5328
5329 2014-03-30 Jan Djärv <jan.h.d@swipnet.se>
5330
5331 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
5332 bar is zero height, just return (Bug#16976).
5333 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
5334
5335 * nsterm.h (EmacsView): Add wait_for_tool_bar.
5336
5337 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
5338 is nil. If waiting for toolbar to complete, force a redraw.
5339
5340 2014-03-28 Glenn Morris <rgm@gnu.org>
5341
5342 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
5343 (emacs_bugreport): New variable.
5344 (usage_message): Use PACKAGE_BUGREPORT.
5345 (syms_of_emacs) <report-emacs-bug-address>: New variable.
5346
5347 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
5348
5349 2014-03-27 Paul Eggert <eggert@cs.ucla.edu>
5350
5351 Port recent signal-related changes to FreeBSD.
5352 Problem reported by Herbert J. Skuhra.
5353 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
5354 Move decls from here ...
5355 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
5356
5357 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5358
5359 * w32term.c (x_draw_image_glyph_string): Fix computation of height
5360 and width of image background when it is displayed with a 'box'
5361 face. (Bug#17115)
5362
5363 2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
5364
5365 More backward-compatible fix to char-equal core dump (Bug#17011).
5366 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
5367 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
5368
5369 2014-03-27 Juanma Barranquero <lekktu@gmail.com>
5370
5371 * image.c (init_svg_functions): When loading SVG-related libraries,
5372 free already loaded libraries if the initialization fails.
5373 (rsvg_handle_set_size_callback): Remove declaration, unused.
5374
5375 2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
5376
5377 Fix core dump in char-equal (Bug#17011).
5378 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
5379 unibyte buffers, as we can't tell whether the characters are
5380 actually unibyte.
5381
5382 * insdel.c (adjust_markers_for_delete): Remove unused local.
5383
5384 2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
5385
5386 Have (MARKER . ADJUSTMENT) undo records always be immediately
5387 after their corresponding (TEXT . POS) record in undo list.
5388 (Bug#16818)
5389 * lisp.h (record-delete): New arg record_markers.
5390 (record_marker_adjustment): No longer needed outside undo.c.
5391 * insdel.c (adjust_markers_for_delete): Move calculation of marker
5392 adjustments to undo.c's record_marker_adjustments. Note that
5393 fileio.c's decide_coding_unwind is another caller to
5394 adjust_markers_for_delete. Because it has undo list bound to t,
5395 it does not rely on adjust_markers_for_delete to record marker
5396 adjustments.
5397 (del_range_2): Swap call to record_delete and
5398 adjust_markers_for_delete so as undo marker adjustments are
5399 recorded before current deletion's adjustments, as before.
5400 (adjust_after_replace):
5401 (replace_range): Pass value for new record_markers arg to
5402 delete_record.
5403 * undo.c (record_marker_adjustment): Rename to
5404 record_marker_adjustments and made static.
5405 (record_delete): Check record_markers arg and call
5406 record_marker_adjustments.
5407 (record_change): Pass value for new record_markers arg to
5408 delete_record.
5409 (record_point): at_boundary calculation no longer needs to account
5410 for marker adjustments.
5411
5412 2014-03-26 Martin Rudalics <rudalics@gmx.at>
5413
5414 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
5415 (Bug#17077).
5416
5417 2014-03-26 Glenn Morris <rgm@gnu.org>
5418
5419 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
5420
5421 2014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
5422
5423 * buffer.c (struct sortvec): Add field `spriority'.
5424 (compare_overlays): Use it.
5425 (sort_overlays): Set it.
5426
5427 2014-03-26 Eli Zaretskii <eliz@gnu.org>
5428
5429 * xdisp.c (redisplay_window): If all previous attempts to find the
5430 cursor row failed, try a few alternatives before falling back to
5431 the top-most row of the window. Use row_containing_pos. (Bug#17047)
5432
5433 2014-03-26 Juanma Barranquero <lekktu@gmail.com>
5434
5435 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
5436 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
5437
5438 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
5439 variables on Windows.
5440
5441 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
5442
5443 * w32.c (unsetenv): Remove unused var `retval'.
5444 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
5445
5446 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
5447 (start_watching): Remove unused var `thr'.
5448
5449 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
5450 (find_child_console): Remove unnecesary var `thread_id'.
5451
5452 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
5453 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
5454
5455 2014-03-26 Glenn Morris <rgm@gnu.org>
5456
5457 * filelock.c (Flock_buffer): Doc tweak.
5458
5459 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
5460 * emacs.c (shut_down_emacs):
5461 * fileio.c (Finsert_file_contents, write_region):
5462 * filelock.c (top-level, syms_of_filelock):
5463 * insdel.c (prepare_to_modify_buffer_1):
5464 CLASH_DETECTION is always defined now.
5465
5466 2014-03-25 Eli Zaretskii <eliz@gnu.org>
5467
5468 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
5469 DLL handle, to speed up thread startup.
5470
5471 2014-03-25 Paul Eggert <eggert@cs.ucla.edu>
5472
5473 Handle sigmask better with nested signal handlers (Bug#15561).
5474 * atimer.c (sigmask_atimers): Remove.
5475 Remaining use rewritten to use body of this function.
5476 * atimer.c (block_atimers, unblock_atimers):
5477 * callproc.c (block_child_signal, unblock_child_signal):
5478 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
5479 New arg OLDSET. All callers changed.
5480 * atimer.c (block_atimers, unblock_atimers):
5481 * callproc.c (block_child_signal, unblock_child_signal):
5482 * keyboard.c (handle_interrupt):
5483 * sound.c (vox_configure, vox_close):
5484 Restore the old signal mask rather than unilaterally clearing bits
5485 from the mask, in case a handler is running within another
5486 handler. All callers changed.
5487 * lisp.h, process.c, process.h, term.c:
5488 Adjust decls and callers to match new API.
5489 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
5490 signal handlers aren't supposed to use floating point anyway.
5491 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
5492
5493 2014-03-23 Daniel Colascione <dancol@dancol.org>
5494
5495 Split gc_sweep into discrete functions for legibility and better
5496 stack traces.
5497
5498 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
5499 (sweep_vectors): Fix typo in comment.
5500 (sweep_conses, sweep_floats, sweep_intervals)
5501 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
5502 (gc_sweep): Call new functions, to which existing functionality is
5503 moved.
5504 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
5505
5506 2014-03-23 Juanma Barranquero <lekktu@gmail.com>
5507
5508 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
5509
5510 2014-03-23 Daniel Colascione <dancol@dancol.org>
5511
5512 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
5513 only if xic_style calls for it. This change allows Emacs to work
5514 with ibus. Also, don't leak resources if create_frame_xic fails,
5515 and stop caching xic_style across different displays.
5516 (supported_xim_styles): Make const.
5517 (best_xim_style): Remove first parameter: it's always just
5518 supported_xim_styles. Change to look at supported_xim_styles
5519 directly.
5520
5521 2014-03-23 Daniel Colascione <dancol@dancol.org>
5522
5523 * term.c (init_tty): Rearrange condition for clarity; print
5524 appropriate diagnostic.
5525
5526 2014-03-23 Daniel Colascione <dancol@dancol.org>
5527
5528 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
5529 array. (ASAN caught.)
5530
5531 2014-03-22 Glenn Morris <rgm@gnu.org>
5532
5533 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
5534
5535 2014-03-22 Daniel Colascione <dancol@dancol.org>
5536
5537 * process.c (conv_sockaddr_to_lisp): When extracting the string
5538 names of AF_LOCAL sockets, stop before reading uninitialized memory.
5539
5540 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5541
5542 Fix regression introduced by patch for Bug#10500.
5543 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
5544 * w32term.c (x_draw_image_relief): Likewise.
5545
5546 2014-03-21 Martin Rudalics <rudalics@gmx.at>
5547
5548 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
5549 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
5550 maximize a frame for odd default fonts.
5551
5552 2014-03-21 Glenn Morris <rgm@gnu.org>
5553
5554 * minibuf.c (history-length): Increase default from 30 to 100.
5555
5556 2014-03-21 Daniel Colascione <dancol@dancol.org>
5557
5558 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
5559 every time we switch to minibuffer.
5560
5561 * alloc.c (lisp_align_malloc, allocate_string_data)
5562 (allocate_vectorlike): Allow mmap allocation of lisp objects.
5563 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
5564
5565 2014-03-21 Eli Zaretskii <eliz@gnu.org>
5566
5567 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
5568 support more "verbs".
5569
5570 2014-03-21 Daniel Colascione <dancol@dancol.org>
5571
5572 Always prohibit dumping a dumped Emacs.
5573
5574 * emacs.c (might_dump): New variable.
5575 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
5576 * lisp.h (might_dump): Declare.
5577 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
5578
5579 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
5580
5581 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
5582
5583 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
5584
5585 * doc.c (store_function_docstring): Warn when we don't know where to
5586 put a docstring.
5587 (Fsubstitute_command_keys): Don't advertise the fact that
5588 text-properties are dropped, since we think it's a bug that we'll fix.
5589
5590 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
5591 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
5592 * frame.c (frame_garbaged): Make "docstring" more precise.
5593
5594 2014-03-20 Glenn Morris <rgm@gnu.org>
5595
5596 * charset.c (init_charset): When we cannot find the charsets directory,
5597 mention if EMACSDATA is set.
5598
5599 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
5600
5601 * fns.c (Frandom): Fix rare bug where the result isn't random.
5602
5603 Fix porting inconsistency about rounding to even.
5604 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
5605 This way, the unusual !HAVE_RINT case acts like the usual
5606 HAVE_RINT case, and we can fix the documentation accordingly.
5607
5608 2014-03-19 Eli Zaretskii <eliz@gnu.org>
5609
5610 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
5611 (w32_wnd_proc): Initialize the dwHoverTime member of
5612 TRACKMOUSEEVENT structure.
5613
5614 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
5615
5616 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
5617
5618 2014-03-16 Eli Zaretskii <eliz@gnu.org>
5619
5620 * search.c (find_newline): Speed up the function when using the
5621 newline cache, by halving the number of calls to
5622 region_cache_forward and region_cache_backward. (Bug#16830)
5623
5624 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
5625
5626 * buffer.c (Fset_buffer): Document return value (bug#17015).
5627
5628 2014-03-14 Martin Rudalics <rudalics@gmx.at>
5629
5630 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
5631 nil, always resize character wise to avoid potential loss of the
5632 mode line (Bug#16923 related).
5633
5634 2014-03-12 Martin Rudalics <rudalics@gmx.at>
5635
5636 * frame.c (x_set_frame_parameters): Always calculate new sizes
5637 pixelwise to avoid potential loss when rounding.
5638
5639 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
5640
5641 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
5642 * xterm.c (x_free_frame_resources): Free all allocated cursors.
5643
5644 2014-03-10 Eli Zaretskii <eliz@gnu.org>
5645
5646 * w32.c (fstatat): Don't add an extra slash if the argument ends
5647 with a slash: this fails the subsequent call to stat_worker on
5648 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
5649
5650 2014-03-09 Martin Rudalics <rudalics@gmx.at>
5651
5652 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
5653
5654 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
5655
5656 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
5657
5658 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
5659 when frame is only on one screen (Bug#14713).
5660
5661 2014-03-08 Eli Zaretskii <eliz@gnu.org>
5662
5663 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
5664 there's a valid wrap point in the display line, the last glyph
5665 cannot "just barely fit" on this row, because display_line doesn't
5666 let it. Instead, proceed as if the last glyph didn't fit, so that
5667 we eventually back up the iterator to the wrap point. This avoids
5668 delusional behavior of move_it_to, whereby it proceeds to the next
5669 display line, but sets current_x to zero for all the glyphs that
5670 without word-wrap would fit on the previous display line.
5671 One result was that visual-order cursor movement behaved erratically
5672 under word-wrap.
5673 (Fmove_point_visually): Add code to find the x coordinate of the
5674 last character before wrap point, under word-wrap on a TTY.
5675
5676 2014-03-07 Eli Zaretskii <eliz@gnu.org>
5677
5678 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
5679 also return value of MOVE_POS_MATCH_OR_ZV from
5680 move_it_in_display_line_to, when moving from beginning of line to
5681 point's position. (Bug#16961)
5682
5683 2014-03-07 Martin Rudalics <rudalics@gmx.at>
5684
5685 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
5686 * window.c (Fselect_window): Explain NORECORD and
5687 `buffer-list-update-hook' in doc-string.
5688
5689 2014-03-06 Martin Rudalics <rudalics@gmx.at>
5690
5691 * window.c (Fother_window_for_scrolling): Check that
5692 Vother_window_scroll_buffer is a buffer.
5693
5694 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
5695
5696 * xterm.c (xim_initialize): Always pass a copy of resource name
5697 to XRegisterIMInstantiateCallback and eassert whether return
5698 value is True. Passing copy is important because Xlib doesn't
5699 make its own copy and resource name argument usually points to
5700 SSDATA (Vx_resource_name), which may be changed from Lisp.
5701 (xim_close_display): For XUnregisterIMInstantiateCallback,
5702 always eassert return value and pass exactly the same values
5703 as were used for XRegisterIMInstantiateCallback.
5704 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
5705 sources to check why if you are interested.
5706
5707 2014-03-05 Martin Rudalics <rudalics@gmx.at>
5708
5709 * dispnew.c (change_frame_size_1): Add new_lines instead of
5710 new_height, the latter may be still zero if passed as such.
5711 * window.c (Fwindow_pixel_height): Mention bottom divider in
5712 doc-string.
5713
5714 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
5715
5716 Fix "resource temporarily unavailable" with xgselect
5717 (Bug#16925).
5718 * xgselect.c: Include <stdbool.h>.
5719 (xg_select) [!USE_GTK]: Don't lose track of errno.
5720
5721 Fix minor --enable-gcc-warnings issues.
5722 * widget.c (update_various_frame_slots, EmacsFrameResize):
5723 Avoid unused locals. Prefer 'if' to '#if' when either will do.
5724
5725 2014-03-04 Ken Brown <kbrown@cornell.edu>
5726
5727 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
5728 represent the actual adjustment needed for alignment.
5729
5730 2014-03-04 Eli Zaretskii <eliz@gnu.org>
5731
5732 * gmalloc.c (aligned_alloc): Don't allocate more memory than
5733 needed, and don't reallocate if the initial allocation already
5734 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
5735
5736 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5737
5738 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
5739 (Bug#16932)
5740
5741 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
5742
5743 * cmds.c (delete-char): Update docstring pointing out that the
5744 function ignores `delete-active-region' and `overwrite-mode'.
5745
5746 2014-03-03 Eli Zaretskii <eliz@gnu.org>
5747
5748 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
5749
5750 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
5751 allocated buffer due to alignment.
5752 (freehook): If the block to be freed was allocated by
5753 'aligned_alloc', find its real pointer before calling 'free'.
5754 (Bug#16901)
5755 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
5756 backtrace.
5757
5758 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
5759
5760 * font.c (toplevel): Adjust comment about font cache layout.
5761 (font_clear_cache): Fix to match real font cache layout.
5762 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
5763 (Fframe_font_cache) [FONT_DEBUG]: New function.
5764 (syms_of_font) [FONT_DEBUG]: Defsubr it.
5765
5766 Avoid crashes when X fonts are erroneously freed on reused X
5767 'Display *' connection data (Bug#16069). Note that X font
5768 resources still may be leaked, but currently there is no way
5769 to completely avoid it.
5770 * xterm.h (struct x_display_info): New member x_id. Add comments.
5771 * xterm.c (x_display_id): New variable.
5772 (x_term_init): Assign identifier to each opened X connection.
5773 * xfont.c (struct xfont): New member x_display_id.
5774 (xfont_open): Initialize it with frame's display id.
5775 (xfont_close): Check whether font's display id matches the one
5776 recorded for the given display. Adjust comment.
5777 * xftfont.c (struct xftfont_info):
5778 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
5779
5780 2014-03-01 Martin Rudalics <rudalics@gmx.at>
5781
5782 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
5783 * window.c (Fother_window_for_scrolling): Don't try to scroll a
5784 killed Vother_window_scroll_buffer.
5785 (Vother_window_scroll_buffer): Fix doc-string accordingly.
5786
5787 2014-03-01 Eli Zaretskii <eliz@gnu.org>
5788
5789 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
5790 that start with more than 2 slashes as UNCs. (Bug#16751)
5791
5792 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
5793
5794 Fix a few crashes and leaks when cloning C strings.
5795 * alloc.c, lisp.h (dupstring): New function.
5796 * gtkutil.c (xg_get_font):
5797 * term.c (tty_default_color_capabilities):
5798 * xsettings.c (store_monospaced_changed)
5799 (store_font_name_changed, parse_settings)
5800 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
5801 This avoids some unlikely crashes due to accessing freed storage,
5802 and avoids some minor memory leaks in the more-typical case.
5803
5804 2014-02-28 Martin Rudalics <rudalics@gmx.at>
5805
5806 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
5807 cursor when modeline can't be dragged (Bug#16647).
5808
5809 2014-02-28 Glenn Morris <rgm@gnu.org>
5810
5811 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
5812 from custom-delayed-init-variables. (Bug#11565)
5813
5814 2014-02-27 Martin Rudalics <rudalics@gmx.at>
5815
5816 More fixes for mouse glyph calculations (Bug#16647).
5817 * window.c (coordinates_in_window): In intersection of
5818 horizontal and vertical window dividers prefer the horizontal
5819 one. Add some extra parens to last fix.
5820 (window_relative_x_coord): Return x-coordinate for header and
5821 mode line too.
5822 * xdisp.c (remember_mouse_glyph): In text area don't extend
5823 glyph into mode line to show the vertical drag cursor there
5824 immediately. Subdivide mouse glyphs in right fringes to show a
5825 horizontal drag cursor as soon as we enter the "grabbable width"
5826 portion. Handle vertical border case separately. Do not
5827 subdivide window divider areas.
5828 (note_mouse_highlight): On bottom divider of bottommost windows
5829 show vertical drag cursor only when the minibuffer window can be
5830 resized.
5831
5832 2014-02-27 Eli Zaretskii <eliz@gnu.org>
5833
5834 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
5835 reset by the face of the object just displayed. See also bug#76.
5836 (get_next_display_element): If the string came from a display
5837 property, examine the box face attribute at it->position, not at
5838 it->current.pos, since the latter was not updated yet. (Bug#16870)
5839 (handle_face_prop): Improve commentary.
5840
5841 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
5842
5843 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
5844 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
5845
5846 2014-02-26 Martin Rudalics <rudalics@gmx.at>
5847
5848 Fixes around Bug#16647.
5849 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
5850 ON_BOTTOM_DIVIDER cases.
5851 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
5852 only if the window has no right divider.
5853 (Fcoordinates_in_window_p): Fix doc-string.
5854
5855 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
5856
5857 * lread.c (Funintern): Fix doc to match advertised calling convention.
5858
5859 2014-02-24 Daniel Colascione <dancol@dancol.org>
5860
5861 * keyboard.c (read_char): Close race that resulted in lost events.
5862
5863 2014-02-22 Glenn Morris <rgm@gnu.org>
5864
5865 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
5866 * window.c (window-resize-pixelwise): Doc fixes.
5867
5868 * process.c (Finternal_default_process_filter)
5869 (Finternal_default_process_sentinel): Doc tweaks.
5870
5871 2014-02-21 Glenn Morris <rgm@gnu.org>
5872
5873 * process.c (Fprocess_buffer, Faccept_process_output)
5874 (Finternal_default_process_filter, Finternal_default_process_sentinel):
5875 Doc fixes.
5876
5877 2014-02-21 Martin Rudalics <rudalics@gmx.at>
5878
5879 * window.c (Fwindow_scroll_bar_width): New function.
5880
5881 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
5882
5883 Pacify GCC when configuring with --enable-gcc-warnings.
5884 * xdisp.c (move_it_in_display_line_to) [lint]:
5885 Initialize recently-added local.
5886
5887 2014-02-21 Daniel Colascione <dancol@dancol.org>
5888
5889 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
5890
5891 2014-02-20 Eli Zaretskii <eliz@gnu.org>
5892
5893 * xdisp.c (init_iterator): Don't dereference a bogus face
5894 pointer. (Bug#16819)
5895 (try_cursor_movement): Don't use cursor position if
5896 set_cursor_from_row failed to compute it. This avoids assertion
5897 violations in MATRIX_ROW.
5898 (move_it_in_display_line_to): Save the iterator state in ppos_it
5899 only once per call. Reimplement the method used to return to the
5900 best candidate position if all the positions found in display line
5901 are beyond TO_CHARPOS. This cuts down the number of calls to
5902 bidi_shelve_cache, which moves a lot of stuff when lines are long
5903 and include bidirectional text. (Bug#15555)
5904
5905 2014-02-20 Glenn Morris <rgm@gnu.org>
5906
5907 * data.c (Fdefalias): Doc fix.
5908
5909 2014-02-19 Eli Zaretskii <eliz@gnu.org>
5910
5911 * xdisp.c (display_line): Fix horizontal scrolling of large images
5912 when fringes are turned off. This comes at a price of not
5913 displaying the truncation/continuation glyphs in this case.
5914 (Bug#16806)
5915
5916 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
5917 CreateDIBSection returns an error indication, zero out *ximg after
5918 destroying the image. This avoids crashes in memory allocations
5919 due to the fact that some of the callers also call
5920 x_destroy_x_image, which will attempt to free an already free'd
5921 block of memory.
5922
5923 2014-02-18 Martin Rudalics <rudalics@gmx.at>
5924
5925 * widget.c (update_various_frame_slots): Don't set
5926 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
5927
5928 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
5929
5930 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
5931
5932 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
5933
5934 temacs --daemon fix (Bug#16599).
5935 * emacs.c (main): Initialize daemon_pipe[1] here ...
5936 (syms_of_emacs): ... instead of here.
5937
5938 2014-02-16 Anders Lindgern <andlind@gmail.com>
5939
5940 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
5941 is set (Bug#16505).
5942
5943 2014-02-16 Daniel Colascione <dancol@dancol.org>
5944
5945 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
5946 (xd_get_connection_address): Use it.
5947 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
5948 xd_get_connection_address because the latter signals if the bus
5949 we're trying to close is already disconnected.
5950
5951 2014-02-13 Eli Zaretskii <eliz@gnu.org>
5952
5953 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
5954 argument to CreateThread. This avoids segfaults on Windows 9X.
5955 Reported by oslsachem <oslsachem@gmail.com>.
5956
5957 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
5958
5959 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
5960 * unexhp9k800.c (unexec_error): New function, to simplify the code.
5961 (check_lseek): New function, to report lseek errors.
5962 (save_data_space, update_file_ptrs, read_header, write_header)
5963 (copy_file, copy_rest, unexec): Use these news functions.
5964 (update_file_ptrs): Don't assume wraparound behavior when
5965 converting a large size_t value to off_t.
5966
5967 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
5968
5969 * composite.c (fill_gstring_header): Pass positions as C integers
5970 and move parameters checking to...
5971 (Fcomposition_get_gstring): ...this function. Handle case when
5972 buffer positions are in reversed order and avoid crash (Bug#16739).
5973 Adjust docstring.
5974 * buffer.c (validate_region): Mention current buffer in error message.
5975
5976 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
5977
5978 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
5979
5980 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
5981
5982 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
5983
5984 2014-02-11 Glenn Morris <rgm@gnu.org>
5985
5986 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
5987 Replace refs to "OpenStep" in messages.
5988
5989 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
5990
5991 Avoid "." at end of error diagnostics.
5992 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
5993 * font.c (Ffont_at):
5994 * nsfns.m (ns_display_info_for_name):
5995 * nsselect.m (Fx_own_selection_internal):
5996 * nsterm.m (performDragOperation:):
5997 Remove "." from end of diagnostic.
5998
5999 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
6000
6001 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
6002 unintuitive (bug#15824).
6003 (Fyes_or_no_p): Doc fix (bug#15456).
6004
6005 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
6006
6007 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
6008 and avoid warning.
6009 * eval.c (call_debugger): When exiting the debugger, do not allow
6010 max_specpdl_size less than actual binding depth (Bug#16603).
6011 (syms_of_eval): Adjust docstring.
6012
6013 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
6014
6015 * cmds.c (Fself_insert_command): Output a clearer error message on
6016 negative repetitions (bug#9476).
6017
6018 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
6019
6020 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
6021
6022 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
6023
6024 * minibuf.c (Fread_string): Doc clarification (bug#15422).
6025
6026 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
6027
6028 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
6029
6030 * keyboard.c (Frecursive_edit): Fix typo in docstring.
6031
6032 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
6033
6034 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
6035
6036 * keyboard.c (Frecursive_edit): Say more precicely how throwing
6037 `exit' works (bug#15865).
6038
6039 2014-02-07 Martin Rudalics <rudalics@gmx.at>
6040
6041 Constrain window box/body sizes and margin widths (Bug#16649).
6042 * xdisp.c (window_box_width): Don't return less than zero.
6043 (window_box_left_offset, window_box_right_offset): Don't return
6044 more than the window's pixel width.
6045 * window.c (window_body_height, window_body_width): Don't return
6046 negative value.
6047 (window_resize_apply): Adjust margin width, if necessary.
6048
6049 2014-02-07 Glenn Morris <rgm@gnu.org>
6050
6051 * nsterm.m (syms_of_nsterm): Doc fix.
6052
6053 2014-02-06 Eli Zaretskii <eliz@gnu.org>
6054
6055 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
6056 New variables: pointers through which to call the respective APIs.
6057 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
6058 (filename_from_ansi, sys_link, check_windows_init_file):
6059 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
6060 This is required on Windows 9X, where we dynamically load
6061 UNICOWS.DLL which has their non-stub implementations.
6062 (maybe_load_unicows_dll): Assign addresses to these 2 function
6063 pointers after loading UNICOWS.DLL.
6064
6065 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
6066 MultiByteToWideChar and WideCharToMultiByte through function
6067 pointers.
6068
6069 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
6070 New declarations.
6071
6072 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
6073
6074 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
6075 for OSX >= 10.9 if separate spaces are used.
6076 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
6077
6078 2014-02-06 Glenn Morris <rgm@gnu.org>
6079
6080 * buffer.c (cache-long-scans): Doc fix.
6081
6082 2014-02-05 Eli Zaretskii <eliz@gnu.org>
6083
6084 * w32fns.c (Fw32_shell_execute): Doc fix.
6085
6086 2014-02-05 Bastien Guerry <bzg@gnu.org>
6087
6088 * syntax.c (Fforward_word): Call Fconstrain_to_field with
6089 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
6090
6091 2014-02-05 Martin Rudalics <rudalics@gmx.at>
6092
6093 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
6094 outside the window (Bug#16649).
6095
6096 * xdisp.c (note_mouse_highlight): When entering a margin area show
6097 a non-text cursor (Bug#16647).
6098
6099 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
6100
6101 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
6102 It prompted a compile-time diagnostic on GNU/Linux.
6103 Simplify to remove the need for the label.
6104
6105 2014-02-04 Eli Zaretskii <eliz@gnu.org>
6106
6107 * w32menu.c (w32_popup_dialog): Don't condition the whole function
6108 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
6109 to show it; otherwise return 'unsupported--w32-dialog' to signal
6110 to the caller that emulation with menus is necessary.
6111 This resurrects code inadvertently deleted by the 2013-10-08 commit.
6112 (Bug#16636)
6113 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
6114
6115 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
6116 by HAVE_DIALOGS.
6117
6118 * menu.c (Fx_popup_dialog): Don't condition the call to
6119 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
6120 special symbol 'unsupported--w32-dialog', emulate the dialog with
6121 a menu by calling x-popup-menu.
6122
6123 * menu.h (Qunsupported__w32_dialog): New extern variable.
6124
6125 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
6126
6127 * keyboard.c (kbd_buffer_get_event): Read file notification events
6128 also in batch mode.
6129
6130 * xgselect.c (xg_select): Read glib events in any case, even if
6131 there are no file descriptors to watch for. (Bug#16519)
6132
6133 2014-02-03 Martin Rudalics <rudalics@gmx.at>
6134
6135 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
6136 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
6137 * w32term.c (w32_draw_window_divider): Handle first and last
6138 pixels specially.
6139 * w32term.h (w32_fill_area_abs): New function.
6140 * xdisp.c (x_draw_right_divider): Don't draw over bottom
6141 divider.
6142 * xfaces.c (realize_basic_faces): Handle new face ids.
6143 * xfns.c (Fx_create_frame): Call x_default_parameter for right
6144 and bottom divider width.
6145 * xterm.c (x_draw_window_divider): Handle first and last pixels
6146 specially.
6147
6148 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
6149
6150 * print.c (Fexternal_debugging_output): Add cast to pacify
6151 --enable-gcc-warnings.
6152 * eval.c (call_debugger): Grow specpdl if the debugger was
6153 entered due to specpdl overflow (Bug#16603) and allow more
6154 specpdl space for the debugger itself.
6155
6156 2014-02-02 Martin Rudalics <rudalics@gmx.at>
6157
6158 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
6159 (Bug#16619)
6160
6161 2014-02-01 Eli Zaretskii <eliz@gnu.org>
6162
6163 * w32fns.c (Ffile_system_info): Use WINAPI in the function
6164 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
6165
6166 * print.c (Fexternal_debugging_output): If the argument character
6167 is non-ASCII, encode it with the current locale's encoding before
6168 writing the result to the terminal. (Bug#16448)
6169
6170 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
6171 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
6172 for it. (Bug#16558)
6173
6174 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
6175
6176 * process.c (create_process): Reset SIGPROF handler in the child.
6177 * callproc.c (call_process): Likewise.
6178
6179 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
6180
6181 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
6182
6183 2014-01-29 Eli Zaretskii <eliz@gnu.org>
6184
6185 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
6186 of zero to print strings, GDB doesn't like it.
6187
6188 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
6189 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
6190 we still use correct addresses. (Bug#16576)
6191
6192 2014-01-27 K. Handa <handa@gnu.org>
6193
6194 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
6195 to preserve the code detection behavior of 24.3.
6196 * coding.h (struct coding_system): New member detected_utf8_bytes.
6197 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
6198 (decode_coding_gap): Use short cut for UTF-8 file reading only
6199 when coding->detected_utf8_bytes equals to coding->src_bytes.
6200 * fileio.c (Finsert_file_contents): Cancel the previous change.
6201
6202 2014-01-29 Martin Rudalics <rudalics@gmx.at>
6203
6204 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
6205 that are not visible.
6206
6207 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
6208
6209 * xmenu.c (create_and_show_popup_menu): Handle case when no key
6210 is grabbed (Bug#16565).
6211
6212 2014-01-28 Martin Rudalics <rudalics@gmx.at>
6213
6214 * xdisp.c (last_max_ascent): Re-remove after erroneously
6215 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
6216 from 2013-03-29.
6217 (move_it_to): Re-remove reference to last_max_ascent.
6218 (Fwindow_text_pixel_size): Add iterator's max_ascent and
6219 max_descent here instead of calling line_bottom_y.
6220 Fix doc-string.
6221
6222 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
6223
6224 * terminal.c (initial_free_frame_resources): New function.
6225 (init_initial_terminal): Install new hook to free face cache
6226 on initial frame and avoid memory leak. For details, see
6227 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
6228 * xfaces.c (free_frame_faces): Adjust comment.
6229
6230 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
6231
6232 * data.c (Fstring_to_number): Document results if unparsable
6233 (Bug#16551).
6234
6235 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
6236
6237 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
6238
6239 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
6240
6241 When decoding, prefer ptrdiff_t to int for buffer positions etc.
6242 * coding.c (detect_coding_utf_8, emacs_mule_char)
6243 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
6244 (check_utf_8, decode_coding):
6245 * coding.h (struct coding_system.errors):
6246 Use ptrdiff_t, not int, for integer values derived from buffer and
6247 string positions.
6248
6249 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
6250 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
6251 before invoking decode_coding_gap, since there's just one block.
6252
6253 2014-01-25 Martin Rudalics <rudalics@gmx.at>
6254
6255 Fix handling of face attributes in Fx_create_frame (Bug#16529).
6256 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
6257 too early. Again run change_frame_size before assigning menu-
6258 and tool-bar-lines.
6259
6260 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
6261
6262 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
6263 arrives, call x_check_fullscreen, in case the new display has a
6264 different resolution. (Bug#16517)
6265
6266 2014-01-25 Eli Zaretskii <eliz@gnu.org>
6267
6268 * term.c (read_menu_input): If the selected frame changes, exit
6269 the menu.
6270 (tty_menu_show): If the selected frame changes while we displayed
6271 a menu, throw to top level. (Bug#16479)
6272
6273 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
6274
6275 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
6276
6277 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
6278
6279 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
6280 * data.c (count_one_bits_word): Fix bug (negated comparison)
6281 when BITS_PER_ULL < BITS_PER_BITS_WORD.
6282
6283 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
6284
6285 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
6286 Avoid undefined behavior by initializing display property bit of a
6287 string processed by the bidirectional iterator. For details, see
6288 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
6289
6290 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
6291
6292 Minor cleanup of previous change.
6293 * image.c (imagemagick_error, Fimagemagick_types):
6294 Omit some recently-introduced and unnecessary casts and assignments.
6295
6296 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
6297
6298 Fix two memory leaks discovered with Valgrind.
6299 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
6300 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
6301
6302 2014-01-22 Martin Rudalics <rudalics@gmx.at>
6303
6304 Fixes in window size functions around Bug#16430 and Bug#16470.
6305 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
6306 (Fwindow_mode_line_height, Fwindow_header_line_height)
6307 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
6308 Minor doc-string adjustments.
6309 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
6310 Rewrite doc-strings.
6311 (window_body_height, window_body_width): Do not count partially
6312 visible lines/columns when PIXELWISE is nil (Bug#16470).
6313 (Qfloor, Qceiling): New symbols.
6314
6315 2014-01-21 Eli Zaretskii <eliz@gnu.org>
6316
6317 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
6318 when the image cache is not yet allocated. (Bug#16509)
6319
6320 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
6321
6322 * buffer.c (Fkill_buffer): When killing an indirect buffer,
6323 re-attach intervals to its base buffer (Bug#16502).
6324 * intervals.c (set_interval_object): Move from here...
6325 * intervals.h (set_interval_object): ... to here. Fix comments.
6326
6327 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
6328
6329 Avoid undefined behavior by initializing buffer redisplay bit.
6330 Problem reported by Dmitry Antipov in
6331 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
6332 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
6333
6334 Revert some of the CANNOT_DUMP fix (Bug#16494).
6335 * lread.c (init_lread): Fix typo: NILP, not !NILP.
6336
6337 2014-01-19 Eli Zaretskii <eliz@gnu.org>
6338
6339 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
6340 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
6341 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
6342 they are replaced by macros that expand into direct calls to the
6343 corresponding functions from GDI32.DLL.
6344 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
6345 variables in the Cygwin build, they are unused.
6346
6347 2014-01-19 K. Handa <handa@gnu.org>
6348
6349 * composite.c (composition_update_it): Fix previous change.
6350
6351 2014-01-18 Eli Zaretskii <eliz@gnu.org>
6352
6353 Fix file name handling on MS-Windows 9X.
6354 * w32.c (maybe_load_unicows_dll): New function.
6355
6356 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
6357 on, to make sure we can convert file names to and from UTF-8 on
6358 Windows 9X. This fixes a failure to start up because Emacs cannot
6359 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
6360
6361 * w32font.c [WINDOWSNT]: Include w32.h.
6362 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
6363 of implementing the same stuff.
6364 Remove now unused g_b_init_is_windows_9x.
6365
6366 * w32.h (maybe_load_unicows_dll): Add prototype.
6367
6368 2014-01-17 Eli Zaretskii <eliz@gnu.org>
6369
6370 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
6371 switch to single keyboard. Prevents daemon crashes when a new
6372 client connects while we show a TTY menu in an existing client.
6373 (Bug#16479)
6374
6375 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
6376
6377 Fix MinGW64 porting problem with _setjmp.
6378 Reported by Eli Zaretskii in:
6379 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
6380 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
6381 the old _setjmp and _longjmp. All uses changed.
6382
6383 2014-01-13 Daniel Colascione <dancol@dancol.org>
6384
6385 * textprop.c (Fremove_list_of_text_properties):
6386 Correctly handle reaching the end of the interval tree. (Bug#15344)
6387
6388 2014-01-13 Martin Rudalics <rudalics@gmx.at>
6389
6390 * xdisp.c (resize_mini_window): Round height to a multiple of
6391 frame's line height. Fix bug in calculation of window start
6392 position (Bug#16424).
6393
6394 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
6395
6396 * macfont.m: Include termchar.h.
6397 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
6398 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
6399 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
6400 *_WITH_GC_* to take face and f as parameters.
6401 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
6402 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
6403
6404 2014-01-13 Daniel Colascione <dancol@dancol.org>
6405
6406 Fix menu item updating in the presence of the Unity global menu
6407 GTK+ module.
6408
6409 * gtkutil.h (xg_have_tear_offs): Add frame parameter
6410 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
6411 tear-off.
6412 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
6413 updating menus; explain why.
6414 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
6415 problem it's supposed to solve and it interferes with detecting
6416 the presence of a global menu.
6417 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
6418 parameter.
6419
6420 2014-01-11 K. Handa <handa@gnu.org>
6421
6422 * composite.c (composition_update_it): Fix indexing of
6423 LGSTRING_CHAR (Bug#15984).
6424
6425 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
6426
6427 * unexw32.c (_start) [__MINGW64__]: Define to __start.
6428
6429 2014-01-11 Eli Zaretskii <eliz@gnu.org>
6430
6431 * xdisp.c (try_window_id): Don't use this function's optimizations
6432 if overlays in the buffer displayed by the window have changed
6433 since last redisplay. (Bug#16347)
6434 (message_dolog): Fix indentation.
6435
6436 2014-01-11 Martin Rudalics <rudalics@gmx.at>
6437
6438 * frame.c (frame_resize_pixelwise): Fix doc-string.
6439
6440 2014-01-10 Martin Rudalics <rudalics@gmx.at>
6441
6442 Fix handling of internal borders (Bug#16348).
6443 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
6444 Remove internal border width from pixel width of windows.
6445 (change_frame_size_1): Don't return early when frame's pixel
6446 size changes - we still have to record the new sizes in the
6447 frame structure.
6448 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
6449 also when toolbar gets larger.
6450 * window.c (check_frame_size): Include internal_border_width in
6451 check.
6452 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
6453 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
6454 In non-toolkit/non-GTK version clear internal border.
6455 * xterm.c (x_clear_under_internal_border): New function for
6456 non-toolkit/non-GTK version.
6457 (x_after_update_window_line): In non-toolkit/non-GTK version
6458 don't do that.
6459 (handle_one_xevent, x_set_window_size):
6460 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
6461 * xterm.h (x_clear_under_internal_border): Extern it.
6462
6463 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
6464
6465 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
6466 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
6467 it again.
6468
6469 2014-01-06 Eli Zaretskii <eliz@gnu.org>
6470
6471 * xdisp.c (redisplay_window): Don't skip window redisplay if the
6472 last value of point is not equal to buffer's point. (Bug#16129)
6473
6474 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
6475
6476 Spelling fixes.
6477 * nsterm.h (updateCollectionBehavior): Rename from
6478 updateCollectionBehaviour. All uses changed.
6479
6480 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
6481 * Makefile.in (SETFATTR): New macro.
6482 (temacs$(EXEEXT)): Use it.
6483
6484 2014-01-04 Martin Rudalics <rudalics@gmx.at>
6485
6486 Fix maximization behavior on Windows (Bug#16300).
6487 * w32fns.c (w32_fullscreen_rect): Don't handle
6488 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
6489 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
6490 of SetWindowPos. Restore last placement also when leaving
6491 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
6492 but the FULLSCREEN_BOTH case.
6493
6494 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
6495
6496 Port to C89.
6497 * data.c (arithcompare_driver):
6498 * fileio.c (Fcar_less_than_car):
6499 * fns.c (internal_equal):
6500 * frame.c (delete_frame):
6501 * lisp.h (enum More_Lisp_Bits):
6502 * lread.c (read1):
6503 Avoid C99 constructs that don't work in C89.
6504 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
6505 to port to C89, which doesn't have 'long long'.
6506 (count_trailing_zero_bits): Use them.
6507
6508 2014-01-03 Chong Yidong <cyd@gnu.org>
6509
6510 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
6511
6512 2014-01-02 Martin Rudalics <rudalics@gmx.at>
6513
6514 Further adjust frame/window scrollbar width calculations.
6515 * window.c (apply_window_adjustment):
6516 Set windows_or_buffers_changed.
6517 (Fwindow_scroll_bars): Return actual scrollbar width.
6518 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
6519 For non-toolkit builds again use 14 as minimum width and set
6520 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
6521 * xterm.c (XTset_vertical_scroll_bar): Take width from
6522 WINDOW_SCROLL_BAR_AREA_WIDTH.
6523 (x_new_font): Rename wid to unit. Base calculation of new
6524 scrollbar width on toolkit used and make it analogous to that of
6525 x_set_scroll_bar_default_width.
6526 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
6527 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
6528 of GetSystemMetrics.
6529 * w32term.c (w32_set_vertical_scroll_bar): Take width from
6530 WINDOW_SCROLL_BAR_AREA_WIDTH.
6531 (x_new_font): Make it correspond to changes in xterm.c.
6532
6533 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
6534
6535 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
6536 This is a cleaner way to fix the MinGW-w64 porting problem.
6537 Check for INTPTR_MAX misconfiguration.
6538
6539 2014-01-01 Eli Zaretskii <eliz@gnu.org>
6540
6541 * search.c (newline_cache_on_off, find_newline): In indirect
6542 buffers, use the newline cache of the base buffer.
6543
6544 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
6545 buffer, invalidate the caches of its base buffer. (Bug#16265)
6546
6547 * indent.c (width_run_cache_on_off, compute_motion): In indirect
6548 buffers, use the width-run cache of the base buffer.
6549
6550 * xdisp.c (redisplay_window): When the window displays an indirect
6551 buffer, and the character widths in the display table have
6552 changed, invalidate the width-run cache of the corresponding base
6553 buffer.
6554
6555 * fileio.c (Finsert_file_contents): When invalidating the newline
6556 cache, consider the case of inserting into indirect buffer.
6557
6558 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
6559 In indirect buffers, use the paragraph cache of the base buffer.
6560
6561 2013-12-31 Martin Rudalics <rudalics@gmx.at>
6562
6563 * window.c (grow_mini_window): Fix last change.
6564
6565 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
6566
6567 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
6568
6569 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
6570
6571 * w32term.c (w32_initialize): Use LCID and LOWORD.
6572
6573 * w32proc.c (create_child): Use pid_t for 5th argument.
6574 (IsValidLocale): Don't provide prototype for MinGW64.
6575 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
6576 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
6577
6578 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
6579 MinGW64 doesn't support.
6580
6581 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
6582
6583 * w32.c (set_named_security_info): New function.
6584 (acl_set_file): Fall back on set_named_security_info if
6585 set_file_security fails.
6586 (g_b_init_set_named_security_info_w)
6587 (g_b_init_set_named_security_info_a): New static variables.
6588 (globals_of_w32): Initialize them to zero.
6589 (set_named_security_info): Set them to non-zero if the
6590 corresponding API is available.
6591 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
6592 New function typedefs.
6593
6594 2013-12-31 Martin Rudalics <rudalics@gmx.at>
6595
6596 Some more fixes following pixelwise resize changes including one
6597 for Bug#16306.
6598 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
6599 of frame_resize_pixelwise.
6600 * widget.c (pixel_to_text_size): New function.
6601 (update_wm_hints): Have size hints respect value of
6602 frame_resize_pixelwise.
6603 (EmacsFrameResize): Alway process resize requests pixelwise.
6604 * window.c (grow_mini_window): Make sure mini window is at least
6605 one line tall.
6606 * xdisp.c (display_menu_bar): Make sure menubar extends till
6607 right end of frame.
6608 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
6609 (x_set_tool_bar_lines): Calculate pixelwise.
6610 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
6611 frame_resize_pixelwise.
6612
6613 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
6614
6615 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
6616 variables not used there.
6617
6618 2013-12-30 Eli Zaretskii <eliz@gnu.org>
6619
6620 * w32.c (sys_umask): New function. (Bug#16299)
6621
6622 2013-12-30 Martin Rudalics <rudalics@gmx.at>
6623
6624 * dispnew.c (change_frame_size_1): Take old width of root window
6625 from that window's pixel width. (Bug#16284)
6626
6627 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
6628
6629 Plain copy-file no longer chmods an existing destination (Bug#16133).
6630 * fileio.c (realmask): Now a static var, not a local.
6631 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
6632 Remove arg STATPTR. All uses changed.
6633 (Fcopy_file): Do not alter permissions of existing destinations,
6634 unless PRESERVE-PERMISSIONS (renamed from
6635 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
6636 Avoid race when testing for existing destinations and for
6637 when input and output files are the same.
6638 If changing the group fails, adjust both default and
6639 preserved permissions so that access is not granted to the
6640 wrong group.
6641 (Fset_default_file_modes, init_fileio): Update realmask.
6642 (Fdefault_file_modes): Use realmask instead of calling umask.
6643
6644 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
6645
6646 Fix pipe bug with OS X emacs --daemon (Bug#16262).
6647 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
6648 flags on the daemon pipe ends before execing.
6649
6650 2013-12-28 Eli Zaretskii <eliz@gnu.org>
6651
6652 * w32fns.c (Fx_create_frame): Error out if called from a TTY
6653 session. (Bug#14739)
6654
6655 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
6656
6657 * callproc.c (Vexec_path): Document that exec-directory is in it.
6658
6659 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
6660
6661 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
6662 default.
6663
6664 2013-12-27 Chong Yidong <cyd@gnu.org>
6665
6666 * data.c (Fsymbol_function): Doc fix.
6667
6668 2013-12-26 Martin Rudalics <rudalics@gmx.at>
6669
6670 Some more tinkering with Bug#16051.
6671 * window.c (resize_frame_windows): Don't let the size of the
6672 root window drop below the frame's default character size.
6673 Never ever delete any subwindows - let the window manager do the
6674 clipping.
6675
6676 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
6677 of toolbar lines needed when they exceed the height of the root
6678 window.
6679 (unwind_create_frame_1): New function.
6680 (Fx_create_frame): Generally inhibit calling the window
6681 configuration change hook here. Remove extra call to
6682 change_frame_size - it's not needed when we don't run the
6683 configuration change hook.
6684
6685 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
6686
6687 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
6688 On my Fedora 19 platform the core dumps were so big that
6689 my desktop became nearly catatonic.
6690 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
6691 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
6692 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
6693 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
6694 a clang-only syntax.
6695 * conf_post.h (__has_feature): New macro, if not already defined.
6696 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
6697 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
6698
6699 2013-12-25 Eli Zaretskii <eliz@gnu.org>
6700
6701 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
6702 is a file name. (Bug#16252)
6703
6704 2013-12-25 Chong Yidong <cyd@gnu.org>
6705
6706 * keyboard.c (Voverriding_terminal_local_map)
6707 (Voverriding_local_map): Doc fix.
6708
6709 * keymap.c (Vemulation_mode_map_alists): Doc fix.
6710
6711 2013-12-24 Eli Zaretskii <eliz@gnu.org>
6712
6713 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
6714 file name when it is submitted to ShellExecute. Simplify code.
6715 Don't test DOCUMENT for being a string, as that is enforced by
6716 CHECK_STRING. Doc fix.
6717
6718 2013-12-23 Eli Zaretskii <eliz@gnu.org>
6719
6720 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
6721 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
6722 redisplay_tool_bar does. Improve and fix commentary.
6723 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
6724 limits of the glyph matrices. (Bug#16051)
6725 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
6726 only when the new size is different from the old one, and the new
6727 size can be achieved given the frame height.
6728
6729 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
6730
6731 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
6732
6733 2013-12-23 Glenn Morris <rgm@gnu.org>
6734
6735 * lread.c (Fload): Mention load-prefer-newer in doc.
6736
6737 2013-12-22 Martin Rudalics <rudalics@gmx.at>
6738
6739 Handle Bug#16207 by being more restrictive when running hooks.
6740 * window.c (unwind_change_frame): New function.
6741 (Fset_window_configuration): Don't run configuration change hook
6742 while the frame configuration is unsafe. Call select_window
6743 twice.
6744
6745 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
6746
6747 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
6748
6749 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
6750
6751 * nsterm.h: Declare EmacsColor category.
6752
6753 * nsterm.m (NSColor): Implement EmacsColor category.
6754 (ns_get_color): Use colorUsingDefaultColorSpace.
6755 (ns_get_color, ns_term_init): Use colorForEmacsRed.
6756
6757 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
6758
6759 2013-12-21 Eli Zaretskii <eliz@gnu.org>
6760
6761 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
6762 having the PNG_NORETURN attribute, to avoid compiler warning in
6763 my_png_error.
6764
6765 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6766
6767 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
6768
6769 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
6770 fringe background extension.
6771 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
6772 because they are now always the same as `left' and `width',
6773 respectively. Remove code for the case that `width' and
6774 `sb_width' are different.
6775
6776 2013-12-20 Martin Rudalics <rudalics@gmx.at>
6777
6778 Remove scroll_bar_actual_width from frames.
6779 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
6780 * frame.c (Fscroll_bar_width): Return scroll bar area width.
6781 (x_figure_window_size):
6782 * nsterm.m (x_set_window_size):
6783 * widget.c (set_frame_size):
6784 * w32term.c (x_set_window_size):
6785 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
6786 scroll_bar_actual_width.
6787
6788 Convert scroll_bar members to integers on Windows.
6789 * w32term.h (struct scroll_bar): Convert top, left, width,
6790 height, start, end and dragging to integers.
6791 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
6792 scroll_bar members.
6793 * w32term.c (w32_set_scroll_bar_thumb)
6794 (w32_scroll_bar_handle_click): Remove XINT conversions for
6795 scroll_bar members. Treat bar->dragging as integer.
6796 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
6797 first element. Remove XINT conversions for scroll_bar members.
6798 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
6799 Remove XINT conversions for scroll_bar members.
6800
6801 Fix assignment for new window total sizes.
6802 * window.c (Fwindow_resize_apply_total): Assign values for
6803 minibuffer window.
6804
6805 2013-12-20 Chong Yidong <cyd@gnu.org>
6806
6807 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
6808 argument to `append'.
6809
6810 2013-12-19 Eli Zaretskii <eliz@gnu.org>
6811
6812 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
6813 current text face, for extending the face of the display margins.
6814 (Bug#16192)
6815
6816 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
6817 Doc fix. (Bug#16190)
6818
6819 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
6820
6821 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
6822 Remove.
6823
6824 * nsterm.m (Qfile, Qurl): New.
6825 (EV_MODIFIERS2): New macro.
6826 (EV_MODIFIERS): Use EV_MODIFIERS2.
6827 (ns_term_init): Remove font and color from DND, does not work on
6828 newer OSX, and other ports don't have them.
6829 (performDragOperation:): Handle modifiers used during drag.
6830 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
6831 Remove global Lisp variables used to communicate with ns-win.el.
6832 Remove font and color handling.
6833 (syms_of_nsterm): Defsym Qfile and Qurl.
6834
6835 2013-12-19 Anders Lindgren <andlind@gmail.com>
6836
6837 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
6838 (ns_constrain_all_frames, x_set_offset): Remove assignment to
6839 dont_constrain.
6840 (updateFrameSize:, windowWillResize:toSize:): Add trace.
6841 (constrainFrameRect): Remove special case nr_screens == 1.
6842 Don't constrain size to size of view.
6843
6844 * nsterm.h (ns_output): Remove dont_constrain.
6845
6846 2013-12-19 Anders Lindgren <andlind@gmail.com>
6847
6848 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
6849
6850 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
6851
6852 Minor fixes for recent openp changes.
6853 * lisp.h (GCPRO7): New macro.
6854 * lread.c (openp): Use bool for boolean; all callers changed.
6855 Protect save_string from GC. Don't assume that file descriptors
6856 are nonzero. Redo save_mtime comparison to avoid bogus GCC
6857 warning about uninitialized variable.
6858
6859 2013-12-18 Eli Zaretskii <eliz@gnu.org>
6860
6861 * w32fns.c (emacs_abort): Use intptr_t as argument of
6862 INT_BUFSIZE_BOUND, to avoid compiler warnings.
6863
6864 2013-12-18 Glenn Morris <rgm@gnu.org>
6865
6866 * lread.c (Fload): Pass load_prefer_newer to openp.
6867 Don't bother checking mtime if openp already did it.
6868 (openp): Add `newer' argument, to check all suffixes
6869 and find the newest file.
6870 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
6871 * callproc.c (call_process):
6872 * charset.c (load_charset_map_from_file):
6873 * emacs.c (init_cmdargs):
6874 * image.c (x_create_bitmap_from_file, x_find_image_file):
6875 * lisp.h (openp):
6876 * lread.c (Flocate_file_internal):
6877 * process.c (Fformat_network_address):
6878 * sound.c (Fplay_sound_internal):
6879 * w32.c (check_windows_init_file):
6880 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
6881
6882 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
6883
6884 2013-12-17 Eli Zaretskii <eliz@gnu.org>
6885
6886 * w32.c (getloadavg): Don't index samples[] array with negative
6887 indices. Recover from wall-clock time being set backwards.
6888
6889 * w32term.c (w32_initialize): Declare the argument of
6890 set_user_model as const.
6891
6892 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
6893 (w32_menu_show): Constify some arguments passed to MessageBox.
6894
6895 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
6896 to initialize Lisp objects.
6897
6898 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
6899 initialize Lisp objects.
6900
6901 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
6902 use variables used only on X under that condition.
6903
6904 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
6905 variables not used there.
6906
6907 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
6908
6909 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
6910 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
6911
6912 2013-12-16 Eli Zaretskii <eliz@gnu.org>
6913
6914 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
6915 code, revealed in presence of R2L characters, character
6916 compositions, and display vectors. A better fix for Bug#16148.
6917 (extend_face_to_end_of_line): Don't reference tool_bar_window in
6918 GTK and NS builds, they don't have this member of struct frame.
6919
6920 * dispextern.h (struct composition_it): Correct a comment for the
6921 'width' member.
6922
6923 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
6924
6925 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
6926 This prevents a compilation error on C compilers that do not
6927 default functions to return 'int' if not declared. Also, add
6928 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
6929 since it now uses inline functions.
6930
6931 2013-12-16 Eli Zaretskii <eliz@gnu.org>
6932
6933 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
6934 display margins on mode line, header line, and in the frame's
6935 tool-bar window. (Bug#16165)
6936
6937 2013-12-16 Andreas Schwab <schwab@suse.de>
6938
6939 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
6940
6941 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
6942
6943 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
6944 `CHECK_LIST_CONS'.
6945
6946 2013-12-16 Martin Rudalics <rudalics@gmx.at>
6947
6948 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
6949
6950 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
6951
6952 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
6953 intended to find bogus pointers in font objects (Bug#16140).
6954 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
6955 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
6956 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
6957 Disable for MS-Windows due to Bug#15876; apparently this
6958 requires more or less substantial changes in fontset code.
6959 * xfont.c (xfont_close):
6960 * xftfont.c (xftfont_close): Call x_display_info_for_display
6961 to check whether 'Display *' is valid (Bug#16093 and probably
6962 Bug#16069).
6963
6964 2013-12-15 Eli Zaretskii <eliz@gnu.org>
6965
6966 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
6967 Reported by Juanma Barranquero <lekktu@gmail.com>.
6968
6969 * process.c (Fprocess_send_eof): Don't crash if someone tries to
6970 open a pty on MS-Windows. (Bug#16152)
6971
6972 * emacs.c (decode_env_path): Fix bogus comparison against
6973 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
6974
6975 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
6976
6977 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
6978 (Fx_file_dialog): Add parentheses around && to silence warning.
6979
6980 * w32term.c (construct_drag_n_drop): Remove unused local variable.
6981
6982 2013-12-15 Eli Zaretskii <eliz@gnu.org>
6983
6984 * xdisp.c (extend_face_to_end_of_line): Extend background of
6985 non-default face in margin areas as well. (Bug#16151)
6986 (display_line): Call extend_face_to_end_of_line for continued
6987 lines as well, if the display margins have non-zero width.
6988 (set_glyph_string_background_width): When needed, set the
6989 extends_to_end_of_line_p flag on glyph strings to be drawn in
6990 margin areas, not only in the text area.
6991
6992 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
6993 startup.
6994
6995 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
6996
6997 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
6998 Don't worry about verify_error being t, since it has to be a list.
6999
7000 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
7001
7002 Use bool for boolean, focusing on headers.
7003 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
7004 No need to include <stdbool.h>, since conf_post.h does it now.
7005 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
7006 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
7007 (SET_PER_BUFFER_VALUE_P):
7008 * ccl.c, ccl.h (setup_ccl_program):
7009 * ccl.h (CHECK_CCL_PROGRAM):
7010 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
7011 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
7012 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
7013 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
7014 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
7015 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
7016 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
7017 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
7018 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
7019 (CHARSET_FAST_MAP_SET):
7020 * coding.c (decode_coding_ccl, encode_coding_ccl):
7021 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
7022 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
7023 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
7024 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
7025 (decode_coding_c_string):
7026 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
7027 * conf_post.h (has_attribute):
7028 * dispextern.h (trace_redisplay_p)
7029 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
7030 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
7031 (SET_GLYPH_FROM_CHAR_GLYPH)
7032 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
7033 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
7034 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
7035 (cursor_in_mouse_face_p):
7036 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
7037 (blank_row, prepare_desired_row)
7038 (build_frame_matrix_from_leaf_window, make_current)
7039 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
7040 (update_window, scrolling_window, update_frame_line):
7041 * disptab.h (GLYPH_FOLLOW_ALIASES):
7042 * editfns.c (Fformat):
7043 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
7044 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
7045 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
7046 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
7047 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
7048 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
7049 (FONT_DEFERRED_LOG):
7050 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
7051 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
7052 (FRAME_MOUSE_UPDATE):
7053 * fringe.c (Fdefine_fringe_bitmap):
7054 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
7055 (x_create_bitmap_from_xpm_data, xpm_load_image):
7056 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
7057 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
7058 (MERGE_INTERVAL_CACHE):
7059 * keymap.h (KEYMAPP):
7060 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
7061 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
7062 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
7063 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
7064 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
7065 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
7066 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
7067 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
7068 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
7069 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
7070 (SETUP_BUFFER_SYNTAX_TABLE):
7071 * systime.h (timespec_valid_p):
7072 * term.c (save_and_enable_current_matrix):
7073 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
7074 * xdisp.c (in_display_vector_p, display_tool_bar_line)
7075 (redisplay_internal, try_window_reusing_current_matrix)
7076 (sync_frame_with_window_matrix_rows, try_window_id)
7077 (display_menu_bar, display_tty_menu_item, display_mode_line)
7078 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
7079 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
7080 * xmenu.c (xmenu_show):
7081 * xterm.c (use_xim, x_term_init):
7082 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
7083 (struct x_bitmap_record):
7084 Use bool for booleans.
7085 * ccl.c (struct buffer_text):
7086 * ccl.h (struct ccl_program):
7087 * charset.h (struct charset):
7088 * cm.h (struct cm):
7089 * coding.h (struct iso_2022_spec, struct coding_system):
7090 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
7091 (struct glyph_string, struct face, struct face_cache)
7092 (struct bidi_string_data, struct bidi_it)
7093 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
7094 (struct image):
7095 * editfns.c (Fformat):
7096 * frame.h (struct frame):
7097 * fringe.c (struct fringe_bitmap):
7098 * intervals.h (struct interval):
7099 * keyboard.h (struct kboard):
7100 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
7101 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
7102 (struct Lisp_Buffer_Local_Value, union specbinding):
7103 * macfont.m (struct macfont_info):
7104 * process.h (struct Lisp_Process):
7105 * termchar.h (struct tty_display_info):
7106 * window.h (struct window):
7107 * xterm.h (struct x_output):
7108 Use bool_bf for boolean bit-fields.
7109 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
7110 All callers changed.
7111 * ccl.h (struct ccl_program): Remove unused members private_state,
7112 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
7113 eight_bit_control.
7114 (struct ccl_spec): Remove unused members cr_carryover,
7115 eight_bit_carryover.
7116 * conf_post.h: Include <stdbool.h>.
7117 (bool_bf): New type.
7118 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
7119 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
7120 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
7121 'do { ... } while (false)' brackets.
7122 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
7123 Args must now be expressions; all callers changed.
7124 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
7125 (PRODUCE_GLYPHS): Simplify use of boolean.
7126 * fileio.c (Fcopy_file):
7127 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
7128 * lisp.h (UNGCPRO): Return void, not int.
7129 (FOR_EACH_TAIL): Use void expression, not int expression.
7130 * region-cache.c: Reindent.
7131 * region-cache.h: Copy comments from region-cache.c, to fix
7132 incorrect remarks about booleans.
7133
7134 2013-12-14 Eli Zaretskii <eliz@gnu.org>
7135
7136 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
7137 when character at point is displayed from a display vector.
7138 (Bug#16148)
7139
7140 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
7141
7142 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
7143 now a list of certificate validation checks that will abort a
7144 connection with an error.
7145 (Fgnutls_boot): Document it and use it.
7146
7147 2013-12-14 Martin Rudalics <rudalics@gmx.at>
7148
7149 * w32term.c (w32_enable_frame_resize_hack): New variable.
7150 (x_set_window_size): Use it to hack frame resizing on Windows
7151 (Bug#16028).
7152
7153 2013-12-14 Eli Zaretskii <eliz@gnu.org>
7154
7155 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
7156 Windows-specific code to w32.c. Change error message text to
7157 match that of Posix platforms.
7158
7159 * w32.c (w32_copy_file): New function, most of the code copied and
7160 reworked from Fcopy_file. Improve error handling. Plug memory
7161 leak when errors are thrown. Support file names outside of the
7162 current codepage. (Bug#7100)
7163
7164 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
7165
7166 * lread.c (load_path_default): Prototype.
7167
7168 2013-12-13 Glenn Morris <rgm@gnu.org>
7169
7170 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
7171 (dump_path): Remove.
7172 (load-path-default): Remove `changed' argument.
7173 Do not set dump_path permanently. Simplify.
7174 (init_lread): Simplify.
7175 (syms_of_lread): Remove dump_path.
7176
7177 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
7178
7179 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
7180 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
7181 2013-12-12 font-related change to avoid Bug#16128, which
7182 is quite hard to fix without even more substantial changes.
7183
7184 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
7185
7186 * font.c (font_close_object): Check for live frame (Bug#16128).
7187
7188 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
7189
7190 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
7191 Return ptrdiff_t, not int, since it's a buffer size.
7192 Reindent/reparen some macros to a more Gnuish style.
7193
7194 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
7195
7196 Avoid undefined behavior with huge regexp interval counts.
7197 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
7198 since it's now specialized to interval counts. All uses changed.
7199 Do not assume wraparound on signed integer overflow.
7200 (regex_compile): Simplify based on the above changes.
7201
7202 2013-12-12 Eli Zaretskii <eliz@gnu.org>
7203
7204 Support file names on MS-Windows that use characters outside of
7205 the current system codepage. (Bug#7100)
7206
7207 * w32.c (get_file_security, set_file_security)
7208 (create_symbolic_link): Separate pointers and boolean flags for
7209 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
7210 non-zero, else the former.
7211 (codepage_for_filenames, filename_to_utf16, )
7212 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
7213 New functions.
7214 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
7215 characters.
7216 (normalize_filename): Lose the DBCS code, now works on UTF-8.
7217 Accept only one argument; all callers changed.
7218 (dostounix_filename): Remove the second argument, now works in
7219 UTF-8. All callers changed.
7220 (parse_root): Lose DBCS code.
7221 (get_long_basename, w32_get_short_filename, init_environment)
7222 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
7223 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
7224 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
7225 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
7226 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
7227 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
7228 otherwise.
7229 (ansi_encode_filename): New function.
7230 (get_emacs_configuration, get_emacs_configuration_options):
7231 Functions deleted.
7232 (add_volume_info, GetCachedVolumeInformation): Run the input file
7233 name through unixtodos_filename, to ensure it is stored and
7234 referenced in canonical form.
7235 (get_volume_info): Lose the DBCS code, now works in UTF-8.
7236 (logon_network_drive, sys_link, utime): Improve error handling.
7237 (sys_access): New function.
7238 (hashval, generate_inode_val): Unused functions deleted.
7239 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
7240 (check_windows_init_file): Convert error message from UTF-8 to
7241 ANSI codepage, for display in the message box.
7242 (globals_of_w32): Set w32_unicode_filenames according to the OS
7243 version.
7244
7245 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
7246 w32_unicode_filenames is non-zero, ANSI mode otherwise.
7247 (syms_of_w32term): Declare w32-unicode-filenames.
7248
7249 * w32proc.c (new_child, delete_child): Remove code that handled
7250 unused pending_deletion and input_file members of the child struct.
7251 (create_child, sys_spawnve): Convert all file names to ANSI
7252 codepage. Use ANSI APIs explicitly; forcibly fail if any file
7253 name cannot be encoded in ANSI codepage. Don't use
7254 unixtodos_filename, mirror slashes by hand.
7255 (record_infile, record_pending_deletion): Functions deleted.
7256 (Fw32_short_file_name): Call w32_get_short_filename instead of
7257 GetShortPathName.
7258
7259 * w32notify.c (add_watch): Work in Unicode mode when
7260 w32_unicode_filenames is non-zero, ANSI mode otherwise.
7261 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
7262 instead, do the same with Lisp primitives.
7263
7264 * w32fns.c (file_dialog_callback, Fx_file_dialog)
7265 (Fsystem_move_file_to_trash, Fw32_shell_execute)
7266 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
7267 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
7268 (Fw32_shell_execute): Improve error reporting.
7269 (Fdefault_printer_name): Ifdef away for Cygwin.
7270
7271 * w32.h (struct _child_process): Remove input_file and
7272 pending_deletion members that are no longer used.
7273 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
7274 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
7275 (ansi_encode_filename): New and updated prototypes.
7276
7277 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
7278 APIs explicitly.
7279 (unexec): Don't use dostounix_filename, it expects a file name in
7280 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
7281 ANSI encoding.
7282
7283 * fileio.c (Ffile_name_directory, file_name_as_directory)
7284 (directory_file_name, Fexpand_file_name)
7285 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
7286 arguments of dostounix_filename.
7287 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
7288 use MAX_UTF8_PATH for size of file-name strings.
7289 (emacs_readlinkat): Build an explicitly unibyte string for file
7290 names.
7291 (syms_of_fileio) <file-name-coding-system>:
7292 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
7293
7294 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
7295 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
7296 directories to UTF-8.
7297 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
7298 environment, and each element of the input PATH, to UTF-8.
7299
7300 * dired.c (file_attributes): Use build_unibyte_string explicitly
7301 to make Lisp strings from user and group names.
7302
7303 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
7304 decode_file.
7305
7306 * coding.c (decode_file_name, encode_file_name): New functions.
7307
7308 * termcap.c (tgetent): Adapt to the change in arguments of
7309 dostounix_filename.
7310
7311 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
7312 names.
7313
7314 * msdos.c (dostounix_filename, init_environment): Adapt to the
7315 change in arguments of dostounix_filename.
7316
7317 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
7318 [WINDOWSNT]: Encode file names passed to the image libraries in
7319 ANSI codepage.
7320
7321 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
7322 [WINDOWSNT]: Convert file names to the current ANSI codepage.
7323
7324 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
7325 arguments of dostounix_filename.
7326
7327 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
7328
7329 * font.h (struct font_entity) [HAVE_NS]: New field to record
7330 font driver which was used to create this entity.
7331 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
7332 frame where the font was opened.
7333 (font_close_object): Add prototype.
7334 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
7335 (font_close_object): Not static any more. Lost frame arg.
7336 Adjust comment and users.
7337 * alloc.c (cleanup_vector): Call font_close_object to adjust
7338 per-frame font counters correctly. If HAVE_NS, also call
7339 driver-specific cleanup for font-entity objects.
7340 * ftfont.c (ftfont_open):
7341 * nsfont.m (nsfont_open):
7342 * w32font.c (w32font_open_internal):
7343 * xfont.c (xfont_open):
7344 * xftfont.c (xftfont_open): Save frame pointer in font object.
7345 * macfont.m (macfont_open): Likewise.
7346 (macfont_descriptor_entity): Save driver pointer to be able
7347 to call its free_entity routine when font-entity is swept.
7348 * ftxfont.c (ftxfont_open): Add eassert because frame
7349 pointer should be saved by ftfont_driver.open.
7350
7351 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
7352
7353 * xterm.c (x_make_frame_visible): Restore hack which is needed when
7354 input polling is used. This is still meaningful for Cygwin, see
7355 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
7356 * keyboard.c (poll_for_input_1, input_polling_used):
7357 Define unconditionally.
7358 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
7359 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
7360 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
7361 (font_for_char): Prefer ptrdiff_t to int for buffer position.
7362 (face_for_char): Likewise. Rearrange eassert and return ASCII
7363 face for CHAR_BYTE8_P.
7364 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
7365
7366 2013-12-11 Ken Brown <kbrown@cornell.edu>
7367
7368 * dispextern.h (erase_phys_cursor):
7369 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
7370
7371 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
7372
7373 * nsterm.m (x_free_frame_resources):
7374 * term.c (tty_free_frame_resources):
7375 * xterm.c (x_free_frame_resources): Do not check for non-NULL
7376 face cache because it's implied by free_frame_faces anyway.
7377 * w32term.c (x_free_frame_resources): Likewise. Do not call
7378 free_frame_faces twice.
7379
7380 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
7381
7382 * editfns.c (Fformat_time_string): Mention %F in the doc.
7383
7384 2013-12-11 Martin Rudalics <rudalics@gmx.at>
7385
7386 * window.c (resize_frame_windows): Don't return immediately when
7387 the root window's size doesn't change - the minibuffer window
7388 may still have to be repositioned/resized.
7389 * xfns.c (Fx_create_frame): Always change the frame size after
7390 initializing the frame's faces.
7391 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
7392 change_frame_size should already have done it.
7393 (x_new_font): Assign new tool- and menu-bar heights.
7394 (x_set_window_size_1): Account for tool- and menu-bar heights
7395 (Bug#16013). Don't set pixel sizes since change_frame_size
7396 should already have done it.
7397
7398 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
7399
7400 Remove the option of using libcrypto.
7401 * Makefile.in (LIB_CRYPTO): Remove.
7402 (LIBES): Don't use it.
7403
7404 2013-12-11 Juri Linkov <juri@jurta.org>
7405
7406 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
7407 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
7408
7409 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
7410
7411 * xdisp.c (display_tool_bar_line): Don't extend on a previously
7412 drawn tool bar items (Bug#16058).
7413 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
7414
7415 2013-12-09 Ken Brown <kbrown@cornell.edu>
7416
7417 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
7418
7419 * lisp.h (get_frame_param): Adjust conditions for prototype
7420 declaration.
7421
7422 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
7423
7424 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
7425 Avoid unused macro warning if configured --without-xft.
7426
7427 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
7428
7429 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
7430
7431 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
7432
7433 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
7434
7435 * emacs.c (main): Call fixup_locale a second time for GNUstep.
7436
7437 2013-12-08 Martin Rudalics <rudalics@gmx.at>
7438
7439 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
7440
7441 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
7442
7443 Use libcrypto's checksum implementations if available, for speed.
7444 * Makefile.in (LIB_CRYPTO): New macro.
7445 (LIBES): Use it.
7446
7447 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
7448 The macro didn't conform to C99 due to type mismatch,
7449 which caused compilation failure with Sun C 5.12,
7450 and it was confusing anyway. Include window.h to declare
7451 redisplay_other_windows.
7452
7453 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
7454
7455 * window.c (set_window_buffer): Update mode line (bug#16084).
7456
7457 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
7458
7459 Fix minor problems found by static checking.
7460 * keyboard.c (poll_for_input_1, input_polling_used):
7461 Define only if HAVE_NTGUI.
7462 * xmenu.c (popup_activate_callback): Omit unnecessary
7463 check against USE_X_TOOLKIT, which must be defined here anyway.
7464 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
7465 Now static.
7466
7467 2013-12-07 Martin Rudalics <rudalics@gmx.at>
7468
7469 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
7470
7471 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
7472
7473 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
7474
7475 * nsterm.m (x_set_window_size): Remove fprintf.
7476 (init): Define always. Set applicationDidFinishLaunchingCalled
7477 for GNUstep.
7478 (applicationDidFinishLaunching:):
7479 Set applicationDidFinishLaunchingCalled.
7480 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
7481 not called.
7482
7483 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
7484
7485 Pixel resize changes for NS (Bug#16049).
7486 * nsterm.m (x_set_window_size): Change parameters rows/cols to
7487 height/width. row/cols are locals.
7488 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
7489 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
7490 (windowWillResize): Remove gsextra. Calculate extra as in
7491 updateFrameSize.
7492 (x_new_font): Don't change frame size if fullscreen.
7493 Change size pixelwise.
7494
7495 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
7496 comment in xfns.c. Change to pixelwise call.
7497
7498 2013-12-06 Eli Zaretskii <eliz@gnu.org>
7499
7500 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
7501 (Bug#16070)
7502
7503 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
7504
7505 * xterm.c (input_signal_count): Remove.
7506 (x_dispatch_event): Define unconditionally.
7507 (x_make_frame_visible): Process X events until the frame
7508 is really visible (Bug#16027).
7509 * xterm.h (x_dispatch_event): Declare unconditionally.
7510
7511 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
7512
7513 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
7514
7515 * nsterm.m (x_set_window_size): Handle pixelwise.
7516
7517 2013-12-05 Martin Rudalics <rudalics@gmx.at>
7518
7519 * w32term.c (x_new_font):
7520 * xterm.c (x_new_font): Calculate new frame size from new font
7521 size (Bug#16028).
7522
7523 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
7524
7525 * lisp.h (FOR_EACH_TAIL): New macro.
7526 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
7527
7528 * window.c (select_window): Call second wset_redisplay before we change
7529 selected_window (bug#16034).
7530
7531 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
7532
7533 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
7534
7535 2013-12-04 Eli Zaretskii <eliz@gnu.org>
7536
7537 * w32xfns.c: Include window.h, to avoid a compiler warning.
7538
7539 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
7540
7541 * window.c (window_scroll): Mark window for redisplay (bug#16034).
7542 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
7543 window_scroll takes care of it.
7544 (Fset_window_point, Fdelete_other_windows_internal)
7545 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
7546 (Fsplit_window_internal, Fdelete_window_internal)
7547 (Fresize_mini_window_internal, Fset_window_configuration)
7548 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
7549 cause redisplay instead of forcing a complete redisplay.
7550 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
7551 we're only affecting the selected_window.
7552
7553 2013-12-04 Eli Zaretskii <eliz@gnu.org>
7554
7555 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
7556 directional control characters. Update type and category
7557 determination according to the UBA from Unicode v6.3.
7558 (bidi_category_t): New category EXPLICIT_FORMATTING.
7559
7560 * dispextern.h (bidi_type_t): Update to include new bidirectional
7561 properties introduced with Unicode v6.3. (Bug#16043)
7562
7563 2013-12-04 Martin Rudalics <rudalics@gmx.at>
7564
7565 * xterm.c (XTflash): Fix coordinate of bottom area to flash
7566 (Bug#16044).
7567
7568 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
7569
7570 * font.c (font_list_entities): Remove dummy assignment.
7571 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
7572 used on graphic displays only. Remove unused 'font_encoder' member.
7573 (struct font_bitmap): Remove unused 'extra' member.
7574 * nsfont.m (nsfont_open):
7575 * w32font.c (w32font_open_internal):
7576 * ftfont.c (ftfont_get_bitmap): Adjust users.
7577
7578 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
7579
7580 Use bool for boolean.
7581 * tparam.c (tparam1):
7582 * undo.c (record_point, record_property_change):
7583 Use bool for boolean, for local vars that are always true or false.
7584
7585 Minor integer overflow fixes (Bug#16033).
7586 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
7587 This improves on the previous fix to this function.
7588 (window_resize_check): When summing up pixel counts, don't rely on
7589 undefined behavior if the sum overflows.
7590
7591 2013-12-03 Martin Rudalics <rudalics@gmx.at>
7592
7593 * window.c (Fset_window_new_pixel): Don't choke at negative
7594 argument value (Bug#16033).
7595
7596 * xfns.c (Fx_create_frame): Add another call to change_frame_size
7597 to avoid crash in window_box_height.
7598
7599 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
7600 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
7601 calculation.
7602 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
7603
7604 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
7605
7606 Minor integer overflow fixes.
7607 * window.c (Fset_window_new_pixel, grow_mini_window):
7608 * xdisp.c (Fwindow_text_pixel_size):
7609 Avoid undefined behavior on signed integer overflow.
7610 * xfns.c (x_set_mouse_color):
7611 Check that drag shape fits in 'unsigned', since that's what X wants.
7612
7613 2013-12-02 Eli Zaretskii <eliz@gnu.org>
7614
7615 Improve reporting of fatal exception on MS-Windows.
7616 * w32fns.c (my_exception_handler): New function.
7617 (globals_of_w32fns): Set it up as the unhandled exception
7618 handler. Initialize exception code and address to zeros.
7619 (emacs_abort): If the exception code and address are available,
7620 print them at the beginning of the backtrace. Fix the format of
7621 printing addresses (was producing 0x0x12345678 on XP).
7622 (Bug#15994)
7623
7624 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
7625
7626 * eval.c (Fbacktrace__locals): New function.
7627 (syms_of_eval): Defsubr it.
7628
7629 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
7630
7631 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
7632 Define here to unify between...
7633 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
7634 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
7635
7636 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7637
7638 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
7639
7640 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
7641 fringe background extension.
7642 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
7643 because they are now always the same as `left' and `width',
7644 respectively. Remove code for the case that `width' and
7645 `sb_width' are different.
7646
7647 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
7648
7649 Fix minor problems found by static checking.
7650 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
7651 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
7652 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
7653
7654 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
7655
7656 * image.c (imagemagick_compute_animated_image): Don't crash if we
7657 have an animation with different-sized images (bug#15313).
7658
7659 2013-11-30 Martin Rudalics <rudalics@gmx.at>
7660
7661 Remove some unused items introduced during pixelwise change.
7662 * window.c (window_resize_total_check): Remove unused function.
7663 * xdisp.c (remember_mouse_glyph): Remove unused label.
7664 (Ftool_bar_height): Move declaration inside #if.
7665 * xterm.c (x_set_window_size): Don't use r and c.
7666
7667 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
7668
7669 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
7670 `value' and `endp'.
7671
7672 * window.c (Fset_window_configuration): Comment out unused variables.
7673
7674 * w32term.c (w32_read_socket): Remove unused variable `buf'.
7675
7676 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
7677
7678 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
7679
7680 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
7681
7682 * gnutls.c (gnutls_audit_log_function): Only declare and define if
7683 HAVE_GNUTLS3 (Bug#16001).
7684
7685 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
7686 if interrupts are deferred (Bug#15801).
7687
7688 2013-11-30 Martin Rudalics <rudalics@gmx.at>
7689
7690 Support resizing frames and windows pixelwise.
7691 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
7692 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
7693 (struct glyph_matrix): Replace window_left_col and
7694 window_top_line by window_pixel_left and window_pixel_top.
7695 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
7696 Minor rewrite.
7697 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
7698 (draw_window_divider, move_it_to, x_draw_right_divider)
7699 (x_draw_bottom_divider, change_frame_size): Add or fix
7700 declarations.
7701 * dispnew.c (change_frame_size_1): Change prototype.
7702 (adjust_glyph_matrix, required_matrix_width)
7703 (adjust_frame_glyphs_for_window_redisplay): Use pixel
7704 values instead of lines and columns.
7705 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
7706 WINDOW_TOTAL_FRINGE_WIDTH.
7707 (handle_window_change_signal, do_pending_window_change)
7708 (init_display): Adjusts calls of change_frame_size.
7709 (change_frame_size, change_frame_size_1): Handle pixelwise
7710 changes.
7711 * frame.c (Qright_divider_width, Qbottom_divider_width):
7712 New Lisp objects.
7713 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
7714 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
7715 (x_set_internal_border_width, x_set_vertical_scroll_bars)
7716 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
7717 values.
7718 (set_frame_param): New function.
7719 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
7720 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
7721 (Ffringe_width, Fborder_width, Fright_divider_width)
7722 (Fbottom_divider_width): New functions, defsubr them.
7723 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
7724 New argument pixelwise.
7725 (struct frame_parm_table): New members Qright_divider_width and
7726 Qbottom_divider_width.
7727 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
7728 (x_report_frame_params): Handle Qright_divider_width and
7729 Qbottom_divider_width.
7730 (x_set_right_divider_width, x_set_bottom_divider_width):
7731 New functions.
7732 (frame_resize_pixelwise): New option.
7733 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
7734 new_pixelwise, right_divider_width and bottom_divider_width;
7735 remove total_lines; rename text_lines, text_cols, new_text_lines
7736 and new_text_cols to text_height, text_width, new_height and
7737 new_width respectively.
7738 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
7739 FRAME_TEXT_WIDTH respectively.
7740 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
7741 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
7742 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
7743 New macros.
7744 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
7745 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
7746 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
7747 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
7748 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
7749 (FRAME_TOTAL_COLS_ARG): Remove macro.
7750 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
7751 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
7752 (x_wm_set_size_hint): Handle frame pixel sizes.
7753 * indent.c (compute_motion, Fcompute_motion):
7754 Call window_body_width instead of window_body_cols.
7755 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
7756 (make_lispy_position): Handle right and bottom dividers.
7757 (Fsuspend_emacs): Pixelize call of change_frame_size.
7758 * keyboard.h: Extern Qright_divider, Qbottom_divider.
7759 * lisp.h: Extern set_frame_param.
7760 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
7761 x_set_window_size.
7762 (Fx_create_frame): Add entry for vertical_drag_cursor.
7763 Pixelize call of change_frame_size.
7764 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
7765 * nsterm.m (ns_update_window_end): Optionally draw right
7766 divider.
7767 (x_set_window_size): Add argument pixelwise.
7768 Call check_frame_size and change_frame_size with pixelwise zero.
7769 (ns_draw_window_divider): New function.
7770 (ns_redisplay_interface): Add ns_draw_window_divider.
7771 (updateFrameSize:): Call change_frame_size with pixelwise zero.
7772 (x_new_font): Call x_set_window_size with pixelwise zero.
7773 * print.c (print_object): For a window print its sequence
7774 number again.
7775 * term.c (Fresume_tty): Pixelize call of change_frame_size.
7776 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
7777 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
7778 (w32_createwindow): Use scroll bar area width.
7779 (w32_wnd_proc): Handle bottom divider width.
7780 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
7781 (Fx_create_frame): Default divider width parameters.
7782 Caclulate sizes pixelwise. Add vertical drag cursor support.
7783 (x_create_tip_frame): Default divider widths to zero.
7784 Pixelize call to change_frame_size.
7785 (Fx_show_tip): Add handling of divider widths. Pixelize window
7786 position and sizes.
7787 (Fw32_frame_rect): New function.
7788 (frame_parm_handler w32_frame_parm_handlers): Add divider
7789 widths.
7790 (Vx_window_vertical_drag_shape): Add variable.
7791 * w32inevt.c (resize_event, maybe_generate_resize_event):
7792 Pixelize change_frame_size calls.
7793 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
7794 call.
7795 * w32term.c (w32_draw_window_divider): New function.
7796 (x_update_window_end): Handle right divider.
7797 (w32_draw_fringe_bitmap, x_scroll_run)
7798 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
7799 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
7800 Calculate new frame sizes pixelwise.
7801 (x_new_font): Pixelize call to x_set_window_size.
7802 (x_check_fullscreen): Pixelize call to change_frame_size.
7803 (x_set_window_size_1, x_set_window_size): New argument
7804 pixelwise. Calculate pixelwise.
7805 (x_wm_set_size_hint): Use scroll bar area width.
7806 (w32_redisplay_interface): Add w32_draw_window_divider.
7807 * w32term.h (struct w32_output): Add vertical drag cursor.
7808 * widget.c (set_frame_size, update_wm_hints)
7809 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
7810 change_frame_size.
7811 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
7812 * window.c (sequence_number): Restore.
7813 (Fwindow_pixel_width, Fwindow_pixel_height)
7814 (Fwindow_mode_line_height, Fwindow_header_line_height)
7815 (window_pixel_to_total, Frun_window_scroll_functions)
7816 (Fset_window_new_pixel, window_resize_apply_total)
7817 (Fwindow_resize_apply_total): New functions.
7818 (window_body_height, window_body_width): Rename from
7819 window_body_lines. New argument PIXELWISE.
7820 Calculate pixelwise.
7821 (Fwindow_body_height, Fwindow_body_width): New argument
7822 PIXELWISE.
7823 (coordinates_in_window, window_relative_x_coord): Use window's
7824 pixel width instead of total width.
7825 (replace_window, recombine_windows): Initialize pixel values.
7826 (resize_root_window, resize_frame_windows, grow_mini_window)
7827 (shrink_mini_window): New argument PIXELWISE.
7828 Calculate pixelwise.
7829 (Fdelete_other_windows_internal, adjust_window_margins)
7830 (window_resize_check, window_resize_apply)
7831 (Fdelete_window_internal, Fresize_mini_window_internal)
7832 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
7833 (check_frame_size): Rename arguments. New argument PIXELWISE.
7834 Calculate pixelwise.
7835 (set_window_buffer): Make samebuf bool. Run configuration change
7836 hook only if buffer changed.
7837 (Fset_window_buffer): Rewrite doc-string.
7838 (make_window): Initialize new_pixel slot.
7839 (Fwindow_resize_apply): Check pixel size of root window.
7840 (Fsplit_window_internal): Call 2nd argument pixel_size.
7841 Calculate pixelwise.
7842 (Fscroll_left, Fscroll_right): Call window_body_width instead of
7843 window_body_cols.
7844 (save_window_data): New slots frame_text_width,
7845 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
7846 (saved_window): New slots pixel_left, pixel_top, pixel_height,
7847 pixel_width.
7848 (Fcurrent_window_configuration, Fset_window_configuration)
7849 (save_window_save, compare_window_configurations): Handle new
7850 slots in save_window_data and saved_window.
7851 (Fset_window_scroll_bars): Fix doc-string.
7852 (window_resize_pixelwise): New variable.
7853 (coordinates_in_window, Fcoordinates_in_window_p):
7854 Handle dividers.
7855 (make_parent_window): Adjust sequence_number.
7856 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
7857 New functions.
7858 * window.h (struct window): New members new_pixel, pixel_left,
7859 pixel_top, pixel_width, pixel_height. Restore sequence_number.
7860 (wset_new_pixel): New function.
7861 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
7862 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
7863 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
7864 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
7865 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
7866 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
7867 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
7868 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
7869 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
7870 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
7871 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
7872 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
7873 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
7874 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
7875 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
7876 Rewrite.
7877 (resize_frame_windows, grow_mini_window, shrink_mini_window)
7878 (window_body_width, check_frame_size): Adapt external declarations.
7879 * xdisp.c (last_max_ascent): New integer.
7880 (window_text_bottom_y): Handle bottom divider.
7881 (window_box_width, window_box_height): Calculate pixelwise.
7882 (get_glyph_string_clip_rects): Handle right divider.
7883 (remember_mouse_glyph): When windows are resized pixelwise
7884 proceed with width and height set to 1.
7885 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
7886 WINDOW_TOTAL_WIDTH.
7887 (move_it_to): Calculate and return maximum x position
7888 encountered.
7889 (Fwindow_text_pixel_size): New function.
7890 (resize_mini_window, update_tool_bar): Calculate pixelwise.
7891 (tool_bar_lines_needed): Rename to tool_bar_height.
7892 Calculate pixelwise.
7893 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
7894 Calculate pixelwise.
7895 (redisplay_tool_bar): Calculate pixelwise.
7896 (redisplay_window): Calculate pixelwise. Handle dividers.
7897 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
7898 (x_draw_vertical_border): Handle dividers.
7899 (define_frame_cursor1): Handle vertical drag cursor.
7900 (x_draw_right_divider, x_draw_bottom_divider): New functions.
7901 (expose_window): Calculate pixelwise. Handle dividers.
7902 (init_xdisp): Initialize pixel values.
7903 * xfaces.c (Qwindow_divider): New face.
7904 (realize_basic_faces): Realize it.
7905 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
7906 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
7907 (x_set_scroll_bar_default_width): Default actual width to 16.
7908 (Fx_create_frame): Set sizes pixelwise.
7909 (x_create_tip_frame): Default divider widths to zero.
7910 Pixelize call of change_frame_size.
7911 (Fx_show_tip): Handle divider widths. Initial pixel position
7912 and sizes.
7913 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
7914 (Vx_window_vertical_drag_shape): New option.
7915 * xmenu.c (free_frame_menubar): Pixelize call of
7916 x_set_window_size.
7917 * xterm.c (x_draw_window_divider): New function.
7918 (x_update_window_end): Optionally draw right divider.
7919 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
7920 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
7921 (handle_one_xevent, x_new_font): Calculate pixelwise.
7922 (x_set_window_size_1, x_set_window_size): New argument
7923 pixelwise. Calculate pixelwise.
7924 (x_wm_set_size_hint): Pixelize call of check_frame_size.
7925 (struct x_redisplay_interface): Add x_draw_window_divider.
7926 * xterm.h (struct x_output): Add vertical_drag_cursor.
7927
7928 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
7929
7930 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
7931 Set invisible frames's `redisplay' when a full redisplay is requested.
7932 (redisplay_window): Set must_be_updated_p instead (bug#15999).
7933 (redisplay_mode_lines): Don't set must_be_updated_p any more.
7934 (display_mode_lines): Set it here instead.
7935
7936 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
7937
7938 * dispextern.h (set_window_update_flags): Remove.
7939
7940 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
7941
7942 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
7943
7944 * xdisp.c (REDISPLAY_SOME_P): New macro.
7945 (redisplay_internal): Use it (bug#15999).
7946 (prepare_menu_bars, redisplay_window): Use it as well.
7947
7948 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
7949
7950 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
7951
7952 * w32font.c (g_b_init_get_char_width_32_w): New static var.
7953 (globals_of_w32font): Zero it out.
7954 (GetCharWidth32W_Proc): New function pointer.
7955 (get_char_width_32_w): New function.
7956 (compute_metrics): If get_glyph_outline_w returns an error, try
7957 get_char_width_32_w before declaring a failure. This avoids
7958 punishing raster (a.k.a. "bitmap") fonts by slowing down
7959 redisplay. (Bug#6364).
7960
7961 2013-11-29 Eli Zaretskii <eliz@gnu.org>
7962
7963 * xdisp.c (clear_mouse_face): Don't invalidate the entire
7964 mouse-highlight info, just signal frame_up_to_date_hook that mouse
7965 highlight needs to be redisplayed. (Bug#15913)
7966
7967 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
7968
7969 Fix minor problems found by static checking.
7970 * buffer.h (struct buffer_text, struct buffer):
7971 * frame.h (struct frame):
7972 * window.h (struct window):
7973 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
7974 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
7975 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
7976 no-longer-valid use of HAVE_MENUS.
7977 * xdisp.c (propagate_buffer_redisplay): Now static.
7978
7979 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
7980
7981 * xmenu.c (Fmenu_or_popup_active_p):
7982 * window.c (Fset_window_configuration):
7983 * menu.c (Fx_popup_menu, Fx_popup_dialog):
7984 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
7985 * fns.c (Fyes_or_no_p):
7986 * editfns.c (Fmessage_box, Fmessage_or_box):
7987 * alloc.c (make_save_ptr_ptr):
7988 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
7989
7990 * window.c (Fset_window_configuration): Move select_window later.
7991
7992 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
7993
7994 Refine redisplay optimizations to only redisplay *some* frames/windows
7995 rather than all of them.
7996 * xdisp.c (REDISPLAY_SOME): New constant.
7997 (redisplay_other_windows, wset_redisplay, fset_redisplay)
7998 (bset_redisplay, bset_update_mode_line): New functions.
7999 (message_dolog): Use bset_redisplay.
8000 (clear_garbaged_frames): Use fset_redisplay.
8001 (echo_area_display): Use wset_redisplay.
8002 (buffer_shared_and_changed): Remove.
8003 (prepare_menu_bars): Call Vpre_redisplay_function before updating
8004 frame titles. Compute the actual set of windows redisplayed.
8005 Don't update frame titles and menu bars for frames that don't need to
8006 be redisplayed.
8007 (propagate_buffer_redisplay): New function.
8008 (AINC): New macro.
8009 (redisplay_internal): Use it. Be more selective in the set of windows
8010 we redisplay. Propagate windows_or_buffers_changed to
8011 update_mode_lines a bit later to simplify the code.
8012 (mark_window_display_accurate_1): Reset window and buffer's
8013 `redisplay' flag.
8014 (redisplay_window): Do nothing if neither the window nor the buffer nor
8015 the frame needs redisplay.
8016 * window.h (struct window): Add `redisplay' field.
8017 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
8018 (redisplay_other_windows, window_list): New declarations.
8019 * window.c (select_window, Fset_window_start): Use wset_redisplay.
8020 (window_list): Not static any more.
8021 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
8022 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
8023 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
8024 * frame.c (Fmake_frame_visible): Don't redisplay everything.
8025 * frame.h (struct frame): Add `redisplay' field.
8026 Move `external_menu_bar' bitfield next to other bit-fields.
8027 (SET_FRAME_GARBAGED): Use fset_redisplay.
8028 (SET_FRAME_VISIBLE): Don't garbage the frame;
8029 Use redisplay_other_windows.
8030 * buffer.h (struct buffer): Add `redisplay' field.
8031 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
8032 (modify_overlay): Use bset_redisplay.
8033 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
8034
8035 2013-11-28 Eli Zaretskii <eliz@gnu.org>
8036
8037 Support w32 file notifications in batch mode.
8038 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
8039 invalid (which happens in batch mode). If non-interactive, call
8040 handle_file_notifications to store file notification events in the
8041 input queue. (Bug#15933)
8042
8043 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
8044
8045 * w32inevt.c (handle_file_notifications): Now external, not static.
8046
8047 * w32term.h (handle_file_notifications): Provide prototype.
8048
8049 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
8050 init_crit, since init_display, which does that otherwise, is not
8051 called.
8052
8053 2013-11-27 Glenn Morris <rgm@gnu.org>
8054
8055 * Makefile.in ($(lispsource)/international/charprop.el): New.
8056 (emacs$(EXEEXT)): Depend on charprop.el.
8057
8058 2013-11-27 Eli Zaretskii <eliz@gnu.org>
8059
8060 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
8061 deleting portions of the buffer under non-nil REPLACE argument.
8062 (Bug#15973)
8063
8064 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
8065 directory, watch it and not its parent.
8066 (add_watch): Allow empty string in FILE.
8067
8068 2013-11-27 Martin Rudalics <rudalics@gmx.at>
8069
8070 * window.c (Fset_window_start, window_resize_apply)
8071 (window_scroll): Reset window_end_valid (Bug#15957).
8072
8073 2013-11-27 Glenn Morris <rgm@gnu.org>
8074
8075 * Makefile.in (leimdir): Now in lisp source directory.
8076 ($(leimdir)/leim-list.el): Just use ../leim .
8077 * epaths.in (PATH_DUMPLOADSEARCH):
8078 * lread.c (load_path_default):
8079 * nsterm.m (ns_load_path): No more leim directory.
8080
8081 2013-11-26 Andreas Schwab <schwab@suse.de>
8082
8083 * .gdbinit (xgettype): Add cast.
8084
8085 2013-11-26 Glenn Morris <rgm@gnu.org>
8086
8087 Preload leim-list.el.
8088 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
8089 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
8090 is a single directory.
8091
8092 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
8093
8094 bool-vector-subsetp is now the normal direction (Bug#15912).
8095 * data.c (Fbool_vector_subsetp): Test whether the first argument
8096 is a subset of the second one, not the reverse. Add doc string.
8097
8098 Fix minor problems found by static checking.
8099 * lread.c (load_path_default): Now static.
8100 * textprop.c (text_property_stickiness): Be consistent about the
8101 test used when deciding whether to consider the previous character.
8102 This simplifies the code a bit.
8103
8104 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
8105
8106 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
8107
8108 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
8109 (syms_of_frame): Don't defsubr them.
8110
8111 2013-11-25 Glenn Morris <rgm@gnu.org>
8112
8113 * lread.c (load_path_default): Change the sense of the argument.
8114 (init_lread): When EMACSLOADPATH is set, do not ignore changes
8115 from dump_path. When it is not, avoid checking dump_path twice.
8116
8117 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
8118 uninstalled dump_path against installed Vload_path. (Bug#15964)
8119
8120 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
8121
8122 Export get_pos_property to Elisp.
8123 * editfns.c (Fget_pos_property): Rename from get_pos_property.
8124 (syms_of_editfns): Export it to Elisp.
8125
8126 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
8127
8128 2013-11-23 Romain Francoise <romain@orebokech.com>
8129
8130 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
8131 initialization here ...
8132 (syms_of_fileio): ... from here.
8133
8134 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
8135
8136 * lread.c (init_lread): Fix int/Lisp_Object mixup.
8137 Please use --enable-check-lisp-object-type.
8138
8139 2013-11-23 Glenn Morris <rgm@gnu.org>
8140
8141 * process.c (get_process): Explicit error for dead buffers.
8142
8143 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
8144
8145 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
8146
8147 2013-11-23 Glenn Morris <rgm@gnu.org>
8148
8149 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
8150 * lread.c (load_path_check): Take path to check as argument.
8151 (load_path_default): New, split from init_lread.
8152 (init_lread): Move calc of default load-path to load_path_default.
8153 Empty elements in EMACSLOADPATH now stand for the default.
8154 (load-path): Doc fix.
8155 * emacs.c (decode_env_path): Add option to treat empty elements
8156 as nil rather than ".".
8157 * callproc.c (init_callproc_1, init_callproc):
8158 * image.c (Vx_bitmap_file_path):
8159 * lisp.h (decode_env_path):
8160 * lread.c (Vsource_directory):
8161 Update for new argument spec of decode_env_path.
8162
8163 2013-11-22 Eli Zaretskii <eliz@gnu.org>
8164
8165 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
8166 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
8167
8168 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
8169
8170 Fix some dependency problems that cause unnecessary recompiles.
8171 Problem reported by RMS in
8172 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
8173 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
8174 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
8175 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
8176 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
8177 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
8178 (boostrap-clean): No need to remove stamp-oldxmenu.
8179
8180 Fix recently introduced bool vector overrun.
8181 This was due to an optimization that went awry.
8182 Reported by Glenn Morris in
8183 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
8184 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
8185 for empty vectors, undoing the 2013-11-18 change.
8186 * data.c (bool_vector_binop_driver): Rely on this.
8187 Fix bug that occasionally overran the destination.
8188 * lisp.h (struct Lisp_Bool_vector): Document this.
8189
8190 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
8191
8192 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
8193 to handle dialogs.
8194
8195 * nsterm.m (init, run, stop:): Comment out for now, does not work
8196 with dialogs.
8197
8198 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
8199
8200 * charset.c (syms_of_charset): Don't read past end of string.
8201
8202 2013-11-19 Glenn Morris <rgm@gnu.org>
8203
8204 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
8205
8206 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
8207
8208 Add hooks to run on gaining/losing focus. (Bug#15029)
8209 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
8210 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
8211 (syms_of_frame): Add focus-in-hook, focus-out-hook.
8212
8213 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
8214
8215 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
8216 The old names predated the API change that put destination at end.
8217
8218 Improve API of recently-added bool vector functions (Bug#15912).
8219 The old API had (bool-vector-count-matches A B)
8220 and (bool-vector-count-matches-at A B I), which gave the
8221 misleading impression that the two functions were variants, one
8222 with a location I. The new API has (bool-vector-count-population A)
8223 and (bool-vector-count-consecutive A B I) to make the distinction
8224 clearer. The first function no longer has a B argument, since the
8225 caller can easily determine the number of nils if the length and
8226 number of ts is known.
8227 * data.c (Fbool_vector_count_population): Rename from
8228 bool_vector_count_matches, and accept just 1 argument.
8229 (Fbool_vector_count_consecutive): Rename from
8230 Fbool_vector_count_matches_at.
8231
8232 Always allocate at least one bits_word per bool vector.
8233 See Daniel Colascione in:
8234 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
8235 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
8236 * data.c (bool_vector_binop_driver): Rely on this. Tune.
8237 * lisp.h (struct Lisp_Bool_vector): Document this.
8238
8239 2013-11-18 Eli Zaretskii <eliz@gnu.org>
8240
8241 * insdel.c (invalidate_buffer_caches): New function, consolidated
8242 from part of prepare_to_modify_buffer.
8243 (insert_from_gap, prepare_to_modify_buffer):
8244 * coding.c (code_convert_region, code_convert_string):
8245 Call invalidate_buffer_caches. (Bug#15841)
8246
8247 * lisp.h (invalidate_buffer_caches): Add prototype.
8248
8249 2013-11-17 Eli Zaretskii <eliz@gnu.org>
8250
8251 * w32term.c (x_update_window_end): Don't invalidate the entire
8252 mouse-highlight info, just signal frame_up_to_date_hook that mouse
8253 highlight needs to be redisplayed. (Bug#15913)
8254
8255 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
8256
8257 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
8258
8259 2013-11-16 Eli Zaretskii <eliz@gnu.org>
8260
8261 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
8262 while we are using Vprin1_to_string_buffer.
8263
8264 * keymap.c (describe_map): Don't crash if PT is 1 both before and
8265 after inserting the description string. (Bug#15907)
8266
8267 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
8268
8269 * data.c: Work around bogus GCC diagnostic about shift count.
8270 Reported by Eli Zaretskii in
8271 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
8272 (pre_value): New function.
8273 (count_trailing_zero_bits): Use it.
8274
8275 2013-11-15 Eli Zaretskii <eliz@gnu.org>
8276
8277 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
8278 assume C macros are not supported even under -g3 in these old GCC
8279 versions.
8280
8281 2013-11-15 Leo Liu <sdl.web@gmail.com>
8282
8283 * minibuf.c (Ftry_completion, Fall_completions)
8284 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
8285
8286 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
8287
8288 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
8289 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
8290 This avoids placing unnecessary constants into the Emacs code.
8291
8292 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8293
8294 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
8295 for Cygwin w32 build.
8296
8297 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
8298 for Cygwin w32 build. (Bug#15892)
8299
8300 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
8301
8302 Simplify, port and tune bool vector implementation.
8303 * alloc.c (bool_vector_exact_payload_bytes)
8304 (bool_vector_payload_bytes): Remove.
8305 (bool_vector_fill): Return its argument.
8306 * alloc.c (bool_vector_fill):
8307 * lread.c (read1):
8308 * print.c (print_object):
8309 Simplify by using bool_vector_bytes.
8310 * alloc.c (make_uninit_bool_vector):
8311 New function, broken out from Fmake_bool_vector.
8312 (Fmake_bool_vector): Use it. Use tail call.
8313 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
8314 * data.c (BITS_PER_ULL): New constant.
8315 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
8316 if long long versions don't exist.
8317 (shift_right_ull): New function.
8318 (count_one_bits_word): New function, replacing popcount_bits_word
8319 macro. Don't assume that bits_word is no wider than long long.
8320 (count_one_bits_word, count_trailing_zero_bits):
8321 Don't assume that bits_word is no wider than long long.
8322 * data.c (bool_vector_binop_driver, bool_vector_not):
8323 * fns.c (Fcopy_sequence):
8324 * lread.c (read1):
8325 Create an uninitialized destination, to avoid needless work.
8326 (internal_equal): Simplify.
8327 (Ffillarray): Prefer tail call.
8328 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
8329 contain at least one word.
8330 (bits_word_to_host_endian): Prefer if to #if. Don't assume
8331 chars are narrower than ints.
8332 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
8333 * fns.c (Fcopy_sequence):
8334 Simplify and tune.
8335 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
8336 Don't try to port to hosts where bits_word values have holes; the
8337 code wouldn't work there anyway. Verify this assumption, though.
8338 (bool_vector_bytes): New function.
8339 (make_uninit_bool_vector): New decl.
8340 (bool_vector_fill): Now returns Lisp_Object.
8341
8342 * xfns.c (xic_create_fontsetname):
8343 * xrdb.c (gethomedir): Prefer tail calls.
8344
8345 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
8346
8347 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
8348 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
8349
8350 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
8351 that requires a return value.
8352 (Fset_buffer_modified_p): Take advantage of this change to do
8353 a tail call.
8354
8355 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
8356
8357 * buffer.c (Frestore_buffer_modified_p): Sync it with
8358 Fset_buffer_modified_p.
8359 (Fforce_mode_line_update): New function, moved from subr.el.
8360 (Fset_buffer_modified_p): Use them.
8361 (syms_of_buffer): Defsubr Fforce_mode_line_update.
8362
8363 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
8364
8365 * search.c (find_newline): Rewrite to prefer offsets to pointers.
8366 This avoids undefined behavior when subtracting pointers into
8367 different aways. On my platform it also makes the code a tad
8368 smaller and presumably faster.
8369
8370 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
8371
8372 * keyboard.c (command_loop_1): Use region-extract-function.
8373 * insdel.c (Qregion_extract_function): Not static any more (can we
8374 stop pretending that these vars can benefit from being marked static?).
8375
8376 2013-11-09 Eli Zaretskii <eliz@gnu.org>
8377
8378 * search.c (find_newline): If buffer text is relocated during the
8379 "dumb loop", adjust C pointers into buffer text to follow suit.
8380 (Bug#15841)
8381
8382 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
8383
8384 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
8385 for conversion (Bug#15837).
8386
8387 2013-11-09 Eli Zaretskii <eliz@gnu.org>
8388
8389 * fileio.c (Finsert_file_contents): Invalidate the newline cache
8390 for the entire range of inserted characters. (Bug#15841)
8391
8392 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
8393
8394 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
8395 unspecified.
8396 (realize_default_face): Remove assignment to distant-foreground if
8397 unspecified (Bug#15815).
8398
8399 2013-11-08 Eli Zaretskii <eliz@gnu.org>
8400
8401 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
8402 cache-long-scans disabled, since we don't want to call
8403 prepare_to_modify_buffer (in insert_1_both) for each message we
8404 display.
8405
8406 * buffer.h (bset_cache_long_scans): New INLINE function, moved
8407 from buffer.c. Improve commentary to the buffer field setter
8408 functions.
8409
8410 * buffer.c (bset_cache_long_scans): Static function deleted.
8411 Improve commentary to the buffer field setter functions.
8412 (init_buffer_once): Default for cache-long-scans changed to t.
8413 (Bug#15797)
8414
8415 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
8416
8417 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
8418
8419 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
8420 This bug was introduced in my 2013-06-21 change, and caused
8421 struct Lisp_Sub_Char_Table objects to be given too many slots,
8422 which broke 'make -C admin/unidata'.
8423
8424 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
8425
8426 Import changes from mac-port 4.5.
8427 * macfont.m (mac_font_copy_default_descriptors_for_language)
8428 (mac_font_copy_default_name_for_charset_and_languages): Declare.
8429 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
8430 (macfont_language_default_font_names): New.
8431 (macfont_list): Rearrange language/charset code.
8432 (macfont_close): Don't check for macfont_info->cache.
8433 (mac_ctfont_create_preferred_family_for_attributes): New font
8434 selection code, call
8435 mac_font_copy_default_name_for_charset_and_languages.
8436 (mac_font_copy_default_descriptors_for_language)
8437 (mac_font_copy_default_name_for_charset_and_languages): New functions.
8438
8439 * macfont.h (kCTVersionNumber10_9): Define if not defined.
8440
8441 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
8442
8443 Port to C11 aligned_alloc, and fix some integer overflows.
8444 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
8445 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
8446 and use of posix_memalign replaced with aligned_alloc.
8447 (aligned_alloc): New function, defined or declared as needed.
8448 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
8449 Don't undef; configure.ac now does this.
8450 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
8451 (calloc, aligned_alloc): Check for integer overflow.
8452 (aligned_alloc): Rename from memalign. All uses changed.
8453 (memalign): New function, an alias for aligned_alloc.
8454
8455 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
8456
8457 * xdisp.c (redisplay_internal): Fix typo in last change.
8458
8459 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
8460
8461 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
8462
8463 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
8464
8465 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
8466 redisplay--mode-lines-cause.
8467 (redisplay_internal): Keep them uptodate. Remove redundant check of
8468 buffer_shared_and_changed.
8469 * *.[chm]: Number every assignment to update_mode_lines so we
8470 can track why it is set.
8471
8472 2013-11-06 Eli Zaretskii <eliz@gnu.org>
8473
8474 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
8475
8476 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
8477
8478 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
8479 can track why it is set.
8480
8481 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
8482
8483 Integer-related fixes for term.c etc.
8484 * dispextern.h (face_tty_specified_color): New function.
8485 * term.c (turn_on_face): Don't rely on undefined behavior when
8486 assigning an out-of-range value to 'long'.
8487 Simplify test for toggling highlight.
8488 (tty_capable_p): Omit last two (unused) args. All callers changed.
8489 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
8490 (read_menu_input, tty_menu_activate, tty_menu_show):
8491 * xfaces.c (x_supports_face_attributes_p)
8492 (tty_supports_face_attributes_p):
8493 Use bool for boolean. All callers changed.
8494 (tty_supports_face_attributes_p): Omit defaults for color indices;
8495 no longer needed. Simplify tail call.
8496
8497 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
8498
8499 * xdisp.c (prepare_menu_bars): Mark static.
8500 * lisp.h (prepare_menu_bars): Don't declare.
8501 * xselect.c (x_handle_selection_clear):
8502 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
8503
8504 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
8505
8506 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
8507 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
8508
8509 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
8510
8511 * keyboard.c (Fcommand_error_default_function): Rename from
8512 Fdefault_error_output.
8513
8514 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
8515
8516 * keyboard.c (Fdefault_error_output): New function, extracted from
8517 cmd_error_internal.
8518 (syms_of_keyboard): Use it for Vcommand_error_function.
8519
8520 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
8521
8522 * eval.c (handlerlist_sentinel): New variable (bug#15802).
8523 (init_eval): Use it to ensure handlerlist is non-NULL.
8524 (unwind_to_catch): Make sure we never set handlerlist to NULL.
8525 (Fsignal): Adjust NULLness test of handlerlist.
8526 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
8527
8528 2013-11-05 Eli Zaretskii <eliz@gnu.org>
8529
8530 * callproc.c (call_process): Call prepare_to_modify_buffer before
8531 decoding text read from the sub-process, as the decoded stuff will
8532 be inserted into the buffer. This will invalidate the various
8533 caches maintained for the buffer. (Bug#15148)
8534
8535 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
8536
8537 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
8538 string of glyphless-char-display.
8539
8540 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
8541
8542 * nsfns.m (ns_get_name_from_ioreg): New function.
8543 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
8544 OSX >= 10.9. Use ns_get_name_from_ioreg.
8545
8546 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
8547
8548 Simplify and port recent bool vector changes.
8549 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
8550 only in this file. Use a more-efficient implementation if the
8551 second argument is a power of 2.
8552 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
8553 Remove no-longer-necessary compile-time checks.
8554 (bool_vector_exact_payload_bytes): New function.
8555 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
8556 exact payload changed to call the new function. Do not assume
8557 that the arg or result fits in ptrdiff_t.
8558 (bool_vector_fill): New function.
8559 (Fmake_bool_vector): Use it. Don't assume bit counts fit
8560 in ptrdiff_t.
8561 (vroundup_ct): Don't assume arg fits in size_t.
8562 * category.c (SET_CATEGORY_SET): Remove. All callers now just
8563 invoke set_category_set.
8564 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
8565 All callers changed. Use bool_vector_set.
8566 * category.h (XCATEGORY_SET): Remove; no longer needed.
8567 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
8568 bool_vector_bitref.
8569 * data.c (Faref): Use bool_vector_ref.
8570 (Faset): Use bool_vector_set.
8571 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
8572 (Fbool_vector_not, Fbool_vector_count_matches)
8573 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
8574 * fns.c (concat): Use bool_vector_ref.
8575 (Ffillarray): Use bool_vector_fill.
8576 (mapcar1): Use bool_vector_ref.
8577 (sxhash_bool_vector): Hash words, not bytes.
8578 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
8579 a constant, since it's now used in #if.
8580 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
8581 unsigned char on unusual architectures, so that we no longer
8582 assume that the number of bits per bits_word is a power of two or
8583 is a multiple of 8 or of CHAR_BIT.
8584 (Qt): Add forward decl.
8585 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
8586 at least as strictly as bits_word.
8587 (bool_vector_data, bool_vector_uchar_data): New accessors.
8588 All data structure accesses changed to use them.
8589 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
8590 (bool_vector_set): New functions.
8591 (bool_vector_fill): New decl.
8592 (ROUNDUP): Move to alloc.c as described above.
8593
8594 Fix recent gnutls changes.
8595 * gnutls.c (Fgnutls_boot): Don't assume C99.
8596 * process.c (wait_reading_process_output): Fix typo in recent change.
8597
8598 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
8599
8600 * process.c (wait_reading_process_output, read_process_output)
8601 (send_process): Check gnutls_state is not NULL.
8602
8603 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
8604 (Fgnutls_boot): Set process gnutls_p later, after initialization.
8605
8606 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
8607
8608 * nsterm.m (init, run, stop:): New methods in EmacsApp for
8609 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
8610
8611 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
8612 OSX >= 10.9.
8613
8614 * nsfns.m (Fx_create_frame): Fix memory leak.
8615
8616 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
8617 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
8618 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
8619
8620 2013-11-04 Eli Zaretskii <eliz@gnu.org>
8621
8622 * xdisp.c (message3_nolog, message_with_string): Encode the string
8623 before writing it to the terminal in a non-interactive session.
8624
8625 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
8626 sure we concatenate them into a unibyte string.
8627
8628 * fileio.c (make_temp_name): Encode PREFIX, and decode the
8629 resulting temporary name before returning it to the caller.
8630 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
8631 is a unibyte string, convert NAME to a unibyte string to ensure
8632 that the result is also a unibyte string.
8633
8634 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
8635 create unibyte strings from default paths and directory/file
8636 names.
8637
8638 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
8639 string.
8640
8641 * callproc.c (init_callproc): Use build_unibyte_string to make
8642 sure we create unibyte strings from default paths and
8643 directory/file names.
8644
8645 * buffer.c (init_buffer): Don't store default-directory of
8646 *scratch* in multibyte form. The original problem which led to
8647 that is described in
8648 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
8649 but it was solved long ago. (Bug#15260)
8650
8651 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
8652
8653 Port to stricter C99 platforms.
8654 Especially, C99 prohibits nesting a struct X inside struct Y if
8655 struct X has a flexible array member.
8656 * alloc.c (struct sdata): New type.
8657 (sdata): Implement in terms of struct sdata.
8658 Remove u member; all uses replaced by next_vector, set_next_vector.
8659 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
8660 (SDATA_DATA_OFFSET): Now a constant, not a macro.
8661 (struct sblock): Rename first_data member to data, which is now
8662 a flexible array member. All uses changed.
8663 (next_vector, set_next_vector, large_vector_vec): New functions.
8664 (vector_alignment): New constant.
8665 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
8666 (struct large-vector): Now merely a NEXT member, since the old approach
8667 ran afoul of stricter C99. All uses changed to use
8668 large_vector_vec or large_vector_offset.
8669 (large_vector_offset): New constant.
8670 * dispnew.c: Include tparam.h, for tgetent.
8671 Do not include term.h; no longer needed.
8672 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
8673 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
8674 (struct Lisp_Vector): Use a flexible array member for contents,
8675 instead of a union with a member that is an array of size 1.
8676 All uses changed.
8677 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
8678 fact that the struct no longer contains a union.
8679 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
8680 (struct Lisp_Save_Value, struct Lisp_Free):
8681 Use unsigned, not int, for spacers, to avoid c99 warning.
8682 (union specbinding): Use unsigned, not bool, for bitfield, as
8683 bool is not portable to pre-C99 hosts.
8684
8685 2013-11-04 Glenn Morris <rgm@gnu.org>
8686
8687 * emacs.c (usage_message): Mention that `-L :...' appends.
8688
8689 2013-11-02 Glenn Morris <rgm@gnu.org>
8690
8691 * Makefile.in (abs_builddir): Remove.
8692 (bootstrap_exe): Use relative filename.
8693
8694 Use relative filenames in TAGS files.
8695 * Makefile.in (abs_srcdir): Remove it again.
8696 (.PHONY): Remove frc.
8697 (maintainer-clean): No more TAGS-LISP file.
8698 (TAGS): Pass relative file names to etags.
8699 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
8700
8701 * Makefile.in (abs_srcdir): New, set by configure.
8702 (lispdir): Remove.
8703 (maintainer-clean): Remove pointless echo. That should be in the
8704 top-level Makefile, if anywhere. Delete TAGS-LISP.
8705 (extraclean): No s/ and m/ directories for some time.
8706 (TAGS): Also depend on ctagsfiles3.
8707 Remove no-longer-defined S_FILE.
8708 Pass absolute filenames to etags once more.
8709 (TAGS-LISP): Replace lispdir with its expansion.
8710 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
8711 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
8712
8713 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
8714
8715 * xfaces.c (check_lface_attrs, realize_default_face):
8716 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
8717 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
8718
8719 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
8720
8721 * emacs.c (original_pwd): Remove global var by making it local.
8722 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
8723
8724 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
8725
8726 * xfaces.c: Declare color_distance.
8727 (QCdistant_foreground): New variable.
8728 (NEAR_SAME_COLOR_THRESHOLD): New define.
8729 (load_color2): New function.
8730 (load_color): Call load_color2.
8731 (load_face_colors): Call load_color2 and if distant-color is specified
8732 calculate distant and use distant-color if colors are near.
8733 (LFACE_DISTANT_FOREGROUND): New define.
8734 (merge_face_ref, Finternal_set_lisp_face_attribute)
8735 (Finternal_get_lisp_face_attribute)
8736 (x_supports_face_attributes_p): Handle distant-foreground similar to
8737 foreground.
8738 (syms_of_xfaces): DEFSYM QCdistant_foreground.
8739
8740 * dispextern.h (lface_attribute_index):
8741 Add LFACE_DISTANT_FOREGROUND_INDEX.
8742
8743 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
8744
8745 * image.c (pbm_next_char): New function.
8746 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
8747 (pbm_scan_number): Use it.
8748 (Qlibjpeg_version): New variable.
8749 (syms_of_image): DEFSYM and initialize it.
8750
8751 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
8752
8753 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
8754
8755 2013-10-31 Glenn Morris <rgm@gnu.org>
8756
8757 * emacs.c (original_pwd): New char.
8758 (main): If using --chdir, store original_pwd.
8759 (init_cmdargs): When setting Vinvocation_directory based on a
8760 relative argv[0], use original_pwd if set. (Bug#15768)
8761
8762 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
8763
8764 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
8765
8766 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
8767
8768 * insdel.c: Fix minor problems found by static checking.
8769 (Qregion_extract_function): Now static.
8770 (prepare_to_modify_buffer_1): Remove unused locals.
8771
8772 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
8773
8774 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
8775 (syms_of_xdisp): Declare pre-redisplay-function.
8776 (markpos_of_region): Remove function.
8777 (init_iterator, compute_stop_pos, handle_face_prop)
8778 (face_before_or_after_it_pos, reseat_to_string)
8779 (get_next_display_element, window_buffer_changed)
8780 (redisplay_internal, try_cursor_movement, redisplay_window)
8781 (try_window_reusing_current_matrix, try_window_id, display_line)
8782 (note_mode_line_or_margin_highlight, note_mouse_highlight)
8783 (display_string, mouse_face_from_buffer_pos): Remove region handling.
8784 * window.h (struct window): Remove field `region_showing'.
8785 * dispextern.h (struct it): Remove region_beg/end_charpos.
8786 (face_at_buffer_position, face_for_overlay_string)
8787 (face_at_string_position): Update prototypes.
8788 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
8789 (face_at_string_position): Remove `region_beg' and `region_end' args.
8790 * fontset.c (Finternal_char_font):
8791 * font.c (font_at, font_range): Adjust calls accordingly.
8792 * insdel.c (Qregion_extract_function): New var.
8793 (syms_of_insdel): Initialize it.
8794 (prepare_to_modify_buffer_1): Use it.
8795
8796 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
8797
8798 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
8799 * ftxfont.c (ftxfont_get_gcs):
8800 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
8801 * xfaces.c (x_free_colors, x_free_dpy_colors)
8802 (x_create_gc, unload_color):
8803 * xselect.c (x_property_data_to_lisp):
8804 * xsettings.c (parse_settings):
8805 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
8806 (get_bits_and_offset): Adjust definition.
8807 * frame.c (XParseGeometry): Adjust locals.
8808 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
8809 * regex.h (toplevel): Likewise for reg_syntax_t.
8810
8811 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
8812
8813 * eval.c (run_hook_with_args): Use FUNCTIONP.
8814
8815 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
8816
8817 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
8818 fields, drop 'allocated_p' member and use -1 for uninitialized value.
8819 * w32term.h (struct w32_output): Similarly but do not use -1 because...
8820 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
8821 on MS-Windows anyway.
8822 (free_face_colors): Define only if HAVE_X_WINDOWS and...
8823 (free_realized_face): ...adjust user.
8824 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
8825 white relief pixels to -1.
8826 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
8827 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
8828 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
8829
8830 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
8831
8832 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
8833 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
8834 in practice now. All callers changed.
8835
8836 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
8837
8838 * dispextern.h (struct face): Use bitfields for 'underline_type'
8839 and 'box' members. Remove set-but-unused members 'pixmap_w' and
8840 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
8841 'stipple' member. Move 'lface' member up to help...
8842 * xfaces.c (make_realized_face): ...this function to find and
8843 clear just the members that need clearing.
8844 (load_face_colors, realize_x_face):
8845 * xdisp.c (extend_face_to_end_of_line): Adjust user.
8846
8847 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
8848
8849 * xftfont.c (struct xftfont_info): Remove set-but-unused
8850 'screen' member.
8851 (xftfont_open): Adjust user.
8852 (xftfont_get_colors): Remove useless prototype.
8853
8854 2013-10-26 Eli Zaretskii <eliz@gnu.org>
8855
8856 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
8857 before passing them to 'unexec'. (Bug#15260)
8858
8859 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
8860
8861 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
8862
8863 2013-10-25 Eli Zaretskii <eliz@gnu.org>
8864
8865 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
8866 the changed signature of the font driver's 'close' method.
8867
8868 * w32font.h (w32font_close): Adjust the prototype to the change in
8869 function definition.
8870
8871 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
8872
8873 * w32uniscribe.c (uniscribe_close): Adapt the call to
8874 w32font_close to its new prototype.
8875
8876 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
8877
8878 Omit unused frame argument of font API's close function.
8879 * font.h (struct font): Drop frame argument. Adjust comment.
8880 * font.c (font_clear_cache, font_close_object): Adjust users.
8881 * ftfont.c (ftfont_close):
8882 * ftxfont.c (ftxfont_close):
8883 * macfont.m (macfont_close):
8884 * nsfont.m (nsfont_close):
8885 * w32font.c (w32font_close):
8886 * xfont.c (xfont_close):
8887 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
8888 tweak comments and make functions safe if called more than once for
8889 the same font object.
8890
8891 Perform font-specific cleanup when font object is swept by GC. See
8892 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
8893 * alloc.c (cleanup_vector): New function.
8894 (sweep_vector): Call it for each reclaimed vector object.
8895 * font.h (struct font): Adjust comment.
8896
8897 2013-10-24 Glenn Morris <rgm@gnu.org>
8898
8899 * Makefile.in (abs_top_srcdir): New, set by configure.
8900
8901 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
8902
8903 Adjust recent font-related changes to fix bug#15686.
8904 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
8905 is a live window system frame, mark its default font too.
8906
8907 2013-10-23 Glenn Morris <rgm@gnu.org>
8908
8909 * Makefile.in (RUN_TEMACS): Make relative (again).
8910 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
8911 (bootstrap-emacs$(EXEEXT)):
8912 Quote entities that might contain whitespace.
8913
8914 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
8915
8916 Port to Solaris 10 and its bundled GCC.
8917 Problem reported by Timothy C. Burt.
8918 * floatfns.c (isfinite, isnan): Redefine unconditionally.
8919
8920 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
8921
8922 Do not allow font caches to grow too large.
8923 * alloc.c (compact_font_cache_entry, compact_font_caches):
8924 New functions or stub if not HAVE_WINDOW_SYSTEM.
8925 (compact_undo_list): Factor out from Fgarbage_collect.
8926 Add comment.
8927 (mark_face_cache): Mark face font. Move down to avoid
8928 extra prototypes.
8929 (mark_terminals): Do not mark font cache here.
8930 (Fgarbage_collect): Call compaction functions described
8931 above. Adjust comment.
8932
8933 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
8934
8935 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
8936 chdir to HOME (bug#15607).
8937
8938 * nsterm.m (Qcocoa, Qgnustep): New variables.
8939 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
8940 (ns_get_color): Make selection color work for GNUstep also.
8941
8942 2013-10-18 Eli Zaretskii <eliz@gnu.org>
8943
8944 * keyboard.c (make_lispy_event): Remove GPM-specific code that
8945 handles mouse clicks. Instead, let GPM use the same code as all
8946 the other mice use. See the discussion starting at
8947 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
8948 for the details of the problem with the menu bar this fixes.
8949
8950 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
8951
8952 Remove port-specific display name lists to avoid extra
8953 complexity and data duplication with display info lists.
8954 * xterm.h (x_display_name_list): Remove declaration.
8955 * xterm.c (x_display_name_list): Remove.
8956 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
8957 * xfns.c (x_display_info_for_name, Fx_display_list):
8958 Likewise. Use x_display_list where appropriate.
8959 * w32term.h (w32_display_name_list): Remove declaration.
8960 * w32term.c (w32_display_name_list): Remove.
8961 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
8962 Adjust users.
8963 * w32fns.c (x_display_info_for_name, Fx_display_list):
8964 Likewise. Use x_display_list where appropriate.
8965 * nsterm.h (ns_display_name_list): Remove declaration.
8966 * nsterm.m (ns_display_name_list): Remove.
8967 (ns_term_init, syms_of_nsterm): Adjust users.
8968 * nsfns.m (ns_display_info_for_name, Fx_display_list):
8969 Likewise. Use x_display_list where appropriate.
8970 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
8971 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
8972 (mark_terminals): Mark per-terminal font cache.
8973
8974 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
8975
8976 Don't run timers in input-pending-p. Its new check-timers param
8977 provides the prior behavior. (Bug#15045).
8978 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
8979
8980 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
8981
8982 Make some functions static in non-Microsoft builds.
8983 On my platform (Fedora 19 x86-64), this shrinks the
8984 Emacs executable (text+data) by 0.25%.
8985 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
8986 (load_color) [!MSDOS]:
8987 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
8988 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
8989 * lisp.h (check_existing):
8990 * process.h (conv_sockaddr_to_lisp, network_interface_list)
8991 (network_interface_info) [!WINDOWSNT]:
8992 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
8993 Remove extern decls.
8994 * fileio.c (check_existing):
8995 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
8996 * process.c (conv_sockaddr_to_lisp, network_interface_list)
8997 (network_interface_info) [!WINDOWSNT]:
8998 * term.c (encode_terminal_code) [!WINDOWSNT]:
8999 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
9000 * xfaces.c (load_color) [!MSDOS]:
9001 Now static.
9002 * fileio.c (check_existing, check_executable, check_writable):
9003 * process.c (network_interface_list, network_interface_info):
9004 Move earlier, so that we don't need forward decls.
9005 * gnutls.c (fn_gnutls_transport_set_errno)
9006 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
9007 Remove; unused.
9008 * w32.c (init_environment): Use faccessat rather than
9009 check_existing, partly for consistency with the rest of the code
9010 in this file, partly so that check_existing can be static.
9011
9012 Make VALMASK visible to GDB even if clang is used (Bug#15574).
9013 * emacs.c (MAIN_PROGRAM): New macro.
9014 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
9015 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
9016
9017 bool vector int width fixes
9018 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
9019 (Fbool_vector_count_matches_at):
9020 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
9021 can exceed PTRDIFF_MAX, at least in theory.
9022 (Fbool_vector_count_matches_at):
9023 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
9024
9025 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
9026
9027 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
9028 (struct sockaddr): Add forward decl, for platforms that lack it.
9029
9030 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
9031
9032 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
9033 Qnil (Bug#15628).
9034
9035 2013-10-16 Eli Zaretskii <eliz@gnu.org>
9036
9037 * w32.c (network_interface_get_info, network_interface_list)
9038 (network_interface_info): New functions. (Bug#15610)
9039 (GetAdaptersInfo_Proc): New typedef.
9040 (get_adapters_info): New wrapper function.
9041 (globals_of_w32): Initialize g_b_init_get_adapters_info.
9042
9043 * process.h (network_interface_list, network_interface_info):
9044 New prototypes.
9045
9046 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
9047 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
9048 all systems. Return non-nil for systems that HAVE_NET_IF_H and
9049 for WINDOWSNT. Doc fix.
9050 (syms_of_process): Defsubr Snetwork_interface_list and
9051 Snetwork_interface_info unconditionally.
9052
9053 * menu.c (have_boxes): Fix redundant simulation of radio buttons
9054 in NS GUI sessions. (Bug#15629)
9055
9056 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
9057
9058 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
9059
9060 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
9061
9062 * print.c (print_object): Print " ..." when truncating bool vectors.
9063
9064 2013-10-15 Eli Zaretskii <eliz@gnu.org>
9065
9066 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
9067 standard mouse buttons.
9068
9069 * termhooks.h (struct input_event): Remove incorrect commentary.
9070
9071 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
9072
9073 Disallow bool vector operations on mixed-length operands.
9074 The old behavior left garbage in the result vector sometimes,
9075 and didn't seem to be useful.
9076 * data.c (Qwrong_length_argument): New static var.
9077 (wrong_length_argument): New function.
9078 (bool_vector_binop_driver): Check that args agree in length.
9079
9080 * keyboard.c, keyboard.h (all_kboards): Now static.
9081
9082 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
9083
9084 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
9085 note from the lispref.
9086
9087 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
9088
9089 * nsterm.h (struct ns_display_info): Remove set-but-unused
9090 member image_cache (image caches are per-terminal anyway).
9091 (FRAME_X_IMAGE_CACHE): Remove.
9092 * nsterm.m (ns_initialize_display_info): Adjust user.
9093
9094 2013-10-14 Eli Zaretskii <eliz@gnu.org>
9095
9096 * w32proc.c: Include mingw_time.h.
9097
9098 * w32.c: Include mingw_time.h.
9099
9100 Implement scrolling of TTY menus when the screen is too short.
9101
9102 * term.c (tty_menu_display): Accept an additional argument, the
9103 menu item from which to start displaying the menu. Account for
9104 the value of Y when limiting the menu to the number of available
9105 screen lines.
9106 (mi_result): New enumeration.
9107 (read_menu_input): Return enumerated value. When the y coordinate
9108 hits min_y or max_y, return scroll indication instead of wrapping
9109 around the menu.
9110 (tty_menu_activate): Handle the scrolling indications from
9111 read_menu_input. Compute the first menu item to display and pass
9112 it to tty_menu_display.
9113
9114 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
9115
9116 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
9117 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
9118 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
9119 Adjust to match the change described below.
9120 (struct terminal): Move must_write_spaces, line_ins_del_ok,
9121 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
9122 memory_below_frame members to...
9123 * termchar.h (struct tty_display_info): ...here because they're
9124 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
9125 * term.c (init_tty):
9126 * nsterm.m (ns_create_terminal):
9127 * w32term.c (w32_create_terminal):
9128 * xterm.c (x_create_terminal): Adjust users.
9129 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
9130 to filter out non-TTY frames. Adjust comment.
9131 (scrolling): Adjust user. Prefer eassert for debugging check.
9132
9133 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
9134
9135 * xfaces.c (PT_PER_INCH): Remove unused macro.
9136 * termhooks.h (struct terminal): Remove set-but-unused
9137 member fast_clear_end_of_line.
9138 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
9139 * nsterm.m (ns_create_terminal):
9140 * term.c (init_tty):
9141 * w32term.c (w32_create_terminal):
9142 * xterm.c (x_create_terminal): Adjust users.
9143
9144 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
9145
9146 * lisp.h (bool_vector_size): New function.
9147 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
9148 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
9149 (Fbool_vector_not, Fbool_vector_count_matches_at):
9150 Remove uses of 'eassume' that should no longer be needed,
9151 because they are subsumed by the 'eassume' in bool_vector_size.
9152
9153 2013-10-12 Eli Zaretskii <eliz@gnu.org>
9154
9155 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
9156 after inclusion of gif_lib.h, thus fixing compiler warnings caused
9157 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
9158
9159 2013-10-11 Eli Zaretskii <eliz@gnu.org>
9160
9161 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
9162 have different dimensions. (Bug#15575)
9163
9164 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
9165 visibility.
9166
9167 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
9168
9169 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
9170
9171 * term.c (tty_menu_show): Never return with unbalanced
9172 specpdl. Use eassert for debugging check. Adjust style.
9173
9174 2013-10-11 Eli Zaretskii <eliz@gnu.org>
9175
9176 * term.c (read_menu_input): Make selection of menu items
9177 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
9178 (tty_menu_activate): Fix off-by-one error when computing max_y.
9179
9180 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
9181
9182 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
9183 audit logging (only used with GnuTLS 3.x) and enable it.
9184
9185 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
9186
9187 * dispnew.c (redraw_frame): Remove useless #ifdef because
9188 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
9189 Also, move TTY fflush to...
9190 * term.c (tty_update_end): ...this function.
9191
9192 2013-10-11 Eli Zaretskii <eliz@gnu.org>
9193
9194 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
9195 the end of the frame's glyph matrix. (Bug#15575)
9196
9197 * term.c (tty_menu_display): Don't move cursor while overwriting
9198 frame's glyphs with menu items. Limit the number of items
9199 displayed to what can be shown on the available screen lines,
9200 excluding the echo area.
9201 (tty_menu_activate): Limit the Y coordinate allowed by
9202 read_menu_input to the last screen line used for menu display.
9203
9204 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
9205
9206 * lisp.h (eassume): New macro.
9207 Also, include <verify.h>, for 'assume'.
9208 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
9209 (vroundup, vector_nbytes):
9210 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
9211 (Fbool_vector_not, Fbool_vector_count_matches)
9212 (Fbool_vector_count_matches_at):
9213 Use eassume, not eassert.
9214 * casetab.c (set_identity, shuffle):
9215 * composite.c (composition_gstring_put_cache):
9216 * dispnew.c (update_frame_1):
9217 * ftfont.c (ftfont_shape_by_flt):
9218 * image.c (gif_load):
9219 * intervals.c (offset_intervals):
9220 * macfont.m (macfont_shape):
9221 Remove calls to 'assume' that are no longer needed, because
9222 --enable-gcc-warnings no longer generates bogus warnings
9223 when these calls are removed.
9224
9225 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
9226
9227 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
9228
9229 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
9230
9231 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
9232 (Qsubstitute_env_in_file_name): New var.
9233 (syms_of_fileio): Define it.
9234
9235 2013-10-10 Eli Zaretskii <eliz@gnu.org>
9236
9237 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
9238 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
9239 (Bug#15575)
9240
9241 * term.c (save_and_enable_current_matrix): Don't allocate and
9242 don't save margin areas.
9243 (restore_desired_matrix): Don't restore margin areas.
9244 (free_saved_screen): Don't free margin areas.
9245
9246 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
9247
9248 * image.c: Pacify --enable-gcc-warnings.
9249 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
9250 #define only if used.
9251
9252 2013-10-10 Eli Zaretskii <eliz@gnu.org>
9253
9254 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
9255 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
9256 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
9257 (gif_load): For giflib v5.x and later, display the error message
9258 produced by giflib when its functions fail.
9259 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
9260 (Bug#15531)
9261
9262 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
9263
9264 * keyboard.c (last_event_timestamp): Remove. For X selection and
9265 GTK popup menus, it may be obtained from per-frame X display info.
9266 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
9267 (process_special_events): Adjust users.
9268 * keyboard.h (last_event_timestamp): Remove declaration.
9269 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
9270 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
9271 * menu.h (xmenu_show): Adjust prototype.
9272 * menu.c (Fx_popup_menu): Adjust user.
9273 * xselect.c (x_own_selection, x_get_foreign_selection)
9274 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
9275
9276 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
9277
9278 * keyboard.c (init_kboard): Now static. Add arg
9279 to denote window system. Adjust comment.
9280 (init_keyboard): Adjust user.
9281 (allocate_kboard): New function.
9282 (syms_of_keyboard):
9283 * nsterm.m (ns_term_init):
9284 * term.c (init_tty):
9285 * w32term.c (w32_create_terminal):
9286 * xterm.c (x_term_init): Use it.
9287 * keyboard.h (init_kboard): Remove prototype.
9288 (allocate_kboard): Add prototype.
9289
9290 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
9291
9292 * image.c (GIFLIB_MAJOR): Ensure it's defined.
9293 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
9294
9295 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
9296
9297 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
9298
9299 2013-10-09 Eli Zaretskii <eliz@gnu.org>
9300
9301 * term.c (tty_menu_activate): Flush the output stream after
9302 showing the cursor, and don't mark the frame garbaged at exit from
9303 the function. Fixes redisplay glitches when moving from one menu
9304 to another.
9305
9306 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
9307
9308 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
9309 or throw error (Bug#15570).
9310
9311 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
9312
9313 * intervals.c (temp_set_point_both): Move test into 'eassert',
9314 for speed.
9315
9316 * lisp.h (eassert): Don't use 'assume'.
9317 Sometimes 'assume' wins in performance, and sometimes it loses,
9318 so it shouldn't be used all the time. Perhaps we need two
9319 flavors of 'eassert', one for where 'assume' is far more likely
9320 to help or to hurt; but that can be done later.
9321 Problem reported by Dmitry Antipov in
9322 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
9323 Also, don't include <verify.h>; no longer needed.
9324
9325 2013-10-09 Glenn Morris <rgm@gnu.org>
9326
9327 * eval.c (Fcond): Doc tweak.
9328
9329 2013-10-09 Eli Zaretskii <eliz@gnu.org>
9330
9331 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
9332 expressions with side effects to eassert. (Bug#15565)
9333
9334 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
9335
9336 * fns.c (hashfn_user_defined): Allow hash functions to return any
9337 Lisp_Object.
9338
9339 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
9340
9341 Fix minor problems found by static checking.
9342 * dispnew.c (save_current_matrix): Omit unnecessary casts.
9343 * dispnew.c (update_frame_with_menu): Mark debug local as used.
9344 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
9345 * keyboard.c (read_menu_command): Remove unused local.
9346 * lisp.h (read_menu_command): New decl.
9347 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
9348 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
9349 Return ptrdiff_t, not int.
9350 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
9351 not int, for benefit of xpalloc.
9352 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
9353 and xpalloc.
9354 (have_menus_p): Remove; unused.
9355 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
9356 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
9357 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
9358 Now static.
9359 (save_and_enable_current_matrix): Omit unnecessary casts.
9360 (read_menu_input): Omit local extern decl (now in lisp.h).
9361 Don't access uninitialized storage if mouse_get_xy fails.
9362 (tty_menu_activate): Mark local as initialized, for lint.
9363 (tty_menu_activate, tty_meny_show): Remove unused locals.
9364
9365 2013-10-08 Eli Zaretskii <eliz@gnu.org>
9366
9367 Support menus on text-mode terminals.
9368 * xterm.h (xw_popup_dialog): Add prototype.
9369
9370 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
9371 (xmenu_show): Block input here, instead in Fx_popup_menu.
9372 (xw_popup_dialog): New function, with X-specific bits of popup
9373 dialogs.
9374
9375 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
9376 New functions.
9377
9378 * window.c (Fset_window_configuration): Use run-time tests of the
9379 frame type instead of compile-time conditionals, when menu-bar
9380 lines are considered.
9381
9382 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
9383 (w32_popup_dialog): New prototypes.
9384
9385 * w32menu.c (Fx_popup_dialog): Function deleted.
9386 (w32_popup_dialog): New function, with w32 specific bits of popup
9387 dialogs. Block input here.
9388
9389 * w32inevt.c (w32_console_read_socket): Minor change to add
9390 debugging TTY events.
9391
9392 * w32fns.c (show_hourglass): If returning early because the frame
9393 is not a GUI frame, unblock input.
9394
9395 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
9396 (cursorY): New functions.
9397
9398 * termhooks.h (cursorX, cursorY): Prototypes of functions on
9399 WINDOWSNT, macros that call curX and curY elsewhere.
9400
9401 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
9402
9403 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
9404 specific function to hide and show cursor on a text-mode terminal.
9405 (tty_menu_struct, struct tty_menu_state): New structures.
9406 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
9407 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
9408 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
9409 (tty_menu_locate, save_and_enable_current_matrix)
9410 (restore_desired_matrix, screen_update, read_menu_input)
9411 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
9412 (tty_pop_down_menu, tty_menu_last_menubar_item)
9413 (tty_menu_new_item_coords, tty_menu_show): New functions.
9414 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
9415
9416 * nsterm.h (ns_popup_dialog): Adjust prototype.
9417
9418 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
9419 of in x-popup-menu.
9420 (ns_popup_dialog): Adapt order of arguments to the other
9421 *_menu_show implementations.
9422 (Fx_popup_dialog): Function deleted.
9423
9424 * msdos.c (x_set_menu_bar_lines): Delete unused function.
9425
9426 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
9427
9428 * menu.c (have_boxes): New function.
9429 (single_keymap_panes): Use it instead of a compile-time
9430 conditional.
9431 (single_menu_item): Use run-time tests of the frame type instead
9432 of compile-time conditionals.
9433 (encode_menu_string): New function.
9434 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
9435 the macro, since different types of frame need different encoding
9436 of menu items.
9437 (digest_single_submenu): Use run-time tests of frame type instead
9438 of, or in addition to, compile-time conditionals.
9439 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
9440 (Fx_popup_menu): Detect when the function is called from keyboard
9441 on a TTY. Don't barf when invoked on a text-mode frame.
9442 Check frame type at run time, instead of compile-time conditionals for
9443 invoking terminal-specific menu-show functions.
9444 Call tty_menu_show on text-mode frames.
9445 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
9446 run time to determine which alternative to invoke; support dialogs
9447 on TTYs.
9448
9449 * keyboard.h <Qmouse_movement>: Declare.
9450
9451 * keyboard.c <Qmouse_movement>: Now extern.
9452 <Qecho_keystrokes>: New static variable.
9453 (read_key_sequence): Accept an additional argument, a flag to
9454 prevent redisplay during reading of the key sequence. All callers
9455 changed.
9456 (read_menu_command): New function.
9457 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
9458 autosave.
9459 (toolkit_menubar_in_use): New function.
9460 (make_lispy_event): Use it instead of a compile-time test.
9461
9462 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
9463 window-system being available.
9464
9465 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
9466 to x-popup-dialog on the frame type, they all now support popup
9467 dialogs.
9468
9469 * dispnew.c (save_current_matrix): Save the margin areas.
9470 (restore_current_matrix): Restore margin areas.
9471 (update_frame_with_menu): New function.
9472
9473 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
9474 Add prototypes.
9475
9476 * alloc.c (make_save_ptr): Now compiled unconditionally.
9477
9478 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
9479
9480 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
9481 (redraw_frame, update_frame): Adjust users.
9482 * dispextern.h (set_window_update_flags): Adjust prototype.
9483 * xdisp.c (redisplay_internal): When updating all frames with zero
9484 windows_or_buffers_changed, assume that only the windows that shows
9485 current buffer should be really updated.
9486
9487 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
9488
9489 Do not allocate huge temporary memory areas and objects while encoding
9490 for file I/O, thus reducing an enormous memory usage for large buffers.
9491 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
9492 * coding.h (struct coding_system): New member raw_destination.
9493 * coding.c (setup_coding_system): Initialize it to zero.
9494 (encode_coding_object): If raw_destination is set, do not create
9495 dst_object. Add comment.
9496 * fileio.c (toplevel): New constant E_WRITE_MAX.
9497 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
9498 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
9499
9500 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
9501
9502 * nsterm.m (windowDidExitFullScreen:)
9503 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
9504
9505 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
9506
9507 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
9508 * keyboard.c (unblock_input_to): Don't process pending signals
9509 if a fatal error is in progress.
9510
9511 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
9512 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
9513 they're talking about words in Lisp bool vectors.
9514 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
9515 * data.c (popcount_bits_word): Rename from popcount_size_t.
9516 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
9517 All uses changed.
9518
9519 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
9520
9521 Improve support for popcount and counting trailing zeros (Bug#15550).
9522 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
9523 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
9524 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
9525 (popcount_size_t_msc, popcount_size_t_gcc):
9526 Remove; now done by Gnulib.
9527 (popcount_size_t): Now a macro that defers to Gnulib.
9528 (count_trailing_zero_bits): Return int, for consistency with
9529 Gnulib and because Emacs prefers signed to unsigned int.
9530 Don't assume that size_t is either unsigned int or unsigned long
9531 or unsigned long long.
9532 (size_t_to_host_endian): Do not assume that size_t is either
9533 exactly 32 or exactly 64 bits wide.
9534 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
9535 etc., so that it's now an enum constant, not a macro.
9536 No need to assume that it's either 32 or 64.
9537
9538 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
9539
9540 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
9541 on >= 10.7.
9542
9543 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
9544
9545 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
9546 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
9547
9548 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
9549
9550 emacs_read and emacs_write now use void *, not char *.
9551 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
9552 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
9553 Buffer arg is now void *, not char *. This matches plain
9554 'read' and 'write' better, and avoids a constraint violation
9555 on Solaris 9 with Oracle Studio.
9556
9557 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
9558
9559 * alloc.c (Fmake_string): For ASCII char initializer, prefer
9560 memset to explicit loop. Otherwise copy largest possible chunk
9561 from initialized to uninitialized part, thus allowing the longer
9562 memcpy runs and reducing the number of loop iterations.
9563
9564 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
9565
9566 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
9567 hide toolbar (Bug#15388).
9568 (windowDidEnterFullScreen:): If presentation options are zero,
9569 set them here (Bug#15388).
9570 (ns_update_auto_hide_menu_bar): Remove runtime check.
9571 Don't auto hide dock unless menubar is also auto hidden.
9572
9573 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
9574
9575 * editfns.c (message): Mention batch mode in doc string.
9576
9577 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
9578
9579 * nsterm.m (check_native_fs): Remove erroneous comment.
9580
9581 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
9582
9583 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
9584 uses find_newline instead of scan_newline and so doesn't move point.
9585
9586 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
9587
9588 Use hardware support for byteswapping on glibc x86 etc.
9589 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
9590 whereas the old swap64 needed 30.
9591 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
9592 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
9593 Use byteswap.h's macros to swap bytes.
9594 * lisp.h (swap16, swap32, swap64): Remove.
9595 All uses replaced by bswap_16, bswap_32, bswap_64.
9596
9597 * bytecode.c (exec_byte_code): Use some more volatile variables
9598 to work around local variables getting clobbered by longjmp.
9599 Port to pre-C99, which doesn't allow decls after stmts.
9600
9601 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
9602
9603 * lisp.h (eassert): Assume that COND is true when optimizing.
9604 In other words, take on the behavior of eassert_and_assume.
9605 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
9606 (eassert_and_assume): Remove. All uses replaced by eassert.
9607
9608 * xdisp.c (Qglyphless_char): Now static.
9609
9610 Adjust to merge from gnulib.
9611 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
9612 * lisp.h: Include <verify.h>, for 'assume'.
9613
9614 * eval.c (clobbered_eassert): New macro.
9615 (internal_catch, internal_condition_case)
9616 (internal_condition_case_1, internal_condition_case_2)
9617 (internal_condition_case_n): Use it instead of eassert
9618 when the argument contains locals clobbered by longjmp.
9619 Don't use clobbered locals outside of clobbered_eassert.
9620 (internal_lisp_condition_case): Use a volatile variable
9621 to work around a local variable's getting clobbered.
9622
9623 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
9624
9625 * lisp.h (struct handler): Merge struct handler and struct catchtag.
9626 (PUSH_HANDLER): New macro.
9627 (catchlist): Remove.
9628 (handlerlist): Always declare.
9629
9630 * eval.c (catchlist): Remove (merge with handlerlist).
9631 (handlerlist, lisp_eval_depth): Not static any more.
9632 (internal_catch, internal_condition_case, internal_condition_case_1)
9633 (internal_condition_case_2, internal_condition_case_n):
9634 Use PUSH_HANDLER.
9635 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
9636 handlerlist/catchlist.
9637 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
9638 handlerlist which can only handle a single condition-case handler at
9639 a time.
9640 (find_handler_clause): Simplify since we only a single branch here
9641 any more.
9642
9643 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
9644 and Bpophandler.
9645 (bcall0): New function.
9646 (exec_byte_code): Add corresponding cases. Improve error message when
9647 encountering an invalid byte-code. Let Bunwind_protect accept
9648 a function (rather than a list of expressions) as argument.
9649
9650 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
9651 and make them unconditional now that they're heap-allocated.
9652
9653 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
9654
9655 * charset.c (Fdecode_char, Fencode_char): Remove description of
9656 `restriction' arg. now that it's hidden by advertised-calling-convention.
9657
9658 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
9659
9660 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
9661 Remove unused variable (from mac-port).
9662 (macfont_draw): Use s->ybase for correct y position.
9663
9664 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
9665
9666 * frame.h (struct frame): Drop has_minibuffer member because...
9667 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
9668 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
9669
9670 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
9671
9672 * window.h (struct window): Prefer enum text_cursor_kinds to int
9673 for phys_cursor_type member. Move the latter, phys_cursor_width,
9674 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
9675 * window.c (replace_window, make_window): Adjust users.
9676
9677 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
9678
9679 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
9680 this module is never compiled otherwise.
9681
9682 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
9683
9684 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
9685 (Bug#15500).
9686
9687 2013-09-29 Eli Zaretskii <eliz@gnu.org>
9688
9689 * xdisp.c (get_next_display_element): Don't call face_for_font in
9690 a build configured --without-x. (Bug#15484)
9691
9692 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
9693
9694 * window.c (calc_absolute_offset): #elif should be #elif defined.
9695
9696 * frame.c (delete_frame): Block/unblock input to overcome race
9697 condition (Bug#15475).
9698
9699 2013-09-29 Andreas Politz <politza@hochschule-trier.de>
9700
9701 * frame.c (delete_frame): Record selected frame only after
9702 calling Qdelete_frame_functions (Bug#15477).
9703
9704 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
9705
9706 * nsterm.m (ns_selection_color): Remove.
9707 (ns_get_color): Check for ns_selection_(fg|bg)_color using
9708 NSColor selectedText(Background)Color. Only for COCOA.
9709 (ns_term_init): Remove assignment of ns_selection_color, logic
9710 moved to ns_get_color.
9711
9712 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
9713 NS_SELECTION_COLOR_DEFAULT.
9714 (NS_SELECTION_FG_COLOR_DEFAULT): New.
9715
9716 2013-09-28 Eli Zaretskii <eliz@gnu.org>
9717
9718 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
9719 frame' does not have the tool_bar_window member.
9720
9721 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
9722
9723 Signal error when reading an empty byte-code object (Bug#15405)
9724 * lread.c (read1): Signal error.
9725 * alloc.c (make_byte_code): eassert header size.
9726 (sweep_vectors): Change an int to size_t.
9727
9728 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
9729
9730 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
9731 instead of ints, as it's the usual style for offsetof constants. See:
9732 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
9733
9734 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
9735 This is ugly, but it should fix the performance problem for older
9736 GCC versions in the short run. I'll look into integrating the
9737 Gnulib module for popcount, as a better fix.
9738 See the thread starting in:
9739 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
9740 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
9741 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
9742 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
9743 (popcount_size_t): Use it.
9744
9745 2013-09-24 Daniel Colascione <dancol@dancol.org>
9746
9747 * process.c (Fnetwork_interface_info): Fix build break due to
9748 vector changes.
9749
9750 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
9751
9752 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
9753 Prefer signed to unsigned integers where either will do.
9754 No need for 'const' on locals that do not escape.
9755 Omit easserts with unnecessary and unportable assumptions about
9756 alignment. Avoid unnecessary casts to char *.
9757
9758 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
9759
9760 Use union for the payload of struct Lisp_Vector.
9761 This helps to avoid a few glitches dictated by C's aliasing rules.
9762 * lisp.h (struct Lisp_Vector): Use union for next and
9763 contents member. Adjust comment. Change related users.
9764 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
9765 Related users changed.
9766 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
9767 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
9768 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
9769 * xfaces.c, xfont.c, xmenu.c: Related users changed.
9770
9771 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
9772
9773 Optimize glyph row clearing and copying routines.
9774 * dispextern.h (struct glyph_row): Change layout of struct
9775 glyph_row to help copy_row_except_pointers. Adjust comment.
9776 * dispnew.c (null_row): Remove.
9777 (clear_glyph_row): Use offsetof and memset to find and clear
9778 just the members that need clearing. Adjust comment.
9779 (copy_row_except_pointers): Likewise for copying.
9780
9781 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
9782
9783 Some minor cleanups of recently-added bool vector code.
9784 * conf_post.h (assume): Always return void. Use lint version
9785 only if GCC and MSC versions don't apply.
9786 * conf_post.h (assume):
9787 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
9788 Depend on _MSC_VER, not __MSC_VER, for consistency with
9789 the rest of Emacs.
9790 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
9791 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
9792 (bool_vector_binop_driver, count_trailing_zero_bits)
9793 (size_t_to_host_endian): Now static, not static inline;
9794 the latter isn't needed with modern compilers and doesn't
9795 work with older compilers anyway.
9796
9797 * alloc.c (valgrind_p): Use bool for boolean.
9798
9799 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
9800
9801 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
9802 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
9803 (display_last_displayed_message_p, message_buf_print)
9804 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
9805 Use bool for boolean.
9806 * dispextern.h (cancel_line, init_desired_glyphs):
9807 Remove ancient leftover.
9808 (help_echo_showing_p, hourglass_shown_p):
9809 * lisp.h (noninteractive_need_newline): Adjust declaration.
9810
9811 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
9812
9813 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
9814 Move to...
9815 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
9816 ...this file and convert the latter to static. Adjust comment.
9817 (make_initial_frame):
9818 * window.c (init_window_once): Adjust user.
9819 * frame.h (last_nonminibuf_frame): Remove declaration.
9820 * lisp.h (selected_frame): Likewise.
9821 * msdos.c (the_only_display_info): Adjust comment.
9822
9823 2013-09-23 Eli Zaretskii <eliz@gnu.org>
9824
9825 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
9826 computing the end column of mouse-highlight that comes from
9827 display or overlay strings. (Bug#15437)
9828 (note_mouse_highlight): Adapt calculation of last argument to
9829 mouse_face_from_string_pos to the above change.
9830
9831 * conf_post.h (__has_builtin): Define to zero, if undefined, on
9832 all platforms, not just for clang.
9833
9834 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
9835
9836 * filelock.c (lock_file_1): Rearrange to remove compiler warning
9837 about excess arguments to snprintf.
9838
9839 * conf_post.h(assume): Use __builtin_unreachable for clang.
9840
9841 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
9842
9843 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
9844 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
9845
9846 2013-09-23 Daniel Colascione <dancol@dancol.org>
9847
9848 * alloc.c (USE_VALGRIND): New macro; on by default
9849 when ENABLE_CHECKING.
9850 (mark_maybe_object, mark_maybe_pointer)
9851 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
9852 valgrind purposes.
9853 (valgrind_p) [USE_VALGRIND]: New variable.
9854 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
9855
9856 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
9857
9858 * process.c (wait_reading_process_output): Change int pnamelen to
9859 socklen_t.
9860
9861 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
9862 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
9863 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
9864 argument to unsigned long to avoid warning.
9865 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
9866
9867 * conf_post.h (assume): Fix compiler error: x shall be cond.
9868
9869 2013-09-22 Daniel Colascione <dancol@dancol.org>
9870
9871 * xfns.c (x_get_monitor_attributes): Suppress unused variable
9872 warning when compiling without a window system.
9873
9874 2013-09-22 Daniel Colascione <dancol@dancol.org>
9875
9876 * data.c (Qbool_vector_p): New symbol.
9877 (bool_vector_spare_mask, popcount_size_t_generic)
9878 (popcount_size_t_msc, popcount_size_t_gcc)
9879 (popcount_size_t)
9880 (bool_vector_binop_driver)
9881 (count_trailing_zero_bits, size_t_to_host_endian)
9882 (Fbool_vector_exclusive_or)
9883 (Fbool_vector_union)
9884 (Fbool_vector_intersection, Fbool_vector_set_difference)
9885 (Fbool_vector_subsetp, Fbool_vector_not)
9886 (Fbool_vector_count_matches)
9887 (Fbool_vector_count_matches_at): New functions.
9888 (syms_of_data): Intern new symbol, functions.
9889 * alloc.c (bool_vector_payload_bytes): New function.
9890 (Fmake_bool_vector): Instead of calling Fmake_vector,
9891 which performs redundant initialization and argument checking,
9892 just call allocate_vector ourselves. Make sure we clear any
9893 terminating padding to zero.
9894 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
9895 instead of open-coding the size calculation.
9896 (vroundup_ct): New macro.
9897 (vroundup): Assume argument >= 0; invoke vroundup_ct.
9898 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
9899 * composite.c (composition_gstring_put_cache):
9900 Change lint_assume to assume.
9901 * conf_post.h (assume): New macro.
9902 (lint_assume): Remove.
9903 * dispnew.c (update_frame_1): Change lint_assume to assume.
9904 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
9905 to assume.
9906 * image.c (gif_load): Change lint_assume to assume.
9907 * lisp.h (eassert_and_assume): New macro.
9908 (Qbool_vector_p): Declare.
9909 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
9910 (swap16, swap32, swap64): New inline functions.
9911 * macfont.m (macfont_shape): Change lint_assume to assume.
9912 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
9913 * xsettings.c (parse_settings): Use new swap16 and
9914 swap32 from lisp.h instead of file-specific macros.
9915
9916 2013-09-22 Eli Zaretskii <eliz@gnu.org>
9917
9918 * xdisp.c (try_window_id): Don't abort if cursor row could not be
9919 found (which can legitimately happen when the glyph row at the
9920 window start is disabled in the current_matrix. (Bug#15365)
9921
9922 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
9923
9924 Fix syntax.h bug introduced by recent INLINE change.
9925 syntax.h defined an extern inline function SYNTAX_ENTRY that was
9926 conditionally compiled one way in some modules, and a different
9927 way in others. This doesn't work with extern inline functions,
9928 which must have the same definition in all modules, because the
9929 defining code might be shared across modules, depending on the
9930 implementation. Symptoms reported by Martin Rudalics in:
9931 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
9932 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
9933 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
9934 overriding the corresponding functions in syntax.h.
9935 * syntax.h (syntax_property_entry, syntax_property_with_flags)
9936 (syntax_property): New inline functions.
9937 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
9938 Rewrite in terms of these new functions.
9939
9940 2013-09-21 Eli Zaretskii <eliz@gnu.org>
9941
9942 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
9943 not chars_in_text, whose result depends on the multibyteness of
9944 the current buffer. (Bug#15426)
9945
9946 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
9947
9948 Port recent change to hosts where pointers aren't 'long'.
9949 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
9950 Don't assume that pointers are the same width as 'long'.
9951 Add a compile-time check that a pointer fits into two X slots.
9952
9953 A simpler, centralized INLINE.
9954 * conf_post.h (INLINE): Define only if not already defined.
9955 This allows us to use a single INLINE, defined by one file
9956 per executable.
9957 * emacs.c (INLINE): Define it.
9958 Also, include category.h, charset.h, composite.h, dispextern.h,
9959 syntax.h, systime.h, so that their INLINE definitions are expanded
9960 properly for Emacs.
9961 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
9962 * buffer.h, buffer.c (BUFFER_INLINE):
9963 * category.h, category.c (CATEGORY_INLINE):
9964 * character.h, character.c (CHARACTER_INLINE):
9965 * charset.h, charset.c (CHARSET_INLINE):
9966 * composite.h, composite.c (COMPOSITE_INLINE):
9967 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
9968 * frame.h, frame.c (FRAME_INLINE):
9969 * intervals.h, intervals.c (INTERVALS_INLINE):
9970 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
9971 * lisp.h, alloc.c (LISP_INLINE):
9972 * process.h, process.c (PROCESS_INLINE):
9973 * syntax.h, syntax.c (SYNTAX_INLINE):
9974 * systime.h, sysdep.c (SYSTIME_INLINE):
9975 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
9976 * window.h, window.c (WINDOW_INLINE):
9977 Remove. All uses replaced with INLINE.
9978
9979 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
9980
9981 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
9982 to avoid Bug#15398.
9983
9984 2013-09-19 Eli Zaretskii <eliz@gnu.org>
9985
9986 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
9987 'const char *' to avoid compiler warnings due to similar change in
9988 the prototype of x_get_string_resource.
9989
9990 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
9991
9992 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
9993 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
9994 going to replace static variables below. Adjust comments.
9995 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
9996 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
9997 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
9998 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
9999 Related users changed.
10000 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
10001 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
10002 last_mouse_movement_time, going to replace static variables below.
10003 Adjust comments.
10004 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
10005 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
10006 Remove.
10007 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
10008 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
10009 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
10010 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
10011 static variables below.
10012 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
10013 (last_mouse_scroll_bar): Remove.
10014 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
10015 (mouseExited): Related users changed.
10016
10017 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
10018
10019 Do not use external array to process X scroll bar messages.
10020 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
10021 (x_send_scroll_bar_event): Pack window pointer into two slots
10022 of XClientMessageEvent if we're 64-bit. Adjust comment.
10023 (x_scroll_bar_to_input_event): Unpack accordingly.
10024
10025 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
10026
10027 Ifdef away recent changes which aren't relevant to NS port.
10028 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
10029 [!HAVE_NS]: Declare as such.
10030 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
10031 [!HAVE_NS]: Define as such.
10032
10033 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
10034
10035 * frame.c (x_redo_mouse_highlight): New function
10036 to factor out common code used in W32 and X ports.
10037 * dispextern.h (x_redo_mouse_highlight): Add prototype.
10038 * xterm.h (struct x_display_info):
10039 * w32term.h (struct w32_display_info):
10040 * nsterm.h (struct ns_display_info): New members
10041 last_mouse_motion_frame, last_mouse_motion_x and
10042 last_mouse_motion_y, going to replace static variables below.
10043 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
10044 (redo_mouse_highlight): Remove.
10045 (note_mouse_movement, syms_of_xterm): Adjust user.
10046 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
10047 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
10048 (redo_mouse_highlight): Remove.
10049 (note_mouse_movement, syms_of_w32term): Adjust user.
10050 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
10051 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
10052 Remove.
10053 (note_mouse_movement, mouseMoved, syms_of_nsterm):
10054 * nsfns.m (compute_tip_xy): Adjust user.
10055
10056 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
10057
10058 * frame.c (x_mouse_grabbed): New function.
10059 * dispextern.h (x_mouse_grabbed): Add prototype.
10060 (last_mouse_frame): Remove declaration.
10061 * xterm.h (struct x_display_info):
10062 * w32term.h (struct w32_display_info):
10063 * nsterm.h (struct ns_display_info): New member
10064 last_mouse_frame, going to replace...
10065 * xdisp.c (last_mouse_frame): ...global variable.
10066 (note_tool_bar_highlight):
10067 * w32term.c (w32_mouse_position, w32_read_socket):
10068 * xterm.c (XTmouse_position, handle_one_xevent):
10069 Use x_mouse_grabbed.
10070 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
10071
10072 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10073
10074 * w32term.c (w32_read_socket): Avoid temporary
10075 variables in a call to x_real_positions.
10076 * xterm.c (handle_one_xevent): Likewise.
10077
10078 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10079
10080 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
10081 (x_icon_type): Remove prototype.
10082 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
10083 * frame.c (x_icon_type): Remove.
10084 * w32term.c (x_make_frame_visible, x_iconify_frame):
10085 * xterm.c (x_make_frame_visible, x_iconify_frame):
10086 Use x_set_bitmap_icon to factor out common code.
10087
10088 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10089
10090 * dispextern.h (check_x_display_info, x_get_string_resource):
10091 Declare here just once and unify the latter.
10092 * frame.c (check_x_display_info, x_get_string_resource):
10093 * nsterm.h (check_x_display_info):
10094 * xrdb.c (x_get_string_resource):
10095 * xterm.h (check_x_display_info): Remove prototypes.
10096 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
10097 * w32reg.c (x_get_string_resource): Likewise.
10098 (w32_get_rdb_resource): Adjust user.
10099
10100 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10101
10102 * xterm.h (struct x_display_info): New member
10103 x_pending_autoraise_frame, going to replace...
10104 * xterm.c (pending_autoraise_frame): ...static variable.
10105 (x_new_focus_frame, XTread_socket): Adjust users.
10106 * w32term.h (struct w32_display_info): New member
10107 w32_pending_autoraise_frame, going to replace...
10108 * w32term.c (pending_autoraise_frame): ...global variable.
10109 (x_new_focus_frame, w32_read_socket): Adjust users.
10110
10111 2013-09-17 Glenn Morris <rgm@gnu.org>
10112
10113 * xdisp.c (message_dolog): If we create *Messages*,
10114 switch it to messages-buffer-mode.
10115
10116 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
10117
10118 Don't overuse 'const' in types of locals.
10119 * bidi.c (bidi_count_bytes):
10120 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
10121 (xg_event_is_for_scrollbar):
10122 * xselect.c (x_handle_property_notify)
10123 (x_handle_selection_notify, x_handle_dnd_message):
10124 * xsettings.c, xsettings.h (xft_settings_event):
10125 * xterm.c (x_handle_net_wm_state, handle_one_event)
10126 (x_menubar_window_to_frame, x_detect_focus_change)
10127 (construct_mouse_click, note_mouse_movement)
10128 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
10129 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
10130 (handle_one_xevent, x_handle_net_wm_state):
10131 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
10132 (x_handle_dnd_message):
10133 Avoid unnecessary 'const', typically the second 'const' in
10134 'const foo * const arg', a 'const' that does not affect the API
10135 and doesn't significantly help the human reader.
10136
10137 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
10138
10139 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
10140 only if Glib < 2.36.0.
10141 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
10142 * xsettings.c (init_gconf, init_gsettings): Do not check
10143 for g_type_init.
10144 * xterm.c (handle_one_xevent): Do not call to x_clear_area
10145 if GTK >= 2.7.0.
10146 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
10147
10148 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
10149
10150 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
10151 before calling g_type_init.
10152
10153 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
10154
10155 * nsterm.m (syms_of_nsterm): ... to here.
10156
10157 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
10158
10159 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
10160 (ignore_next_mouse_click_timeout): Use Time as X does.
10161 (handle_one_xevent): Avoid cast and use unsigned comparison.
10162
10163 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
10164
10165 Do not copy X event in handle_one_xevent except KeyPress case.
10166 Wnen XEvent is processed, it is unlikely to be changed except
10167 KeyPress case, so we can avoid copying and use const pointer to
10168 const data to make sure that an event is not changed elsewhere.
10169 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
10170 const' and do not create local copy except for the KeyPress event.
10171 Use casts to avoid a few glitches. Adjust formatting. Add comments.
10172 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
10173 (x_handle_net_wm_state, x_menubar_window_to_frame)
10174 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
10175 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
10176 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
10177 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
10178 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
10179 (x_handle_dnd_message):
10180 * xsettings.c (xft_settings_event):
10181 Use 'const XEvent * const' where appropriate.
10182 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
10183
10184 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
10185
10186 Fix X event waiting to handle multiple frames.
10187 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
10188 * xterm.c (pending_event_wait): Remove. Adjust users.
10189 (x_detect_focus_change): Pass frame arg.
10190 (handle_one_xevent): Find related frame early and clear per-frame
10191 wait_event_type only if this is an event for the relevant frame.
10192 (x_wait_for_event): Use per-frame wait_event_type.
10193
10194 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
10195
10196 * nsfns.m (Fx_create_frame): Fix font driver registration for
10197 GNUstep.
10198
10199 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
10200 for syms_of_macfont.
10201
10202 * nsterm.m: Include macfont.h.
10203 (ns_tmp_flags, ns_tmp_font): Remove.
10204 (ns_compute_glyph_string_overhangs): Check for driver Qns.
10205 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
10206 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
10207 (changeFont:): Fix code style. Check for font driver type when
10208 getiing font.
10209
10210 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
10211 (f)->descent.
10212
10213 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
10214 (nsfont_open): Set font driver type.
10215 Set font->ascent and font->descent. Figure out font instead of
10216 ns_tmp_font, and flags instead of ns_tmp_flags.
10217 Fix indentation. Remove call to ns_draw_text_decoration,
10218 moved to nsterm.
10219
10220 * nsfns.m: Include macfont.h.
10221 (Fx_create_frame): Register macfont driver, make a better default font.
10222 (Fns_popup_font_panel): Get font from macfont driver, if used.
10223
10224 * macfont.m, macfont.h, macuvs.h: New files.
10225
10226 * font.h: Declare syms_of_macfont.
10227
10228 * font.c (syms_of_font): Call syms_of_macfont.
10229
10230 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
10231
10232 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
10233
10234 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
10235 and it is always zero for others, so I assume that this is an ancient
10236 leftover which nobody will want to change any more.
10237 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
10238 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
10239 * frame.c (x_set_scroll_bar_width):
10240 * w32fns.c (w32_createscrollbar):
10241 * w32term.c (w32_set_vertical_scroll_bar):
10242 * xfns.c (x_set_scroll_bar_default_width):
10243 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
10244 (x_scroll_bar_expose): Related users changed.
10245
10246 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
10247
10248 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
10249 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
10250 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
10251 Define as such.
10252 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
10253 Define once here...
10254 * nsterm.h, w32term.h, xterm.h: ...and not here.
10255 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
10256 Remove unused Xisms.
10257 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
10258 these modules are never compiled otherwise.
10259
10260 2013-09-14 Eli Zaretskii <eliz@gnu.org>
10261
10262 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
10263 Doc fix. (Bug#15375)
10264
10265 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
10266
10267 Unify Fx_focus_frame between all ports.
10268 * frame.h (x_focus_frame): New prototype.
10269 * xfns.c (Fx_focus_frame): Remove.
10270 (syms_of_xfns): Do not defsubr it.
10271 (x_focus_frame): X implementation.
10272 * nsfns.m (Fx_focus_frame): Remove.
10273 (syms_of_nsfns): Do not defsubr it.
10274 (x_focus_frame): NS implementation.
10275 * w32term.c (Fx_focus_frame): Remove.
10276 (x_focus_on_frame): Rename to...
10277 (x_focus_frame): W32 implementation.
10278 * w32term.h (x_focus_on_frame): Remove prototype.
10279 * w32fns.c (Fx_focus_frame): Remove.
10280 (syms_of_w32fns): Do not defsubr it.
10281 * frame.c (Fx_focus_frame): Define here.
10282 (syms_of_frame): Defsubr here.
10283 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
10284
10285 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
10286
10287 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
10288 All of them are replaced with FRAME_DISPLAY_INFO, defined in
10289 each port to reference the port-specific window system data.
10290 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
10291 (FRAME_DISPLAY_INFO): Define.
10292 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
10293 (FRAME_DISPLAY_INFO): Define. Adjust users.
10294 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
10295 (FRAME_DISPLAY_INFO): Define. Adjust users.
10296 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
10297 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
10298 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
10299 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
10300 * xselect.c, xterm.c: All related users changed.
10301
10302 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
10303
10304 * xterm.h (x_window_to_frame, x_any_window_to_frame)
10305 (x_menubar_window_to_frame): Remove prototypes.
10306 * xfns.c (x_window_to_frame, x_any_window_to_frame)
10307 (x_menubar_window_to_frame, x_top_window_to_frame):
10308 Move from here...
10309 * xterm.c (x_window_to_frame, x_any_window_to_frame)
10310 (x_menubar_window_to_frame, x_top_window_to_frame):
10311 ...to here and convert all but the last to static.
10312
10313 2013-09-12 Eli Zaretskii <eliz@gnu.org>
10314
10315 * lisp.mk (lisp): Add w32-common-fns.elc.
10316
10317 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
10318
10319 * charset.c (char_charset): Document an exception for char-charset.
10320
10321 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
10322
10323 * xterm.h (x_display_info): New field last_user_time...
10324 * xterm.c (toplevel): ...to replace static last_user_time.
10325 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
10326
10327 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
10328
10329 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
10330 scroll bar values to prevent thumb from disappear and update comment.
10331
10332 2013-09-11 Glenn Morris <rgm@gnu.org>
10333
10334 * emacs.c (usage_message): Possessive apostrophe tweak.
10335
10336 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10337
10338 * nsterm.m (syms_of_nsterm): Use Qns.
10339 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
10340 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
10341 * xfns.c (x_display_info_for_name, Fx_open_connection):
10342 Remove old '#if 0' code.
10343 (syms_of_xfns): Use Qx.
10344 * termhooks.h (fullscreen_hook): Remove the leftover.
10345 (struct terminal): Fix typo in comment.
10346
10347 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10348
10349 Cleaning up a few X scroll bar bits.
10350 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
10351 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
10352 New member last_seen_part, going to replace...
10353 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
10354 (xt_action_hook) [USE_LUCID]: Adjust user.
10355 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
10356 Lucid-specific scroll bar support.
10357 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
10358 to int and adjust to use last_seen_part member.
10359 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
10360 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
10361 Initialize last_seen_part.
10362
10363 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
10364
10365 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
10366 insert-buffer-substring an empty string.
10367
10368 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
10369
10370 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
10371 avoiding a GCC warning.
10372
10373 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10374
10375 Ifdef away frame tool bar code when it is not really used.
10376 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
10377 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
10378 and minimize_tool_bar_window_p under the above.
10379 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
10380 (fset_tool_bar_window): Likewise.
10381 * dispnew.c (clear_current_matrices, clear_desired_matrices)
10382 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
10383 (change_frame_size_1):
10384 * window.c (window_from_coordinates, Frecenter): Adjust users.
10385 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
10386 code is not really used.
10387 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
10388 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
10389 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
10390 [!USE_GTK && !HAVE_NS]: Define as such.
10391 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
10392 (note_mouse_highlight, expose_frame):
10393 * xfns.c (x_set_tool_bar_lines):
10394 * xterm.c (handle_one_xevent): Adjust users.
10395
10396 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
10397
10398 Fix corruption with multiple emacsclient -t instances (Bug#15222).
10399 This bug was introduced by my 2013-08-26 patch, which incorrectly
10400 assumed that the terminfo implementation doesn't use termcap buffers.
10401 * term.c (init_tty) [TERMINFO]: Remove optimization, as
10402 these buffers apparently are used after all.
10403 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
10404 (struct tty_display_info): Define members termcap_term_buffer and
10405 termcap_strings_buffer even if TERMINFO.
10406
10407 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
10408
10409 Fix last change.
10410 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
10411 'usage' docstring entry to pacify make-docfile.
10412
10413 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
10414
10415 Change comparison functions =, <, >, <=, >= to take many arguments.
10416 * data.c: Change comparison functions' interface and implementation.
10417 * lisp.h: Make arithcompare available for efficient two arg
10418 comparisons.
10419 * bytecode.c: Use arithcompare.
10420 * fileio.c: Use new interface.
10421
10422 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
10423
10424 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
10425
10426 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
10427
10428 * eval.c (Feval): Document the new use of `lexical'.
10429
10430 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
10431
10432 Review and drop old frame resize hack.
10433 * frame.h (struct frame): Remove force_flush_display_p.
10434 * dispnew.c (update_frame): Adjust user and don't call
10435 flush_frame here. The comment has said that there was an issues
10436 with redisplaying fringes, but I don't see any differences with
10437 and without this hack. Hopefully we can continue without it.
10438 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
10439 current frame matrices twice if resized_p is set.
10440
10441 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
10442
10443 Do not populate pure Xism x_sync to other ports.
10444 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
10445 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
10446 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
10447 * w32term.h (x_sync): Remove prototype.
10448
10449 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
10450
10451 Cleanup frame flushing.
10452 * dispextern.h (struct redisplay_interface):
10453 Drop flush_display_optional because flush_display is enough
10454 for X and flushing via RIF is just a no-op for others.
10455 * frame.h (flush_frame): New function.
10456 * dispnew.c (update_frame):
10457 * minibuf.c (read_minibuf):
10458 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
10459 Use it.
10460 * keyboard.c (detect_input_pending_run_timers): Do not flush
10461 all frames but selected one in redisplay_preserve_echo_area.
10462 * nsterm.m (ns_flush): Remove no-op.
10463 (ns_redisplay_interface): Adjust user.
10464 * w32term.h (x_flush): Remove no-op.
10465 (w32_redisplay_interface): Adjust user.
10466 * xterm.c (x_flush): Simplify because we do not flush all
10467 frames at once any more. Adjust comment.
10468 (x_redisplay_interface): Adjust user.
10469
10470 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
10471
10472 Port --without-x --enable-gcc-warnings to Fedora 19.
10473 * gfilenotify.c (globals_of_gfilenotify):
10474 Call g_type_init only if using an older glib version that needs it.
10475
10476 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
10477
10478 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
10479 (last_glyphless_glyph_merged_face_id): Remove declarations.
10480 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
10481 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
10482 (last_glyphless_glyph_merged_face_id): Now static.
10483 (merge_escape_glyph_face): New function, refactored from...
10484 (get_next_display_element): ...here.
10485 (merge_glyphless_glyph_face): New function, refactored from...
10486 (produce_glyphless_glyph): ...here...
10487 * term.c (produce_glyphless_glyph): ...and here.
10488
10489 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
10490
10491 * eval.c (eval_sub): Only call Ffunction if necessary.
10492
10493 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
10494
10495 Attempt to make redisplay more selective when changing cursor type.
10496 * frame.h (struct frame): New bitfield cursor_type_changed.
10497 * xdisp.c (cursor_type_changed): Remove.
10498 (try_cursor_movement, redisplay_window, try_window_id)
10499 (set_frame_cursor_types, try_window_reusing_current_matrix):
10500 Adjust to use per-frame bitfield.
10501 (redisplay_internal): Look for cursor type change on each visible
10502 frame and consider all frames if cursor type has been changed on
10503 the frame other than selected. If cursor type has been changed on
10504 selected frame only, do not use fast update.
10505
10506 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
10507
10508 Attempt to make redisplay more selective when changing fonts.
10509 * frame.h (struct frame): New bitfield fonts_changed.
10510 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
10511 (adjust_frame_glyphs): Add prototype.
10512 * dispnew.c (fonts_changed_p): Remove.
10513 (adjust_glyphs): Remove because we do not
10514 adjust matrices on all frames at once any more.
10515 (adjust_frame_glyphs): Block and unblock input here.
10516 (adjust_glyph_matrix): Use fonts_changed.
10517 (change_frame_size_1): Use adjust_frame_glyphs.
10518 * font.c (font_open_entity): Use fonts_changed.
10519 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
10520 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
10521 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
10522 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
10523 (shrink_mini_window, Fresize_mini_window_internal)
10524 (window_scroll_pixel_based, Fset_window_configuration)
10525 (apply_window_adjustment, Fset_window_vscroll):
10526 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
10527 Use adjust_frame_glyphs.
10528 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
10529 (try_window_reusing_current_matrix, try_window_id, display_line)
10530 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
10531 (redisplay_internal): Consider fonts_changed and adjust frame
10532 matrices for each frame only if the frame is visible. If font
10533 has been changed on some frame during full redisplay, retry
10534 only visible frames where the font has been actually changed.
10535
10536 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10537
10538 Cache current header and mode line height for each window.
10539 * window.h (struct window): New fields mode_line_height
10540 and header_line_height.
10541 * window.c (make_window): Initialize them.
10542 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
10543 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
10544 (current_mode_line_height, current_header_line_height):
10545 Remove declaration.
10546 * xdisp.c (current_mode_line_height, current_header_line_height):
10547 Remove.
10548 (pos_visible_p, init_xdisp): Adjust user.
10549 (redisplay_window): Invalidate mode_line_height and
10550 header_line_height if current and desired matrices do not agree.
10551
10552 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10553
10554 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
10555 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
10556
10557 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10558
10559 Make --without-x compatible with --enable-gcc-warnings.
10560 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
10561 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
10562 members under HAVE_WINDOW_SYSTEM.
10563 * keyboard.c (make_lispy_focus_out): Likewise.
10564 (record_menu_key): Move under HAVE_MENUS.
10565 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
10566 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
10567 (syms_of_xdisp): Adjust user.
10568 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
10569 (start_hourglass, cancel_hourglass):
10570 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
10571 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
10572 and CLEAR_FONT_TABLE_NFONTS.
10573 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
10574 Declare only if HAVE_WINDOW_SYSTEM.
10575 (lface_same_font_attributes_p, clear_face_gcs): Define only
10576 if HAVE_WINDOW_SYSTEM.
10577
10578 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
10579
10580 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
10581 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
10582 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
10583
10584 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
10585
10586 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
10587
10588 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
10589
10590 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
10591 This fixes a type error on hosts where ptrdiff_t is wider than int.
10592
10593 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
10594
10595 * keyboard.c (read_key_sequence_vs): New function.
10596 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
10597 common code.
10598
10599 * callint.c (Fcall_interactively): Always return a vector for 'K'.
10600
10601 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
10602
10603 Makefile improvements.
10604 * Makefile.in (config.status): Don't use double-colon rules, as
10605 they are not portable according to POSIX. Fix shell typo with `;
10606 I guess this rule has never been tested?
10607 (VCSWITNESS): New macro, to override any environment var.
10608
10609 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
10610
10611 * xterm.h (struct x_display_info): Do not track X connection
10612 fd separately because it is always available from Display.
10613 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
10614 Adjust users.
10615
10616 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
10617
10618 * buffer.c (drop_overlay):
10619 * fileio.c (restore_point_unwind): Prefer unchain_marker to
10620 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
10621
10622 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
10623
10624 * buffer.c (Fmake_overlay, Fmove_overlay):
10625 * intervals.c (set_point_from_marker):
10626 * print.c (PRINTPREPARE): Prefer signal_error
10627 to plain error and report unsuitable marker too.
10628
10629 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
10630
10631 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
10632 for 'dragging' member.
10633 (struct x_output): Remove set-but-unused leftovers
10634 'left_before_move' and 'top_before_move'.
10635 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
10636 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
10637 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
10638 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
10639 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
10640 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
10641 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
10642 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
10643
10644 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
10645
10646 * nsfont.m (INVALID_GLYPH): New define.
10647 (nsfont_encode_char): Use INVALID_GLYPH.
10648 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
10649
10650 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10651
10652 * xterm.c (x_last_mouse_movement_time): Revert last change.
10653 This code should use XDisplayMotionBufferSize to check display's
10654 motion history first, and there are few other issues as well.
10655 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
10656 (handle_one_xevent): Adjust user.
10657
10658 2013-09-02 Martin Rudalics <rudalics@gmx.at>
10659
10660 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
10661 * frame.c (Flast_nonminibuf_frame): ... to here.
10662 (check_minibuf_window): Don't abort if no window was found
10663 (Bug#15247).
10664
10665 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10666
10667 Use XGetMotionEvents to ask the last mouse motion time from X server.
10668 * xterm.c (X_MOTION_HISTORY): Default to 1.
10669 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
10670 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
10671 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
10672 Ifdef away legacy code.
10673 (XTmouse_position, x_scroll_bar_report_motion):
10674 Use x_last_mouse_movement_time.
10675 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
10676 UnmapNotify event.
10677
10678 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10679
10680 * msdos.c (last_mouse_window): Move to...
10681 (dos_rawgetc): ...this function and adjust comment.
10682 * nsterm.m (last_window): Rename to last_mouse_window, move to...
10683 (mouseMoved): ...this function and adjust comment.
10684 * w32term.c (last_window): Likewise with...
10685 (w32_read_socket): ...this function.
10686 * xterm.c (last_window): Likewise with...
10687 (handle_one_xevent): ...this function.
10688
10689 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10690
10691 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
10692 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
10693 (handle_one_xevent): ...to here.
10694 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
10695 otherwise.
10696
10697 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
10698
10699 * msdos.c (IT_set_terminal_window): Remove no-op.
10700 (initialize_msdos_display): Adjust terminal setup.
10701 * w32console.c (w32con_set_terminal_window): Remove no-op.
10702 (initialize_w32_display): Adjust terminal setup.
10703 * w32term.c (w32_set_terminal_window): Remove no-op.
10704 (w32_create_terminal): Adjust terminal setup.
10705 * xterm.c (XTset_terminal_window): Remove no-op.
10706 (x_create_terminal): Adjust terminal setup.
10707
10708 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
10709
10710 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
10711 Remove no-ops.
10712 (ns_create_terminal): Adjust terminal setup.
10713 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
10714 Remove no-ops.
10715 (w32_create_terminal): Adjust terminal setup.
10716 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
10717 Remove no-ops.
10718 (x_create_terminal): Adjust terminal setup.
10719
10720 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
10721
10722 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
10723 (CLIP_TEXT_POS_FROM_MARKER): New macro.
10724 * dispnew.c (buffer_posn_from_coords):
10725 * window.c (Fwindow_end, displayed_window_lines):
10726 * xdisp.c (redisplay_mode_lines): Use it.
10727
10728 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
10729
10730 * fontset.c (face_for_char): Check char in the current face font first
10731 if HAVE_NS (Bug#15138).
10732
10733 2013-08-31 Martin Rudalics <rudalics@gmx.at>
10734
10735 * window.c (temp_output_buffer_show): Make sure window returned
10736 by display_buffer is live (Bug#15213).
10737
10738 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
10739
10740 Minor cleanup to avoid forward declarations.
10741 * coding.h (struct ccl_spec): Remove forward declaration.
10742 * composite.h (toplevel): Include font.h.
10743 (struct composition_it, struct face, struct font_metrics):
10744 Remove forward declaration.
10745 * dispextern.h (struct image, struct atimer): Likewise.
10746 * emacsgtkfixed.h (struct frame): Likewise.
10747 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
10748 * font.h (struct font_driver, struct font, struct glyph_string)
10749 (struct face): Remove forward declaration.
10750 * fontset.h (struct face, struct font): Likewise.
10751 * frame.h (toplevel): Style cleanup.
10752 (enum output_method): Move to...
10753 * termhooks.h (enum output_method): ...here.
10754 (struct glyph, struct frame, struct ns_display_info)
10755 (struct x_display_info, struct w32_display_info):
10756 Remove forward declaration.
10757 * xterm.h (toplevel): Include termhooks.h.
10758 (struct font, struct window, struct glyph_matrix, struct frame)
10759 (struct input_event, struct face, struct image): Remove forward
10760 declaration.
10761 * gtkutil.h (struct _widget_value): Likewise.
10762 * keyboard.h (toplevel): Include termhooks.h.
10763 (struct input_event): Remove forward declaration.
10764
10765 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10766
10767 * intervals.c (set_point_from_marker): New function.
10768 * editfns.c (Fgoto_char):
10769 * process.c (Finternal_default_process_filter):
10770 * window.c (select_window_1): Use it.
10771 * buffer.h (set_point_from_marker): Add prototype.
10772
10773 2013-08-29 Eli Zaretskii <eliz@gnu.org>
10774
10775 * w32.c (term_winsock): Call release_listen_threads before calling
10776 WSACleanup.
10777 (_sys_wait_accept): Wait for accept event in a loop with a finite
10778 timeout, instead of waiting indefinitely. Will hopefully avoid
10779 hanging during exit because WSACleanup deadlocks waiting for the
10780 event object to be released. (Bug#14333)
10781
10782 * w32proc.c (release_listen_threads): New function, signals all
10783 the reader threads that listen for connections to stop waiting.
10784
10785 * w32.h (release_listen_threads): Add prototype.
10786
10787 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10788
10789 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
10790 field of new marker (for sanity and safety).
10791 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
10792 anyway because XMISCTYPE is a function and can't be an lvalue).
10793
10794 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10795
10796 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
10797 (x_after_update_window_line, x_scroll_bar_create)
10798 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
10799 (handle_one_xevent, x_clear_frame_area):
10800 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
10801 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
10802 * xterm.h (x_clear_area): Adjust prototype.
10803
10804 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
10805
10806 Hook scanning and indentation functions to find_newline. This helps
10807 to avoid duplicated code and renders more respect to newline cache.
10808 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
10809 * cmds.c (Fforward_line):
10810 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
10811 Use find_newline and avoid unnecessary point movements.
10812 * search.c (scan_newline): Implement on top of find_newline.
10813
10814 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
10815
10816 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
10817 scoped code (bug#11258).
10818
10819 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
10820
10821 * nsterm.m (last_window): New variable.
10822 (EV_TRAILER2): New macro.
10823 (EV_TRAILER): Call EV_TRAILER2.
10824 (mouseMoved:): Add support for mouse-autoselect-window
10825 on nextstep (Bug#6888).
10826
10827 2013-08-28 Andreas Schwab <schwab@suse.de>
10828
10829 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
10830 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
10831 Remove unused macro definitions.
10832 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
10833 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
10834 Only define if emacs.
10835
10836 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
10837
10838 Prefer enum glyph_row_area to int where appropriate.
10839 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
10840 Fix comment.
10841 (window_box, window_box_width, window_box_left, window_box_left_offset)
10842 (window_box_right, window_box_right_offset): Adjust prototypes.
10843 * xdisp.c (window_box, window_box_width, window_box_left)
10844 (window_box_left_offset, window_box_right, window_box_right_offset):
10845 Use enum glyph_row_area. Adjust users and tweak comment where needed.
10846 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
10847 * nsterm.m (ns_clip_to_row):
10848 * w32term.c (w32_clip_to_row):
10849 * xterm.c (x_clip_to_row): Likewise.
10850
10851 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
10852
10853 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
10854 (Fprevious_overlay_change): Fast path for buffer with no overlays.
10855
10856 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
10857
10858 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
10859 for portability to hosts where /bin/sh has problems.
10860
10861 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
10862
10863 Redesign redisplay interface to drop global output_cursor.
10864 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
10865 (toplevel): Remove declaration of output_cursor.
10866 (set_output_cursor, x_cursor_to): Remove prototype.
10867 * window.h (struct window): New member output_cursor.
10868 (output_cursor_to): New function to replace RIF member.
10869 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
10870 (update_text_area, set_window_cursor_after_update): Use it.
10871 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
10872 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
10873 * nsterm.m (ns_update_window_begin, ns_update_window_end):
10874 * w32term.c (x_update_window_begin, x_update_window_end):
10875 * xterm.c (x_update_window_begin, x_update_window_end):
10876 Adjust to use per-window output cursor.
10877
10878 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
10879
10880 Simplify SELECT_TYPE-related code.
10881 Like EMACS_TIME, this portability layer is no longer needed, since
10882 Emacs has been using fd_set as a portability layer for some time.
10883 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
10884 (SELECT_TYPE): Remove. All uses changed to fd_set.
10885 (fd_set) [!FD_SET]: New typedef.
10886
10887 Simplify EMACS_TIME-related code.
10888 This portability layer is no longer needed, since Emacs has been
10889 using struct timespec as a portability layer for some time.
10890 * atimer.h, buffer.h, dispextern.h, xgselect.h:
10891 Include <time.h> rather than "systime.h"; that's all that's needed now.
10892 * dispnew.c: Include <timespec.h> rather than "systime.h";
10893 that's all that's needed now.
10894 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
10895 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
10896 TIMESPEC_RESOLUTION.
10897 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
10898 LOG10_TIMESPEC_RESOLUTION.
10899 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
10900 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
10901 (make_emacs_time): Remove. All used changed to make_timespec.
10902 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
10903 (current_timespec): Rename from current_emacs_time. All uses changed.
10904 (add_emacs_time): Remove. All uses changed to timespec_add.
10905 (sub_emacs_time): Remove. All uses change dot timespec_sub.
10906 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
10907 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
10908 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
10909 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
10910 (current_timespec): Rename from current_emacs_time. All uses changed.
10911 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
10912 changed to timespec_cmp.
10913 * xgselect.c: Include <timespec.h>, since our .h files don't.
10914
10915 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
10916
10917 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
10918 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
10919 Remove the leftovers.
10920 * gtkutil.c (toplevel): Do not declare Qxft but include
10921 font.h to do so.
10922 * image.c (toplevel): Do not declare Vlibrary_cache because
10923 it's already done in lisp.h.
10924
10925 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
10926
10927 * lisp.h (Mouse_HLInfo): Move from here...
10928 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
10929 (reset_mouse_highlight): New function.
10930 * msdos.c (dos_set_window_size, IT_update_begin)
10931 (internal_terminal_init):
10932 * nsterm.m (ns_update_window_end, x_free_frame_resources)
10933 (ns_initialize_display_info):
10934 * w32console.c (initialize_w32_display):
10935 * w32term.c (x_update_window_end, x_free_frame_resources)
10936 (w32_initialize_display_info):
10937 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
10938 * window.c (Fdelete_other_windows_internal):
10939 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
10940 * termchar.h (toplevel):
10941 * xterm.h (toplevel): Include dispextern.h.
10942
10943 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
10944
10945 Fix minor problems found by static checking.
10946 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
10947 (expect): Avoid nested-if warning.
10948 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
10949 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
10950 * nsterm.h, nsterm.m (ns_select):
10951 * xgselect.c, xgselect.h (xg_select):
10952 Adjust signature to better match pselect's.
10953 * nsterm.m (ns_select):
10954 Don't set *TIMEOUT, since pselect doesn't.
10955 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
10956 diagnostic about assigning const char * to it.
10957 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
10958
10959 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
10960
10961 * lread.c (substitute_object_recurse): Handle hash-tables as well
10962 (bug#15190).
10963
10964 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
10965
10966 Fix unlikely core dump in init_tty, and simplify terminfo case.
10967 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
10968 The old version incorrectly dumped core if malloc returned a
10969 buffer containing only non-NUL bytes.
10970 (init_tty): Do not allocate or free termcap buffers; the
10971 struct does that for us now.
10972 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
10973 (struct tty_display_info): Define members termcap_term_buffer and
10974 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
10975 use them. Allocate them directly in struct rather than indirectly
10976 via a pointer, to simplify init_tty.
10977
10978 * frame.c (check_minibuf_window): Initialize 'window' properly,
10979 so that Emacs reliably aborts later if 'window' is not initialized.
10980
10981 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
10982
10983 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
10984 of VoidSymbol (Bug#15154).
10985
10986 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
10987
10988 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
10989 mouse_face_beg_y and mouse_face_end_y.
10990 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
10991 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
10992 Adjust users and update comment where appropriate.
10993
10994 2013-08-26 Martin Rudalics <rudalics@gmx.at>
10995
10996 * frame.c (check_minibuf_window): New function.
10997 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
10998 Call check_minibuf_window (Bug#15183).
10999
11000 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11001
11002 * window.h (struct window): Replace last_cursor with last_cursor_vpos
11003 because this is the only last cursor data we need to keep and consult.
11004 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
11005 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
11006 Adjust users.
11007
11008 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11009
11010 Fix recovering from possible decompression error.
11011 Since insert_from_gap doesn't always move point, we can't use PT as
11012 the position where the partially decompressed data ends, and
11013 should count how many bytes was produced so far.
11014 * decompress.c (struct decompress_unwind_data): Add nbytes member.
11015 (unwind_decompress): Really delete partially uncompressed data.
11016 (Fzlib_decompress_region): Take decompressed data size into account.
11017
11018 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11019
11020 * syntax.c (init_syntax_once): Adjust comment and do an early
11021 initialization of Qchar_table_extra_slots just once...
11022 * casetab.c (init_casetab_once):
11023 * category.c (init_category_once):
11024 * character.c (syms_of_character):
11025 * coding.c (syms_of_coding):
11026 * xdisp.c (syms_of_xdisp): ...and omit it here.
11027
11028 2013-08-24 Eli Zaretskii <eliz@gnu.org>
11029
11030 * xdisp.c (get_next_display_element): Don't apply to characters
11031 from a display vector the logic of setting it->end_of_box_run_p
11032 suitable for characters from a buffer. (Bug#15175)
11033
11034 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
11035 to handle directories, rather than '_utime' which doesn't.
11036 (Bug#15176)
11037
11038 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
11039
11040 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
11041 or fullscreen (Bug#14627).
11042
11043 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
11044
11045 System-dependent integer overflow fixes.
11046 * process.c (Fset_process_window_size): Signal an error if
11047 the window size is outside the range supported by the lower level.
11048 * sysdep.c (set_window_size): Return negative on error,
11049 nonnegative on success, rather than -1, 0, 1 on not in system,
11050 failure, success. This is simpler. Caller changed.
11051 (serial_configure): Remove unnecessary initialization of local.
11052 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
11053 size fits in unsigned long; this isn't true on some 32-bit hosts.
11054 Avoid buffer overrun if some future version of /proc/meminfo has a
11055 variable name longer than 20 bytes.
11056 (system_process_attributes) [__FreeBSD__]:
11057 Don't assume hw.availpages fits in 'int'.
11058
11059 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
11060
11061 Don't let very long directory names overrun the stack.
11062 Fix some related minor problems involving "//", vfork.
11063 * callproc.c (encode_current_directory): New function.
11064 (call_process): Don't append "/"; not needed.
11065 * fileio.c (file_name_as_directory_slop): New constant.
11066 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
11067 this can save the caller having to alloca.
11068 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
11069 Use SAFE_ALLOCA, not alloca.
11070 (directory_file_name, Fexpand_file_name): Leave leading "//"
11071 alone, since it can be special even on POSIX platforms.
11072 * callproc.c (call_process):
11073 * process.c (Fformat_network_address):
11074 * sysdep.c (sys_subshell):
11075 Use encode_current_directory rather than rolling our own.
11076 (create_process): No need to encode directory; caller does that now.
11077 * process.h (encode_current_directory): New decl.
11078 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
11079 Rework to avoid 'goto xyzzy;'.
11080
11081 2013-08-23 Eli Zaretskii <eliz@gnu.org>
11082
11083 * xdisp.c (handle_face_prop): If the default face was remapped use
11084 the remapped face for strings from prefix properties. (Bug#15155)
11085
11086 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
11087
11088 Minor cleanup for redisplay interface and few related functions.
11089 * frame.h (enum text_cursor_kinds): Move from here...
11090 * dispextern.h (enum text_cursor_kinds): ...to here.
11091 (toplevel): Drop unnecessary declarations.
11092 (struct redisplay_interface): Use bool and enum text_cursor_kinds
11093 in update_window_end_hook and draw_window_cursor functions.
11094 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
11095 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
11096 * w32term.c (x_update_window_end, w32_draw_window_cursor):
11097 * xterm.c (x_update_window_end, x_draw_window_cursor):
11098 * xdisp.c (display_and_set_cursor, update_window_cursor)
11099 (update_cursor_in_window_tree, x_update_cursor): Use bool and
11100 enum text_cursor_kinds where appropriate.
11101
11102 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
11103
11104 Redesign redisplay interface to drop updated_row and updated_area.
11105 * dispextern.h (updated_row, updated_area): Remove declaration.
11106 (struct redisplay_interface): Pass glyph row and row area parameters
11107 to write_glyphs, insert_glyphs and clear_end_of_line functions.
11108 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
11109 Adjust prototypes.
11110 * dispnew.c (updated_row, updated_area): Remove.
11111 (redraw_overlapped_rows, update_window_line): Adjust user.
11112 (update_marginal_area, update_text_area): Likewise. Pass updated row
11113 as a parameter. Prefer enum glyph_row_area to int where appropriate.
11114 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
11115 Adjust users.
11116
11117 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
11118
11119 * process.c (flush_pending_output): Remove stub.
11120 All uses removed.
11121
11122 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
11123
11124 * callproc.c: Fix race that killed background processes (Bug#15144).
11125 (call_process): New arg TEMPFILE_INDEX. Callers changed.
11126 Record deleted process-id in critical section, not afterwards.
11127 Don't mistakenly kill process created by a call-process invocation
11128 that discards output and does not wait.
11129
11130 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
11131
11132 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
11133 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
11134 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
11135 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
11136 to shut up compiler in mark_object.
11137 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
11138
11139 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
11140
11141 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
11142 We can't portably rely on PTY_OPEN doing that, even if
11143 it calls posix_openpt with O_CLOEXEC.
11144
11145 2013-08-20 Kenichi Handa <handa@gnu.org>
11146
11147 * character.c (string_char): Improve commentary.
11148
11149 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
11150
11151 * image.c (SIGNATURE_DIGESTSIZE): Remove.
11152 (struct animation_cache): Make signature a flexible array member.
11153 All uses changed. This is a tad slower but may insulate us better
11154 from future changes to ImageMagick.
11155
11156 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
11157
11158 * image.c: Shrink memory needed for animation cache.
11159 (SIGNATURE_DIGESTSIZE): New constant.
11160 (struct animation_cache): Make 'signature' a fixed size array of bytes.
11161 (imagemagick_create_cache): Copy the signature. This saves
11162 several KB of memory that ImageMagick wastes per signature.
11163 Don't bother updating the update_time, as the caller does that now.
11164 (imagemagick_prune_animation_cache): Don't destroy the signature, as
11165 it's a fixed size struct member now.
11166 (imagemagick_get_animation_cache): Always destroy the signature,
11167 as it's now imagemagick_create_cache's responsibility to copy it.
11168 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
11169 and use memcmp rather than strcmp.
11170 eassert that ImageMagick returns a signature of the specified length.
11171
11172 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11173
11174 * image.c (imagemagick_get_animation_cache): Don't segfault on
11175 each invocation.
11176 (imagemagick_get_animation_cache): Revert to previous definition
11177 so that it actually works. But keep the memory leak fix.
11178 (imagemagick_get_animation_cache): Fix memory leak.
11179
11180 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
11181
11182 * image.c: Fix animation cache signature memory leak.
11183 Fix some other minor performance problems while we're at it.
11184 (imagemagick_create_cache): Clear just the members that
11185 need clearing. Don't set update_time, as caller does that now.
11186 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
11187 Simplify by using pointer-to-pointer instead of a prev pointer.
11188 (imagemagick_prune_animation_cache): Use make_emacs_time rather
11189 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
11190 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
11191 it's already a copy. Free the signature probe unless it's cached.
11192
11193 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
11194 This was introduced by my 2013-08-12 fix for Bug#15035.
11195
11196 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
11197
11198 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
11199 (imagemagick_prune_animation_cache): Now static.
11200
11201 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
11202
11203 * image.c (imagemagick_get_animation_cache): Don't segfault when
11204 pruning all entries.
11205
11206 2013-08-18 Ken Brown <kbrown@cornell.edu>
11207
11208 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
11209 static heap if ENABLE_CHECKING is defined.
11210 (max_bss_sbrk_ptr): New variable.
11211 (bss_sbrk): Use it.
11212 (report_sheap_usage): Report maximum static heap usage instead of
11213 ending static heap usage.
11214
11215 2013-08-17 Eli Zaretskii <eliz@gnu.org>
11216
11217 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
11218 of zlib_initialized according to the results of calling
11219 init_zlib_functions.
11220
11221 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
11222
11223 * image.c: Implement an ImageMagick per-image cache.
11224 (imagemagick_get_animation_cache): Fix a double-free error.
11225 (imagemagick_load_image): Remove the ping_wand code, which only
11226 apparently saved time on invalid animated images, and slowed down
11227 everything else. Optimize for the common case.
11228
11229 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
11230
11231 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
11232
11233 * editfns.c (insert_before_markers): Mention overlay in the doc string.
11234
11235 * marker.c (set_marker): Remove documentation of undefined behavior.
11236
11237 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11238
11239 * image.c (imagemagick_compute_animated_image): Animate correctly
11240 when sub-images are smaller than the main image.
11241 (imagemagick_compute_animated_image): Setting the iterator row to
11242 zero is apparently not allowed.
11243 (imagemagick_compute_animated_image): Allow images that say they
11244 have sub-images that are bigger than the main image, but just crop
11245 them.
11246
11247 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
11248
11249 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
11250
11251 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11252
11253 * image.c (imagemagick_compute_animated_image): Respect the GIF
11254 disposal methods.
11255
11256 2013-08-15 Ken Brown <kbrown@cornell.edu>
11257
11258 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
11259 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
11260 needed.
11261
11262 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
11263
11264 Fix minor problems found by static checking.
11265 * frame.c (delete_frame):
11266 * xdisp.c (next_element_from_display_vector):
11267 Avoid uninitialized local.
11268 * image.c (imagemagick_compute_animated_image): Port to C89.
11269 Prefer usual GNU indentation style for loops.
11270 Be more careful about bizarrely large sizes, by using ptrdiff_t
11271 instead of int.
11272
11273 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
11274
11275 Fix infinite frame selection loop (Bug#15025).
11276 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
11277
11278 2013-08-15 Eli Zaretskii <eliz@gnu.org>
11279
11280 * xdisp.c (compute_window_start_on_continuation_line):
11281 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
11282 to make sure we end up setting the window start at the leftmost
11283 visible character of the display line. This avoids funky
11284 horizontal shifting because the window start is not kept on the
11285 same position. (Bug#15090)
11286 (next_element_from_display_vector): Support 'box' face attribute
11287 in the face definitions of a display vector. (Bug#15099)
11288
11289 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11290
11291 * image.c (imagemagick_compute_animated_image): Implement animated
11292 images (bug#14700).
11293 (imagemagick_compute_animated_image): Fix some compilation
11294 warnings. Implement a very simple cache to make the animation
11295 usable at all, but it should be replaced with a per-image cache.
11296
11297 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
11298
11299 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
11300 to do `for' loops over alist values.
11301 * buffer.h (FOR_EACH_BUFFER):
11302 * process.c (FOR_EACH_PROCESS): Use it.
11303 (handle_child_signal, status_notify, Fget_buffer_process)
11304 (kill_buffer_processes): Use FOR_EACH_PROCESS.
11305
11306 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
11307
11308 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
11309 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
11310 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
11311 to xzalloc and so avoid redundant call to memset.
11312 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
11313 members because it is allocated with xzalloc and so already zeroed.
11314
11315 2013-08-14 Ken Brown <kbrown@cornell.edu>
11316
11317 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
11318 (Bug#15094).
11319
11320 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11321
11322 Utility function and macro to copy Lisp string to C string.
11323 * lisp.h (xlispstrdupa): New macro.
11324 (xlispstrdup): New prototype.
11325 * alloc.c (xlispstrdup): New function.
11326 * callint.c (Fcall_interactively):
11327 * fileio.c (Ffile_name_directory, Fexpand_file_name)
11328 (Fsubstitute_in_file_name):
11329 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
11330 * image.c (x_create_bitmap_from_file):
11331 * w32term.c (w32_term_init):
11332 * xterm.c (x_term_init): Use xlispstrdup.
11333
11334 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
11335
11336 * image.c (imagemagick_load_image): Make animated pictures work.
11337 There's still some problems with background color settings, though
11338 (bug#14700).
11339
11340 * decompress.c (unwind_decompress): Always restore point.
11341
11342 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
11343
11344 * marker.c (set_marker): Reformat documentation.
11345
11346 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
11347
11348 * xdisp.c (cursor_type_changed): Now static.
11349
11350 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
11351 Use changed. This avoids the need to call xmalloc and for the
11352 caller to call xfree, and avoids memory leaks in some situations.
11353
11354 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11355
11356 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
11357 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
11358 (redisplay_window): If window_end_valid is cleared due to non-zero
11359 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
11360 so do not call to try_cursor_movement for that window.
11361
11362 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11363
11364 * window.h (struct window): Convert window_end_pos and
11365 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
11366 (wset_window_end_pos, wset_window_end_vpos): Remove.
11367 * dispnew.c (adjust_glyph_matrix):
11368 * window.c (Fwindow_end, replace_window, set_window_buffer)
11369 (make_window):
11370 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
11371 (set_vertical_scroll_bar, redisplay_window, try_window)
11372 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
11373 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
11374 (note_mouse_highlight): Adjust users.
11375 (try_cursor_movement): Likewise. Convert old precondition to eassert.
11376 Add comment.
11377
11378 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11379
11380 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
11381 * image.c (imagemagick_filename_hint): Use `const char *' and
11382 prefer SSDATA to SDATA to avoid warnings.
11383
11384 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11385
11386 Cleanup window fringes, margins and scroll bars adjustments.
11387 * window.c (set_window_fringes, set_window_margins)
11388 (set_window_scroll_bars, apply_window_adjustment): New functions.
11389 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
11390 (Fset_window_scroll_bars): Use them.
11391
11392 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
11393
11394 * window.h (struct window): Convert scroll_bar_width
11395 from Lisp_Object to integer. Adjust comment.
11396 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
11397 Adjust users.
11398 * window.c (wset_scroll_bar_width): Remove.
11399 (make_window): Initialize scroll_bar_width.
11400 (Fsplit_window_internal): Use direct assignment.
11401 (Fset_window_configuration, save_window_save):
11402 Convert Lisp_Object to integer and back where appropriate.
11403 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
11404 bar was actually changed, and mention this in docstring.
11405
11406 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
11407
11408 * decompress.c: Minor simplifications.
11409 (Fzlib_decompress_region): Don't bother verifying
11410 that avail_out <= UINT_MAX, as that was confusing.
11411 Mention the restriction in a comment instead.
11412 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
11413
11414 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
11415
11416 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
11417 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
11418
11419 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
11420
11421 * image.c (imagemagick_filename_hint): Check for errors in the
11422 alist structure.
11423
11424 2013-08-13 Eli Zaretskii <eliz@gnu.org>
11425
11426 * window.c (Fwindow_margins): Return nil when there's no marginal
11427 area, as per the documented API.
11428
11429 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
11430 Fmake_vector, as scroll bar's struct members are not all Lisp
11431 objects now. This avoids crashes in GC.
11432
11433 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
11434 bool, so its address could be taken.
11435
11436 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
11437
11438 * image.c (imagemagick_filename_hint): New function to possibly
11439 apply `image-content-type-suffixes'.
11440 (imagemagick_load_image): Use it.
11441
11442 2013-08-13 Eli Zaretskii <eliz@gnu.org>
11443
11444 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
11445 if loading zlib failed.
11446
11447 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
11448
11449 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
11450 2013-08-13 checkin below. Change bool to BOOL, rule is:
11451 All Obj-C code uses BOOL, except for interfaces callable from C.
11452
11453 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
11454
11455 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11456
11457 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
11458 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
11459 bool instead of BOOL.
11460 * w32term.h (struct scroll_bar): Convert fringe_extended_p
11461 from Lisp_Object to bitfield. Adjust comment.
11462 * w32term.c (x_scroll_bar_create): Adjust user.
11463 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
11464 * xterm.c (XTset_vertical_scroll_bar): Likewise.
11465 Use bool for boolean.
11466 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
11467 to `unsigned int' when defining a bitfield.
11468
11469 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
11470
11471 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
11472
11473 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11474
11475 * window.h (struct window): Convert left_margin_cols and
11476 right_margin_cols from Lisp_Objects to integers. Adjust comment.
11477 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
11478 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
11479 Adjust users.
11480 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
11481 Adjust comment.
11482 (showing_window_margins_p, update_window_line, update_frame_1):
11483 * fringe.c (draw_fringe_bitmap_1):
11484 * xdisp.c (window_box_width): Adjust users.
11485 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
11486 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
11487 Use direct assignment.
11488 (Fset_window_configuration, save_window_save, Fwindow_margins):
11489 Convert Lisp_Object to integer and back where appropriate.
11490 (Fset_window_margins): Adjust user. Return t if any margin
11491 was actually changed, and mention this in docstring.
11492
11493 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
11494
11495 * syntax.c (forward_word):
11496 * cmds.c (forward_char, backward_char): Mention the optional argument.
11497
11498 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11499
11500 * window.h (struct window): Convert left_fringe_width
11501 and right_fringe_width from Lisp_Objects to integers.
11502 Adjust comment.
11503 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
11504 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
11505 * window.c (wset_left_fringe_width, wset_right_fringe_width):
11506 Remove.
11507 (make_window): Initialize new integer fields to -1.
11508 (Fsplit_window_internal): Use direct assignment.
11509 (Fset_window_configuration, save_window_save):
11510 Convert Lisp_Object to integer and back where appropriate.
11511 (Fset_window_fringes): Adjust user. Return t if any fringe
11512 was actually changed, and mention this in docstring.
11513
11514 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11515
11516 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
11517 * nsfns.m (x_set_cursor_type):
11518 * w32fns.c (x_set_cursor_type):
11519 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
11520 * xdisp.c (set_frame_cursor_types): ...but in common code.
11521
11522 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11523
11524 * font.c (clear_font_cache): New function, stripped from...
11525 (Fclear_font_cache): ...here, which now uses the function
11526 above. Adjust comment.
11527 * font.h (clear_font_cache): Add prototype.
11528 * xfaces.c (clear_face_cache): Use clear_font_cache.
11529
11530 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
11531
11532 * window.c (Fset_window_start): Compare `w', not `window' because
11533 `w' might not be equal to `window' after call to decode_live_window.
11534
11535 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
11536
11537 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
11538 This fixes a problem introduced by the Bug#15035 patch
11539 when using GPG. Reported by Herbert J. Skuhra.
11540
11541 2013-08-12 Eli Zaretskii <eliz@gnu.org>
11542
11543 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
11544 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
11545 not yet initialized.
11546
11547 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
11548
11549 * decompress.c (Fzlib_decompress_region): Support zlib
11550 decompression, too, and rename.
11551
11552 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
11553
11554 Minor zlib configuration tweaks.
11555 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
11556 Don't assume presence of fn_inflateInit2_ zlib internal function.
11557
11558 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
11559
11560 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
11561 include the zlib prefix.
11562
11563 2013-08-12 Eli Zaretskii <eliz@gnu.org>
11564
11565 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
11566 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
11567 define static variables that are pointers to zlib functions to be
11568 dynamically loaded.
11569 (init_zlib_functions) [WINDOWSNT]: New function.
11570 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
11571 New macros.
11572 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
11573 macros instead of invoking the zlib functions directly.
11574 (syms_of_decompress): DEFSYM Qzlib_dll.
11575 Staticpro Szlib_available_p.
11576
11577 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
11578
11579 Avoid looping over all frame windows to freeze and unfreeze.
11580 * window.h (struct window): Drop frozen_window_start_p.
11581 (freeze_window_starts): Drop prototype.
11582 * frame.h (struct frame): New frozen_window_starts flag.
11583 (FRAME_WINDOWS_FROZEN): New macro.
11584 * window.c (freeze_window_start, freeze_window_starts):
11585 Remove.
11586 (select_window, replace_window): Adjust users.
11587 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
11588 (window_frozen_p): New function.
11589 (redisplay_window): Use it.
11590
11591 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
11592
11593 Fix some fd issues when running subprocesses (Bug#15035).
11594 Fix bugs that can leak files or file descriptors on errors.
11595 Don't unlink open temp files, as that's hard for users to diagnose
11596 when things go awry (e.g., temp disk exhausted).
11597 Don't bother to lock temp files. Check for invalid recursion.
11598 * callproc.c (synch_process_fd): Remove. All uses removed.
11599 (synch_process_tempfile): New var or macro.
11600 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
11601 New constants.
11602 (record_kill_process): New arg, the temp name. All callers changed.
11603 (delete_temp_file): Now just a simple wrapper around unlink.
11604 (call_process_kill): New arg, the call_process_fd array.
11605 Close them all. Clear synch_process_pid. Remove the temp file,
11606 or arrange for it to be removed.
11607 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
11608 that's been moved to synch_process_tempfile. Caller changed.
11609 Do not remove the tempfile; that's now call_process_kill's
11610 responsibility.
11611 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
11612 call_process_kill; the caller now does that.
11613 (call_process_cleanup): Do not close the process fd; that's now
11614 call_process_kill's responsibility.
11615 (Fcall_process): Implement via new function call_process, which
11616 has most of the old body of Fcall_process, but with a different API.
11617 (call_process): New function that does not open or close filefd if
11618 it is nonnegative. Record which fds need to be closed, and let
11619 call_process_kill close (and remove the tempfile, on MSDOS) on error.
11620 Signal an error if invoked recursively (could be done via a hook).
11621 Simplify creation of the tempfile in the MSDOS case.
11622 Don't create the output file until after checking for the executable.
11623 Report any failure to open /dev/null.
11624 Don't open /dev/null for writing twice; once is enough.
11625 Don't create pipe if all output is being discarded or sent to file.
11626 Don't worry about setting up the coding system or reading from the
11627 pipe if all output is being discarded.
11628 Hoist fd_error local into top level, to lessen block nesting.
11629 Don't record deleted pid here; now done by Fcall_process_region.
11630 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
11631 and note its success in synch_process_tempfile.
11632 Do not leak resources when child_setup fails.
11633 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
11634 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
11635 (create_temp_file): Now returns open fd, with an additional
11636 Lisp_Object * argument to return the name. All callers changed.
11637 Do not close the file; rewind it instead, and leave it open for
11638 the caller. Do not lock the temp file. Unwind-protect the file
11639 and the file-descriptor.
11640 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
11641 If an asynchrounous process, record it here, not in call_process.
11642 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
11643 * eval.c (set_unwind_protect): New function.
11644 * fileio.c (write_region): New function, generalized from the
11645 old Fwrite_region. Do not lock temp files.
11646 (Fwrite_region): Use it.
11647 * lisp.h (set_unwind_protect, write_region): New decls.
11648 * process.c: Include <verify.h>.
11649 (make_process): Mark fds as initially closed.
11650 (deleted_pid_list): Now a list of pid-filename pairs.
11651 All uses changed.
11652 (close_process_fd): New function.
11653 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
11654 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
11655 New constants. Verify that their number matches PROCESS_OPEN_FDS.
11656 (create_process, create_pty, Fmake_serial_process)
11657 (server_accept_connection): Record which fds need to be closed,
11658 and let deactivate_process close them.
11659 (Fmake_network_process): Do not discard the unwind-protect
11660 until it's safe to do so.
11661 (deactivate_process): Close the fds opened by create_process etc.
11662 (Fprocess_send_eof): Adjust to new way of recording open fds.
11663 Report an error if /dev/null can't be opened, instead of aborting.
11664 * process.h (PROCESS_OPEN_FDS): New constant.
11665 (struct Lisp_Process): New member open_fds.
11666 (record_kill_process, record_deleted_pid): Adjust signatures.
11667 (record_deleted_pid): Move decl here ...
11668 * syswait.h (record_deleted_pid): ... from here.
11669
11670 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
11671
11672 * decompress.c: Fix bugs with large buffers and weird inputs.
11673 Tune a bit. Reindent as per usual Emacs style.
11674 (BUFFER_SIZE): Remove.
11675 (Fdecompress_gzipped_region): Do not mishandle input buffers with
11676 more than UINT_MAX bytes. Decompress into the gap instead of into
11677 an auto buffer, as this should avoid copying. Return nil if
11678 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
11679 set immediate_quit; we shouldn't trust zlib code that much.
11680
11681 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11682
11683 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
11684 errors, and really move the gap to where we want it.
11685
11686 * lisp.h: Include decompress.c support.
11687
11688 * emacs.c (main): Include decompress.c support.
11689
11690 * Makefile.in: Include -lz if present.
11691
11692 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
11693
11694 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
11695 (initWithTitle:): Initialize frame to 0.
11696 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
11697 (fillWithWidgetValue:frame:): Rename from
11698 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
11699
11700 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
11701 fillWithWidgetValue:frame:
11702
11703 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
11704 remove memory leak warnings.
11705
11706 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
11707 (ns_check_menu_open): Handle menu == nil. Remove assignment to
11708 menu_pending_title.
11709
11710 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
11711 (x_activate_menubar): Update the whole menu.
11712 (trackingNotification:): Call ns_check_menu_open if tracking ends.
11713 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
11714 current event is not NSSystemDefined (Bug#15001).
11715 Call ns_check_menu_open only if trackingMenu is 2.
11716 (menuDidClose:): New method, decrease trackingMenu.
11717 (fillWithWidgetValue:setDelegate:): New method.
11718 (fillWithWidgetValue:): Call the above.
11719
11720 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
11721
11722 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
11723
11724 Omit some unnecessary casts.
11725 Many of these go back to the old pre-C89 days, when they may have
11726 been needed, but we've been assuming C89 or later for a while now.
11727 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
11728 (live_float_p, live_misc_p, live_vector_p):
11729 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
11730 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
11731 (defvar_per_buffer):
11732 * callint.c (Fcall_interactively):
11733 * doc.c (Fsubstitute_command_keys):
11734 * filelock.c (get_boot_time):
11735 * frame.c (xrdb_get_resource):
11736 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
11737 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
11738 (xg_get_file_name_from_selector, menuitem_destroy_callback)
11739 (menuitem_highlight_callback, menu_destroy_callback)
11740 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
11741 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
11742 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
11743 (xg_tool_bar_help_callback, tb_size_cb):
11744 * image.c (xpm_alloc_color, png_read_from_memory)
11745 (png_read_from_file, png_load_body, our_memory_skip_input_data)
11746 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
11747 (syms_of_image):
11748 * keymap.c (describe_map):
11749 * nsfns.m (Fns_display_monitor_attributes_list):
11750 * nsmenu.m (process_dialog:):
11751 * nsterm.m (hold_event):
11752 * process.c (wait_reading_process_output):
11753 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
11754 * scroll.c (do_direct_scrolling, scrolling_1):
11755 * termcap.c (tgetent):
11756 * window.c (check_window_containing, add_window_to_list)
11757 (freeze_window_starts):
11758 * xdisp.c (compare_overlay_entries, vmessage):
11759 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
11760 (x_get_monitor_attributes_xrandr)
11761 (Fx_display_monitor_attributes_list, x_display_info_for_name)
11762 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
11763 * xfont.c (xfont_match, xfont_open):
11764 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
11765 (menubar_selection_callback, menu_position_func)
11766 (popup_selection_callback, create_and_show_popup_menu)
11767 (dialog_selection_callback, create_and_show_dialog):
11768 * xrdb.c (x_get_string_resource)
11769 (main) [TESTRM]:
11770 * xsmfns.c (x_session_check_input):
11771 * xterm.c (x_draw_glyphless_glyph_string_foreground)
11772 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
11773 (xaw_jump_callback, xaw_scroll_callback):
11774 Omit unnecessary casts.
11775
11776 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
11777
11778 Minor string-length refactoring.
11779 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
11780 * frame.c (make_monitor_attribute_list):
11781 Prefer build_string to strlen + make_string.
11782
11783 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
11784
11785 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
11786 don't check minor_code (Bug#14417).
11787
11788 2013-08-09 Eli Zaretskii <eliz@gnu.org>
11789
11790 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
11791 vertical positions instead. This avoids calling MATRIX_ROW with
11792 row numbers that are possibly beyond valid limits. (Bug#15064)
11793
11794 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
11795
11796 Use xstrdup and build_unibyte_string where applicable.
11797 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
11798 * xfns.c (x_window):
11799 * xrdb.c (x_get_customization_string):
11800 * xterm.c (xim_initialize):
11801 * w32fns.c (w32_window): Use xstrdup.
11802 (w32_display_monitor_attributes_list):
11803 * emacs.c (init_cmdargs):
11804 * keyboard.c (PUSH_C_STR):
11805 * nsfont.m (nsfont_open):
11806 * sysdep.c (system_process_attributes):
11807 * w32.c (system_process_attributes):
11808 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
11809
11810 2013-08-09 Eli Zaretskii <eliz@gnu.org>
11811
11812 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
11813 variables of these types so that GDB would know about them, as aid
11814 for debugging fatal exceptions. (Bug#15024) See also
11815 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
11816 discussions.
11817
11818 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
11819
11820 * nsterm.m (ns_update_begin): Don't change clip path if it would be
11821 larger than the NSWindow (Bug#14934).
11822
11823 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
11824
11825 Redesign redisplay interface to drop global variable updated_window.
11826 Always pass currently updated window as a parameter to update routines.
11827 * dispextern.h (updated_window): Remove declaration.
11828 (struct redisplay_interface): Pass window parameter to
11829 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
11830 and after_update_window_hook.
11831 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
11832 Adjust prototypes.
11833 * dispnew.c (updated_window): Remove.
11834 (redraw_overlapped_rows, update_marginal_area, update_text_area)
11835 (update_window_line): Adjust to match redisplay interface changes.
11836 * nsterm.m (ns_update_window_begin, ns_update_window_end)
11837 (ns_scroll_run, ns_after_update_window_line):
11838 * w32term.c (x_update_window_begin, x_update_window_end)
11839 (x_after_update_window_line, x_scroll_run):
11840 * xterm.c (x_update_window_begin, x_update_window_end)
11841 (x_after_update_window_line, x_scroll_run):
11842 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
11843 Likewise. Adjust comments where appropriate.
11844 (x_cursor_to): Simplify because this is always called during window
11845 update (but install debugging check anyway).
11846 (expose_window): Check must_be_updated_p flag to see whether this
11847 function is called during window update.
11848
11849 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
11850
11851 Do not reset window modification event counters excessively.
11852 These leftovers and poor man's tricky methods to catch extra
11853 redisplay's attention are no longer needed.
11854 * frame.c (set_menu_bar_lines_1):
11855 * minibuf.c (read_minibuf_unwind):
11856 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
11857 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
11858 (window_scroll_line_based, Fset_window_configuration):
11859 * xdisp.c (redisplay_window): Do not reset last_modified and
11860 last_overlay_modified counters.
11861
11862 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
11863
11864 * xselect.c (x_send_client_event): Set send_event and serial, memset
11865 data.l as it might be bigger than data.b. Use 24 bit mask to
11866 XSendEvent (Bug#15034).
11867
11868 2013-08-07 Eli Zaretskii <eliz@gnu.org>
11869
11870 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
11871 for TTY frames that are not the top frame on their console.
11872 (Bug#14616)
11873
11874 2013-08-07 Martin Rudalics <rudalics@gmx.at>
11875
11876 * w32term.c (w32fullscreen_hook): Really maximize frame when
11877 asked for (Bug#14841).
11878
11879 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
11880
11881 Prefer selected_window to Fselected_window, likewise for frames.
11882 * buffer.c (Fbuffer_swap_text):
11883 * data.c (Fvariable_binding_locus):
11884 * window.c (run_window_configuration_change_hook): Adjust users.
11885 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
11886 Use decode_live_frame.
11887
11888 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
11889
11890 Be more careful if selected window shows the buffer other than current,
11891 use window_outdated only if this is not so. This change should also
11892 address some weird issues discussed in Bug#13012.
11893 * window.h (window_outdated): New prototype.
11894 * window.c (window_outdated): Now here. Convert from static and
11895 always assume window's buffer.
11896 (Fwindow_end, Fwindow_line_height): Use it.
11897 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
11898 and always assume window's buffer.
11899 (redisplay_window): Adjust user.
11900 (redisplay_internal): Call to reconsider_clip_changes once and
11901 check whether mode line should be updated only if selected window
11902 shows current buffer.
11903 (run_window_scroll_functions): Use eassert for debugging check.
11904 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
11905
11906 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
11907
11908 * window.c (window_scroll, window_scroll_pixel_based)
11909 (window_scroll_line_based): Use bool for booleans.
11910
11911 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
11912
11913 * process.c: Fix minor off-by-one issues in descriptor counts.
11914 This shouldn't fix any real bugs, but it cleans up the code a bit.
11915 (max_process_desc, max_input_desc): -1, not 0, means none.
11916 All uses changed.
11917 (delete_input_desc): New function.
11918 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
11919 (deactivate_process): Scan backwards when recomuting max_process_desc;
11920 that should be faster.
11921 (init_process_emacs): Initialize max_input_desc.
11922
11923 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
11924
11925 Use region cache to speedup bidi_find_paragraph_start.
11926 * buffer.h (struct buffer): New member bidi_paragraph_cache.
11927 Rename cache_long_line_scans to cache_long_scans.
11928 * buffer.c (bset_cache_long_line_scans): Rename to
11929 bset_cache_long_scans.
11930 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
11931 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
11932 into account.
11933 (syms_of_buffer): Rename cache-long-line-scans to
11934 cache-long-scans. Adjust docstring.
11935 * search.c (newline_cache_on_off):
11936 * indent.c (width_run_cache_on_off): Adjust users.
11937 * bidi.c (bidi_paragraph_cache_on_off): New function.
11938 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
11939 * insdel.c (prepare_to_modify_buffer):
11940 Invalidate bidi_paragraph_cache if enabled.
11941
11942 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
11943
11944 Invalidate region caches only if buffer text is going to be changed.
11945 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
11946 (modify_text): ...new prototype.
11947 (prepare_to_modify_buffer_1): New prototype.
11948 * textprop.c (modify_region): Rename to...
11949 (modify_text_properties): ...new function.
11950 (add_text_properties_1, set_text_properties, Fremove_text_properties)
11951 (Fremove_list_of_text_properties): Adjust users.
11952 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
11953 (modify_text): ...new function.
11954 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
11955 (prepare_to_modify_buffer_1): ...new function.
11956 * casefiddle.c (casify_region):
11957 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
11958 (Ftranspose_regions): Use modify_text.
11959
11960 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
11961
11962 * lisp.mk (lisp): Add nadvice.elc.
11963
11964 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
11965
11966 New macro to iterate over live buffers similar to frames.
11967 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
11968 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
11969 Declare buffer-related variables here to offload lisp.h.
11970 * buffer.c (Vbuffer_alist): Adjust comment.
11971 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
11972 (other_buffer_safely):
11973 * data.c (store_symval_forwarding):
11974 * dispnew.c (Fframe_or_buffer_changed_p):
11975 * fileio.c (Fdo_auto_save):
11976 * filelock.c (unlock_all_files):
11977 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
11978
11979 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
11980
11981 Fix some minor races in hosts lacking mkostemp (Bug#15015).
11982 * callproc.c (create_temp_file):
11983 * filelock.c (create_lock_file):
11984 Assume mkostemp, since it's now provided by Gnulib.
11985
11986 2013-08-04 Eli Zaretskii <eliz@gnu.org>
11987
11988 * w32.c (mkostemp): New function.
11989 (mktemp): Remove, no longer used. Most of the code reused in
11990 mkostemp. (Bug#15015)
11991 (mktemp): Don't undef.
11992
11993 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
11994
11995 * dispnew.c (glyph_matrix_count, glyph_pool_count):
11996 Move under GLYPH_DEBUG and ENABLE_CHECKING.
11997 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
11998 (free_glyph_pool, check_glyph_memory): Likewise for
11999 all users. Adjust comments where appropriate.
12000
12001 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
12002
12003 * composite.h: Minor fixups.
12004 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
12005 to fix a misspelling, and change it to an inline function while
12006 we're at it (it need not be a macro). All uses changed.
12007 (composition_method, composition_valid_p):
12008 Rewrite to avoid assignments in if-conditions.
12009
12010 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
12011
12012 Do not use global Lisp_Object in composition macros.
12013 * composite.h (composition_temp): Remove declaration.
12014 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
12015 (composition_method, composition_valid_p): ...inline functions.
12016 (compose_region): Remove the leftover.
12017 * composite.c (composition_temp): Remove.
12018 (run_composition_function, update_compositions)
12019 (composition_compute_stop_pos, composition_adjust_point)
12020 (Ffind_composition_internal):
12021 * coding.c (handle_composition_annotation):
12022 * xdisp.c (handle_composition_prop, check_point_in_composition):
12023 Related users changed.
12024
12025 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
12026
12027 Drop FRAME_PTR typedef.
12028 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
12029 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
12030 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
12031 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
12032 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
12033 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
12034 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
12035 All related users changed.
12036
12037 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
12038
12039 * eval.c (default_toplevel_binding): New function.
12040 (Fdefvar): Use it.
12041 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
12042 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
12043 (syms_of_eval): Export them.
12044 * data.c (Fdefault_value): Micro cleanup.
12045 * term.c (init_tty): Use "false".
12046
12047 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
12048
12049 Fix X GC leak in GTK and raw (no toolkit) X ports.
12050 * xterm.c (x_free_frame_resources): If white and black relief
12051 GCs are allocated, always free them here.
12052 * xfns.c (x_make_gc): Omit redundant initialization.
12053 * widget.c (create_frame_gcs): Remove the leftover.
12054 (EmacsFrameDestroy): Do nothing because all GCs are now freed
12055 in x_free_frame_resources.
12056
12057 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
12058
12059 * nsterm.m (windowWillResize:toSize:): Only change title if
12060 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
12061 modifying it.
12062 (viewDidEndLiveResize): New method.
12063
12064 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
12065 inside NS_IMPL_COCOA.
12066
12067 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
12068
12069 * insdel.c (adjust_after_replace, replace_range, del_range_2):
12070 Do not check whether undo is enabled because record_insert and
12071 record_delete does that themselves.
12072
12073 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
12074
12075 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
12076 member which is not really used any more.
12077 (FRAME_XIC_BASE_FONTNAME): Remove.
12078 * xfns.c (xic_free_fontset): Adjust user.
12079 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
12080 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
12081 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
12082 (xdialog_show): Use eassert for debugging check.
12083 * w32term.c (x_unfocus_frame): Remove unused dummy function.
12084
12085 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
12086
12087 * fileio.c, fns.c (merge): Move extern decl from here ...
12088 * lisp.h (merge): ... to here.
12089
12090 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12091
12092 Fix last font-related change.
12093 * w32font.h (w32font_list_internal, w32font_match_internal):
12094 Fix prototype.
12095 * w32uniscribe.c (uniscribe_list, uniscribe_match)
12096 (uniscribe_list_family): Adjust to match font API change.
12097 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
12098 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
12099
12100 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12101
12102 * frame.h (FRAME_MOUSE_UPDATE):
12103 * nsterm.m (ns_frame_up_to_date): Omit redundant check
12104 whether hlinfo->mouse_face_mouse_frame is non-NULL.
12105
12106 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12107
12108 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
12109 * font.h (struct font_driver): Change list, match, and list_family
12110 functions to accept struct frame * as first arg.
12111 * font.c (font_score, font_compare, font_sort_entities):
12112 Remove prototypes.
12113 (font_sort_entities, font_list_entities, font_select_entity)
12114 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
12115 match font API change.
12116 * xfont.c (xfont_list, xfont_match, xfont_list_family):
12117 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
12118 * ftxfont.c (ftxfont_list, ftxfont_match):
12119 * xftfont.c (xftfont_list, xftfont_match):
12120 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
12121 * w32font.c (w32font_list, w32font_match, w32font_list)
12122 (w32font_list_internal, w32_font_match_internal): Likewise.
12123 * xfaces.c (Fx_family_fonts): Adjust user.
12124
12125 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12126
12127 Do not use pure Xism x_wm_set_icon_position in non-X ports.
12128 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
12129 only if HAVE_X_WINDOWS is in use.
12130 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
12131 * nsterm.m (x_wm_set_icon_position): Remove no-op.
12132 * w32term.c (x_wm_set_icon_position): Likewise.
12133 * w32fns.c (x_icon): Adjust user.
12134
12135 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
12136
12137 * xterm.c (last_mouse_press_frame): Remove the
12138 leftover which is not really used any more.
12139 (handle_one_xevent, syms_of_xterm): Adjust users.
12140 (x_flush): Call XFlush once per each X display, not frame.
12141 This is better because this code always unconditionally skips
12142 non-X frames in Vframe_list and issues the only XFlush if we
12143 have more than one X frame on the same X display.
12144 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
12145 Use bool for booleans.
12146 (x_draw_glyph_string_background, cvt_string_to_pixel)
12147 (cvt_pixel_dtor): Drop unnecessary prototypes.
12148 * xterm.h (x_display_ok): Adjust prototype.
12149
12150 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
12151
12152 Drop unnecessary functions that deals with frame pixel size.
12153 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
12154 (x_pixel_height): Drop prototypes.
12155 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
12156 (x_pixel_height): Drop implementations.
12157 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
12158 which should be always valid for window frame.
12159 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
12160 * w32menu.c (Fx_popup_dialog):
12161 * xmenu.c (Fx_popup_dialog): Likewise for both.
12162
12163 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
12164
12165 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
12166 frame parameters and call to Fmodify_frame_parameters just once.
12167 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
12168 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
12169 and mention nil frame in docstring.
12170
12171 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
12172
12173 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
12174 (x_figure_window_size): Likewise. Adjust to return long.
12175 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
12176 (toplevel): Move Qterminal_live_p to...
12177 * terminal.c (toplevel): ...here, make it static, and...
12178 (syms_of_terminal): ...DEFSYM here.
12179 * frame.h (Qterminal_live_p): Remove declaration.
12180 (make_frame, x_figure_window_size): Adjust prototype.
12181 * nsfns.m (Fx_create_frame): Use long for window flags.
12182
12183 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
12184
12185 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
12186 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
12187 Do not assume that emacs_close (INT_MAX) is a no-op.
12188
12189 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
12190
12191 * xfaces.c (make_face_cache): For struct face_cache, prefer
12192 xmalloc to xzalloc and so avoid redundant call to memset.
12193 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
12194
12195 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
12196
12197 * fringe.c (draw_window_fringes, update_window_fringes)
12198 (compute_fringe_widths):
12199 * w32term.c (x_draw_glyph_string):
12200 * window.c (candidate_window_p, Frecenter):
12201 * xfaces.c (realize_basic_faces, realize_default_face)
12202 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
12203 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
12204 * xfns.c (x_set_cursor_color, xic_free_xfontset):
12205 * xmenu.c (Fx_menu_bar_open_internal):
12206 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
12207 * xsettings.c (xft_settings_event):
12208 * xterm.c (x_draw_glyph_string, x_had_errors_p):
12209 Use bool for booleans. Adjust style and comments where
12210 appropriate.
12211 * dispextern.h (draw_window_fringes, update_window_fringes)
12212 (compute_fringe_widths):
12213 * xterm.h (x_had_errors_p): Adjust prototype.
12214
12215 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
12216
12217 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
12218 CHECK_LIST. Rewrite the loop to avoid useless local variable.
12219
12220 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
12221
12222 * fns.c (toplevel): Remove comment before Fsafe_length because
12223 it checks for QUIT.
12224
12225 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
12226
12227 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
12228
12229 2013-07-28 Eli Zaretskii <eliz@gnu.org>
12230
12231 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
12232 frame which got the message is still alive, before dereferencing
12233 its pointer. (Bug#14970)
12234
12235 * frame.c (delete_frame): Test "this" frame's minibuffer window to
12236 be a live window, before using it as such. (Bug#14970)
12237
12238 2013-07-27 Eli Zaretskii <eliz@gnu.org>
12239
12240 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
12241 w32_detect_focus_change instead of doing part of its job by hand.
12242 This fixes the problem whereby FOCUS_OUT events were not sent to
12243 the event queue.
12244
12245 2013-07-26 Eli Zaretskii <eliz@gnu.org>
12246
12247 * process.c (Fprocess_list): Doc fix.
12248
12249 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
12250 being re-exposed only if it didn't ask to become visible.
12251 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
12252 was previously iconified. (Bug#14841)
12253 (x_iconify_frame): Mark the frame iconified.
12254
12255 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
12256
12257 Fix minor problems found by static checking.
12258 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
12259 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
12260
12261 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
12262
12263 * eval.c (set_specpdl_old_value): New function.
12264 (unbind_to): Minor simplification.
12265 (get_backtrace_frame): New function.
12266 (Fbacktrace_frame): Use it. Add `base' argument.
12267 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
12268 (syms_of_eval): Export backtrace-eval.
12269 * xterm.c (x_focus_changed): Simplify.
12270
12271 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
12272
12273 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
12274
12275 2013-07-24 Eli Zaretskii <eliz@gnu.org>
12276
12277 * xdisp.c (redisplay_window): Instead of moving point out of
12278 scroll margin, reject the force_start method, and try scrolling
12279 instead. (Bug#14780)
12280
12281 2013-07-24 Ken Brown <kbrown@cornell.edu>
12282
12283 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
12284 (Bug#14944).
12285
12286 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
12287
12288 * eval.c (Fprogn): Do not check that BODY is a proper list.
12289 This undoes the previous change. The check slows down the
12290 interpreter, and is not needed to prevent a crash. See
12291 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
12292
12293 2013-07-23 Glenn Morris <rgm@gnu.org>
12294
12295 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
12296
12297 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
12298
12299 Port to GNU/Linux systems with tinfo but not ncurses.
12300 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
12301 to decide whether ncurses is being used. Without this change,
12302 GCC complains about tgetent not being declared, on a system
12303 that has tinfo installed but ncurses not installed.
12304
12305 * eval.c (Fprogn): Check that BODY is a proper list.
12306
12307 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
12308 * data.c (Fsetq_default):
12309 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
12310 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
12311 (Fcondition_case):
12312 Tune by taking advantage of the fact that ARGS is always a list
12313 when a function is declared to have UNEVALLED args.
12314
12315 * emacsgtkfixed.c: Port to GCC 4.6.
12316 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
12317
12318 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
12319
12320 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
12321 here to silence compiler warnings.
12322
12323 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
12324
12325 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
12326 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
12327 from messing up Emacs's 'struct frame' (Bug#14923).
12328
12329 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
12330
12331 * alloc.c (make_save_ptr_ptr): Define this function.
12332 It was inadvertently omitted. It's needed only if
12333 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
12334
12335 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
12336
12337 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
12338 frame have focus (Bug#14895).
12339
12340 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
12341
12342 Avoid vfork-related deadlock more cleanly.
12343 * callproc.c (child_setup): When the child's exec fails, output
12344 the program name, as that's more useful. Use O_NONBLOCK to avoid
12345 deadlock.
12346 * process.c (create_process_1): Remove; no longer needed.
12347 (create_process): Remove timer hack; no longer needed, now that
12348 the child avoids deadlock.
12349
12350 2013-07-20 Glenn Morris <rgm@gnu.org>
12351
12352 * image.c (Fimage_flush): Fix doc typo.
12353
12354 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
12355
12356 Fix array bounds violation when pty allocation fails.
12357 * process.c (PTY_NAME_SIZE): New constant.
12358 (pty_name): Remove static variable; it's now auto.
12359 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
12360 Take pty_name as an arg rather than using a static variable.
12361 All callers changed.
12362 (create_process): Recover pty_flag from process, not from volatile local.
12363 (create_pty): Stay inside array even when pty allocation fails.
12364 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
12365
12366 * lread.c (Fload): Avoid initialization only when lint checking.
12367 Mention that it's needed only for older GCCs.
12368
12369 2013-07-20 Kenichi Handa <handa@gnu.org>
12370
12371 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
12372 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
12373
12374 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
12375
12376 * lread.c (Fload): Avoid uninitialized warning.
12377
12378 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
12379
12380 Fix some minor file descriptor leaks and related glitches.
12381 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
12382 (create_lock_file): Use write, not emacs_write.
12383 * image.c (slurp_file, png_load_body):
12384 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
12385 (server_accept_connection):
12386 Don't leak an fd on memory allocation failure.
12387 * image.c (slurp_file): Add a cheap heuristic for growing files.
12388 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
12389 as that's what the other routines do. Maybe input need not be
12390 blocked at all, but it's better to be consistent.
12391 Avoid undefined behavior when strlen is zero.
12392
12393 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
12394 (NSTATICS): Now a constant; doesn't need to be a macro.
12395
12396 2013-07-19 Richard Stallman <rms@gnu.org>
12397
12398 * coding.c (decode_coding_utf_8): Add simple loop for fast
12399 processing of ASCII characters.
12400
12401 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
12402
12403 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
12404
12405 2013-07-19 Eli Zaretskii <eliz@gnu.org>
12406
12407 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
12408 unportable 'struct x_display_info'.
12409 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
12410 is a portable type.
12411
12412 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
12413
12414 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
12415 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
12416 or fscanf fails.
12417 (system_process_attributes): Prefer plain char to unsigned char
12418 when either will do. Clean up properly if interrupted or if
12419 memory allocations fail. Don't assume sscanf succeeds.
12420 Remove no-longer-needed workaround to stop GCC from whining.
12421 Read command-line once, instead of multiple times. Check read status a
12422 bit more carefully.
12423
12424 Fix obscure porting bug with varargs functions.
12425 The code assumed that int is treated like ptrdiff_t in a vararg
12426 function, which is not a portable assumption. There was a similar
12427 -- though these days less likely -- porting problem with various
12428 assumptions that pointers of different types all smell the same as
12429 far as vararg functions is conserved. To make this problem less
12430 likely in the future, redo the API to use varargs functions.
12431 * alloc.c (make_save_value): Remove this vararg function.
12432 All uses changed to ...
12433 (make_save_int_int_int, make_save_obj_obj_obj_obj)
12434 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
12435 New functions.
12436 (make_save_ptr): Rename from make_save_pointer, for consistency with
12437 the above. Define only on platforms that need it. All uses changed.
12438
12439 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
12440
12441 * keyboard.c: Try to fix typos in previous change.
12442 (DISPLAY_LIST_INFO): New macro.
12443 (kbd_buffer_get_event): Do not access members that are not present
12444 in X11. Revert inadvertent change of "!=" to "=".
12445
12446 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
12447
12448 * keyboard.c (kbd_buffer_get_event):
12449 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
12450 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
12451
12452 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
12453
12454 * filelock.c: Fix unlikely file descriptor leaks.
12455 (get_boot_time_1): Rework to avoid using emacs_open.
12456 This doesn't actually fix a leak, but is better anyway.
12457 (read_lock_data): Use read, not emacs_read.
12458
12459 * doc.c: Fix minor memory and file descriptor leaks.
12460 * doc.c (get_doc_string): Fix memory leak when doc file absent.
12461 (get_doc_string, Fsnarf_documentation):
12462 Fix file descriptor leak on error.
12463
12464 * term.c: Fix minor fdopen-related file descriptor leaks.
12465 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
12466 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
12467
12468 * charset.c: Fix file descriptor leaks and errno issues.
12469 Include <errno.h>.
12470 (load_charset_map_from_file): Don't leak file descriptor on error.
12471 Use plain record_xmalloc since the allocation is larger than
12472 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
12473 of entries.
12474 * eval.c (record_unwind_protect_nothing):
12475 * fileio.c (fclose_unwind):
12476 New functions.
12477 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
12478 The replacement doesn't block input, but that no longer seems
12479 necessary.
12480
12481 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
12482
12483 * lread.c: Fix file descriptor leaks and errno issues.
12484 (Fload): Close some races that leaked fds or streams when 'load'
12485 was interrupted.
12486 (Fload, openp): Report error number of last nontrivial failure to open.
12487 ENOENT counts as trivial.
12488 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
12489 New functions.
12490 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
12491 now that the function is always called with a nonnegative arg.
12492 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
12493 All uses replaced with ...
12494 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
12495
12496 A few more minor file errno-reporting bugs.
12497 * callproc.c (Fcall_process):
12498 * doc.c (Fsnarf_documentation):
12499 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
12500 * process.c (set_socket_option):
12501 Don't let a constructor trash errno.
12502 * doc.c: Include <errno.h>.
12503
12504 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
12505
12506 * w32fns.c (unwind_create_tip_frame): Fix declaration.
12507
12508 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
12509
12510 Fix w32 bug with call-process-region (Bug#14885).
12511 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
12512 to Fcall_process when the input is empty. This simplifies the
12513 code a bit. It makes no difference on POSIXish platforms but
12514 apparently it fixes a bug on w32.
12515
12516 Fix bug where insert-file-contents closes a file twice (Bug#14839).
12517 * fileio.c (close_file_unwind): Don't close if FD is negative;
12518 this can happen when unwinding a zapped file descriptor.
12519 (Finsert_file_contents): Unwind-protect the fd before the point marker,
12520 in case Emacs runs out of memory between the two unwind-protects.
12521 Don't trash errno when closing FD.
12522 Zap the FD in the specpdl when closing it, instead of deferring
12523 the removal of the unwind-protect; this fixes a bug where a child
12524 function unwinds the stack past us.
12525
12526 New unwind-protect flavors to better type-check C callbacks.
12527 This also lessens the need to write wrappers for callbacks,
12528 and the need for make_save_pointer.
12529 * alloc.c (free_save_value):
12530 * atimer.c (run_all_atimers):
12531 Now extern.
12532 * alloc.c (safe_alloca_unwind):
12533 * atimer.c (unwind_stop_other_atimers):
12534 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
12535 * menu.c (cleanup_popup_menu) [HAVE_NS]:
12536 * minibuf.c (choose_minibuf_frame_1):
12537 * process.c (make_serial_process_unwind):
12538 * xdisp.c (pop_message_unwind):
12539 * xselect.c (queue_selection_requests_unwind):
12540 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
12541 * alloc.c (record_xmalloc):
12542 Prefer record_unwind_protect_ptr to record_unwind_protect with
12543 make_save_pointer.
12544 * alloc.c (Fgarbage_collect):
12545 Prefer record_unwind_protect_void to passing a dummy.
12546 * buffer.c (restore_buffer):
12547 * window.c (restore_window_configuration):
12548 * xfns.c, w32fns.c (do_unwind_create_frame)
12549 New wrapper. All record-unwind uses of wrappee changed.
12550 * buffer.c (set_buffer_if_live):
12551 * callproc.c (call_process_cleanup, delete_temp_file):
12552 * coding.c (code_conversion_restore):
12553 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
12554 * editfns.c (save_excursion_restore)
12555 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
12556 (save_restriction_restore):
12557 * eval.c (restore_stack_limits, un_autoload):
12558 * fns.c (require_unwind):
12559 * keyboard.c (recursive_edit_unwind, tracking_off):
12560 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
12561 * macros.c (pop_kbd_macro, restore_menu_items):
12562 * nsfns.m (unwind_create_frame):
12563 * print.c (print_unwind):
12564 * process.c (start_process_unwind):
12565 * search.c (unwind_set_match_data):
12566 * window.c (select_window_norecord, select_frame_norecord):
12567 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
12568 (fast_set_selected_frame):
12569 * xfns.c, w32fns.c (unwind_create_tip_frame):
12570 Return void, not a dummy Lisp_Object. All uses changed.
12571 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
12572 * callproc.c (call_process_kill):
12573 * fileio.c (restore_point_unwind, decide_coding_unwind)
12574 (build_annotations_unwind):
12575 * insdel.c (Fcombine_after_change_execute_1):
12576 * keyboard.c (read_char_help_form_unwind):
12577 * menu.c (unuse_menu_items):
12578 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
12579 * sound.c (sound_cleanup):
12580 * xdisp.c (unwind_redisplay):
12581 * xfns.c (clean_up_dialog):
12582 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
12583 Accept no args and return void, instead of accepting and returning
12584 a dummy Lisp_Object. All uses changed.
12585 * cygw32.c (fchdir_unwind):
12586 * fileio.c (close_file_unwind):
12587 * keyboard.c (restore_kboard_configuration):
12588 * lread.c (readevalllop_1):
12589 * process.c (wait_reading_process_output_unwind):
12590 Accept int and return void, rather than accepting an Emacs integer
12591 and returning a dummy object. In some cases this fixes an
12592 unlikely bug when the corresponding int is outside Emacs integer
12593 range. All uses changed.
12594 * dired.c (directory_files_internal_unwind):
12595 * fileio.c (do_auto_save_unwind):
12596 * gtkutil.c (pop_down_dialog):
12597 * insdel.c (reset_var_on_error):
12598 * lread.c (load_unwind):
12599 * xfns.c (clean_up_file_dialog):
12600 * xmenu.c, nsmenu.m (pop_down_menu):
12601 * xmenu.c (cleanup_widget_value_tree):
12602 * xselect.c (wait_for_property_change_unwind):
12603 Accept pointer and return void, rather than accepting an Emacs
12604 save value encapsulating the pointer and returning a dummy object.
12605 All uses changed.
12606 * editfns.c (Fformat): Update the saved pointer directly via
12607 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
12608 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
12609 (unwind_body): New function.
12610 (record_unwind_protect): First arg is now a function returning void,
12611 not a dummy Lisp_Object.
12612 (record_unwind_protect_ptr, record_unwind_protect_int)
12613 (record_unwind_protect_void): New functions.
12614 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
12615 * fileio.c (struct auto_save_unwind): New type.
12616 (do_auto_save_unwind): Use it.
12617 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
12618 * insdel.c (struct rvoe_arg): New type.
12619 (reset_var_on_error): Use it.
12620 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
12621 New constants.
12622 (specbinding_func): Remove; there are now several such functions.
12623 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
12624 (set_unwind_protect_ptr): New function.
12625 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
12626
12627 Be simpler and more consistent about reporting I/O errors.
12628 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
12629 Say "Read error" and "Write error", rather than "I/O error", or
12630 "IO error reading", or "IO error writing", when a read or write
12631 error occurs.
12632 * process.c (Fmake_network_process, wait_reading_process_output)
12633 (send_process, Fprocess_send_eof, wait_reading_process_output):
12634 Capitalize diagnostics consistently. Put "failed foo" at the
12635 start of the diagnostic, so that we don't capitalize the
12636 function name "foo". Consistently say "failed" for such
12637 diagnostics.
12638 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
12639 All callers changed. This is so it can use report_file_error.
12640 * sysdep.c (serial_open, serial_configure): Capitalize I/O
12641 diagnostics consistently as above.
12642
12643 * fileio.c (report_file_errno): Fix errno reporting bug.
12644 If the file name is neither null nor a pair, package it up as a
12645 singleton list. All callers changed, both to this function and to
12646 report_file_error. This fixes a bug where the memory allocator
12647 invoked by list1 set errno so that the immediately following
12648 report_file_error reported the wrong errno value.
12649
12650 Fix minor problems found by --enable-gcc-warnings.
12651 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
12652 * keyboard.c (kbd_buffer_get_event): Remove unused local.
12653
12654 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
12655
12656 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
12657 Set event->arg to Qt if switch-event shall be generated.
12658 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
12659
12660 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
12661
12662 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
12663 FOCUS_OUT_EVENT.
12664
12665 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
12666 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
12667 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
12668 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
12669 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
12670 and there is a focused frame.
12671 (head_table): Add focus-in and focus-out.
12672 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
12673 bind to handle-focus-in/out.
12674
12675 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
12676 (Fhandle_switch_frame): Call Fhandle_focus_in.
12677 (syms_of_frame): defsubr handle-focus-in/out.
12678
12679 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
12680
12681 Fix porting bug to older POSIXish platforms (Bug#14862).
12682 * sysdep.c (emacs_pipe): New function, that implements
12683 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
12684 This should port better to CentOS 5 and to Mac OS X 10.6.
12685 All calls to pipe2 changed.
12686
12687 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
12688 This makes the code easier to read and the executable a bit smaller.
12689 Do not replace all calls to Fcons that happen to create lists,
12690 just calls that are intended to create lists. For example, when
12691 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
12692 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
12693 Similarly for list2 through list5.
12694 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
12695 * bytecode.c (exec_byte_code):
12696 * callint.c (quotify_arg, Fcall_interactively):
12697 * callproc.c (Fcall_process, create_temp_file):
12698 * charset.c (load_charset_map_from_file)
12699 (Fdefine_charset_internal, init_charset):
12700 * coding.c (get_translation_table, detect_coding_system)
12701 (Fcheck_coding_systems_region)
12702 (Fset_terminal_coding_system_internal)
12703 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
12704 * composite.c (update_compositions, Ffind_composition_internal):
12705 * dired.c (directory_files_internal, file_name_completion)
12706 (Fsystem_users):
12707 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
12708 * doc.c (Fsnarf_documentation):
12709 * editfns.c (Fmessage_box):
12710 * emacs.c (main):
12711 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
12712 (Feval, eval_sub, Ffuncall, apply_lambda):
12713 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
12714 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
12715 (Fset_file_times, Finsert_file_contents)
12716 (Fchoose_write_coding_system, Fwrite_region):
12717 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
12718 * font.c (font_registry_charsets, font_parse_fcname)
12719 (font_prepare_cache, font_update_drivers, Flist_fonts):
12720 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
12721 * frame.c (make_frame, Fmake_terminal_frame)
12722 (x_set_frame_parameters, x_report_frame_params)
12723 (x_default_parameter, Fx_parse_geometry):
12724 * ftfont.c (syms_of_ftfont):
12725 * image.c (gif_load):
12726 * keyboard.c (command_loop_1):
12727 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
12728 (Fcopy_keymap, append_key, Fcurrent_active_maps)
12729 (Fminor_mode_key_binding, accessible_keymaps_1)
12730 (Faccessible_keymaps, Fwhere_is_internal):
12731 * lread.c (read_emacs_mule_char):
12732 * menu.c (find_and_return_menu_selection):
12733 * minibuf.c (get_minibuffer):
12734 * nsfns.m (Fns_perform_service):
12735 * nsfont.m (ns_script_to_charset):
12736 * nsmenu.m (ns_popup_dialog):
12737 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
12738 (Fx_own_selection_internal):
12739 * nsterm.m (append2):
12740 * print.c (Fredirect_debugging_output)
12741 (print_prune_string_charset):
12742 * process.c (Fdelete_process, Fprocess_contact)
12743 (Fformat_network_address, set_socket_option)
12744 (read_and_dispose_of_process_output, write_queue_push)
12745 (send_process, exec_sentinel):
12746 * sound.c (Fplay_sound_internal):
12747 * textprop.c (validate_plist, add_properties)
12748 (Fput_text_property, Fadd_face_text_property)
12749 (copy_text_properties, text_property_list, syms_of_textprop):
12750 * unexaix.c (report_error):
12751 * unexcoff.c (report_error):
12752 * unexsol.c (unexec):
12753 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
12754 (Fformat_mode_line, syms_of_xdisp):
12755 * xfaces.c (set_font_frame_param)
12756 (Finternal_lisp_face_attribute_values)
12757 (Finternal_merge_in_global_face, syms_of_xfaces):
12758 * xfns.c (x_default_scroll_bar_color_parameter)
12759 (x_default_font_parameter, x_create_tip_frame):
12760 * xfont.c (xfont_supported_scripts):
12761 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
12762 (menu_help_callback, xmenu_show):
12763 * xml.c (make_dom):
12764 * xterm.c (set_wm_state):
12765 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
12766 and similarly for list2 through list5.
12767
12768 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
12769
12770 * callproc.c (Fcall_process_region): Fix minor race and tune.
12771 (create_temp_file): New function, with the temp-file-creation part
12772 of the old Fcall_process_region. Use Fcopy_sequence to create the
12773 temp file name, rather than alloca + build_string, for simplicity.
12774 Don't bother to block input around the temp file creation;
12775 shouldn't be needed. Simplify use of mktemp.
12776 Use record_unwind_protect immediately after creating the temp file;
12777 this closes an unlikely race where the temp file was not removed.
12778 Use memcpy rather than an open-coded loop.
12779 (Fcall_process_region): Use the new function. If the input is
12780 empty, redirect from /dev/null rather than from a newly created
12781 empty temp file; this avoids unnecessary file system traffic.
12782
12783 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
12784
12785 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
12786 Simplify by making this case like the other two. This is a bit
12787 slower on obsolete hosts, but the extra complexity isn't worth it.
12788
12789 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
12790 * process.c (create_process) [!DOS_NT]:
12791 Remove now-unnecessary calls to emacs_close.
12792
12793 2013-07-13 Eli Zaretskii <eliz@gnu.org>
12794
12795 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
12796 returning early. (Bug#14850)
12797
12798 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
12799 and inhibit-iso-escape-detection attributes of 'undecided'.
12800 (Bug#14822)
12801
12802 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
12803
12804 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
12805 Reported by Herbert J. Skuhra in
12806 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
12807
12808 Don't lose top specpdl entry when memory is exhausted.
12809 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
12810 specpdl overflow here, to simplify callers; all callers changed.
12811 Always reserve an unused entry at the stack top; this avoids
12812 losing the top entry's information when memory is exhausted.
12813
12814 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
12815
12816 Clean up errno reporting and fix some errno-reporting bugs.
12817 * callproc.c (Fcall_process):
12818 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
12819 * process.c (create_process, Fmake_network_process):
12820 * unexaix.c (report_error):
12821 * unexcoff.c (report_error):
12822 Be more careful about reporting the errno of failed operations.
12823 The code previously reported the wrong errno sometimes.
12824 Also, prefer report_file_errno to setting errno + report_file_error.
12825 (Fcall_process): Look at openp return value rather than at path,
12826 as that's a bit faster and clearer when there's a numeric predicate.
12827 * fileio.c (report_file_errno): New function, with most of the
12828 old contents of report_file_error.
12829 (report_file_error): Use it.
12830 (Ffile_exists_p, Ffile_accessible_directory_p):
12831 Set errno to 0 when it is junk.
12832 * fileio.c (Faccess_file):
12833 * image.c (x_create_bitmap_from_file):
12834 Use faccessat rather than opening the file, to avoid the hassle of
12835 having a file descriptor open.
12836 * lisp.h (report_file_errno): New decl.
12837 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
12838
12839 Minor EBADF fixes.
12840 * process.c (create_process, wait_reading_process_output) [AIX]:
12841 Remove obsolete SIGHUP-related code, as Emacs no longer disables
12842 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
12843 a multithreaded environment anyway).
12844 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
12845
12846 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
12847
12848 * image.c (x_find_image_file): Don't close a remote file handle.
12849
12850 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
12851
12852 Fix races with threads and file descriptors.
12853 * callproc.c (Fcall_process_region):
12854 * dired.c (open_directory):
12855 * emacs.c (main, Fdaemon_initialized):
12856 * image.c (x_find_image_file):
12857 * inotify.c (Finotify_rm_watch):
12858 * lread.c (Flocate_file_internal):
12859 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
12860 * term.c (term_mouse_moveto, init_tty):
12861 * termcap.c (tgetent):
12862 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
12863 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
12864 * unexhp9k800.c, unexmacosx.c (unexec):
12865 * callproc.c (Fcall_process_region):
12866 Use emacs_close, not close.
12867 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
12868 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
12869 and posix_close function on current platforms (which all lack them).
12870 (emacs_close): Use it. This should fix the races on GNU/Linux and
12871 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
12872 and it should avoid closing random victim file descriptors on
12873 other platforms.
12874
12875 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
12876
12877 * inotify.c (uninitialized): Remove. All uses replaced by -1.
12878 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
12879 Touch up doc a bit.
12880
12881 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
12882 This is for .gdbinit xbacktrace.
12883
12884 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
12885 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
12886 (emacs_set_tty): Now static.
12887 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
12888 * term.c (tty_capable_p, tty_default_color_capabilities)
12889 (get_tty_terminal, term_mouse_movement)
12890 (handle_one_term_event, init_tty, maybe_fatal):
12891 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
12892 (tgetent, scan_file, name_match, compare_contin):
12893 * terminal.c (get_terminal):
12894 Use bool for boolean.
12895 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
12896 Prefer char to unsigned char if either will do.
12897 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
12898 (tty_write_glyphs): Prefer int to unsigned.
12899 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
12900 All callers changed.
12901 * termcap.c (tprint, main) [TEST]: Remove non-working test.
12902
12903 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
12904
12905 Port to C89.
12906 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
12907 (B__dummy__): New dummy symbol, to pacify C89.
12908 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
12909 they can't grok varargs macros.
12910 * dispnew.c (add_window_display_history)
12911 (add_frame_display_history):
12912 * print.c (print_object):
12913 * xdisp.c (debug_method_add):
12914 Use %p printf format only for void pointers.
12915 * emacs.c (usage_message): New constant, replacing ...
12916 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
12917 (main): Adjust to usage reorg.
12918 * fns.c (syms_of_fns):
12919 * profiler.c (syms_of_profiler):
12920 Don't use non-constant struct initializers.
12921 * gnutls.h (gnutls_initstage_t):
12922 * lisp.h (enum Lisp_Fwd_Type):
12923 * lread.c (lisp_file_lexically_bound_p):
12924 * xsettings.c (anonymous enum):
12925 Remove trailing comma.
12926 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
12927 * lisp.h (ENUM_BF): Use unsigned if pedantic.
12928 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
12929 (DEFUN): Use it.
12930 * regex.c (const_re_char): New type, to pacify strict C89.
12931 All uses of 'const re_char' replaced to use it.
12932 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
12933 with glibc when strict C89. This change is imported from gnulib.
12934 All uses changed.
12935 (_Restrict_arr_): Rename from __restrict_arr, similarly.
12936 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
12937 Omit GNU_LINUX implementation, since it requires long long.
12938 * xterm.c (x_draw_underwave):
12939 Do not assume the traditional order of struct's members.
12940 (x_term_init): Rewrite to avoid the need for non-constant structure
12941 initializers.
12942
12943 Syntax cleanup, mostly replacing macros with functions.
12944 This removes the need for the syntax_temp hack.
12945 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
12946 * syntax.c (SYNTAX_INLINE): New macro.
12947 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
12948 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
12949 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
12950 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
12951 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
12952 (SYNTAX_COMEND_FIRST): Now functions, not macros.
12953 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
12954 Now constants, not macros.
12955 (syntax_temp) [!__GNUC__]: Remove.
12956 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
12957 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
12958 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
12959 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
12960 Move here from syntax.h; now functions, not macros. Except for the
12961 last function, these are static since only syntax.c uses them.
12962 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
12963 All uses changed. Now a function, not a macro; use this fact
12964 to simplify the code.
12965 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
12966 compiler bugs; no longer relevant.
12967 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
12968 (SYNTAX_INLINE): New macro.
12969 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
12970 for the new functions. Use bool for boolean member.
12971 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
12972 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
12973 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
12974 (SETUP_BUFFER_SYNTAX_TABLE):
12975 Now extern inline functions, not macros.
12976 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
12977 Remove; all uses replaced by implementation.
12978 (syntax_temp) [!__GNUC__]: Remove decl.
12979 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
12980
12981 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
12982
12983 * emacs.c (main): Fix syntax error.
12984
12985 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
12986
12987 Timestamp fixes for undo (Bug#14824).
12988 * atimer.c (schedule_atimer):
12989 * fileio.c (Ffile_newer_than_file_p):
12990 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
12991 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
12992 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
12993 (syms_of_fileio): Remove Sclear_visited_file_name.
12994 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
12995 file doesn't exist; this avoids an ambiguity with negative timestamps.
12996 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
12997 * systime.h (make_emacs_time, invalid_emacs_time):
12998 Don't assume struct timespec layout; POSIX doesn't guarantee it.
12999 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
13000 * undo.c (record_first_change): Push (visited-file-modtime) onto
13001 undo list rather than reimplementing it by hand, incorrectly.
13002
13003 2013-07-09 Ken Brown <kbrown@cornell.edu>
13004
13005 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
13006
13007 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
13008
13009 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
13010
13011 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
13012
13013 Handle errno and exit status a bit more carefully.
13014 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
13015 number into an exit status. Instead, use EXIT_CANCELED.
13016 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
13017 * callproc.c (relocate_fd):
13018 * emacs.c (close_output_streams, main):
13019 * process.c (create_process):
13020 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
13021 Use emacs_perror for simplicity.
13022 * callproc.c (relocate_fd, main):
13023 * sysdep.c (sys_subshell):
13024 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
13025 (shut_down_emacs): Use emacs_write, not write.
13026 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
13027 * fileio.c (Fcopy_file, e_write):
13028 * nsterm.m (ns_select):
13029 * process.c (send_process):
13030 * sound.c (vox_write):
13031 Use emacs_write_sig, not emacs_write.
13032 * lisp.h (emacs_write_sig, emacs_perror): New decls.
13033 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
13034 New constants.
13035 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
13036 of write.
13037 (emacs_full_write): New function.
13038 (emacs_write): Rewrite to use it.
13039 (emacswrite_sig, emacs_perror): New functions.
13040 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
13041
13042 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
13043
13044 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
13045 on NS even if it is present. Pixmap on NS is a void*.
13046
13047 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
13048
13049 Port to Ubuntu 10 (Bug#14803).
13050 Problem reported by T.V. Raman.
13051 * process.c (close_on_exec, accept4, process_socket):
13052 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
13053
13054 2013-07-07 Eli Zaretskii <eliz@gnu.org>
13055
13056 * w32.c (sys_dup): Declare prototype.
13057
13058 * filelock.c:
13059 * emacs.c:
13060 * callproc.c [WINDOWSNT]: Include sys/socket.h.
13061
13062 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
13063
13064 Make file descriptors close-on-exec when possible (Bug#14803).
13065 This simplifies Emacs a bit, since it no longer needs to worry
13066 about closing file descriptors by hand in some cases.
13067 It also fixes some unlikely races. Not all such races, as
13068 libraries often open files internally without setting
13069 close-on-exec, but it's an improvement.
13070 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
13071 * callproc.c (Fcall_process) [!MSDOS]:
13072 * emacs.c (main) [!DOS_NT]:
13073 * nsterm.m (ns_term_init):
13074 * process.c (create_process):
13075 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
13076 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
13077 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
13078 Prefer mkostemp with O_CLOEXEC to mkstemp.
13079 * callproc.c (relocate_fd) [!WINDOWSNT]:
13080 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
13081 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
13082 now using pipe2.
13083 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
13084 Make the resulting file descriptor close-on-exec.
13085 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
13086 * lread.c (load_descriptor_list, load_descriptor_unwind):
13087 Remove; no longer needed. All uses removed.
13088 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
13089 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
13090 New functions.
13091 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
13092 (Fmake_network_process, Fnetwork_interface_list)
13093 (Fnetwork_interface_info, server_accept_connection):
13094 Make newly-created socket close-on-exec.
13095 * sysdep.c (emacs_open, emacs_fopen):
13096 Make new-created descriptor close-on-exec.
13097 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
13098 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
13099
13100 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
13101
13102 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
13103 for NS_IMPL_GNUSTEP.
13104
13105 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
13106
13107 Fix openp errno handling.
13108 * callproc.c (Fcall_process): Preserve openp errno around close.
13109 * lread.c (openp): Set errno when returning -1, as some callers
13110 expect this.
13111
13112 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
13113
13114 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
13115
13116 * nsterm.h (NSSavePanel): Update comment.
13117 (NSAPP_DATA2_RUNFILEDIALOG): Define.
13118 (ns_run_file_dialog): Declare.
13119
13120 * nsfns.m: Remove panelOK.
13121 (ns_fd_data): New.
13122 (ns_run_file_dialog): New function.
13123 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
13124 event loop, so file dialog is popped up by ns_run_file_dialog, called
13125 by sendEvent (Bug#14578).
13126 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
13127
13128 2013-07-06 Eli Zaretskii <eliz@gnu.org>
13129
13130 * xdisp.c (default_line_pixel_height): New function.
13131 (pos_visible_p, move_it_vertically_backward, try_scrolling)
13132 (try_cursor_movement, redisplay_window, try_window)
13133 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
13134
13135 * window.c (window_scroll_pixel_based):
13136 use default_line_pixel_height.
13137
13138 * dispextern.h (default_line_pixel_height): Add prototype.
13139
13140 * frame.c (x_set_line_spacing): Accept a float value for
13141 line-spacing parameter, per the documentation.
13142
13143 * data.c (Fmultibyte_string_p): Doc fix.
13144
13145 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
13146
13147 Use emacs_open more consistently when opening files.
13148 This handles EINTR more consistently now, and makes it easier
13149 to introduce other uniform changes to file descriptor handling.
13150 * sysstdio.h: New file.
13151 * buffer.c (mmap_init):
13152 * cygw32.c (chdir_to_default_directory):
13153 * dispnew.c (Fopen_termscript):
13154 * emacs.c (Fdaemon_initialized):
13155 * fileio.c (Fdo_auto_save):
13156 * image.c (slurp_file, png_load_body, jpeg_load_body):
13157 * keyboard.c (Fopen_dribble_file):
13158 * lread.c (Fload):
13159 * print.c (Fredirect_debugging_output):
13160 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
13161 * termcap.c (tgetent):
13162 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
13163 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
13164 * w32term.c (w32_initialize) [CYGWIN]:
13165 * xfaces.c (Fx_load_color_file):
13166 Use emacs_open instead of plain open, and emacs_fopen instead of
13167 plain fopen.
13168 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
13169 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
13170 * callproc.c (default_output_mode): New constant.
13171 (Fcall_process): Use it to call emacs_open instead of plain creat.
13172 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
13173 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
13174 (emacs_fopen): New function.
13175 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
13176 Include <lisp.h>, for emacs_open.
13177 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
13178
13179 Remove duplicate #include directives.
13180 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
13181 * xfaces.c:
13182 Don't include stdio.h twice.
13183 * buffer.c [USE_MMAP_FOR_BUFFERS]:
13184 Don't include sys/types.h or stdio.h twice.
13185 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
13186 * lread.c: Don't include coding.h twice.
13187 * nsfont.m: Don't include frame.h twice.
13188 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
13189 * ralloc.c: Don't include <unistd.h> twice.
13190 * xdisp.c: Don't include font.h twice.
13191 * xterm.c: Don't include fontset.h twice.
13192 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
13193
13194 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
13195
13196 Scale ImageMagick images more carefully.
13197 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
13198 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
13199 Be more careful about avoiding undefined behavior after
13200 integer overflow and division by zero.
13201
13202 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13203
13204 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
13205 (syms_of_w32fns): DEFSYM them.
13206 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
13207 (CCHDEVICENAME): Define macros if not defined.
13208 (struct MONITOR_INFO_EX): New struct.
13209 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
13210 (enum_display_monitors_fn): New variable.
13211 (globals_of_w32fns): Initialize it.
13212 (Fx_display_pixel_width, Fx_display_pixel_height)
13213 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
13214 multi-monitor setups in docstrings.
13215 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
13216 screen size by primary monitor's millimeter per pixel.
13217 (w32_monitor_enum, w32_display_monitor_attributes_list)
13218 (w32_display_monitor_attributes_list_fallback)
13219 (Fw32_display_monitor_attributes_list): New functions.
13220 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
13221
13222 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
13223 if not defined.
13224 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
13225
13226 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
13227
13228 * fileio.c (Qfile_notify_error): New error symbol.
13229
13230 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
13231 * inotify.c (inotify_callback, symbol_to_inotifymask)
13232 (Finotify_add_watch, Finotify_rm_watch): Use it.
13233 (inotifyevent_to_event): Exchange order of cookie and file name.
13234 (Finotify_add_watch): Adapt docstring.
13235
13236 * lisp.h (Qfile_notify_error): Declare.
13237
13238 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
13239
13240 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
13241 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
13242 Do not clear _malloc_thread_enabled_p, undoing the previous change,
13243 which did not work (see <http://bugs.gnu.org/14569#307>).
13244 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
13245 && (!noninteractive || initialized)). This attempts to thread
13246 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
13247
13248 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
13249
13250 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
13251 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
13252
13253 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
13254
13255 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
13256 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
13257 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
13258 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
13259
13260 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
13261
13262 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
13263 Define to __sys_siglist.
13264
13265 2013-07-02 Eli Zaretskii <eliz@gnu.org>
13266
13267 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
13268 word-wrap, so that overflow-newline-into-fringe would work in
13269 visual-line-mode. (Bug#2749)
13270 (move_it_in_display_line_to): When the last scanned display
13271 element fits exactly on the display line, and
13272 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
13273 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
13274 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
13275 finding buffer position that corresponds to pixel coordinates,
13276 e.g. in buffer_posn_from_coords.
13277
13278 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
13279
13280 * process.c (handle_child_signal): Call catch_child_signal if
13281 NS_IMPL_GNUSTEP.
13282
13283 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
13284
13285 Don't convert function pointers to void * and back.
13286 It isn't portable C, and it's easy enough to avoid.
13287 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
13288 (make_save_value): Add support for SAVE_FUNCPOINTER.
13289 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
13290 * print.c (print_object):
13291 Distinguish function from object pointers.
13292 * lisp.h (SAVE_FUNCPOINTER): New constant.
13293 (SAVE_SLOT_BITS): Adjust to it.
13294 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
13295 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
13296 (voidfuncptr): New typedef.
13297 (struct Lisp_Save_Value): New member data[0].funcpointer.
13298 (XSAVE_FUNCPOINTER): New function.
13299
13300 Simplify buildobj processing.
13301 * Makefile.in (buildobj.h): Make it a sequence of strings each
13302 followed by comma, rather than a single string. Put it into a
13303 .tmp file in case there's an error while generating it.
13304 (gl-stamp): Use .tmp for temp files.
13305 (mostlyclean): Clean .tmp files.
13306 * doc.c (buildobj): Move to just the routine that needs it.
13307 It's now an array of strings, so processing is simpler.
13308
13309 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
13310
13311 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
13312 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
13313 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
13314 Invoke malloc_enable_thread even when not interactive.
13315 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
13316 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
13317 in this case, since the underlying bug has now been fixed.
13318
13319 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
13320
13321 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
13322 unlinking it (bug#14691).
13323
13324 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
13325
13326 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
13327 before checking whether buffer is modified. This lets
13328 `kill-buffer-query-functions' cancel killing of the buffer or save
13329 its content before `kill-buffer' asks user the "Buffer %s
13330 modified; kill anyway?" question.
13331
13332 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
13333
13334 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
13335 Let the super performKeyEquivalent deal with them (Bug#14747).
13336
13337 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
13338
13339 * widget.c (resize_cb): Remove unused local.
13340
13341 Do not use GTK 3 if it exists but cannot be compiled.
13342 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
13343 * xterm.c (x_error_handler) [!USE_GTK]:
13344 Do not use GTK 3.
13345
13346 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
13347
13348 2013-06-30 Eli Zaretskii <eliz@gnu.org>
13349
13350 * intervals.c (get_local_map): Instead of aborting, clip POSITION
13351 to the valid range of values. (Bug#14753)
13352
13353 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
13354 when moving point by using the current glyph matrix. This avoids
13355 the need to force redisplay when this function is called in a
13356 loop.
13357
13358 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
13359
13360 Fix minor problems found by static checking.
13361 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
13362 Redo the latter's body to sidestep GCC parenthesization warnings.
13363 (setup_coding_system, detect_coding, detect_coding_system): Use them.
13364 * coding.c (detect_coding, detect_coding_system):
13365 * coding.h (struct undecided_spec):
13366 Use bool for boolean.
13367 * image.c (QCmax_width, QCmax_height): Now static.
13368 * xdisp.c (Fmove_point_visually): Remove unused local.
13369
13370 2013-06-29 Eli Zaretskii <eliz@gnu.org>
13371
13372 * xdisp.c (Fmove_point_visually): New function.
13373
13374 2013-06-28 Kenichi Handa <handa@gnu.org>
13375
13376 * coding.h (define_coding_undecided_arg_index): New enum.
13377 (coding_attr_index): New members
13378 coding_attr_undecided_inhibit_null_byte_detection,
13379 coding_attr_undecided_inhibit_iso_escape_detection,
13380 coding_attr_undecided_prefer_utf_8.
13381 (undecided_spec): New struct.
13382 (struct coding_system): New member `undecided' of the member
13383 `spec'.
13384
13385 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
13386 (detect_coding): Likewise.
13387 (detect_coding_system): Likewise.
13388 (Fdefine_coding_system_internal): New coding system properties
13389 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
13390 :prefer-utf-8.
13391 (syms_of_coding): Adjust for coding_arg_undecided_max.
13392
13393 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
13394
13395 * image.c (x_from_xcolors): Remove unused local.
13396
13397 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13398
13399 Defer image data transfer between X client and server until actual
13400 display happens.
13401
13402 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
13403 and `mask_img'.
13404
13405 * image.c (Destroy_Image): Remove.
13406 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
13407 `mask_p', and `colors_p'. All uses changed.
13408 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
13409 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
13410 New macros for `flags' arg to x_clear_image_1.
13411 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
13412 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
13413 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
13414 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
13415 (image_get_x_image, image_unget_x_image): New functions or macros.
13416 (image_background, image_background_transparent, x_to_xcolors)
13417 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
13418 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
13419 instead of Destroy_Image.
13420 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
13421 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
13422 (png_load_body, jpeg_load_body, tiff_load, gif_load)
13423 (imagemagick_load_image, svg_load_image): Use them instead of
13424 x_create_x_image_and_pixmap, and x_put_x_image followed by
13425 x_destroy_x_image, respectively.
13426 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
13427 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
13428 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
13429 background_transparent fields.
13430 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
13431 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
13432
13433 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
13434
13435 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
13436 This mostly consists of undoing recent changes.
13437 * callproc.c (Fcall_process):
13438 * process.c (create_process):
13439 Do not worry about catching SIGCHLD here, undoing previous change.
13440 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
13441 * process.c, process.h (catch_child_signal):
13442 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
13443 * process.c (catch_child_handler): Don't worry about being called
13444 lazily and do not assume caller has blocked SIGCHLD, undoing
13445 previous change. Move first-time stuff back to
13446 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
13447 tickle glib, as that causes Cygwin bootstrap to fail. Do not
13448 set lib_child_handler if it's already initialized, which may
13449 help avoid problems on GNUstep.
13450
13451 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
13452
13453 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
13454 * callproc.c (Fcall_process):
13455 * process.c (create_process):
13456 Make sure SIGCHLD is caught before we fork,
13457 since Emacs startup no arranges to catch SIGCHLD.
13458 * process.c (lib_child_handler): Initialize to null, not to
13459 dummy_handler.
13460 (catch_child_signal): Allow self to be called lazily.
13461 Do nothing if it's already been called.
13462 Assume caller has blocked SIGCHLD (all callers do now).
13463 * emacs.c (main): Do not catch SIGCHLD here; defer it until
13464 just before it's really needed.
13465 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
13466 since it hasn't been caught yet.
13467
13468 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
13469
13470 * image.c (compute_image_size): New function to implement
13471 :max-width and :max-height.
13472 (imagemagick_load_image): Use it.
13473
13474 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
13475
13476 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
13477 * callproc.c, process.h (block_child_signal, unblock_child_signal):
13478 Now extern.
13479 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
13480 * process.c (catch_child_signal): Block SIGCHLD while futzing with
13481 the SIGCHLD handler, since the code is not atomic and (due to glib)
13482 signals may be arriving now.
13483 * sysdep.c (init_signals): Do not catch child signals here;
13484 'main' now does that later, at a safer time.
13485
13486 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
13487
13488 Clean up SIGCHLD handling a bit (Bug#14569).
13489 * process.c, process.h (catch_child_signal):
13490 Now always extern, even if !NS_IMPL_GNUSTEP.
13491 * process.c (catch_child_signal): Move glib tickler here from
13492 init_process_emacs, so that it's done earlier in Emacs
13493 initialization. Also move the noninteractive && !initialized
13494 check here from init_process_emacs. This is all a bit cleaner for
13495 GNUish platforms, and I hope it works around the Cygwin bug.
13496 * sysdep.c (init_signals): Invoke catch_child_signal here, so
13497 that glib signal handling is tickled before glib creates threads.
13498
13499 * process.c (wait_reading_process_output): Avoid int overflow
13500 when reading more than 2 GiB total from a process.
13501
13502 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
13503
13504 * process.c (create_process): Handle a couple more cases,
13505 i.e., work even if new_argv and wait_child_setup[i] are cached.
13506 Use Fcall_process's style for volatile vars.
13507
13508 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
13509
13510 * process.c (create_process): Mark PROCESS volatile.
13511
13512 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
13513
13514 Use C99-style flexible array members if available.
13515 This avoids some subtle aliasing issues, which typically
13516 aren't a problem with GCC but may be a problem elsewhere.
13517 * alloc.c (sdata): New typedef, replacing the old struct sdata.
13518 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
13519 In either case, it uses a flexible array member rather than
13520 the old struct hack. All uses changed.
13521 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
13522 Adjust to sdata reorganization.
13523 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
13524 Use offsetof (struct, flex_array_member), not sizeof (struct), as
13525 that ports better to pre-C99 non-GCC.
13526 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
13527 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
13528 as the latter has changed.
13529 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
13530 and port better to pre-C99 GCC.
13531 * image.c (struct xpm_cached_color):
13532 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
13533 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
13534 Use FLEXIBLE_ARRAY_MEMBER.
13535 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
13536 Move decl to top level so it gets checked against implementation.
13537 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
13538 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
13539
13540 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
13541
13542 * syntax.c: Integer cleanups.
13543 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
13544 All uses that need 0-or-2 changed to:
13545 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
13546 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
13547 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
13548 (char_quoted, prev_char_comend_first, back_comment)
13549 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
13550 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
13551 Use bool for boolean.
13552 (update_syntax_table, skip_chars, skip_syntaxes):
13553 Prefer int to unsigned when either will do.
13554 (back_comment): Return boolean success flag, like forw_comment,
13555 instead of positive-or-minus-1 (which might have overflowed int anyway).
13556 Don't stuff ptrdiff_t into int.
13557 (syntax_spec_code, syntax_code_spec): Now const.
13558 (Fmatching_paren, scan_lists, scan_sexps_forward):
13559 Use enum syntaxcode for syntax code.
13560 (Fmatching_paren): Check that arg is a character, not just an integer.
13561 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
13562 (Finternal_describe_syntax_value): Omit no-longer-needed
13563 comparison to 0.
13564 (skip_chars): Use char, not unsigned char, when the distinction
13565 doesn't matter.
13566 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
13567 * bytecode.c (exec_byte_code):
13568 * syntax.c (syntax_spec_code, Fchar_syntax)
13569 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
13570 (init_syntax_once):
13571 * syntax.h (SYNTAX_WITH_FLAGS):
13572 Omit unnecessary casts.
13573
13574 2013-06-20 Eli Zaretskii <eliz@gnu.org>
13575
13576 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
13577 line dimensions here, to avoid race conditions with the main
13578 thread. (Bug#14062, bug#14630, bug#14669)
13579
13580 * w32term.c (w32_draw_window_cursor): Compute the header line and
13581 mode line dimensions here.
13582 <w32_system_caret_window, w32_system_caret_hdr_height>:
13583 <w32_system_caret_mode_height>: New variables.
13584
13585 * w32term.h: Declare them.
13586
13587 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
13588
13589 * alloc.c (die): Move "assertion failed" string here ...
13590 * lisp.h (eassert): ... from here. Also, suppress evaluation of
13591 COND when SUPPRESS_CHECKING. This shrinks the executable text
13592 size by 0.8% to 2.2% when configured with --enable-checking,
13593 depending on optimization flags (GCC 4.8.1 x86-64).
13594
13595 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
13596
13597 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
13598
13599 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
13600 base is 2; this is more accurate.
13601
13602 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
13603
13604 * sound.c (string_default): Move to !WINDOWSNT section.
13605 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
13606
13607 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
13608
13609 * sound.c: Integer cleanups.
13610 Remove unnecessary forward decls.
13611 (struct sound_device): The 'file' member is now a Lisp_Object, not
13612 a char *, so that we needn't invoke alloca on a huge size.
13613 (Fplay_sound_internal): Adjust to this.
13614 (string_default): New function.
13615 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
13616 Use it to adjust to the struct sound_device change.
13617 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
13618 (be2hs) [0]: Remove.
13619
13620 * syntax.c (skip_chars): Don't use uninitialized storage
13621 when searching a multibyte buffer for characters that are not in a
13622 unibyte string that contains non-ASCII characters.
13623
13624 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
13625
13626 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
13627 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
13628
13629 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
13630
13631 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
13632
13633 2013-06-18 Kenichi Handa <handa@gnu.org>
13634
13635 * font.c (Ffont_spec): Signal an error for an invalid font name
13636 (Bug#14648).
13637
13638 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
13639
13640 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
13641 In particular this ports to 32-bit sparc Sun cc.
13642 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
13643 array with a dummy element at specpdl[-1], so that its address can
13644 be taken portably.
13645 (unbind_to): Do not copy the binding; not needed, now that we
13646 copy old_value in the one place where the copy is needed.
13647 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
13648 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
13649 (union specbinding): Rename from struct specbinding. Redo layout
13650 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
13651 which is not portable. With Sun C 5.12 32-bit sparc, the
13652 declaration causes nargs to be an unsigned bitfield, a behavior
13653 that the C standard allows; but Emacs wants nargs to be signed.
13654 The overall type is now a union of structures rather than a
13655 structure of union of structures, and the 'kind' member is now a
13656 bitfield, so that the overall type doesn't grow. All uses changed.
13657 * process.c (Fmake_serial_process): Remove unnecessary initialization.
13658
13659 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
13660
13661 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
13662 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
13663
13664 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
13665
13666 2013-06-17 Eli Zaretskii <eliz@gnu.org>
13667
13668 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
13669 unless we know that the window w's frame is a frame object.
13670 Another attempt at solving bug#14062 and bug#14630.
13671
13672 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
13673
13674 * textprop.c (property_set_type): New enum.
13675 (add_properties): Allow appending/prepending text properties.
13676 (add_text_properties_1): Factored out of Fadd_text_properties.
13677 (Fadd_text_properties): Move all the code into
13678 add_text_properties_1.
13679 (Fadd_face_text_property): New function that calls
13680 add_text_properties_1.
13681
13682 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
13683
13684 Move functions from lisp.h to individual modules when possible.
13685 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
13686 * alloc.c (XFLOAT_INIT, set_symbol_name):
13687 * buffer.c (CHECK_OVERLAY):
13688 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
13689 (set_char_table_parent):
13690 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
13691 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
13692 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
13693 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
13694 (set_blv_valcell):
13695 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
13696 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
13697 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
13698 (backtrace_args, backtrace_debug_on_exit):
13699 * floatfns.c (CHECK_FLOAT):
13700 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
13701 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
13702 (set_hash_hash, set_hash_hash_slot, set_hash_index)
13703 (set_hash_index_slot):
13704 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
13705 * marker.c (CHECK_MARKER):
13706 * textprop.c (CHECK_STRING_OR_BUFFER):
13707 * window.c (CHECK_WINDOW_CONFIGURATION):
13708 Move here from lisp.h, and make these functions static rather than
13709 extern inline.
13710 * buffer.c (Qoverlayp):
13711 * data.c (Qsubrp):
13712 * fns.c (Qhash_table_p):
13713 * window.c (Qwindow_configuration_p):
13714 Now static.
13715 * lisp.h: Remove the abovementioned defns and decls.
13716
13717 Use functions, not macros, for XINT etc (Bug#11935).
13718 In lisp.h, prefer functions to function-like macros, and
13719 constants to object-like macros, when either will do. This:
13720 . simplifies use, as there's no more need to worry about
13721 arguments' side effects being evaluated multiple times.
13722 . makes the code easier to debug on some platforms.
13723 However, when using gcc -O0, keep using function-like macros
13724 for a few critical operations, for performance reasons.
13725 This sort of thing isn't needed with gcc -Og, but -Og
13726 is a GCC 4.8 feature and isn't widely-enough available yet.
13727 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
13728 Remove enum lsb_bits; no longer needed.
13729 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
13730 * buffer.c (Qoverlap):
13731 * data.c (Qsubrp):
13732 * fns.c (Qhash_table_p):
13733 Now extern, so lisp.h can use these symbols.
13734 * dispextern.h: Include character.h, for MAX_CHAR etc.
13735 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
13736 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
13737 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
13738 (GLYPH_CODE_P): Move here from lisp.h.
13739 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
13740 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
13741 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
13742 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
13743 XUNTAG now returns void *.
13744 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
13745 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
13746 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
13747 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
13748 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
13749 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
13750 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
13751 (lisp_h_XPNTR, lisp_h_XSYMBOL):
13752 New macros, renamed from their sans-lisp_h_ counterparts.
13753 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
13754 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
13755 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
13756 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
13757 If compiling via GCC without optimization, define these as macros
13758 in addition to inline functions.
13759 To disable this, compile with -DINLINING=0.
13760 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
13761 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
13762 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
13763 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
13764 (INTMASK, VALMASK): Now macros, since static values cannot be
13765 accessed from extern inline functions.
13766 (VALMASK): Also a constant, for benefit of old GDB.
13767 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
13768 is INTEGERP, which can fold it in.
13769 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
13770 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
13771 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
13772 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
13773 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
13774 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
13775 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
13776 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
13777 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
13778 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
13779 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
13780 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
13781 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
13782 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
13783 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
13784 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
13785 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
13786 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
13787 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
13788 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
13789 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
13790 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
13791 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
13792 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
13793 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
13794 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
13795 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
13796 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
13797 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
13798 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
13799 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
13800 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
13801 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
13802 Now functions.
13803 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
13804 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
13805 (VALMASK): Define in one place rather than in two, merging the
13806 USE_LSB_TAG parts; this is simpler.
13807 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
13808 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
13809 Move up, to avoid use before definition.
13810 Also include "globals.h" earlier, for the same reason.
13811 (make_natnum): New function.
13812 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
13813 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
13814 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
13815 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
13816 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
13817 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
13818 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
13819 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
13820 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
13821 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
13822 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
13823 (Qwindow_configuration_p, Qimage): New forward declarations.
13824 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
13825 (STRING_COPYIN): Remove; unused.
13826 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
13827 (xcar_addr, xcdr_addr): New functions. All uses changed.
13828 (IEEE_FLOATING_POINT): Now a constant, not a macro.
13829 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
13830 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
13831 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
13832 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
13833 (TYPE_RANGED_INTEGERP): Simplify.
13834 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
13835 (setlocale, fixup_locale, synchronize_system_messages_locale)
13836 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
13837 Now empty functions, not macros.
13838 (functionp): Return bool, not int.
13839 * window.c (Qwindow_configuration_p): Now extern,
13840 so window.h can use it.
13841 * window.h (Qwindowp): Move decl back to lisp.h.
13842
13843 2013-06-15 Eli Zaretskii <eliz@gnu.org>
13844
13845 * xdisp.c (Fline_pixel_height): New function, required for solving
13846 bug #14567.
13847
13848 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
13849
13850 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
13851
13852 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
13853
13854 * lread.c (syms_of_lread):
13855 * fns.c (Fprovide): Adjust to new format of after-load-alist.
13856
13857 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
13858
13859 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
13860
13861 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
13862
13863 * fileio.c (expand_file_name): Doc fix.
13864
13865 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
13866
13867 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
13868 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
13869 Wait for self, not for 0. This can't hurt on GNU or similar
13870 system, and may help with Cygwin.
13871
13872 * keyboard.c: Don't use PROP (...) as an lvalue.
13873 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
13874 Use set_prop (A, B), not PROP (A) = B.
13875
13876 2013-06-10 Eli Zaretskii <eliz@gnu.org>
13877
13878 * xdisp.c (get_it_property): Use it->window instead of generating
13879 a Lisp object from it->w.
13880
13881 2013-06-09 Eli Zaretskii <eliz@gnu.org>
13882
13883 * xdisp.c (get_it_property): If it->object is a buffer, pass to
13884 get-char-property the window that is being rendered, instead of
13885 the buffer, to support window-specific overlays. (Bug#14575)
13886 (compute_display_string_pos): When W is NULL, use the current
13887 buffer as the object to pass to get-char-property.
13888 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
13889 pointer member of the bidi iterator, since no window is pertinent
13890 to this function.
13891
13892 2013-06-08 Eli Zaretskii <eliz@gnu.org>
13893
13894 * bidi.c (bidi_fetch_char): Accept additional argument, the window
13895 being displayed, and pass it to compute_display_string_pos.
13896 (bidi_level_of_next_char, bidi_resolve_explicit_1)
13897 (bidi_paragraph_init): All callers changed.
13898
13899 * xdisp.c (init_from_display_pos, init_iterator)
13900 (handle_single_display_spec, next_overlay_string)
13901 (get_overlay_strings_1, reseat_1, reseat_to_string)
13902 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
13903 Set bidi_it.w member from it->w.
13904 (compute_display_string_pos): Accept additional argument, the
13905 window being displayed, and pass it to Fget_char_property.
13906 (Bug#14575)
13907
13908 * dispextern.h (struct bidi_it): New member w, the window being
13909 displayed.
13910 (compute_display_string_pos): Adjust prototype.
13911
13912 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
13913
13914 * xgselect.c: Remove unneeded include xterm.h.
13915
13916 * process.c (wait_reading_process_output): Check for NS before GLIB.
13917 GLIB may be linked in due to rsvg, but ns_select must be called.
13918
13919 * xgselect.c (xg_select): Remove call to window_system_available
13920 and g_main_context_pending at the top, so Gdk events (i.e. file
13921 notify) are processed when Emacs is started with -nw.
13922
13923 2013-06-07 Eli Zaretskii <eliz@gnu.org>
13924
13925 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
13926 (ctagsfiles3): New variable, includes only *.m files.
13927 (TAGS): Use an explicit language name in the regular expressions,
13928 to avoid transformation of '/SOMETHING' by MSYS to
13929 'c:\MSYS\SOMETHING'.
13930
13931 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
13932
13933 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
13934
13935 2013-06-06 Eli Zaretskii <eliz@gnu.org>
13936
13937 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
13938 still need to set the mouse pointer shape and activate help-echo.
13939 (Bug#14558)
13940
13941 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
13942
13943 A few porting etc. fixes for the new file monitor code.
13944 See the thread containing
13945 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
13946 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
13947 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
13948 (dir_monitor_callback, Fgfile_rm_watch):
13949 Use assq_no_quit instead of Fassoc, for speed.
13950 (dir_monitor_callback, Fgfile_rm_watch):
13951 eassert that the monitor is a fixnum.
13952 (dir_monitor_callback): No need for CDR_SAFE.
13953 Simplify building of lisp with alternative tails.
13954 (Fgfile_add_watch, Fgfile_rm_watch):
13955 Do not assume glib functions set errno reliably on failure.
13956 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
13957 and signal an error otherwise.
13958 (Fgfile_rm_watch): Prefer CONSP to !NILP.
13959 Use Fdelq instead of Fdelete, for speed.
13960
13961 2013-06-05 Eli Zaretskii <eliz@gnu.org>
13962
13963 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
13964 don't insist on being invoked on a highlighted tool-bar button.
13965 Avoids losing tool-bar functionality when mouse-highlight is nil.
13966 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
13967 Don't highlight when mouse-highlight is nil.
13968 (note_mouse_highlight): When mouse-highlight is nil, don't return
13969 right away; instead, run tool-bar and mode-line highlight
13970 subroutine, clear any existing highlight, and revert the mouse
13971 pointer to its default shape. (Bug#14558)
13972
13973 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
13974
13975 * lisp.mk (lisp): Add prog-mode.el.
13976
13977 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
13978
13979 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
13980 * process.c (dummy_handler): New function.
13981 (lib_child_handler): New static var.
13982 (handle_child_signal): Invoke it.
13983 (catch_child_signal): If a library has set up a signal handler,
13984 save it into lib_child_handler.
13985 (init_process_emacs): If using glib and not on Windows, tickle glib's
13986 child-handling code so that it initializes its private SIGCHLD handler.
13987 * syssignal.h (SA_SIGINFO): Default to 0.
13988 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
13989 31; it should no longer be needed now.
13990
13991 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
13992
13993 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
13994
13995 * gfilenotify.c (globals_of_gfilenotify): New function.
13996 (syms_of_gfilenotify): Move global initialization there.
13997
13998 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
13999
14000 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
14001
14002 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
14003 * keyboard.c (menu_bar_items, tool_bar_items):
14004 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
14005 not override local keymaps any more.
14006
14007 2013-06-04 Eli Zaretskii <eliz@gnu.org>
14008
14009 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
14010
14011 2013-06-03 Eli Zaretskii <eliz@gnu.org>
14012
14013 * w32console.c (initialize_w32_display): Return the dimensions of
14014 the console window via 2 additional arguments, not via the current
14015 frame. This avoids crashes due to overrunning the bounds of
14016 frame's decode_mode_spec_buffer, which is not resized following
14017 the change of the frame dimensions from the initial 10x10.
14018
14019 * w32term.h (w32_initialize_display_info): Adjust prototype.
14020
14021 * term.c (init_tty): Take dimensions of the frame from the values
14022 returned by initialize_w32_display.
14023
14024 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
14025 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
14026 (LIBES): Add $(GFILENOTIFY_LIBS).
14027
14028 * w32inevt.c (handle_file_notifications): Add dummy implementation
14029 for !HAVE_W32NOTIFY.
14030
14031 * w32term.c: Wrap code with HAVE_W32NOTIFY.
14032
14033 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
14034
14035 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
14036
14037 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
14038
14039 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
14040
14041 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
14042
14043 Fix minor problems found by static checking.
14044 * data.c (pure_write_error):
14045 Use xsignal2, not Fsignal, as Fsignal might return.
14046 * eval.c (set_backtrace_debug_on_exit): Now static.
14047 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
14048 No longer inline. EXTERN_INLINE is needed only for functions
14049 defined in .h files. Reindent function header as per GNU style.
14050 (backtrace_p, backtrace_top, backtrace_next):
14051 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
14052 compiler or linker. Add extern decls to pacify gcc -Wall.
14053 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
14054 Now static.
14055 * frame.c (free_monitors): Define only on platforms that need it.
14056 * nsterm.m (ns_term_init):
14057 * process.c (catch_child_signal):
14058 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
14059 defined on all porting targets these days.
14060 * process.c, process.h (catch_child_signal):
14061 Make it extern only if NS_IMPL_GNUSTEP is defined.
14062
14063 2013-06-03 Eli Zaretskii <eliz@gnu.org>
14064
14065 * w32.c (gettimeofday): Make the signature identical to prototype
14066 in nt/inc/sys/time.h.
14067
14068 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
14069
14070 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
14071 .gdbinit.
14072
14073 * keyboard.c (safe_run_hooks_error): Improve error message.
14074
14075 * data.c (pure_write_error): Add `object' argument.
14076 * puresize.h (CHECK_IMPURE): Use it.
14077
14078 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
14079
14080 * Makefile.in (NOTIFY_OBJ): New variable.
14081 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
14082
14083 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
14084 Call syms_of_gfilenotify.
14085
14086 * gfilenotify.c: New file.
14087
14088 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
14089 and Qfile_w32notify.
14090 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
14091 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
14092
14093 * lisp.h: Declare syms_of_gfilenotify.
14094
14095 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
14096
14097 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
14098
14099 Merge the specpdl and backtrace stacks. Make the structure of the
14100 specpdl entries more obvious via a tagged union of structs.
14101 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
14102 (enum specbind_tag): New enum.
14103 (struct specbinding): Make it a tagged union of structs.
14104 Add a case for backtrace records.
14105 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
14106 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
14107 (backtrace_debug_on_exit): New accessors.
14108 (struct backtrace): Remove.
14109 (struct catchtag): Remove backlist field.
14110 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
14111 Move to eval.c.
14112 (Flocal_variable_p): Speed up the common case where the binding is
14113 already loaded.
14114 * eval.c (backtrace_list): Remove.
14115 (set_specpdl_symbol, set_specpdl_old_value): Remove.
14116 (set_backtrace_args, set_backtrace_nargs)
14117 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
14118 (backtrace_next): New functions.
14119 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
14120 (unwind_to_catch, internal_lisp_condition_case)
14121 (internal_condition_case, internal_condition_case_1)
14122 (internal_condition_case_2, internal_condition_case_n): Don't bother
14123 with backtrace_list any more.
14124 (Fsignal): Adjust to new backtrace format.
14125 (grow_specpdl): Move up.
14126 (record_in_backtrace): New function.
14127 (eval_sub, Ffuncall): Use it.
14128 (apply_lambda): Adjust to new backtrace format.
14129 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
14130 data.c.
14131 (specbind): Adjust to new specpdl format. Simplify.
14132 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
14133 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
14134 backtrace format.
14135 (mark_backtrace): Remove.
14136 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
14137 * xdisp.c (redisplay_internal): Use record_in_backtrace.
14138 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
14139 Use mark_specpdl.
14140 * profiler.c (record_backtrace): Use get_backtrace.
14141 (handle_profiler_signal): Use backtrace_top_function.
14142 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
14143 accessor functions.
14144
14145 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
14146
14147 * process.h (catch_child_signal): Declare.
14148
14149 * process.c (catch_child_signal): New function.
14150 (init_process_emacs): Call it.
14151
14152 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
14153 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
14154 NS_IMPL_COCOA.
14155 (x_set_cursor_type): Remove declaration.
14156 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
14157 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
14158 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
14159 (ns_get_color): Use F suffix on float.
14160 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
14161 (ns_get_rgb_color): Remove.
14162 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
14163 (note_mouse_movement): x and y are CGFloat.
14164 (ns_draw_fringe_bitmap): Remove unused rowY.
14165 Change #if to COCOA && >= 10_6.
14166 (ns_draw_window_cursor): Remove unused overspill.
14167 (ns_draw_underwave): width and x are EamcsCGFloat.
14168 (ns_draw_box): thickness is CGFloat.
14169 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
14170 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
14171 if not in main thread.
14172 (ns_get_pending_menu_title, ns_check_menu_open)
14173 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
14174 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
14175 (sendFromMainThread:): New method.
14176 (changeFont:): size is CGFloat.
14177 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
14178 Disable warning about permanent text.
14179 (characterIndexForPoint:): Adjust return type depending on GNUstep
14180 version.
14181 (mouseDown:): delta is CGFloat.
14182 (updateFrameSize): Remove unised variable f.
14183 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
14184 Cast float to EmacsCGFloat.
14185 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
14186 also to -1 when restoring.
14187 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
14188 inside NS_IMPL_COCOA.
14189 (toggleFullScreen:): Put call to toggleFullScreen inside
14190 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
14191 (setPosition:portion:whole:): por is CGFloat.
14192 (getMouseMotionPart:window:x:y:): Add F suffix to float.
14193 (mouseDown:): Use CGFloat.
14194 (mouseDragged:): Remove unised variable edge.
14195 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
14196
14197 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
14198 of CGFloat differs.
14199 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
14200 when NS_IMPL_GNUSTEP.
14201 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
14202 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
14203 (EmacsToolbar): Add clearAll. Add tag argument to
14204 addDisplayItemWithImage.
14205 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
14206
14207 * nsselect.m (ns_get_local_selection): Remove unused variable type.
14208
14209 * nsmenu.m (ns_update_menubar): Make static.
14210 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
14211 (fillWithWidgetValue:): Add cast to SEL for setAction.
14212 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
14213 (update_frame_tool_bar): Update code for GNUstep.
14214 (clearAll): New method.
14215 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
14216 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
14217 Move identifierToItem setObject and activeIdentifiers addObject before
14218 call to insertItemWithItemIdentifier.
14219 (validateVisibleItems): Fix indentation.
14220 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
14221 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
14222 UtilityWindow to aStyle, remove call to setStyleMask.
14223
14224 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
14225
14226 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
14227 (ns_charset_covers, ns_get_covering_families, nsfont_open):
14228 Use F suffix on floats.
14229 (ns_char_width): Returns CGFloat.
14230 (ns_ascii_average_width): w is CGFloat instead of float.
14231 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
14232 DPSxshow.
14233 (ns_glyph_metrics): CGFloat instead of float.
14234
14235 * nsfns.m (x_set_foreground_color, x_set_background_color):
14236 Use EmacsCGFloat.
14237 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
14238 remove unused variables.
14239 (Fns_read_file_name): Keep track if panel is for save.
14240 Use ns_filename_from_panel/ns_directory_from_panel.
14241 (Fns_list_services): delegate only used for COCOA.
14242 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
14243 Just return the input if GNUstep.
14244 (x_screen_planes): Remove.
14245 (Fxw_color_values): Use EmacsCGFloat
14246 (Fns_display_monitor_attributes_list): Only get screen number for
14247 Cocoa.
14248 (getDirectory, getFilename): Remove from EmacsOpenPanel and
14249 EmacsSavePanel.
14250 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
14251 ns_directory_from_panel.
14252
14253 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
14254
14255 * process.c (handle_child_signal): Also use WCONTINUED.
14256 This is so that list-processes doesn't mistakenly list the process
14257 as stopped, when the process has actually been continued and is
14258 now running.
14259
14260 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
14261
14262 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
14263 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
14264 not already configured.
14265
14266 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
14267
14268 2013-05-29 Eli Zaretskii <eliz@gnu.org>
14269
14270 * Makefile.in (mostlyclean): Remove *.res files.
14271
14272 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
14273
14274 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
14275 a buffer (bug#8447).
14276
14277 2013-05-27 Eli Zaretskii <eliz@gnu.org>
14278
14279 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
14280 display vector, and we backtrack, handle the case that the
14281 previous character position is also displayed from a display
14282 vector or covered by a display string or image. (Bug#14476)
14283
14284 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
14285
14286 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
14287 (struct MonitorInfo, free_monitors): Remove.
14288 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
14289 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
14290 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
14291 Qframes, Qsource.
14292
14293 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
14294 (struct MonitorInfo, free_monitors): Remove.
14295 (ns_screen_name): Make static.
14296 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
14297 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
14298 Qframes, Qsource.
14299
14300 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
14301 (struct MonitorInfo): New struct.
14302 (free_monitors, make_monitor_attribute_list): Declare.
14303
14304 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
14305 New Lisp_Object:s.
14306 (free_monitors, make_monitor_attribute_list): New functions.
14307 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
14308 Qsource.
14309
14310 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
14311
14312 * callproc.c (call_process): Refine the doc string. (Bug#14045)
14313
14314 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
14315
14316 * keyboard.c: Apply keyboard decoding only to events that come directly
14317 from the tty, not from unread-command-events (bug#14368).
14318 (read_event_from_main_queue): New function, extracted from read_char.
14319 (read_decoded_char): Remove.
14320 (read_decoded_event_from_main_queue): New function to replace it.
14321 (read_char): Use it.
14322 (read_key_sequence): Use read_char rather than read_decoded_char.
14323
14324 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
14325
14326 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
14327
14328 * casetab.c (init_casetab_once): Fix last change (bug#14424).
14329
14330 2013-05-22 Kenichi Handa <handa@gnu.org>
14331
14332 The following changes are to fix the setting of
14333 buffer-file-coding-system on, for instance, C-x RET c unix RET
14334 _FILE_OF_DOS_EOL_TYPE_ RET.
14335
14336 * coding.h (struct coding_system): New member detected_utf8_chars.
14337
14338 * coding.c (detect_coding_utf_8): Count characters and check EOL
14339 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
14340 BOM is there.
14341 (setup_coding_system): Do not initialize coding->head_ascii.
14342 (check_ascii): Do not set coding->eol_seen but update it. Do not
14343 call adjust_coding_eol_type here.
14344 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
14345 If the eol-type of CODING is already specified, adjust the eol type
14346 of the found coding-system.
14347 (decode_coding_gap): Cancel previous change. Utilize the
14348 character numbers counted by detect_coding_utf_8. Fix detection
14349 of BOM for utf-8.
14350
14351 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
14352
14353 * search.c (looking_at_1): Only set last_thing_searched if the match
14354 changed the match-data (bug#14281).
14355
14356 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
14357
14358 * xdisp.c (reseat_at_previous_visible_line_start):
14359 Already declared in dispextern.h, so remove it here.
14360 (move_it_vertically_backward): Likewise.
14361
14362 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14363
14364 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
14365 (Fx_display_pixel_width, Fx_display_pixel_height)
14366 (Fx_display_mm_width, Fx_display_mm_height):
14367 Mention `display-monitor-attributes-list' in docstrings.
14368
14369 * nsfns.m (ns_get_screen): Remove function. All uses removed.
14370 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
14371 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
14372 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
14373 (Fx_display_backing_store, Fx_display_visual_class)
14374 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
14375 (Fx_display_grayscale_p, Fx_display_pixel_width)
14376 (Fx_display_pixel_height, Fx_display_planes)
14377 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
14378 (Fx_display_screens): Don't confuse X11 screens with NS screens.
14379 (Fx_display_mm_width, Fx_display_mm_height)
14380 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
14381 height for all physical monitors as in X11.
14382
14383 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
14384 Return pixel width or height for all physical monitors as in X11.
14385
14386 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
14387
14388 Port --enable-gcc-warnings to clang.
14389 * bytecode.c (exec_byte_code):
14390 * regex.c:
14391 Redo diagnostic pragmas to pacify clang, too.
14392 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
14393 * editfns.c (Fencode_time):
14394 * fileio.c (file_accessible_directory_p):
14395 * font.c (font_unparse_xlfd):
14396 Use '&"string"[index]' instead of '"string" + (index)'.
14397 * undo.c (user_error): Remove; unused.
14398
14399 2013-05-16 Eli Zaretskii <eliz@gnu.org>
14400
14401 * insdel.c (insert_1_both): Document the arguments, instead of
14402 referring to insert_1, which no longer exists.
14403
14404 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
14405 some window, increment windows_or_buffers_changed, so that
14406 *Messages* display in that window is updated. (Bug#14408)
14407
14408 * w32.c: Include epaths.h.
14409 (init_environment): Use cmdproxy.exe without leading directories.
14410 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
14411 case.
14412 (gettimeofday): Adjust signature and return value to Posix
14413 expectations.
14414
14415 * unexw32.c (open_output_file): Delete the existing emacs.exe
14416 before creating it, to break the hard link to the versioned
14417 executable.
14418
14419 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
14420 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
14421 (FIRSTFILE_OBJ): New variables.
14422 (W32_RES): Rename to EMACSRES. All users changed.
14423 (base_obj): Use $(CM_OBJ).
14424 (ALLOBJS): Use $(FIRSTFILE_OBJ).
14425 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
14426 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
14427 $(W32_RES_LINK) before $(LIBES).
14428 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
14429
14430 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
14431
14432 * makefile.w32-in (DOC): Use just "DOC".
14433
14434 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
14435
14436 * process.c: Export default filters and sentinels to Elisp.
14437 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
14438 New constants.
14439 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
14440 (Fset_process_sentinel, Fformat_network_address):
14441 Default to them instead of nil.
14442 (server_accept_connection): Sentinels can't be nil any more.
14443 (read_and_dispose_of_process_output): New function, extracted from
14444 read_process_output.
14445 (read_process_output): Use it; filters can't be nil.
14446 (Finternal_default_process_filter): New function, extracted from
14447 read_process_output.
14448 (exec_sentinel_unwind): Remove function.
14449 (exec_sentinel): Don't zilch sentinel while running.
14450 (status_notify): Sentinels can't be nil.
14451 (Finternal_default_process_sentinel): New function extracted from
14452 status_notify.
14453 (setup_process_coding_systems): Default filter is not nil any more.
14454 (syms_of_process): Export new Elisp functions and initialize
14455 new constants.
14456 * lisp.h (make_lisp_proc): New function.
14457
14458 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
14459
14460 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
14461
14462 2013-05-14 Eli Zaretskii <eliz@gnu.org>
14463
14464 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
14465 unless we know that the window w is a leaf window.
14466 Another attempt at solving bug#14062.
14467
14468 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
14469
14470 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
14471 fdesc (Bug#14375).
14472
14473 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
14474
14475 * image.c (gif_load): Check that subimages fit (Bug#14345).
14476
14477 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
14478
14479 * lread.c (skip_dyn_eof): New function.
14480 (read1): Use it to skip the end of a file in response to #@00.
14481
14482 * doc.c (get_doc_string): Slightly relax the sanity checking.
14483
14484 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
14485
14486 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
14487 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
14488 (MonitorInfo): New struct.
14489 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
14490 (Fns_display_monitor_attributes_list): New functions.
14491 (display-usable-bounds): Remove.
14492 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
14493 Qsource.
14494
14495 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
14496
14497 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
14498 (GTK_CHECK_VERSION): New macro, if not already defined.
14499 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
14500 replaced by GTK_CHECK_VERSION.
14501
14502 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
14503
14504 * xterm.h (GTK_PREREQ): New macro.
14505 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
14506 to use this macro instead, for consistency and clarity.
14507
14508 2013-05-08 Eli Zaretskii <eliz@gnu.org>
14509
14510 * xdisp.c (row_for_charpos_p): New function, with code of
14511 cursor_row_p, but accepts an additional argument CHARPOS instead
14512 of using a hardcoded PT.
14513 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
14514 (row_containing_pos): Call row_for_charpos_p instead of partially
14515 doing the same. Fixes cursor positioning under longlines-mode
14516 when longlines-show-effect includes more than one newline, when
14517 moving the cursor vertically up.
14518
14519 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
14520
14521 * makefile.w32-in (ACL_H): New macro.
14522 ($(BLD)/fileio.$(O)): Update dependencies.
14523
14524 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
14525
14526 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
14527 * Makefile.in (LIB_ACL): New macro.
14528 (LIBACL_LIBS): Remove.
14529 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
14530 * fileio.c: Include <acl.h>.
14531 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
14532 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
14533 !acl_errno_valid.
14534 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
14535 it ourselves.
14536
14537 * unexelf.c: Don't assume ElfW (Half) fits in int.
14538 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
14539 when dealing with ElfW (Half) values, since they can exceed 2**31
14540 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
14541 (entry_address): Omit unused NUM arg. All uses changed.
14542
14543 2013-05-07 Juri Linkov <juri@jurta.org>
14544
14545 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
14546 to the string converted from number with `Fnumber_to_string'.
14547 (Bug#14254)
14548
14549 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
14550
14551 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
14552 This fixes a problem introduced by my previous change.
14553
14554 2013-05-07 Glenn Morris <rgm@gnu.org>
14555
14556 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
14557
14558 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
14559
14560 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
14561
14562 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
14563
14564 Static checking by GCC 4.8.0.
14565 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
14566 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
14567 (x_get_monitor_attributes_fallback)
14568 (x_get_monitor_attributes_xinerama)
14569 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
14570 Define only if USE_GTK.
14571 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
14572 (x_get_monitor_attributes_fallback): Omit unused locals.
14573 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
14574 Use double, not float, to avoid mixed-mode floating point arithmetic.
14575
14576 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14577 Jan Djärv <jan.h.d@swipnet.se>
14578
14579 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
14580 (XINERAMA_CFLAGS): New macros.
14581 (ALL_CFLAGS, LIBES): Use them.
14582
14583 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
14584 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
14585 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
14586 (syms_of_xfns): DEFSYM them.
14587 (struct MonitorInfo): New struct.
14588 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
14589 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
14590 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
14591 (x_get_monitor_attributes_xinerama): New functions.
14592 (Fx_display_monitor_attributes_list): New primitive.
14593 (syms_of_xfns): Defsubr it.
14594
14595 * xterm.h (x_display_info): Add Xatom_net_workarea and
14596 Xatom_net_current_desktop.
14597
14598 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
14599 and dpyinfo->Xatom_net_current_desktop.
14600
14601 2013-05-06 Eli Zaretskii <eliz@gnu.org>
14602
14603 * xdisp.c (pos_visible_p): Use the special code for finding the
14604 beginning of a display property or overlay for any "replacing"
14605 display property, not just for display strings. This solves
14606 incorrect reporting of position by posn-at-point. (Bug#14241)
14607
14608 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
14609
14610 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
14611 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
14612 Verify that ElfW (Half) fits in int.
14613 (fatal): Use same signature as lisp.h.
14614 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
14615 configure and build with -DUNEXELF_DEBUG without worrying about
14616 other modules that use DEBUG.
14617 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
14618 possibly-wide integers now uses it instead of plain fprintf.
14619 (entry_address): New function, which avoids problems with 32-bit
14620 overflow on 64-bit hosts.
14621 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
14622 (round_up): Don't assume the remainder fits in int.
14623 (find_section): Use bool for boolean. Simplify debug code.
14624 (unexec): Don't assume file sizes fit in int or size_t.
14625 Omit unnecessary trailing newline in 'fatal' format.
14626 Use strerror rather than outputting decimal error number.
14627 Remove unused code when emacs is not defined;
14628 this file relies on Emacs now.
14629 Don't assume e_phnum and e_shnum are positive.
14630
14631 * regex.c: Fix problems when DEBUG is defined.
14632 (extract_number, extract_number_and_incr): Define regardless of
14633 whether DEBUG is defined; that's simpler and makes the code less
14634 likely to go stale in the normal case when DEBUG is not defined.
14635 Return int rather than taking an int * arg. All callers changed.
14636 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
14637 Remove, replacing with ...
14638 (DEBUG_PRINT): New macro. All callers changed.
14639 (DEBUG_COMPILES_ARGUMENTS): New macro.
14640 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
14641 (print_compiled_pattern, print_double_string) [DEBUG]:
14642 Use prototype rather than old-style definition.
14643 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
14644 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
14645 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
14646 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
14647 Don't assume ptrdiff_t, size_t, and long are the same width as int.
14648 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
14649 This matters only when DEBUG is defined.
14650
14651 2013-05-05 Eli Zaretskii <eliz@gnu.org>
14652
14653 * xdisp.c (set_iterator_to_next): Set the
14654 ignore_overlay_strings_at_pos_p flag only if we are _really_
14655 iterating over an overlay string, as indicated by the
14656 current.overlay_string_index member. (Bug#14306)
14657
14658 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
14659
14660 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
14661 to where it is used, to avoid autorelease issues (Bug#14050).
14662
14663 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
14664
14665 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
14666 * fileio.c (syms_of_fileio): Implement this.
14667 * filelock.c (create_lock_file): If symbolic links don't work, so
14668 we use a regular file as a lock file, do not fsync the lock file;
14669 it's not needed.
14670
14671 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
14672
14673 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
14674 (syms_of_minibuf): Adjust accodingly.
14675 * lread.c (Fread):
14676 * callint.c (Fcall_interactively): Adjust calls accordingly.
14677
14678 2013-05-04 Eli Zaretskii <eliz@gnu.org>
14679
14680 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
14681 w->contents is a buffer before computing everything else.
14682 Use parentheses to disambiguate last part of the condition.
14683
14684 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
14685 assertion violations. (Bug#14062)
14686
14687 2013-05-01 David Reitter <david.reitter@gmail.com>
14688
14689 * nsfns.m (ns_tooltip): Initialize.
14690
14691 2013-04-28 Eli Zaretskii <eliz@gnu.org>
14692
14693 * coding.c (decode_coding_gap): Don't remove the character before
14694 a newline unless it's a CR character. (Bug#14287)
14695
14696 2013-04-28 Dan Nicolaescu <dann@gnu.org>
14697
14698 * dispextern.h (struct face): Move enum face_underline_type
14699 earlier so that bitfields can be in the same word.
14700
14701 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
14702
14703 * nsfns.m (handlePanelKeys): New function.
14704 (EmacsOpenPanel:performKeyEquivalent:)
14705 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
14706 arrows/function/control and copy/paste keys (Bug#14296).
14707
14708 2013-04-27 Juri Linkov <juri@jurta.org>
14709
14710 * callint.c (Fcall_interactively): Call `Qread_number' for
14711 interactive code letter `n' instead of using duplicate code.
14712 (Bug#14254)
14713
14714 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
14715
14716 * systime.h (make_timeval): Declare as 'const'.
14717
14718 2013-04-27 Kenichi Handa <handa@gnu.org>
14719
14720 * font.c (font_open_entity): Always open a font of manageable
14721 size.
14722
14723 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
14724
14725 Port better to AIX (Bug#14258).
14726 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
14727 to pacify AIX xlc.
14728
14729 2013-04-24 Kenichi Handa <handa@gnu.org>
14730
14731 * coding.c (decode_coding_iso_2022): When an invalid escape
14732 sequence is encountered, reset the invocation and designation
14733 status to the safest one.
14734
14735 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
14736
14737 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
14738 Without this fix, "make distclean" leaves stamp-h1 behind.
14739
14740 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
14741
14742 * w32fns.c (w32_fullscreen_rect): New function to compute the
14743 window rectangle for the given fullscreen mode.
14744 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
14745 longer tunes the window size. This keeps the window's edges flush
14746 with the screen and allows the taskbar to hide itself in fullboth.
14747
14748 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
14749 window decorations and uses the entire screen.
14750
14751 * w32term.h (w32_fullscreen_rect) Add prototype.
14752 (struct w32_output): Replace normal_width, normal_height,
14753 normal_top, and normal_left members with a single normal_placement
14754 struct.
14755 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
14756 Remove macros.
14757 (FRAME_NORMAL_PLACEMENT): New macro.
14758
14759 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
14760
14761 * minibuf.c (Ftest_completion): Silence compiler warning.
14762
14763 2013-04-15 Eli Zaretskii <eliz@gnu.org>
14764
14765 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
14766 bug#14062.
14767
14768 * frame.h (WINDOW_FRAME): Protect macro and its argument with
14769 parentheses.
14770
14771 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
14772 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
14773 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
14774 parentheses where appropriate.
14775
14776 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
14777
14778 * keyboard.c (timer_start_idle): Remove no-longer-used local.
14779
14780 2013-04-14 Eli Zaretskii <eliz@gnu.org>
14781
14782 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
14783 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
14784 Mention in the doc string that setting these variables takes
14785 effect only after a call to set-window-buffer. (Bug#14200)
14786
14787 2013-04-13 Eli Zaretskii <eliz@gnu.org>
14788
14789 * indent.c (Fvertical_motion): Don't consider display strings on
14790 overlay strings as display strings on the buffer position we
14791 started from. This prevents vertical cursor motion from jumping
14792 more than one line when there's an overlay string with a display
14793 property at end of line.
14794 Reported by Karl Chen <Karl.Chen@quarl.org> in
14795 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
14796
14797 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
14798
14799 * window.c (select_window): `record_buffer' even if window is
14800 already selected (bug#14191).
14801
14802 2013-04-11 Eli Zaretskii <eliz@gnu.org>
14803
14804 * window.c (Fwindow_end): Test more flags, including the buffer's
14805 last_overlay_modified flag, to determine whether the window's
14806 display is really up-to-date. Prevents the function from
14807 returning a stale value. (Bug#14170)
14808 (Fwindow_line_height): Fix the test for up-to-date-ness of the
14809 current matrix.
14810
14811 2013-04-10 Eli Zaretskii <eliz@gnu.org>
14812
14813 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
14814 garbaged only if it is not already the top frame on its TTY.
14815 This prevents flickering due to constant redrawing of TTY frames when
14816 there are GUI frames open in the same session. (Bug#13864)
14817
14818 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
14819
14820 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
14821 of marking the idle timers directly.
14822
14823 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
14824
14825 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
14826 tables (bug#14054).
14827
14828 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
14829
14830 * window.c (select_window): Don't record_buffer while the invariant is
14831 temporarily broken (bug#14161).
14832
14833 * fns.c (Fdelq): Don't assume !NILP => CONSP.
14834
14835 2013-04-07 Eli Zaretskii <eliz@gnu.org>
14836
14837 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
14838
14839 2013-04-07 Romain Francoise <romain@orebokech.com>
14840
14841 Ignore additional platform-specific ACL errors (Bug#13702).
14842 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
14843 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
14844
14845 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
14846
14847 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
14848 f->output_data.ns.
14849
14850 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
14851
14852 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
14853 This bug was introduced by my 2013-02-25 change that simplified
14854 data_start configuration. Without this change, on GNU/Linux
14855 an Emacs configured with --enable-profiling fails immediately
14856 due to a profiler signal.
14857 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
14858 with these flags. On platforms where special flags are needed
14859 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
14860 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
14861 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
14862
14863 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
14864
14865 Get rid of some platform-specific functions examining window
14866 system and its capabilities. This is a partial rework of the
14867 2013-04-05 change.
14868 * lisp.h (have_menus_p): Remove prototype. This function is
14869 replaced with platform-independent window_system_available.
14870 (check_window_system): Move to...
14871 * frame.h (decode_window_system_frame, window_system_available):
14872 ...here, add new prototypes.
14873 * frame.c (window_system_available, decode_window_system_frame):
14874 New functions.
14875 (check_window_system): Platform-independent now.
14876 * xterm.h (x_in_use): Remove declaration.
14877 (check_x_frame):
14878 * w32term.h (check_x_frame):
14879 * nsterm.h (check_x_frame): Remove prototypes. This function
14880 is replaced with platform-independent decode_window_system_frame.
14881 * msdos.c (have_menus_p): Remove.
14882 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
14883 Remove platform-specific functions. Use check_window_system,
14884 decode_window_system_frame and check_ns_display_info where
14885 appropriate. Minor style and comment tweaks.
14886 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
14887 (check_x_frame): Likewise.
14888 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
14889 Likewise.
14890 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
14891 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
14892 * xmenu.c, xselect.c: All related users changed.
14893
14894 2013-04-03 Kenichi Handa <handa@gnu.org>
14895
14896 The following changes is to optimize the code for reading UTF-8
14897 files.
14898
14899 * coding.c (check_ascii): Rename from detect_ascii. Return value
14900 changed. Check EOL format. Do not call adjust_coding_eol_type
14901 here.
14902 (check_utf_8): New function.
14903 (adjust_coding_eol_type): Do nothing if already adjusted.
14904 (detect_coding): Compare the return value of check_ascii with
14905 coding->src_bytes. Call adjust_coding_eol_type if necessary.
14906 (decode_coding_gap): Optimize for valid UTF-8.
14907
14908 2013-03-21 Kenichi Handa <handa@gnu.org>
14909
14910 * coding.c (syms_of_coding): Cancel previous change.
14911
14912 * insdel.c (insert_from_gap): Fix previous change.
14913
14914 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
14915
14916 Consistently use platform-specific function to detect window system.
14917 * lisp.h (check_window_system): New prototype. This function is
14918 going to replace check_x, check_w32 and check_ns.
14919 (have_menus_p): Mention msdos.c in comment.
14920 * fontset.c (check_window_system_func): Remove. Adjust all users.
14921 * fontset.h (check_window_system_func): Remove prototype.
14922 * nsterm.h (check_ns):
14923 * xterm.h (check_x):
14924 * w32term.h (check_w32): Likewise.
14925 * menu.c (Fx_popup_menu): Use check_window_system.
14926 * msdos.c (check_window_system): Define for MS-DOS.
14927 * nsfns.m (check_window_system): Define for NS. Adjust all users.
14928 * w32fns.c (check_window_system): Likewise for MS-Windows.
14929 * xfns.c (check_window_system): Likewise for X.
14930 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
14931 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
14932
14933 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
14934
14935 Prefer < to > in range checks such as 0 <= i && i < N.
14936 This makes it easier to visualize quantities on a number line.
14937 This patch doesn't apply to all such range checks,
14938 only to the range checks affected by the 2013-03-24 change.
14939 This patch reverts most of the 2013-03-24 change.
14940 * alloc.c (xpalloc, Fgarbage_collect):
14941 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
14942 * character.c (string_escape_byte8):
14943 * charset.c (read_hex):
14944 * data.c (cons_to_unsigned):
14945 * dispnew.c (update_frame_1):
14946 * doc.c (Fsubstitute_command_keys):
14947 * doprnt.c (doprnt):
14948 * editfns.c (hi_time, decode_time_components):
14949 * fileio.c (file_offset):
14950 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
14951 * font.c (font_intern_prop):
14952 * frame.c (x_set_alpha):
14953 * gtkutil.c (get_utf8_string):
14954 * indent.c (check_display_width):
14955 * keymap.c (Fkey_description):
14956 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
14957 * lread.c (read1):
14958 * minibuf.c (read_minibuf_noninteractive):
14959 * process.c (wait_reading_process_output):
14960 * search.c (Freplace_match):
14961 * window.c (get_phys_cursor_glyph):
14962 * xdisp.c (redisplay_internal):
14963 * xsmfns.c (smc_save_yourself_CB):
14964 Prefer < to > for range checks.
14965 * dispnew.c (sit_for): Don't mishandle NaNs.
14966 This fixes a bug introduced in the 2013-03-24 change.
14967 * editfns.c (decode_time_components): Don't hoist comparison.
14968 This fixes another bug introduced in the 2013-03-24 change.
14969
14970 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
14971
14972 * frame.h (struct frame): Drop scroll_bottom_vpos
14973 member becaue all real users are dead long ago.
14974 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
14975 * xdisp.c (redisplay_internal): Adjust user.
14976
14977 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
14978
14979 * nsmenu.m (showAtX:Y:for:): setLevel to
14980 NSPopUpMenuWindowLevel (Bug#13998).
14981
14982 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
14983
14984 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
14985 (ns_check_pending_open_menu): Declare.
14986
14987 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
14988 (x_activate_menubar): Update the menu with title that matches
14989 ns_get_pending_menu_title, and call
14990 ns_check_pending_openmenu (Bug#12698).
14991 (menuWillOpen:): New method.
14992 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
14993
14994 * nsterm.m (menu_will_open_state, menu_mouse_point)
14995 (menu_pending_title): New varaibles.
14996 (ns_get_pending_menu_title, ns_check_menu_open)
14997 (ns_check_pending_open_menu): New functions.
14998
14999 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
15000
15001 * indent.c (current_column_bol_cache): Remove leftover which is not
15002 used in Fmove_to_column any more.
15003 (current_column, scan_for_column): Adjust users.
15004 * keyboard.c (last_point_position_buffer, last_point_position_window):
15005 Remove leftovers which are not used for recording undo any more.
15006 (command_loop_1, syms_of_keyboard): Adjust users.
15007 * xdisp.c (last_max_ascent): Remove leftover which is not used in
15008 redisplay_window any more.
15009 (move_it_to): Adjust user.
15010
15011 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
15012
15013 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
15014 Update dependencies.
15015
15016 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
15017
15018 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
15019 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
15020 forward references.
15021
15022 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
15023
15024 * window.h (struct window): Replace hchild, vchild and buffer slots
15025 with a single slot 'contents'. This is possible because each valid
15026 window may have either the child window (in vertical or horizontal
15027 combination) or buffer to display (for the leaf window). Using that,
15028 a lot of operations to traverse and/or change window hierarchies may
15029 be simplified. New member horizontal is used to distinguish between
15030 horizontal and vertical combinations of internal windows.
15031 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
15032 (WINDOW_VERTICAL_COMBINATION_P): New macros.
15033 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
15034 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
15035 Use contents slot, not buffer, where appropriate.
15036 (wset_combination): New function.
15037 (wset_buffer): Add eassert.
15038 (Fframe_first_window): Simplify the loop reaching first window.
15039 (Fwindow_buffer): Use WINDOW_LEAF_P.
15040 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
15041 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
15042 (unshow_buffer): Convert initial debugging check to eassert.
15043 (replace_window, recombine_windows, Fdelete_other_windows_internal)
15044 (make_parent_window, window_resize_check, window_resize_apply)
15045 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
15046 (Fset_window_configuration, delete_all_child_windows, save_window_save):
15047 Adjust to match struct window changes.
15048 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
15049 (mark_window_cursors_off, count_windows, get_leaf_windows)
15050 (foreach_window_1): Simplify the loop.
15051 * alloc.c (mark_object): Do not check for the leaf window because
15052 internal windows has no glyph matrices anyway.
15053 * dispnew.c (clear_window_matrices, showing_window_margins_p)
15054 (allocate_matrices_for_window_redisplay, fake_current_matrices)
15055 (allocate_matrices_for_frame_redisplay, free_window_matrices)
15056 (build_frame_matrix_from_window_tree, mirror_make_current)
15057 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
15058 (update_window_tree, set_window_update_flags): Simplify the loop.
15059 (sync_window_with_frame_matrix_rows): Enforce live window.
15060 Use contents slot, not buffer, where appropriate.
15061 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
15062 and WINDOW_HORIZONTAL_COMBINATION_P.
15063 (make_frame_visible_1): Simplify the loop.
15064 Use contents slot, not buffer, where appropriate.
15065 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
15066 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
15067 (expose_window_tree): Likewise.
15068 Use contents slot, not buffer, where appropriate.
15069 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
15070 to avoid deleted windows. Use contents slot instead of buffer.
15071 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
15072 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
15073 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
15074 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
15075
15076 2013-03-28 Eli Zaretskii <eliz@gnu.org>
15077
15078 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
15079 identify the reasons for assertion violations in bug#14062 and
15080 similar ones.
15081 (Fx_show_tip): Fix compilation error under
15082 "--enable-check-lisp-object-type". (Bug#14073)
15083
15084 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
15085 Reported by <rzl24ozi@gmail.com>.
15086
15087 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
15088
15089 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
15090 start marker...
15091 (unwind_with_echo_area_buffer): ...to restore it here.
15092 This is needed to ensure that...
15093 (redisplay_window): ...both window markers are valid here,
15094 which is verified by eassert.
15095 * editfns.c (save_excursion_save): Do not assume that
15096 selected_window always displays the buffer.
15097 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
15098 Fix comment.
15099
15100 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
15101
15102 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
15103 the upcase table.
15104
15105 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
15106
15107 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
15108
15109 2013-03-27 Eli Zaretskii <eliz@gnu.org>
15110
15111 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
15112 since MinGW's w32api headers do. This avoids compiler warnings.
15113
15114 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
15115 if already defined.
15116
15117 2013-03-26 Eli Zaretskii <eliz@gnu.org>
15118
15119 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
15120
15121 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
15122
15123 * gtkutil.c (style_changed_cb): Check if frame is live and an
15124 X frame (Bug#14038).
15125
15126 2013-03-26 Eli Zaretskii <eliz@gnu.org>
15127
15128 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
15129 Define only for _WIN32_WINNT less than 0x0500.
15130 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
15131 MinGW64.
15132 Move inclusion of time.h before sys/time.h, so that MinGW64 could
15133 see its own definitions of 'struct timeval' and 'struct timezone'.
15134
15135 Fix incompatibilities between MinGW.org and MinGW64 headers.
15136 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
15137
15138 * w32.c (REPARSE_DATA_BUFFER): Guard with
15139 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
15140
15141 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
15142
15143 * xterm.c: Include X11/XKBlib.h
15144 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
15145
15146 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
15147
15148 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
15149 written backwards.
15150 * blockinput.h (input_blocked_p): Likewise.
15151 * bytecode.c (exec_byte_code): Likewise.
15152 * callproc.c (call_process_kill, call_process_cleanup)
15153 (Fcall_process): Likewise.
15154 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
15155 (Fccl_execute_on_string): Likewise.
15156 * character.c (string_escape_byte8): Likewise.
15157 * charset.c (read_hex): Likewise.
15158 * cm.c (calccost): Likewise.
15159 * data.c (cons_to_unsigned): Likewise.
15160 * dired.c (directory_files_internal, file_name_completion):
15161 Likewise.
15162 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
15163 (sit_for): Likewise.
15164 * doc.c (Fsubstitute_command_keys): Likewise.
15165 * doprnt.c (doprnt): Likewise.
15166 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
15167 * emacsgtkfixed.c: Likewise.
15168 * fileio.c (file_offset, Fwrite_region): Likewise.
15169 * floatfns.c (Fexpt, fmod_float): Likewise.
15170 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
15171 Likewise.
15172 * font.c (font_intern_prop): Likewise.
15173 * frame.c (x_set_alpha): Likewise.
15174 * gtkutil.c (get_utf8_string): Likewise.
15175 * indent.c (check_display_width): Likewise.
15176 * intervals.c (create_root_interval, rotate_right, rotate_left)
15177 (split_interval_right, split_interval_left)
15178 (adjust_intervals_for_insertion, delete_node)
15179 (interval_deletion_adjustment, adjust_intervals_for_deletion)
15180 (merge_interval_right, merge_interval_left, copy_intervals)
15181 (set_intervals_multibyte_1): Likewise.
15182 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
15183 * keymap.c (Fkey_description): Likewise.
15184 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
15185 * lread.c (openp, read_integer, read1, string_to_number):
15186 Likewise.
15187 * menu.c (ensure_menu_items): Likewise.
15188 * minibuf.c (read_minibuf_noninteractive): Likewise.
15189 * print.c (printchar, strout): Likewise.
15190 * process.c (create_process, Faccept_process_output)
15191 (wait_reading_process_output, read_process_output, send_process)
15192 (wait_reading_process_output): Likewise.
15193 * profiler.c (make_log, handle_profiler_signal): Likewise.
15194 * regex.c (re_exec): Likewise.
15195 * regex.h: Likewise.
15196 * search.c (looking_at_1, Freplace_match): Likewise.
15197 * sysdep.c (get_child_status, procfs_ttyname)
15198 (procfs_get_total_memory): Likewise.
15199 * systime.h (EMACS_TIME_VALID_P): Likewise.
15200 * term.c (dissociate_if_controlling_tty): Likewise.
15201 * window.c (get_phys_cursor_glyph): Likewise.
15202 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
15203 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
15204 Likewise.
15205 * xfns.c (Fx_window_property): Likewise.
15206 * xmenu.c (set_frame_menubar): Likewise.
15207 * xselect.c (x_get_window_property, x_handle_dnd_message):
15208 Likewise.
15209 * xsmfns.c (smc_save_yourself_CB): Likewise.
15210 * xterm.c (x_scroll_bar_set_handle): Likewise.
15211
15212 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
15213
15214 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
15215 to be optional or nil. Adjust comment and convert it to docstring.
15216 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
15217 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
15218
15219 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
15220
15221 Static checking by GCC 4.8-20130319.
15222 * image.c (gif_load): Assume pass < 3 to pacify GCC.
15223 * process.c (Fset_process_datagram_address)
15224 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
15225 * xdisp.c (get_char_face_and_encoding)
15226 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
15227 (get_glyph_face_and_encoding): Prepare face before possibly using it.
15228 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
15229
15230 2013-03-24 Ken Brown <kbrown@cornell.edu>
15231
15232 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
15233 fix compilation on 64-bit Cygwin, where underscores are not
15234 automatically prepended.
15235
15236 * w32term.c (w32_initialize): Silence compiler warning.
15237
15238 2013-03-23 Eli Zaretskii <eliz@gnu.org>
15239
15240 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
15241 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
15242 variables, to save and restore frame dimensions.
15243 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
15244 after returning from a 'fullscreen' configuration.
15245 use SendMessage instead of PostMessage to send the SC_RESTORE message,
15246 to avoid races between the main thread and the input thread.
15247
15248 * w32term.h (struct w32_output): New members normal_width,
15249 normal_height, normal_top, normal_left, and prev_fsmode.
15250 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
15251 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
15252 members of a frame.
15253
15254 * w32term.c (w32fullscreen_hook): Record last value of the frame's
15255 'fullscreen' parameter. Always record previous width and height
15256 of the frame, except when switching out of maximized modes, so
15257 that they could be restored correctly, instead of resetting to the
15258 default frame dimensions. Send SC_RESTORE command to the frame,
15259 unless we are going to send SC_MAXIMIZE, to restore the frame
15260 resize hints in the mouse pointer shown by the window manager.
15261 (Bug#14032)
15262
15263 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
15264
15265 * lisp.h (get_frame_param): Adjust conditions for prototype
15266 declaration.
15267
15268 2013-03-22 Ken Brown <kbrown@cornell.edu>
15269
15270 * unexcw.c: Drop unneeded inclusion of w32common.h.
15271 (report_sheap_usage): Declare.
15272 (read_exe_header): Add magic numbers for x86_64.
15273 (fixup_executable): Fix printf format specifier for unsigned long
15274 argument.
15275
15276 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
15277
15278 * frame.h (struct frame): Put menu_bar_window under #ifdef
15279 because this member is not needed when X toolkit is in use.
15280 (fset_menu_bar_window):
15281 * dispnew.c (clear_current_matrices, clear_desired_matrices)
15282 (free_glyphs, update_frame):
15283 * xdisp.c (expose_frame): Likewise.
15284 (display_menu_bar): Likewise. Remove redundant eassert.
15285 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
15286 toolkit is in use.
15287
15288 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
15289
15290 Use functions and constants to manipulate Lisp_Save_Value objects.
15291 This replaces code that used macros and strings and token-pasting.
15292 The change makes the C source a bit easier to follow,
15293 and shrinks the Emacs executable a bit.
15294 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
15295 (make_save_value): Change 1st arg from string to enum. All callers
15296 changed.
15297 (INTX): Remove.
15298 (mark_object): Use if, not #if, for GC_MARK_STACK.
15299 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
15300 (XSAVE_OBJECT): Now functions, not macros.
15301 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
15302 the constant was never used.
15303 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
15304 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
15305 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
15306 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
15307 New constants.
15308 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
15309 type3 with a single member save_type. All uses changed.
15310 (save_type, set_save_pointer, set_save_integer): New functions.
15311 * print.c (PRINTX): Remove.
15312
15313 * alloc.c: Remove redundant static declarations.
15314
15315 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
15316
15317 * window.h (struct window): Convert left_col, top_line, total_lines
15318 and total_cols from Lisp_Objects to integers. Adjust comments.
15319 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
15320 Remove.
15321 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
15322 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
15323 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
15324 Adjust users where appropriate.
15325
15326 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
15327
15328 * frame.h (struct frame): Drop resx and resy because the same data is
15329 available from window system-specific output context. Adjust users.
15330 (default_pixels_per_inch_x, default_pixels_per_inch_y):
15331 New functions to provide defaults when no window system available.
15332 (FRAME_RES_X, FRAME_RES_Y): New macros.
15333 (NUMVAL): Move from xdisp.c.
15334 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
15335 (Ffont_face_attributes, Fopen_font):
15336 * image.c (gs_load):
15337 * w32font.c (fill_in_logfont):
15338 * xdisp.c (calc_pixel_width_or_height):
15339 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
15340 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
15341
15342 2013-03-20 Kenichi Handa <handa@gnu.org>
15343
15344 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
15345 to 1 (temporary workaround until a bug related to ASCII
15346 optimization is fixed).
15347
15348 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
15349
15350 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
15351 Signal error if window is not internal. Adjust docstring.
15352 (delete_all_child_windows): Use combination_limit to save the buffer.
15353 (Fset_window_configuration): Adjust accordingly.
15354 * print.c (syms_of_print): Initialize debugging output not here...
15355 (init_print_once): ...but in a new function here.
15356 * lisp.h (init_print_once): Add prototype.
15357 * emacs.c (main): Add call to init_print_once. Adjust comments.
15358
15359 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
15360
15361 * window.c (window_resize_check, window_resize_apply)
15362 (window_from_coordinates, recombine_windows, set_window_buffer)
15363 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
15364 (Fsplit_window_internal, Fdelete_window_internal)
15365 (freeze_window_starts): Use bool for booleans.
15366 * window.h (window_frame_coordinates, resize_frame_windows)
15367 (freeze_window_starts, set_window_buffer): Adjust prototypes.
15368
15369 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
15370
15371 * dispnew.c (bitch_at_user): Use `user-error'.
15372
15373 2013-03-17 Ken Brown <kbrown@cornell.edu>
15374
15375 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
15376 as return type of image_background. (Bug#13981)
15377 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
15378
15379 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
15380
15381 * nsterm.m (updateFrameSize:): Change resize increments if needed.
15382 (ns_select): Don't return with result uninitialized.
15383
15384 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
15385 and getDirectory.
15386
15387 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
15388 New functions.
15389 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
15390 directories. If filename is nil, get directory name (Bug#13932).
15391 Use getFilename and getDirectory.
15392 (getFilename, getDirectory): New methods for EmacsSavePanel and
15393 EmacsOpenPanel.
15394 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
15395
15396 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
15397
15398 * coding.c (decode_coding_gap): Fix typo caught by static checking.
15399
15400 2013-03-15 Kenichi Handa <handa@gnu.org>
15401
15402 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
15403 (adjust_after_replace): Make it back to static. Delete the third
15404 arg text_at_gap_tail. Cancel the code for handling it.
15405
15406 * coding.h (struct coding_system): New member eol_seen.
15407
15408 * coding.c (detect_ascii): New function.
15409 (detect_coding): Set coding->head_ascii and coding->eol_seen only
15410 when the source bytes are actually scanned. On detecting for
15411 coding_category_utf_8_auto, call detect_ascii instead of scanning
15412 source bytes directly.
15413 (produce_chars): Call insert_from_gap with the new arg 0.
15414 (encode_coding): Likewise.
15415 (decode_coding_gap): Control ASCII optimization by the variable
15416 disable_ascii_optimization instead of #ifndef .. #endif.
15417 Deccode EOL format according to coding->eol_seen.
15418 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
15419 variable.
15420
15421 * lisp.h (adjust_after_replace): Cancel externing it.
15422 (insert_from_gap): Adjust prototype.
15423
15424 2013-03-15 Eli Zaretskii <eliz@gnu.org>
15425
15426 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
15427 FULLSCREEN_MAXIMIZED. (Bug#13935)
15428
15429 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
15430
15431 * region-cache.c (find_cache_boundary, move_cache_gap)
15432 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
15433 Simplify debugging check and convert to eassert. Adjust comment.
15434 (pp_cache): Put under ENABLE_CHECKING.
15435
15436 2013-03-14 Eli Zaretskii <eliz@gnu.org>
15437
15438 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
15439 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
15440 and WM_ACTIVATEAPP.
15441 (w32fullscreen_hook): If the frame is visible, reset
15442 f->want_fullscreen flag after changing the frame size. If the
15443 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
15444 (Bug#13953)
15445
15446 2013-03-13 Daniel Colascione <dancol@dancol.org>
15447
15448 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
15449 too so that these builds can use Cygwin's file conversion
15450 functions. (We've been building and linking cygw32.o all along
15451 and just not using it.)
15452
15453 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
15454
15455 File synchronization fixes (Bug#13944).
15456 * Makefile.in (LIB_FDATASYNC): New macro.
15457 (LIBES): Use it.
15458 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
15459 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
15460 Don't worry about HAVE_FSYNC, since a substitute fsync is
15461 available if the system lacks one.
15462 (Fwrite_regin): Retry fsync if interrupted.
15463
15464 2013-03-13 Eli Zaretskii <eliz@gnu.org>
15465
15466 * w32term.c (w32_read_socket): If the Emacs frame is being
15467 activated, call w32fullscreen_hook, to make sure the new frame
15468 dimensions are in effect. (Bug#13937)
15469
15470 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
15471
15472 * xdisp.c (init_iterator): Simplify because both character and byte
15473 positions are either specified or -1. Add eassert. Adjust comment.
15474 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
15475 character and byte positions can be obtained from marker.
15476
15477 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
15478
15479 Static checking by Sun C 5.12.
15480 * alloc.c (buffer_memory_full) [REL_ALLOC]:
15481 * bytecode.c (exec_byte_code):
15482 * dispnew.c (init_display):
15483 * eval.c (error):
15484 * fileio.c (Fsubstitute_in_file_name):
15485 * keyboard.c (Fevent_convert_list):
15486 * keymap.c (Fsingle_key_description):
15487 * term.c (maybe_fatal, fatal):
15488 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
15489 * xsmfns.c (Fhandle_save_session):
15490 Omit unreachable code.
15491 * keymap.c (map_keymap_char_table_item): Cast void * to
15492 a function pointer type; the C Standard requires this.
15493
15494 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
15495 Include <sys/param.h> unconditionally, as that works elsewhere and
15496 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
15497 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
15498 and FreeBSD now.
15499
15500 See ChangeLog.12 for earlier changes.
15501
15502 ;; Local Variables:
15503 ;; coding: utf-8
15504 ;; End:
15505
15506 Copyright (C) 2011-2014 Free Software Foundation, Inc.
15507
15508 This file is part of GNU Emacs.
15509
15510 GNU Emacs is free software: you can redistribute it and/or modify
15511 it under the terms of the GNU General Public License as published by
15512 the Free Software Foundation, either version 3 of the License, or
15513 (at your option) any later version.
15514
15515 GNU Emacs is distributed in the hope that it will be useful,
15516 but WITHOUT ANY WARRANTY; without even the implied warranty of
15517 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15518 GNU General Public License for more details.
15519
15520 You should have received a copy of the GNU General Public License
15521 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.