]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Increase default history-length from 30 to 100
[gnu-emacs] / src / ChangeLog
1 2014-03-21 Glenn Morris <rgm@gnu.org>
2
3 * minibuf.c (history-length): Increase default from 30 to 100.
4
5 2014-03-21 Daniel Colascione <dancol@dancol.org>
6
7 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
8 every time we switch to minibuffer.
9
10 * alloc.c (lisp_align_malloc, allocate_string_data)
11 (allocate_vectorlike): Allow mmap allocation of lisp objects.
12 (pointers_fit_in_lispobj_p,mmap_lisp_allowed_p): New functions.
13
14 2014-03-21 Eli Zaretskii <eliz@gnu.org>
15
16 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
17 support more "verbs".
18
19 2014-03-21 Daniel Colascione <dancol@dancol.org>
20
21 Always prohibit dumping a dumped Emacs.
22
23 * emacs.c (might_dump): New variable.
24 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
25 * lisp.h (might_dump): Declare.
26 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
27
28 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
29
30 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
31
32 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
33
34 * doc.c (store_function_docstring): Warn when we don't know where to
35 put a docstring.
36 (Fsubstitute_command_keys): Don't advertise the fact that
37 text-properties are dropped, since we think it's a bug that we'll fix
38 in 24.5.
39
40 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
41 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
42 * frame.c (frame_garbaged): Make "docstring" more precise.
43
44 2014-03-20 Glenn Morris <rgm@gnu.org>
45
46 * charset.c (init_charset): When we cannot find the charsets directory,
47 mention if EMACSDATA is set.
48
49 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
50
51 * fns.c (Frandom): Fix rare bug where the result isn't random.
52
53 Fix porting inconsistency about rounding to even.
54 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
55 This way, the unusual !HAVE_RINT case acts like the usual
56 HAVE_RINT case, and we can fix the documentation accordingly.
57
58 2014-03-19 Eli Zaretskii <eliz@gnu.org>
59
60 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
61 (w32_wnd_proc): Initialize the dwHoverTime member of
62 TRACKMOUSEEVENT structure.
63
64 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
65
66 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
67
68 2014-03-16 Eli Zaretskii <eliz@gnu.org>
69
70 * search.c (find_newline): Speed up the function when using the
71 newline cache, by halving the number of calls to
72 region_cache_forward and region_cache_backward. (Bug#16830)
73
74 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
75
76 * buffer.c (Fset_buffer): Document return value (bug#17015).
77
78 2014-03-14 Martin Rudalics <rudalics@gmx.at>
79
80 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
81 nil, always resize character wise to avoid potential loss of the
82 mode line (Bug#16923 related).
83
84 2014-03-12 Martin Rudalics <rudalics@gmx.at>
85
86 * frame.c (x_set_frame_parameters): Always calculate new sizes
87 pixelwise to avoid potential loss when rounding.
88
89 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
90
91 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
92 * xterm.c (x_free_frame_resources): Free all allocated cursors.
93
94 2014-03-10 Eli Zaretskii <eliz@gnu.org>
95
96 * w32.c (fstatat): Don't add an extra slash if the argument ends
97 with a slash: this fails the subsequent call to stat_worker on
98 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
99
100 2014-03-09 Martin Rudalics <rudalics@gmx.at>
101
102 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
103
104 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
105
106 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
107
108 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
109 when frame is only on one screen (Bug#14713).
110
111 2014-03-08 Eli Zaretskii <eliz@gnu.org>
112
113 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
114 there's a valid wrap point in the display line, the last glyph
115 cannot "just barely fit" on this row, because display_line doesn't
116 let it. Instead, proceed as if the last glyph didn't fit, so that
117 we eventually back up the iterator to the wrap point. This avoids
118 delusional behavior of move_it_to, whereby it proceeds to the next
119 display line, but sets current_x to zero for all the glyphs that
120 without word-wrap would fit on the previous display line.
121 One result was that visual-order cursor movement behaved erratically
122 under word-wrap.
123 (Fmove_point_visually): Add code to find the x coordinate of the
124 last character before wrap point, under word-wrap on a TTY.
125
126 2014-03-07 Eli Zaretskii <eliz@gnu.org>
127
128 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
129 also return value of MOVE_POS_MATCH_OR_ZV from
130 move_it_in_display_line_to, when moving from beginning of line to
131 point's position. (Bug#16961)
132
133 2014-03-07 Martin Rudalics <rudalics@gmx.at>
134
135 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
136 * window.c (Fselect_window): Explain NORECORD and
137 `buffer-list-update-hook' in doc-string.
138
139 2014-03-06 Martin Rudalics <rudalics@gmx.at>
140
141 * window.c (Fother_window_for_scrolling): Check that
142 Vother_window_scroll_buffer is a buffer.
143
144 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
145
146 * xterm.c (xim_initialize): Always pass a copy of resource name
147 to XRegisterIMInstantiateCallback and eassert whether return
148 value is True. Passing copy is important because Xlib doesn't
149 make its own copy and resource name argument usually points to
150 SSDATA (Vx_resource_name), which may be changed from Lisp.
151 (xim_close_display): For XUnregisterIMInstantiateCallback,
152 always eassert return value and pass exactly the same values
153 as were used for XRegisterIMInstantiateCallback.
154 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
155 sources to check why if you are interested.
156
157 2014-03-05 Martin Rudalics <rudalics@gmx.at>
158
159 * dispnew.c (change_frame_size_1): Add new_lines instead of
160 new_height, the latter may be still zero if passed as such.
161 * window.c (Fwindow_pixel_height): Mention bottom divider in
162 doc-string.
163
164 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
165
166 Fix "resource temporarily unavailable" with xgselect
167 (Bug#16925).
168 * xgselect.c: Include <stdbool.h>.
169 (xg_select) [!USE_GTK]: Don't lose track of errno.
170
171 Fix minor --enable-gcc-warnings issues.
172 * widget.c (update_various_frame_slots, EmacsFrameResize):
173 Avoid unused locals. Prefer 'if' to '#if' when either will do.
174
175 2014-03-04 Ken Brown <kbrown@cornell.edu>
176
177 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
178 represent the actual adjustment needed for alignment.
179
180 2014-03-04 Eli Zaretskii <eliz@gnu.org>
181
182 * gmalloc.c (aligned_alloc): Don't allocate more memory than
183 needed, and don't reallocate if the initial allocation already
184 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
185
186 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
187
188 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
189 (Bug#16932)
190
191 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
192
193 * cmds.c (delete-char): Update docstring pointing out that the
194 function ignores `delete-active-region' and `overwrite-mode'.
195
196 2014-03-03 Eli Zaretskii <eliz@gnu.org>
197
198 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
199
200 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
201 allocated buffer due to alignment.
202 (freehook): If the block to be freed was allocated by
203 'aligned_alloc', find its real pointer before calling 'free'.
204 (Bug#16901)
205 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
206 backtrace.
207
208 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
209
210 * font.c (toplevel): Adjust comment about font cache layout.
211 (font_clear_cache): Fix to match real font cache layout.
212 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
213 (Fframe_font_cache) [FONT_DEBUG]: New function.
214 (syms_of_font) [FONT_DEBUG]: Defsubr it.
215
216 Avoid crashes when X fonts are erroneously freed on reused X
217 'Display *' connection data (Bug#16069). Note that X font
218 resources still may be leaked, but currently there is no way
219 to completely avoid it.
220 * xterm.h (struct x_display_info): New member x_id. Add comments.
221 * xterm.c (x_display_id): New variable.
222 (x_term_init): Assign identifier to each opened X connection.
223 * xfont.c (struct xfont): New member x_display_id.
224 (xfont_open): Initialize it with frame's display id.
225 (xfont_close): Check whether font's display id matches the one
226 recorded for the given display. Adjust comment.
227 * xftfont.c (struct xftfont_info):
228 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
229
230 2014-03-01 Martin Rudalics <rudalics@gmx.at>
231
232 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
233 * window.c (Fother_window_for_scrolling): Don't try to scroll a
234 killed Vother_window_scroll_buffer.
235 (Vother_window_scroll_buffer): Fix doc-string accordingly.
236
237 2014-03-01 Eli Zaretskii <eliz@gnu.org>
238
239 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
240 that start with more than 2 slashes as UNCs. (Bug#16751)
241
242 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
243
244 Fix a few crashes and leaks when cloning C strings.
245 * alloc.c, lisp.h (dupstring): New function.
246 * gtkutil.c (xg_get_font):
247 * term.c (tty_default_color_capabilities):
248 * xsettings.c (store_monospaced_changed)
249 (store_font_name_changed, parse_settings)
250 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
251 This avoids some unlikely crashes due to accessing freed storage,
252 and avoids some minor memory leaks in the more-typical case.
253
254 2014-02-28 Martin Rudalics <rudalics@gmx.at>
255
256 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
257 cursor when modeline can't be dragged (Bug#16647).
258
259 2014-02-28 Glenn Morris <rgm@gnu.org>
260
261 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
262 from custom-delayed-init-variables. (Bug#11565)
263
264 2014-02-27 Martin Rudalics <rudalics@gmx.at>
265
266 More fixes for mouse glyph calculations (Bug#16647).
267 * window.c (coordinates_in_window): In intersection of
268 horizontal and vertical window dividers prefer the horizontal
269 one. Add some extra parens to last fix.
270 (window_relative_x_coord): Return x-coordinate for header and
271 mode line too.
272 * xdisp.c (remember_mouse_glyph): In text area don't extend
273 glyph into mode line to show the vertical drag cursor there
274 immediately. Subdivide mouse glyphs in right fringes to show a
275 horizontal drag cursor as soon as we enter the "grabbable width"
276 portion. Handle vertical border case separately. Do not
277 subdivide window divider areas.
278 (note_mouse_highlight): On bottom divider of bottommost windows
279 show vertical drag cursor only when the minibuffer window can be
280 resized.
281
282 2014-02-27 Eli Zaretskii <eliz@gnu.org>
283
284 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
285 reset by the face of the object just displayed. See also bug#76.
286 (get_next_display_element): If the string came from a display
287 property, examine the box face attribute at it->position, not at
288 it->current.pos, since the latter was not updated yet. (Bug#16870)
289 (handle_face_prop): Improve commentary.
290
291 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
292
293 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
294 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
295
296 2014-02-26 Martin Rudalics <rudalics@gmx.at>
297
298 Fixes around Bug#16647.
299 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
300 ON_BOTTOM_DIVIDER cases.
301 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
302 only if the window has no right divider.
303 (Fcoordinates_in_window_p): Fix doc-string.
304
305 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
306
307 * lread.c (Funintern): Fix doc to match advertised calling convention.
308
309 2014-02-24 Daniel Colascione <dancol@dancol.org>
310
311 * keyboard.c (read_char): Close race that resulted in lost events.
312
313 2014-02-22 Glenn Morris <rgm@gnu.org>
314
315 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
316 * window.c (window-resize-pixelwise): Doc fixes.
317
318 * process.c (Finternal_default_process_filter)
319 (Finternal_default_process_sentinel): Doc tweaks.
320
321 2014-02-21 Glenn Morris <rgm@gnu.org>
322
323 * process.c (Fprocess_buffer, Faccept_process_output)
324 (Finternal_default_process_filter, Finternal_default_process_sentinel):
325 Doc fixes.
326
327 2014-02-21 Martin Rudalics <rudalics@gmx.at>
328
329 * window.c (Fwindow_scroll_bar_width): New function.
330
331 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
332
333 Pacify GCC when configuring with --enable-gcc-warnings.
334 * xdisp.c (move_it_in_display_line_to) [lint]:
335 Initialize recently-added local.
336
337 2014-02-21 Daniel Colascione <dancol@dancol.org>
338
339 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
340
341 2014-02-20 Eli Zaretskii <eliz@gnu.org>
342
343 * xdisp.c (init_iterator): Don't dereference a bogus face
344 pointer. (Bug#16819)
345 (try_cursor_movement): Don't use cursor position if
346 set_cursor_from_row failed to compute it. This avoids assertion
347 violations in MATRIX_ROW.
348 (move_it_in_display_line_to): Save the iterator state in ppos_it
349 only once per call. Reimplement the method used to return to the
350 best candidate position if all the positions found in display line
351 are beyond TO_CHARPOS. This cuts down the number of calls to
352 bidi_shelve_cache, which moves a lot of stuff when lines are long
353 and include bidirectional text. (Bug#15555)
354
355 2014-02-20 Glenn Morris <rgm@gnu.org>
356
357 * data.c (Fdefalias): Doc fix.
358
359 2014-02-19 Eli Zaretskii <eliz@gnu.org>
360
361 * xdisp.c (display_line): Fix horizontal scrolling of large images
362 when fringes are turned off. This comes at a price of not
363 displaying the truncation/continuation glyphs in this case.
364 (Bug#16806)
365
366 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
367 CreateDIBSection returns an error indication, zero out *ximg after
368 destroying the image. This avoids crashes in memory allocations
369 due to the fact that some of the callers also call
370 x_destroy_x_image, which will attempt to free an already free'd
371 block of memory.
372
373 2014-02-18 Martin Rudalics <rudalics@gmx.at>
374
375 * widget.c (update_various_frame_slots): Don't set
376 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
377
378 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
379
380 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
381
382 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
383
384 temacs --daemon fix (Bug#16599).
385 * emacs.c (main): Initialize daemon_pipe[1] here ...
386 (syms_of_emacs): ... instead of here.
387
388 2014-02-16 Anders Lindgern <andlind@gmail.com>
389
390 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
391 is set (Bug#16505).
392
393 2014-02-16 Daniel Colascione <dancol@dancol.org>
394
395 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
396 (xd_get_connection_address): Use it.
397 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
398 xd_get_connection_address because the latter signals if the bus
399 we're trying to close is already disconnected.
400
401 2014-02-13 Eli Zaretskii <eliz@gnu.org>
402
403 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
404 argument to CreateThread. This avoids segfaults on Windows 9X.
405 Reported by oslsachem <oslsachem@gmail.com>.
406
407 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
408
409 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
410 * unexhp9k800.c (unexec_error): New function, to simplify the code.
411 (check_lseek): New function, to report lseek errors.
412 (save_data_space, update_file_ptrs, read_header, write_header)
413 (copy_file, copy_rest, unexec): Use these news functions.
414 (update_file_ptrs): Don't assume wraparound behavior when
415 converting a large size_t value to off_t.
416
417 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
418
419 * composite.c (fill_gstring_header): Pass positions as C integers
420 and move parameters checking to...
421 (Fcomposition_get_gstring): ...this function. Handle case when
422 buffer positions are in reversed order and avoid crash (Bug#16739).
423 Adjust docstring.
424 * buffer.c (validate_region): Mention current buffer in error message.
425
426 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
427
428 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
429
430 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
431
432 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
433
434 2014-02-11 Glenn Morris <rgm@gnu.org>
435
436 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
437 Replace refs to "OpenStep" in messages.
438
439 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
440
441 Avoid "." at end of error diagnostics.
442 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
443 * font.c (Ffont_at):
444 * nsfns.m (ns_display_info_for_name):
445 * nsselect.m (Fx_own_selection_internal):
446 * nsterm.m (performDragOperation:):
447 Remove "." from end of diagnostic.
448
449 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
450
451 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
452 unintuitive (bug#15824).
453 (Fyes_or_no_p): Doc fix (bug#15456).
454
455 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
456
457 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
458 and avoid warning.
459 * eval.c (call_debugger): When exiting the debugger, do not allow
460 max_specpdl_size less than actual binding depth (Bug#16603).
461 (syms_of_eval): Adjust docstring.
462
463 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
464
465 * cmds.c (Fself_insert_command): Output a clearer error message on
466 negative repetitions (bug#9476).
467
468 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
469
470 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
471
472 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
473
474 * minibuf.c (Fread_string): Doc clarification (bug#15422).
475
476 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
477
478 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
479
480 * keyboard.c (Frecursive_edit): Fix typo in docstring.
481
482 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
483
484 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
485
486 * keyboard.c (Frecursive_edit): Say more precicely how throwing
487 `exit' works (bug#15865).
488
489 2014-02-07 Martin Rudalics <rudalics@gmx.at>
490
491 Constrain window box/body sizes and margin widths (Bug#16649).
492 * xdisp.c (window_box_width): Don't return less than zero.
493 (window_box_left_offset, window_box_right_offset): Don't return
494 more than the window's pixel width.
495 * window.c (window_body_height, window_body_width): Don't return
496 negative value.
497 (window_resize_apply): Adjust margin width, if necessary.
498
499 2014-02-07 Glenn Morris <rgm@gnu.org>
500
501 * nsterm.m (syms_of_nsterm): Doc fix.
502
503 2014-02-06 Eli Zaretskii <eliz@gnu.org>
504
505 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
506 New variables: pointers through which to call the respective APIs.
507 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
508 (filename_from_ansi, sys_link, check_windows_init_file):
509 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
510 This is required on Windows 9X, where we dynamically load
511 UNICOWS.DLL which has their non-stub implementations.
512 (maybe_load_unicows_dll): Assign addresses to these 2 function
513 pointers after loading UNICOWS.DLL.
514
515 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
516 MultiByteToWideChar and WideCharToMultiByte through function
517 pointers.
518
519 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
520 New declarations.
521
522 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
523
524 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
525 for OSX >= 10.9 if separate spaces are used.
526 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
527
528 2014-02-06 Glenn Morris <rgm@gnu.org>
529
530 * buffer.c (cache-long-scans): Doc fix.
531
532 2014-02-05 Eli Zaretskii <eliz@gnu.org>
533
534 * w32fns.c (Fw32_shell_execute): Doc fix.
535
536 2014-02-05 Bastien Guerry <bzg@gnu.org>
537
538 * syntax.c (Fforward_word): Call Fconstrain_to_field with
539 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
540
541 2014-02-05 Martin Rudalics <rudalics@gmx.at>
542
543 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
544 outside the window (Bug#16649).
545
546 * xdisp.c (note_mouse_highlight): When entering a margin area show
547 a non-text cursor (Bug#16647).
548
549 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
550
551 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
552 It prompted a compile-time diagnostic on GNU/Linux.
553 Simplify to remove the need for the label.
554
555 2014-02-04 Eli Zaretskii <eliz@gnu.org>
556
557 * w32menu.c (w32_popup_dialog): Don't condition the whole function
558 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
559 to show it; otherwise return 'unsupported--w32-dialog' to signal
560 to the caller that emulation with menus is necessary.
561 This resurrects code inadvertently deleted by the 2013-10-08 commit.
562 (Bug#16636)
563 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
564
565 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
566 by HAVE_DIALOGS.
567
568 * menu.c (Fx_popup_dialog): Don't condition the call to
569 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
570 special symbol 'unsupported--w32-dialog', emulate the dialog with
571 a menu by calling x-popup-menu.
572
573 * menu.h (Qunsupported__w32_dialog): New extern variable.
574
575 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
576
577 * keyboard.c (kbd_buffer_get_event): Read file notification events
578 also in batch mode.
579
580 * xgselect.c (xg_select): Read glib events in any case, even if
581 there are no file descriptors to watch for. (Bug#16519)
582
583 2014-02-03 Martin Rudalics <rudalics@gmx.at>
584
585 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
586 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
587 * w32term.c (w32_draw_window_divider): Handle first and last
588 pixels specially.
589 * w32term.h (w32_fill_area_abs): New function.
590 * xdisp.c (x_draw_right_divider): Don't draw over bottom
591 divider.
592 * xfaces.c (realize_basic_faces): Handle new face ids.
593 * xfns.c (Fx_create_frame): Call x_default_parameter for right
594 and bottom divider width.
595 * xterm.c (x_draw_window_divider): Handle first and last pixels
596 specially.
597
598 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
599
600 * print.c (Fexternal_debugging_output): Add cast to pacify
601 --enable-gcc-warnings.
602 * eval.c (call_debugger): Grow specpdl if the debugger was
603 entered due to specpdl overflow (Bug#16603) and allow more
604 specpdl space for the debugger itself.
605
606 2014-02-02 Martin Rudalics <rudalics@gmx.at>
607
608 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
609 (Bug#16619)
610
611 2014-02-01 Eli Zaretskii <eliz@gnu.org>
612
613 * w32fns.c (Ffile_system_info): Use WINAPI in the function
614 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
615
616 * print.c (Fexternal_debugging_output): If the argument character
617 is non-ASCII, encode it with the current locale's encoding before
618 writing the result to the terminal. (Bug#16448)
619
620 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
621 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
622 for it. (Bug#16558)
623
624 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
625
626 * process.c (create_process): Reset SIGPROF handler in the child.
627 * callproc.c (call_process): Likewise.
628
629 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
630
631 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
632
633 2014-01-29 Eli Zaretskii <eliz@gnu.org>
634
635 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
636 of zero to print strings, GDB doesn't like it.
637
638 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
639 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
640 we still use correct addresses. (Bug#16576)
641
642 2014-01-27 K. Handa <handa@gnu.org>
643
644 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
645 to preserve the code detection behavior of 24.3.
646 * coding.h (struct coding_system): New member detected_utf8_bytes.
647 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
648 (decode_coding_gap): Use short cut for UTF-8 file reading only
649 when coding->detected_utf8_bytes equals to coding->src_bytes.
650 * fileio.c (Finsert_file_contents): Cancel the previous change.
651
652 2014-01-29 Martin Rudalics <rudalics@gmx.at>
653
654 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
655 that are not visible.
656
657 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
658
659 * xmenu.c (create_and_show_popup_menu): Handle case when no key
660 is grabbed (Bug#16565).
661
662 2014-01-28 Martin Rudalics <rudalics@gmx.at>
663
664 * xdisp.c (last_max_ascent): Re-remove after erroneously
665 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
666 from 2013-03-29.
667 (move_it_to): Re-remove reference to last_max_ascent.
668 (Fwindow_text_pixel_size): Add iterator's max_ascent and
669 max_descent here instead of calling line_bottom_y.
670 Fix doc-string.
671
672 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
673
674 * terminal.c (initial_free_frame_resources): New function.
675 (init_initial_terminal): Install new hook to free face cache
676 on initial frame and avoid memory leak. For details, see
677 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
678 * xfaces.c (free_frame_faces): Adjust comment.
679
680 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
681
682 * data.c (Fstring_to_number): Document results if unparsable
683 (Bug#16551).
684
685 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
686
687 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
688
689 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
690
691 When decoding, prefer ptrdiff_t to int for buffer positions etc.
692 * coding.c (detect_coding_utf_8, emacs_mule_char)
693 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
694 (check_utf_8, decode_coding):
695 * coding.h (struct coding_system.errors):
696 Use ptrdiff_t, not int, for integer values derived from buffer and
697 string positions.
698
699 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
700 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
701 before invoking decode_coding_gap, since there's just one block.
702
703 2014-01-25 Martin Rudalics <rudalics@gmx.at>
704
705 Fix handling of face attributes in Fx_create_frame (Bug#16529).
706 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
707 too early. Again run change_frame_size before assigning menu-
708 and tool-bar-lines.
709
710 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
711
712 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
713 arrives, call x_check_fullscreen, in case the new display has a
714 different resolution. (Bug#16517)
715
716 2014-01-25 Eli Zaretskii <eliz@gnu.org>
717
718 * term.c (read_menu_input): If the selected frame changes, exit
719 the menu.
720 (tty_menu_show): If the selected frame changes while we displayed
721 a menu, throw to top level. (Bug#16479)
722
723 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
724
725 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
726
727 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
728
729 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
730 * data.c (count_one_bits_word): Fix bug (negated comparison)
731 when BITS_PER_ULL < BITS_PER_BITS_WORD.
732
733 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
734
735 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
736 Avoid undefined behavior by initializing display property bit of a
737 string processed by the bidirectional iterator. For details, see
738 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
739
740 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
741
742 Minor cleanup of previous change.
743 * image.c (imagemagick_error, Fimagemagick_types):
744 Omit some recently-introduced and unnecessary casts and assignments.
745
746 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
747
748 Fix two memory leaks discovered with Valgrind.
749 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
750 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
751
752 2014-01-22 Martin Rudalics <rudalics@gmx.at>
753
754 Fixes in window size functions around Bug#16430 and Bug#16470.
755 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
756 (Fwindow_mode_line_height, Fwindow_header_line_height)
757 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
758 Minor doc-string adjustments.
759 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
760 Rewrite doc-strings.
761 (window_body_height, window_body_width): Do not count partially
762 visible lines/columns when PIXELWISE is nil (Bug#16470).
763 (Qfloor, Qceiling): New symbols.
764
765 2014-01-21 Eli Zaretskii <eliz@gnu.org>
766
767 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
768 when the image cache is not yet allocated. (Bug#16509)
769
770 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
771
772 * buffer.c (Fkill_buffer): When killing an indirect buffer,
773 re-attach intervals to its base buffer (Bug#16502).
774 * intervals.c (set_interval_object): Move from here...
775 * intervals.h (set_interval_object): ... to here. Fix comments.
776
777 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
778
779 Avoid undefined behavior by initializing buffer redisplay bit.
780 Problem reported by Dmitry Antipov in
781 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
782 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
783
784 Revert some of the CANNOT_DUMP fix (Bug#16494).
785 * lread.c (init_lread): Fix typo: NILP, not !NILP.
786
787 2014-01-19 Eli Zaretskii <eliz@gnu.org>
788
789 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
790 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
791 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
792 they are replaced by macros that expand into direct calls to the
793 corresponding functions from GDI32.DLL.
794 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
795 variables in the Cygwin build, they are unused.
796
797 2014-01-19 K. Handa <handa@gnu.org>
798
799 * composite.c (composition_update_it): Fix previous change.
800
801 2014-01-18 Eli Zaretskii <eliz@gnu.org>
802
803 Fix file name handling on MS-Windows 9X.
804 * w32.c (maybe_load_unicows_dll): New function.
805
806 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
807 on, to make sure we can convert file names to and from UTF-8 on
808 Windows 9X. This fixes a failure to start up because Emacs cannot
809 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
810
811 * w32font.c [WINDOWSNT]: Include w32.h.
812 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
813 of implementing the same stuff.
814 Remove now unused g_b_init_is_windows_9x.
815
816 * w32.h (maybe_load_unicows_dll): Add prototype.
817
818 2014-01-17 Eli Zaretskii <eliz@gnu.org>
819
820 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
821 switch to single keyboard. Prevents daemon crashes when a new
822 client connects while we show a TTY menu in an existing client.
823 (Bug#16479)
824
825 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
826
827 Fix MinGW64 porting problem with _setjmp.
828 Reported by Eli Zaretskii in:
829 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
830 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
831 the old _setjmp and _longjmp. All uses changed.
832
833 2014-01-13 Daniel Colascione <dancol@dancol.org>
834
835 * textprop.c (Fremove_list_of_text_properties):
836 Correctly handle reaching the end of the interval tree. (Bug#15344)
837
838 2014-01-13 Martin Rudalics <rudalics@gmx.at>
839
840 * xdisp.c (resize_mini_window): Round height to a multiple of
841 frame's line height. Fix bug in calculation of window start
842 position (Bug#16424).
843
844 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
845
846 * macfont.m: Include termchar.h.
847 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
848 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
849 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
850 *_WITH_GC_* to take face and f as parameters.
851 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
852 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
853
854 2014-01-13 Daniel Colascione <dancol@dancol.org>
855
856 Fix menu item updating in the presence of the Unity global menu
857 GTK+ module.
858
859 * gtkutil.h (xg_have_tear_offs): Add frame parameter
860 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
861 tear-off.
862 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
863 updating menus; explain why.
864 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
865 problem it's supposed to solve and it interferes with detecting
866 the presence of a global menu.
867 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
868 parameter.
869
870 2014-01-11 K. Handa <handa@gnu.org>
871
872 * composite.c (composition_update_it): Fix indexing of
873 LGSTRING_CHAR (Bug#15984).
874
875 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
876
877 * unexw32.c (_start) [__MINGW64__]: Define to __start.
878
879 2014-01-11 Eli Zaretskii <eliz@gnu.org>
880
881 * xdisp.c (try_window_id): Don't use this function's optimizations
882 if overlays in the buffer displayed by the window have changed
883 since last redisplay. (Bug#16347)
884 (message_dolog): Fix indentation.
885
886 2014-01-11 Martin Rudalics <rudalics@gmx.at>
887
888 * frame.c (frame_resize_pixelwise): Fix doc-string.
889
890 2014-01-10 Martin Rudalics <rudalics@gmx.at>
891
892 Fix handling of internal borders (Bug#16348).
893 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
894 Remove internal border width from pixel width of windows.
895 (change_frame_size_1): Don't return early when frame's pixel
896 size changes - we still have to record the new sizes in the
897 frame structure.
898 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
899 also when toolbar gets larger.
900 * window.c (check_frame_size): Include internal_border_width in
901 check.
902 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
903 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
904 In non-toolkit/non-GTK version clear internal border.
905 * xterm.c (x_clear_under_internal_border): New function for
906 non-toolkit/non-GTK version.
907 (x_after_update_window_line): In non-toolkit/non-GTK version
908 don't do that.
909 (handle_one_xevent, x_set_window_size):
910 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
911 * xterm.h (x_clear_under_internal_border): Extern it.
912
913 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
914
915 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
916 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
917 it again.
918
919 2014-01-06 Eli Zaretskii <eliz@gnu.org>
920
921 * xdisp.c (redisplay_window): Don't skip window redisplay if the
922 last value of point is not equal to buffer's point. (Bug#16129)
923
924 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
925
926 Spelling fixes.
927 * nsterm.h (updateCollectionBehavior): Rename from
928 updateCollectionBehaviour. All uses changed.
929
930 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
931 * Makefile.in (SETFATTR): New macro.
932 (temacs$(EXEEXT)): Use it.
933
934 2014-01-04 Martin Rudalics <rudalics@gmx.at>
935
936 Fix maximization behavior on Windows (Bug#16300).
937 * w32fns.c (w32_fullscreen_rect): Don't handle
938 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
939 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
940 of SetWindowPos. Restore last placement also when leaving
941 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
942 but the FULLSCREEN_BOTH case.
943
944 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
945
946 Port to C89.
947 * data.c (arithcompare_driver):
948 * fileio.c (Fcar_less_than_car):
949 * fns.c (internal_equal):
950 * frame.c (delete_frame):
951 * lisp.h (enum More_Lisp_Bits):
952 * lread.c (read1):
953 Avoid C99 constructs that don't work in C89.
954 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
955 to port to C89, which doesn't have 'long long'.
956 (count_trailing_zero_bits): Use them.
957
958 2014-01-03 Chong Yidong <cyd@gnu.org>
959
960 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
961
962 2014-01-02 Martin Rudalics <rudalics@gmx.at>
963
964 Further adjust frame/window scrollbar width calculations.
965 * window.c (apply_window_adjustment):
966 Set windows_or_buffers_changed.
967 (Fwindow_scroll_bars): Return actual scrollbar width.
968 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
969 For non-toolkit builds again use 14 as minimum width and set
970 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
971 * xterm.c (XTset_vertical_scroll_bar): Take width from
972 WINDOW_SCROLL_BAR_AREA_WIDTH.
973 (x_new_font): Rename wid to unit. Base calculation of new
974 scrollbar width on toolkit used and make it analogous to that of
975 x_set_scroll_bar_default_width.
976 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
977 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
978 of GetSystemMetrics.
979 * w32term.c (w32_set_vertical_scroll_bar): Take width from
980 WINDOW_SCROLL_BAR_AREA_WIDTH.
981 (x_new_font): Make it correspond to changes in xterm.c.
982
983 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
984
985 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
986 This is a cleaner way to fix the MinGW-w64 porting problem.
987 Check for INTPTR_MAX misconfiguration.
988
989 2014-01-01 Eli Zaretskii <eliz@gnu.org>
990
991 * search.c (newline_cache_on_off, find_newline): In indirect
992 buffers, use the newline cache of the base buffer.
993
994 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
995 buffer, invalidate the caches of its base buffer. (Bug#16265)
996
997 * indent.c (width_run_cache_on_off, compute_motion): In indirect
998 buffers, use the width-run cache of the base buffer.
999
1000 * xdisp.c (redisplay_window): When the window displays an indirect
1001 buffer, and the character widths in the display table have
1002 changed, invalidate the width-run cache of the corresponding base
1003 buffer.
1004
1005 * fileio.c (Finsert_file_contents): When invalidating the newline
1006 cache, consider the case of inserting into indirect buffer.
1007
1008 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
1009 In indirect buffers, use the paragraph cache of the base buffer.
1010
1011 2013-12-31 Martin Rudalics <rudalics@gmx.at>
1012
1013 * window.c (grow_mini_window): Fix last change.
1014
1015 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
1016
1017 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
1018
1019 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
1020
1021 * w32term.c (w32_initialize): Use LCID and LOWORD.
1022
1023 * w32proc.c (create_child): Use pid_t for 5th argument.
1024 (IsValidLocale): Don't provide prototype for MinGW64.
1025 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
1026 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
1027
1028 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
1029 MinGW64 doesn't support.
1030
1031 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
1032
1033 * w32.c (set_named_security_info): New function.
1034 (acl_set_file): Fall back on set_named_security_info if
1035 set_file_security fails.
1036 (g_b_init_set_named_security_info_w)
1037 (g_b_init_set_named_security_info_a): New static variables.
1038 (globals_of_w32): Initialize them to zero.
1039 (set_named_security_info): Set them to non-zero if the
1040 corresponding API is available.
1041 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
1042 New function typedefs.
1043
1044 2013-12-31 Martin Rudalics <rudalics@gmx.at>
1045
1046 Some more fixes following pixelwise resize changes including one
1047 for Bug#16306.
1048 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
1049 of frame_resize_pixelwise.
1050 * widget.c (pixel_to_text_size): New function.
1051 (update_wm_hints): Have size hints respect value of
1052 frame_resize_pixelwise.
1053 (EmacsFrameResize): Alway process resize requests pixelwise.
1054 * window.c (grow_mini_window): Make sure mini window is at least
1055 one line tall.
1056 * xdisp.c (display_menu_bar): Make sure menubar extends till
1057 right end of frame.
1058 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
1059 (x_set_tool_bar_lines): Calculate pixelwise.
1060 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
1061 frame_resize_pixelwise.
1062
1063 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
1064
1065 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
1066 variables not used there.
1067
1068 2013-12-30 Eli Zaretskii <eliz@gnu.org>
1069
1070 * w32.c (sys_umask): New function. (Bug#16299)
1071
1072 2013-12-30 Martin Rudalics <rudalics@gmx.at>
1073
1074 * dispnew.c (change_frame_size_1): Take old width of root window
1075 from that window's pixel width. (Bug#16284)
1076
1077 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
1078
1079 Plain copy-file no longer chmods an existing destination (Bug#16133).
1080 * fileio.c (realmask): Now a static var, not a local.
1081 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
1082 Remove arg STATPTR. All uses changed.
1083 (Fcopy_file): Do not alter permissions of existing destinations,
1084 unless PRESERVE-PERMISSIONS (renamed from
1085 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
1086 Avoid race when testing for existing destinations and for
1087 when input and output files are the same.
1088 If changing the group fails, adjust both default and
1089 preserved permissions so that access is not granted to the
1090 wrong group.
1091 (Fset_default_file_modes, init_fileio): Update realmask.
1092 (Fdefault_file_modes): Use realmask instead of calling umask.
1093
1094 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
1095
1096 Fix pipe bug with OS X emacs --daemon (Bug#16262).
1097 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
1098 flags on the daemon pipe ends before execing.
1099
1100 2013-12-28 Eli Zaretskii <eliz@gnu.org>
1101
1102 * w32fns.c (Fx_create_frame): Error out if called from a TTY
1103 session. (Bug#14739)
1104
1105 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
1106
1107 * callproc.c (Vexec_path): Document that exec-directory is in it.
1108
1109 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
1110
1111 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
1112 default.
1113
1114 2013-12-27 Chong Yidong <cyd@gnu.org>
1115
1116 * data.c (Fsymbol_function): Doc fix.
1117
1118 2013-12-26 Martin Rudalics <rudalics@gmx.at>
1119
1120 Some more tinkering with Bug#16051.
1121 * window.c (resize_frame_windows): Don't let the size of the
1122 root window drop below the frame's default character size.
1123 Never ever delete any subwindows - let the window manager do the
1124 clipping.
1125
1126 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
1127 of toolbar lines needed when they exceed the height of the root
1128 window.
1129 (unwind_create_frame_1): New function.
1130 (Fx_create_frame): Generally inhibit calling the window
1131 configuration change hook here. Remove extra call to
1132 change_frame_size - it's not needed when we don't run the
1133 configuration change hook.
1134
1135 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
1136
1137 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
1138 On my Fedora 19 platform the core dumps were so big that
1139 my desktop became nearly catatonic.
1140 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
1141 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
1142 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
1143 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
1144 a clang-only syntax.
1145 * conf_post.h (__has_feature): New macro, if not already defined.
1146 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
1147 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
1148
1149 2013-12-25 Eli Zaretskii <eliz@gnu.org>
1150
1151 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
1152 is a file name. (Bug#16252)
1153
1154 2013-12-25 Chong Yidong <cyd@gnu.org>
1155
1156 * keyboard.c (Voverriding_terminal_local_map)
1157 (Voverriding_local_map): Doc fix.
1158
1159 * keymap.c (Vemulation_mode_map_alists): Doc fix.
1160
1161 2013-12-24 Eli Zaretskii <eliz@gnu.org>
1162
1163 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
1164 file name when it is submitted to ShellExecute. Simplify code.
1165 Don't test DOCUMENT for being a string, as that is enforced by
1166 CHECK_STRING. Doc fix.
1167
1168 2013-12-23 Eli Zaretskii <eliz@gnu.org>
1169
1170 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
1171 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
1172 redisplay_tool_bar does. Improve and fix commentary.
1173 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
1174 limits of the glyph matrices. (Bug#16051)
1175 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
1176 only when the new size is different from the old one, and the new
1177 size can be achieved given the frame height.
1178
1179 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
1180
1181 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
1182
1183 2013-12-23 Glenn Morris <rgm@gnu.org>
1184
1185 * lread.c (Fload): Mention load-prefer-newer in doc.
1186
1187 2013-12-22 Martin Rudalics <rudalics@gmx.at>
1188
1189 Handle Bug#16207 by being more restrictive when running hooks.
1190 * window.c (unwind_change_frame): New function.
1191 (Fset_window_configuration): Don't run configuration change hook
1192 while the frame configuration is unsafe. Call select_window
1193 twice.
1194
1195 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
1196
1197 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
1198
1199 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
1200
1201 * nsterm.h: Declare EmacsColor category.
1202
1203 * nsterm.m (NSColor): Implement EmacsColor category.
1204 (ns_get_color): Use colorUsingDefaultColorSpace.
1205 (ns_get_color, ns_term_init): Use colorForEmacsRed.
1206
1207 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
1208
1209 2013-12-21 Eli Zaretskii <eliz@gnu.org>
1210
1211 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
1212 having the PNG_NORETURN attribute, to avoid compiler warning in
1213 my_png_error.
1214
1215 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1216
1217 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
1218
1219 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
1220 fringe background extension.
1221 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
1222 because they are now always the same as `left' and `width',
1223 respectively. Remove code for the case that `width' and
1224 `sb_width' are different.
1225
1226 2013-12-20 Martin Rudalics <rudalics@gmx.at>
1227
1228 Remove scroll_bar_actual_width from frames.
1229 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
1230 * frame.c (Fscroll_bar_width): Return scroll bar area width.
1231 (x_figure_window_size):
1232 * nsterm.m (x_set_window_size):
1233 * widget.c (set_frame_size):
1234 * w32term.c (x_set_window_size):
1235 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
1236 scroll_bar_actual_width.
1237
1238 Convert scroll_bar members to integers on Windows.
1239 * w32term.h (struct scroll_bar): Convert top, left, width,
1240 height, start, end and dragging to integers.
1241 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
1242 scroll_bar members.
1243 * w32term.c (w32_set_scroll_bar_thumb)
1244 (w32_scroll_bar_handle_click): Remove XINT conversions for
1245 scroll_bar members. Treat bar->dragging as integer.
1246 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
1247 first element. Remove XINT conversions for scroll_bar members.
1248 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
1249 Remove XINT conversions for scroll_bar members.
1250
1251 Fix assignment for new window total sizes.
1252 * window.c (Fwindow_resize_apply_total): Assign values for
1253 minibuffer window.
1254
1255 2013-12-20 Chong Yidong <cyd@gnu.org>
1256
1257 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
1258 argument to `append'.
1259
1260 2013-12-19 Eli Zaretskii <eliz@gnu.org>
1261
1262 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
1263 current text face, for extending the face of the display margins.
1264 (Bug#16192)
1265
1266 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
1267 Doc fix. (Bug#16190)
1268
1269 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
1270
1271 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
1272 Remove.
1273
1274 * nsterm.m (Qfile, Qurl): New.
1275 (EV_MODIFIERS2): New macro.
1276 (EV_MODIFIERS): Use EV_MODIFIERS2.
1277 (ns_term_init): Remove font and color from DND, does not work on
1278 newer OSX, and other ports don't have them.
1279 (performDragOperation:): Handle modifiers used during drag.
1280 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
1281 Remove global Lisp variables used to communicate with ns-win.el.
1282 Remove font and color handling.
1283 (syms_of_nsterm): Defsym Qfile and Qurl.
1284
1285 2013-12-19 Anders Lindgren <andlind@gmail.com>
1286
1287 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
1288 (ns_constrain_all_frames, x_set_offset): Remove assignment to
1289 dont_constrain.
1290 (updateFrameSize:, windowWillResize:toSize:): Add trace.
1291 (constrainFrameRect): Remove special case nr_screens == 1.
1292 Don't constrain size to size of view.
1293
1294 * nsterm.h (ns_output): Remove dont_constrain.
1295
1296 2013-12-19 Anders Lindgren <andlind@gmail.com>
1297
1298 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
1299
1300 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
1301
1302 Minor fixes for recent openp changes.
1303 * lisp.h (GCPRO7): New macro.
1304 * lread.c (openp): Use bool for boolean; all callers changed.
1305 Protect save_string from GC. Don't assume that file descriptors
1306 are nonzero. Redo save_mtime comparison to avoid bogus GCC
1307 warning about uninitialized variable.
1308
1309 2013-12-18 Eli Zaretskii <eliz@gnu.org>
1310
1311 * w32fns.c (emacs_abort): Use intptr_t as argument of
1312 INT_BUFSIZE_BOUND, to avoid compiler warnings.
1313
1314 2013-12-18 Glenn Morris <rgm@gnu.org>
1315
1316 * lread.c (Fload): Pass load_prefer_newer to openp.
1317 Don't bother checking mtime if openp already did it.
1318 (openp): Add `newer' argument, to check all suffixes
1319 and find the newest file.
1320 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
1321 * callproc.c (call_process):
1322 * charset.c (load_charset_map_from_file):
1323 * emacs.c (init_cmdargs):
1324 * image.c (x_create_bitmap_from_file, x_find_image_file):
1325 * lisp.h (openp):
1326 * lread.c (Flocate_file_internal):
1327 * process.c (Fformat_network_address):
1328 * sound.c (Fplay_sound_internal):
1329 * w32.c (check_windows_init_file):
1330 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
1331
1332 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
1333
1334 2013-12-17 Eli Zaretskii <eliz@gnu.org>
1335
1336 * w32.c (getloadavg): Don't index samples[] array with negative
1337 indices. Recover from wall-clock time being set backwards.
1338
1339 * w32term.c (w32_initialize): Declare the argument of
1340 set_user_model as const.
1341
1342 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
1343 (w32_menu_show): Constify some arguments passed to MessageBox.
1344
1345 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
1346 to initialize Lisp objects.
1347
1348 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
1349 initialize Lisp objects.
1350
1351 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
1352 use variables used only on X under that condition.
1353
1354 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
1355 variables not used there.
1356
1357 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
1358
1359 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
1360 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
1361
1362 2013-12-16 Eli Zaretskii <eliz@gnu.org>
1363
1364 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
1365 code, revealed in presence of R2L characters, character
1366 compositions, and display vectors. A better fix for Bug#16148.
1367 (extend_face_to_end_of_line): Don't reference tool_bar_window in
1368 GTK and NS builds, they don't have this member of struct frame.
1369
1370 * dispextern.h (struct composition_it): Correct a comment for the
1371 'width' member.
1372
1373 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
1374
1375 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
1376 This prevents a compilation error on C compilers that do not
1377 default functions to return 'int' if not declared. Also, add
1378 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
1379 since it now uses inline functions.
1380
1381 2013-12-16 Eli Zaretskii <eliz@gnu.org>
1382
1383 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
1384 display margins on mode line, header line, and in the frame's
1385 tool-bar window. (Bug#16165)
1386
1387 2013-12-16 Andreas Schwab <schwab@suse.de>
1388
1389 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
1390
1391 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
1392
1393 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
1394 `CHECK_LIST_CONS'.
1395
1396 2013-12-16 Martin Rudalics <rudalics@gmx.at>
1397
1398 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
1399
1400 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
1401
1402 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
1403 intended to find bogus pointers in font objects (Bug#16140).
1404 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
1405 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
1406 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
1407 Disable for MS-Windows due to Bug#15876; apparently this
1408 requires more or less substantial changes in fontset code.
1409 * xfont.c (xfont_close):
1410 * xftfont.c (xftfont_close): Call x_display_info_for_display
1411 to check whether 'Display *' is valid (Bug#16093 and probably
1412 Bug#16069).
1413
1414 2013-12-15 Eli Zaretskii <eliz@gnu.org>
1415
1416 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
1417 Reported by Juanma Barranquero <lekktu@gmail.com>.
1418
1419 * process.c (Fprocess_send_eof): Don't crash if someone tries to
1420 open a pty on MS-Windows. (Bug#16152)
1421
1422 * emacs.c (decode_env_path): Fix bogus comparison against
1423 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
1424
1425 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
1426
1427 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
1428 (Fx_file_dialog): Add parentheses around && to silence warning.
1429
1430 * w32term.c (construct_drag_n_drop): Remove unused local variable.
1431
1432 2013-12-15 Eli Zaretskii <eliz@gnu.org>
1433
1434 * xdisp.c (extend_face_to_end_of_line): Extend background of
1435 non-default face in margin areas as well. (Bug#16151)
1436 (display_line): Call extend_face_to_end_of_line for continued
1437 lines as well, if the display margins have non-zero width.
1438 (set_glyph_string_background_width): When needed, set the
1439 extends_to_end_of_line_p flag on glyph strings to be drawn in
1440 margin areas, not only in the text area.
1441
1442 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
1443 startup.
1444
1445 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
1446
1447 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
1448 Don't worry about verify_error being t, since it has to be a list.
1449
1450 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
1451
1452 Use bool for boolean, focusing on headers.
1453 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
1454 No need to include <stdbool.h>, since conf_post.h does it now.
1455 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
1456 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
1457 (SET_PER_BUFFER_VALUE_P):
1458 * ccl.c, ccl.h (setup_ccl_program):
1459 * ccl.h (CHECK_CCL_PROGRAM):
1460 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
1461 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
1462 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
1463 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
1464 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
1465 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
1466 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
1467 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
1468 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
1469 (CHARSET_FAST_MAP_SET):
1470 * coding.c (decode_coding_ccl, encode_coding_ccl):
1471 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
1472 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
1473 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
1474 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
1475 (decode_coding_c_string):
1476 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
1477 * conf_post.h (has_attribute):
1478 * dispextern.h (trace_redisplay_p)
1479 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
1480 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
1481 (SET_GLYPH_FROM_CHAR_GLYPH)
1482 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
1483 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
1484 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
1485 (cursor_in_mouse_face_p):
1486 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
1487 (blank_row, prepare_desired_row)
1488 (build_frame_matrix_from_leaf_window, make_current)
1489 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
1490 (update_window, scrolling_window, update_frame_line):
1491 * disptab.h (GLYPH_FOLLOW_ALIASES):
1492 * editfns.c (Fformat):
1493 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
1494 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
1495 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
1496 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
1497 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
1498 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
1499 (FONT_DEFERRED_LOG):
1500 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
1501 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
1502 (FRAME_MOUSE_UPDATE):
1503 * fringe.c (Fdefine_fringe_bitmap):
1504 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
1505 (x_create_bitmap_from_xpm_data, xpm_load_image):
1506 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
1507 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
1508 (MERGE_INTERVAL_CACHE):
1509 * keymap.h (KEYMAPP):
1510 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
1511 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
1512 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
1513 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
1514 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
1515 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
1516 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
1517 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
1518 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
1519 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
1520 (SETUP_BUFFER_SYNTAX_TABLE):
1521 * systime.h (timespec_valid_p):
1522 * term.c (save_and_enable_current_matrix):
1523 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
1524 * xdisp.c (in_display_vector_p, display_tool_bar_line)
1525 (redisplay_internal, try_window_reusing_current_matrix)
1526 (sync_frame_with_window_matrix_rows, try_window_id)
1527 (display_menu_bar, display_tty_menu_item, display_mode_line)
1528 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
1529 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
1530 * xmenu.c (xmenu_show):
1531 * xterm.c (use_xim, x_term_init):
1532 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
1533 (struct x_bitmap_record):
1534 Use bool for booleans.
1535 * ccl.c (struct buffer_text):
1536 * ccl.h (struct ccl_program):
1537 * charset.h (struct charset):
1538 * cm.h (struct cm):
1539 * coding.h (struct iso_2022_spec, struct coding_system):
1540 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
1541 (struct glyph_string, struct face, struct face_cache)
1542 (struct bidi_string_data, struct bidi_it)
1543 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
1544 (struct image):
1545 * editfns.c (Fformat):
1546 * frame.h (struct frame):
1547 * fringe.c (struct fringe_bitmap):
1548 * intervals.h (struct interval):
1549 * keyboard.h (struct kboard):
1550 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
1551 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
1552 (struct Lisp_Buffer_Local_Value, union specbinding):
1553 * macfont.m (struct macfont_info):
1554 * process.h (struct Lisp_Process):
1555 * termchar.h (struct tty_display_info):
1556 * window.h (struct window):
1557 * xterm.h (struct x_output):
1558 Use bool_bf for boolean bit-fields.
1559 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
1560 All callers changed.
1561 * ccl.h (struct ccl_program): Remove unused members private_state,
1562 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
1563 eight_bit_control.
1564 (struct ccl_spec): Remove unused members cr_carryover,
1565 eight_bit_carryover.
1566 * conf_post.h: Include <stdbool.h>.
1567 (bool_bf): New type.
1568 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
1569 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
1570 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
1571 'do { ... } while (false)' brackets.
1572 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
1573 Args must now be expressions; all callers changed.
1574 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
1575 (PRODUCE_GLYPHS): Simplify use of boolean.
1576 * fileio.c (Fcopy_file):
1577 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
1578 * lisp.h (UNGCPRO): Return void, not int.
1579 (FOR_EACH_TAIL): Use void expression, not int expression.
1580 * region-cache.c: Reindent.
1581 * region-cache.h: Copy comments from region-cache.c, to fix
1582 incorrect remarks about booleans.
1583
1584 2013-12-14 Eli Zaretskii <eliz@gnu.org>
1585
1586 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
1587 when character at point is displayed from a display vector.
1588 (Bug#16148)
1589
1590 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
1591
1592 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
1593 now a list of certificate validation checks that will abort a
1594 connection with an error.
1595 (Fgnutls_boot): Document it and use it.
1596
1597 2013-12-14 Martin Rudalics <rudalics@gmx.at>
1598
1599 * w32term.c (w32_enable_frame_resize_hack): New variable.
1600 (x_set_window_size): Use it to hack frame resizing on Windows
1601 (Bug#16028).
1602
1603 2013-12-14 Eli Zaretskii <eliz@gnu.org>
1604
1605 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
1606 Windows-specific code to w32.c. Change error message text to
1607 match that of Posix platforms.
1608
1609 * w32.c (w32_copy_file): New function, most of the code copied and
1610 reworked from Fcopy_file. Improve error handling. Plug memory
1611 leak when errors are thrown. Support file names outside of the
1612 current codepage. (Bug#7100)
1613
1614 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
1615
1616 * lread.c (load_path_default): Prototype.
1617
1618 2013-12-13 Glenn Morris <rgm@gnu.org>
1619
1620 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
1621 (dump_path): Remove.
1622 (load-path-default): Remove `changed' argument.
1623 Do not set dump_path permanently. Simplify.
1624 (init_lread): Simplify.
1625 (syms_of_lread): Remove dump_path.
1626
1627 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
1628
1629 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
1630 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
1631 2013-12-12 font-related change to avoid Bug#16128, which
1632 is quite hard to fix without even more substantial changes.
1633
1634 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
1635
1636 * font.c (font_close_object): Check for live frame (Bug#16128).
1637
1638 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
1639
1640 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
1641 Return ptrdiff_t, not int, since it's a buffer size.
1642 Reindent/reparen some macros to a more Gnuish style.
1643
1644 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
1645
1646 Avoid undefined behavior with huge regexp interval counts.
1647 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
1648 since it's now specialized to interval counts. All uses changed.
1649 Do not assume wrapraound on signed integer overflow.
1650 (regex_compile): Simplify based on the above changes.
1651
1652 2013-12-12 Eli Zaretskii <eliz@gnu.org>
1653
1654 Support file names on MS-Windows that use characters outside of
1655 the current system codepage. (Bug#7100)
1656
1657 * w32.c (get_file_security, set_file_security)
1658 (create_symbolic_link): Separate pointers and boolean flags for
1659 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
1660 non-zero, else the former.
1661 (codepage_for_filenames, filename_to_utf16, )
1662 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
1663 New functions.
1664 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
1665 characters.
1666 (normalize_filename): Lose the DBCS code, now works on UTF-8.
1667 Accept only one argument; all callers changed.
1668 (dostounix_filename): Remove the second argument, now works in
1669 UTF-8. All callers changed.
1670 (parse_root): Lose DBCS code.
1671 (get_long_basename, w32_get_short_filename, init_environment)
1672 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
1673 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
1674 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
1675 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
1676 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
1677 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
1678 otherwise.
1679 (ansi_encode_filename): New function.
1680 (get_emacs_configuration, get_emacs_configuration_options):
1681 Functions deleted.
1682 (add_volume_info, GetCachedVolumeInformation): Run the input file
1683 name through unixtodos_filename, to ensure it is stored and
1684 referenced in canonical form.
1685 (get_volume_info): Lose the DBCS code, now works in UTF-8.
1686 (logon_network_drive, sys_link, utime): Improve error handling.
1687 (sys_access): New function.
1688 (hashval, generate_inode_val): Unused functions deleted.
1689 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
1690 (check_windows_init_file): Convert error message from UTF-8 to
1691 ANSI codepage, for display in the message box.
1692 (globals_of_w32): Set w32_unicode_filenames according to the OS
1693 version.
1694
1695 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
1696 w32_unicode_filenames is non-zero, ANSI mode otherwise.
1697 (syms_of_w32term): Declare w32-unicode-filenames.
1698
1699 * w32proc.c (new_child, delete_child): Remove code that handled
1700 unused pending_deletion and input_file members of the child struct.
1701 (create_child, sys_spawnve): Convert all file names to ANSI
1702 codepage. Use ANSI APIs explicitly; forcibly fail if any file
1703 name cannot be encoded in ANSI codepage. Don't use
1704 unixtodos_filename, mirror slashes by hand.
1705 (record_infile, record_pending_deletion): Functions deleted.
1706 (Fw32_short_file_name): Call w32_get_short_filename instead of
1707 GetShortPathName.
1708
1709 * w32notify.c (add_watch): Work in Unicode mode when
1710 w32_unicode_filenames is non-zero, ANSI mode otherwise.
1711 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
1712 instead, do the same with Lisp primitives.
1713
1714 * w32fns.c (file_dialog_callback, Fx_file_dialog)
1715 (Fsystem_move_file_to_trash, Fw32_shell_execute)
1716 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
1717 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
1718 (Fw32_shell_execute): Improve error reporting.
1719 (Fdefault_printer_name): Ifdef away for Cygwin.
1720
1721 * w32.h (struct _child_process): Remove input_file and
1722 pending_deletion members that are no longer used.
1723 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
1724 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
1725 (ansi_encode_filename): New and updated prototypes.
1726
1727 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
1728 APIs explicitly.
1729 (unexec): Don't use dostounix_filename, it expects a file name in
1730 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
1731 ANSI encoding.
1732
1733 * fileio.c (Ffile_name_directory, file_name_as_directory)
1734 (directory_file_name, Fexpand_file_name)
1735 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
1736 arguments of dostounix_filename.
1737 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
1738 use MAX_UTF8_PATH for size of file-name strings.
1739 (emacs_readlinkat): Build an explicitly unibyte string for file
1740 names.
1741 (syms_of_fileio) <file-name-coding-system>:
1742 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
1743
1744 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
1745 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
1746 directories to UTF-8.
1747 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
1748 environment, and each element of the input PATH, to UTF-8.
1749
1750 * dired.c (file_attributes): Use build_unibyte_string explicitly
1751 to make Lisp strings from user and group names.
1752
1753 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
1754 decode_file.
1755
1756 * coding.c (decode_file_name, encode_file_name): New functions.
1757
1758 * termcap.c (tgetent): Adapt to the change in arguments of
1759 dostounix_filename.
1760
1761 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
1762 names.
1763
1764 * msdos.c (dostounix_filename, init_environment): Adapt to the
1765 change in arguments of dostounix_filename.
1766
1767 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
1768 [WINDOWSNT]: Encode file names passed to the image libraries in
1769 ANSI codepage.
1770
1771 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
1772 [WINDOWSNT]: Convert file names to the current ANSI codepage.
1773
1774 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
1775 arguments of dostounix_filename.
1776
1777 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
1778
1779 * font.h (struct font_entity) [HAVE_NS]: New field to record
1780 font driver which was used to create this entity.
1781 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
1782 frame where the font was opened.
1783 (font_close_object): Add prototype.
1784 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
1785 (font_close_object): Not static any more. Lost frame arg.
1786 Adjust comment and users.
1787 * alloc.c (cleanup_vector): Call font_close_object to adjust
1788 per-frame font counters correctly. If HAVE_NS, also call
1789 driver-specific cleanup for font-entity objects.
1790 * ftfont.c (ftfont_open):
1791 * nsfont.m (nsfont_open):
1792 * w32font.c (w32font_open_internal):
1793 * xfont.c (xfont_open):
1794 * xftfont.c (xftfont_open): Save frame pointer in font object.
1795 * macfont.m (macfont_open): Likewise.
1796 (macfont_descriptor_entity): Save driver pointer to be able
1797 to call its free_entity routine when font-entity is swept.
1798 * ftxfont.c (ftxfont_open): Add eassert because frame
1799 pointer should be saved by ftfont_driver.open.
1800
1801 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
1802
1803 * xterm.c (x_make_frame_visible): Restore hack which is needed when
1804 input polling is used. This is still meaningful for Cygwin, see
1805 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
1806 * keyboard.c (poll_for_input_1, input_polling_used):
1807 Define unconditionally.
1808 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
1809 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
1810 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
1811 (font_for_char): Prefer ptrdiff_t to int for buffer position.
1812 (face_for_char): Likewise. Rearrange eassert and return ASCII
1813 face for CHAR_BYTE8_P.
1814 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
1815
1816 2013-12-11 Ken Brown <kbrown@cornell.edu>
1817
1818 * dispextern.h (erase_phys_cursor):
1819 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
1820
1821 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
1822
1823 * nsterm.m (x_free_frame_resources):
1824 * term.c (tty_free_frame_resources):
1825 * xterm.c (x_free_frame_resources): Do not check for non-NULL
1826 face cache because it's implied by free_frame_faces anyway.
1827 * w32term.c (x_free_frame_resources): Likewise. Do not call
1828 free_frame_faces twice.
1829
1830 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
1831
1832 * editfns.c (Fformat_time_string): Mention %F in the doc.
1833
1834 2013-12-11 Martin Rudalics <rudalics@gmx.at>
1835
1836 * window.c (resize_frame_windows): Don't return immediately when
1837 the root window's size doesn't change - the minibuffer window
1838 may still have to be repositioned/resized.
1839 * xfns.c (Fx_create_frame): Always change the frame size after
1840 initializing the frame's faces.
1841 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
1842 change_frame_size should already have done it.
1843 (x_new_font): Assign new tool- and menu-bar heights.
1844 (x_set_window_size_1): Account for tool- and menu-bar heights
1845 (Bug#16013). Don't set pixel sizes since change_frame_size
1846 should already have done it.
1847
1848 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
1849
1850 Remove the option of using libcrypto.
1851 * Makefile.in (LIB_CRYPTO): Remove.
1852 (LIBES): Don't use it.
1853
1854 2013-12-11 Juri Linkov <juri@jurta.org>
1855
1856 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
1857 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
1858
1859 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
1860
1861 * xdisp.c (display_tool_bar_line): Don't extend on a previously
1862 drawn tool bar items (Bug#16058).
1863 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
1864
1865 2013-12-09 Ken Brown <kbrown@cornell.edu>
1866
1867 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
1868
1869 * lisp.h (get_frame_param): Adjust conditions for prototype
1870 declaration.
1871
1872 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
1873
1874 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
1875 Avoid unused macro warning if configured --without-xft.
1876
1877 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
1878
1879 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
1880
1881 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
1882
1883 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
1884
1885 * emacs.c (main): Call fixup_locale a second time for GNUstep.
1886
1887 2013-12-08 Martin Rudalics <rudalics@gmx.at>
1888
1889 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
1890
1891 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
1892
1893 Use libcrypto's checksum implementations if available, for speed.
1894 * Makefile.in (LIB_CRYPTO): New macro.
1895 (LIBES): Use it.
1896
1897 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
1898 The macro didn't conform to C99 due to type mismatch,
1899 which caused compilation failure with Sun C 5.12,
1900 and it was confusing anyway. Include window.h to declare
1901 redisplay_other_windows.
1902
1903 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
1904
1905 * window.c (set_window_buffer): Update mode line (bug#16084).
1906
1907 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
1908
1909 Fix minor problems found by static checking.
1910 * keyboard.c (poll_for_input_1, input_polling_used):
1911 Define only if HAVE_NTGUI.
1912 * xmenu.c (popup_activate_callback): Omit unnecessary
1913 check against USE_X_TOOLKIT, which must be defined here anyway.
1914 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
1915 Now static.
1916
1917 2013-12-07 Martin Rudalics <rudalics@gmx.at>
1918
1919 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
1920
1921 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
1922
1923 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
1924
1925 * nsterm.m (x_set_window_size): Remove fprintf.
1926 (init): Define always. Set applicationDidFinishLaunchingCalled
1927 for GNUstep.
1928 (applicationDidFinishLaunching:):
1929 Set applicationDidFinishLaunchingCalled.
1930 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
1931 not called.
1932
1933 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
1934
1935 Pixel resize changes for NS (Bug#16049).
1936 * nsterm.m (x_set_window_size): Change parameters rows/cols to
1937 height/width. row/cols are locals.
1938 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
1939 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
1940 (windowWillResize): Remove gsextra. Calculate extra as in
1941 updateFrameSize.
1942 (x_new_font): Don't change frame size if fullscreen.
1943 Change size pixelwise.
1944
1945 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
1946 comment in xfns.c. Change to pixelwise call.
1947
1948 2013-12-06 Eli Zaretskii <eliz@gnu.org>
1949
1950 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
1951 (Bug#16070)
1952
1953 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
1954
1955 * xterm.c (input_signal_count): Remove.
1956 (x_dispatch_event): Define unconditionally.
1957 (x_make_frame_visible): Process X events until the frame
1958 is really visible (Bug#16027).
1959 * xterm.h (x_dispatch_event): Declare unconditionally.
1960
1961 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
1962
1963 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
1964
1965 * nsterm.m (x_set_window_size): Handle pixelwise.
1966
1967 2013-12-05 Martin Rudalics <rudalics@gmx.at>
1968
1969 * w32term.c (x_new_font):
1970 * xterm.c (x_new_font): Calculate new frame size from new font
1971 size (Bug#16028).
1972
1973 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
1974
1975 * lisp.h (FOR_EACH_TAIL): New macro.
1976 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
1977
1978 * window.c (select_window): Call second wset_redisplay before we change
1979 selected_window (bug#16034).
1980
1981 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
1982
1983 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
1984
1985 2013-12-04 Eli Zaretskii <eliz@gnu.org>
1986
1987 * w32xfns.c: Include window.h, to avoid a compiler warning.
1988
1989 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
1990
1991 * window.c (window_scroll): Mark window for redisplay (bug#16034).
1992 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
1993 window_scroll takes care of it.
1994 (Fset_window_point, Fdelete_other_windows_internal)
1995 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
1996 (Fsplit_window_internal, Fdelete_window_internal)
1997 (Fresize_mini_window_internal, Fset_window_configuration)
1998 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
1999 cause redisplay instead of forcing a complete redisplay.
2000 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
2001 we're only affecting the selected_window.
2002
2003 2013-12-04 Eli Zaretskii <eliz@gnu.org>
2004
2005 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
2006 directional control characters. Update type and category
2007 determination according to the UBA from Unicode v6.3.
2008 (bidi_category_t): New category EXPLICIT_FORMATTING.
2009
2010 * dispextern.h (bidi_type_t): Update to include new bidirectional
2011 properties introduced with Unicode v6.3. (Bug#16043)
2012
2013 2013-12-04 Martin Rudalics <rudalics@gmx.at>
2014
2015 * xterm.c (XTflash): Fix coordinate of bottom area to flash
2016 (Bug#16044).
2017
2018 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
2019
2020 * font.c (font_list_entities): Remove dummy assignment.
2021 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
2022 used on graphic displays only. Remove unused 'font_encoder' member.
2023 (struct font_bitmap): Remove unused 'extra' member.
2024 * nsfont.m (nsfont_open):
2025 * w32font.c (w32font_open_internal):
2026 * ftfont.c (ftfont_get_bitmap): Adjust users.
2027
2028 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
2029
2030 Use bool for boolean.
2031 * tparam.c (tparam1):
2032 * undo.c (record_point, record_property_change):
2033 Use bool for boolean, for local vars that are always true or false.
2034
2035 Minor integer overflow fixes (Bug#16033).
2036 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
2037 This improves on the previous fix to this function.
2038 (window_resize_check): When summing up pixel counts, don't rely on
2039 undefined behavior if the sum overflows.
2040
2041 2013-12-03 Martin Rudalics <rudalics@gmx.at>
2042
2043 * window.c (Fset_window_new_pixel): Don't choke at negative
2044 argument value (Bug#16033).
2045
2046 * xfns.c (Fx_create_frame): Add another call to change_frame_size
2047 to avoid crash in window_box_height.
2048
2049 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
2050 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
2051 calculation.
2052 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
2053
2054 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
2055
2056 Minor integer overflow fixes.
2057 * window.c (Fset_window_new_pixel, grow_mini_window):
2058 * xdisp.c (Fwindow_text_pixel_size):
2059 Avoid undefined behavior on signed integer overflow.
2060 * xfns.c (x_set_mouse_color):
2061 Check that drag shape fits in 'unsigned', since that's what X wants.
2062
2063 2013-12-02 Eli Zaretskii <eliz@gnu.org>
2064
2065 Improve reporting of fatal exception on MS-Windows.
2066 * w32fns.c (my_exception_handler): New function.
2067 (globals_of_w32fns): Set it up as the unhandled exception
2068 handler. Initialize exception code and address to zeros.
2069 (emacs_abort): If the exception code and address are available,
2070 print them at the beginning of the backtrace. Fix the format of
2071 printing addresses (was producing 0x0x12345678 on XP).
2072 (Bug#15994)
2073
2074 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
2075
2076 * eval.c (Fbacktrace__locals): New function.
2077 (syms_of_eval): Defsubr it.
2078
2079 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
2080
2081 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
2082 Define here to unify between...
2083 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
2084 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
2085
2086 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2087
2088 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
2089
2090 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
2091 fringe background extension.
2092 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
2093 because they are now always the same as `left' and `width',
2094 respectively. Remove code for the case that `width' and
2095 `sb_width' are different.
2096
2097 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
2098
2099 Fix minor problems found by static checking.
2100 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
2101 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
2102 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
2103
2104 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2105
2106 * image.c (imagemagick_compute_animated_image): Don't crash if we
2107 have an animation with different-sized images (bug#15313).
2108
2109 2013-11-30 Martin Rudalics <rudalics@gmx.at>
2110
2111 Remove some unused items introduced during pixelwise change.
2112 * window.c (window_resize_total_check): Remove unused function.
2113 * xdisp.c (remember_mouse_glyph): Remove unused label.
2114 (Ftool_bar_height): Move declaration inside #if.
2115 * xterm.c (x_set_window_size): Don't use r and c.
2116
2117 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
2118
2119 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
2120 `value' and `endp'.
2121
2122 * window.c (Fset_window_configuration): Comment out unused variables.
2123
2124 * w32term.c (w32_read_socket): Remove unused variable `buf'.
2125
2126 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
2127
2128 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
2129
2130 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
2131
2132 * gnutls.c (gnutls_audit_log_function): Only declare and define if
2133 HAVE_GNUTLS3 (Bug#16001).
2134
2135 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
2136 if interrupts are deferred (Bug#15801).
2137
2138 2013-11-30 Martin Rudalics <rudalics@gmx.at>
2139
2140 Support resizing frames and windows pixelwise.
2141 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
2142 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
2143 (struct glyph_matrix): Replace window_left_col and
2144 window_top_line by window_pixel_left and window_pixel_top.
2145 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
2146 Minor rewrite.
2147 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
2148 (draw_window_divider, move_it_to, x_draw_right_divider)
2149 (x_draw_bottom_divider, change_frame_size): Add or fix
2150 declarations.
2151 * dispnew.c (change_frame_size_1): Change prototype.
2152 (adjust_glyph_matrix, required_matrix_width)
2153 (adjust_frame_glyphs_for_window_redisplay): Use pixel
2154 values instead of lines and columns.
2155 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
2156 WINDOW_TOTAL_FRINGE_WIDTH.
2157 (handle_window_change_signal, do_pending_window_change)
2158 (init_display): Adjusts calls of change_frame_size.
2159 (change_frame_size, change_frame_size_1): Handle pixelwise
2160 changes.
2161 * frame.c (Qright_divider_width, Qbottom_divider_width):
2162 New Lisp objects.
2163 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
2164 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
2165 (x_set_internal_border_width, x_set_vertical_scroll_bars)
2166 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
2167 values.
2168 (set_frame_param): New function.
2169 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
2170 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
2171 (Ffringe_width, Fborder_width, Fright_divider_width)
2172 (Fbottom_divider_width): New functions, defsubr them.
2173 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
2174 New argument pixelwise.
2175 (struct frame_parm_table): New members Qright_divider_width and
2176 Qbottom_divider_width.
2177 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
2178 (x_report_frame_params): Handle Qright_divider_width and
2179 Qbottom_divider_width.
2180 (x_set_right_divider_width, x_set_bottom_divider_width):
2181 New functions.
2182 (frame_resize_pixelwise): New option.
2183 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
2184 new_pixelwise, right_divider_width and bottom_divider_width;
2185 remove total_lines; rename text_lines, text_cols, new_text_lines
2186 and new_text_cols to text_height, text_width, new_height and
2187 new_width respectively.
2188 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
2189 FRAME_TEXT_WIDTH respectively.
2190 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
2191 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
2192 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
2193 New macros.
2194 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
2195 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
2196 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
2197 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
2198 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
2199 (FRAME_TOTAL_COLS_ARG): Remove macro.
2200 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
2201 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
2202 (x_wm_set_size_hint): Handle frame pixel sizes.
2203 * indent.c (compute_motion, Fcompute_motion):
2204 Call window_body_width instead of window_body_cols.
2205 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
2206 (make_lispy_position): Handle right and bottom dividers.
2207 (Fsuspend_emacs): Pixelize call of change_frame_size.
2208 * keyboard.h: Extern Qright_divider, Qbottom_divider.
2209 * lisp.h: Extern set_frame_param.
2210 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
2211 x_set_window_size.
2212 (Fx_create_frame): Add entry for vertical_drag_cursor.
2213 Pixelize call of change_frame_size.
2214 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
2215 * nsterm.m (ns_update_window_end): Optionally draw right
2216 divider.
2217 (x_set_window_size): Add argument pixelwise.
2218 Call check_frame_size and change_frame_size with pixelwise zero.
2219 (ns_draw_window_divider): New function.
2220 (ns_redisplay_interface): Add ns_draw_window_divider.
2221 (updateFrameSize:): Call change_frame_size with pixelwise zero.
2222 (x_new_font): Call x_set_window_size with pixelwise zero.
2223 * print.c (print_object): For a window print its sequence
2224 number again.
2225 * term.c (Fresume_tty): Pixelize call of change_frame_size.
2226 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
2227 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
2228 (w32_createwindow): Use scroll bar area width.
2229 (w32_wnd_proc): Handle bottom divider width.
2230 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
2231 (Fx_create_frame): Default divider width parameters.
2232 Caclulate sizes pixelwise. Add vertical drag cursor support.
2233 (x_create_tip_frame): Default divider widths to zero.
2234 Pixelize call to change_frame_size.
2235 (Fx_show_tip): Add handling of divider widths. Pixelize window
2236 position and sizes.
2237 (Fw32_frame_rect): New function.
2238 (frame_parm_handler w32_frame_parm_handlers): Add divider
2239 widths.
2240 (Vx_window_vertical_drag_shape): Add variable.
2241 * w32inevt.c (resize_event, maybe_generate_resize_event):
2242 Pixelize change_frame_size calls.
2243 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
2244 call.
2245 * w32term.c (w32_draw_window_divider): New function.
2246 (x_update_window_end): Handle right divider.
2247 (w32_draw_fringe_bitmap, x_scroll_run)
2248 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
2249 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
2250 Calculate new frame sizes pixelwise.
2251 (x_new_font): Pixelize call to x_set_window_size.
2252 (x_check_fullscreen): Pixelize call to change_frame_size.
2253 (x_set_window_size_1, x_set_window_size): New argument
2254 pixelwise. Calculate pixelwise.
2255 (x_wm_set_size_hint): Use scroll bar area width.
2256 (w32_redisplay_interface): Add w32_draw_window_divider.
2257 * w32term.h (struct w32_output): Add vertical drag cursor.
2258 * widget.c (set_frame_size, update_wm_hints)
2259 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
2260 change_frame_size.
2261 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
2262 * window.c (sequence_number): Restore.
2263 (Fwindow_pixel_width, Fwindow_pixel_height)
2264 (Fwindow_mode_line_height, Fwindow_header_line_height)
2265 (window_pixel_to_total, Frun_window_scroll_functions)
2266 (Fset_window_new_pixel, window_resize_apply_total)
2267 (Fwindow_resize_apply_total): New functions.
2268 (window_body_height, window_body_width): Rename from
2269 window_body_lines. New argument PIXELWISE.
2270 Calculate pixelwise.
2271 (Fwindow_body_height, Fwindow_body_width): New argument
2272 PIXELWISE.
2273 (coordinates_in_window, window_relative_x_coord): Use window's
2274 pixel width instead of total width.
2275 (replace_window, recombine_windows): Initialize pixel values.
2276 (resize_root_window, resize_frame_windows, grow_mini_window)
2277 (shrink_mini_window): New argument PIXELWISE.
2278 Calculate pixelwise.
2279 (Fdelete_other_windows_internal, adjust_window_margins)
2280 (window_resize_check, window_resize_apply)
2281 (Fdelete_window_internal, Fresize_mini_window_internal)
2282 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
2283 (check_frame_size): Rename arguments. New argument PIXELWISE.
2284 Calculate pixelwise.
2285 (set_window_buffer): Make samebuf bool. Run configuration change
2286 hook only if buffer changed.
2287 (Fset_window_buffer): Rewrite doc-string.
2288 (make_window): Initialize new_pixel slot.
2289 (Fwindow_resize_apply): Check pixel size of root window.
2290 (Fsplit_window_internal): Call 2nd argument pixel_size.
2291 Calculate pixelwise.
2292 (Fscroll_left, Fscroll_right): Call window_body_width instead of
2293 window_body_cols.
2294 (save_window_data): New slots frame_text_width,
2295 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
2296 (saved_window): New slots pixel_left, pixel_top, pixel_height,
2297 pixel_width.
2298 (Fcurrent_window_configuration, Fset_window_configuration)
2299 (save_window_save, compare_window_configurations): Handle new
2300 slots in save_window_data and saved_window.
2301 (Fset_window_scroll_bars): Fix doc-string.
2302 (window_resize_pixelwise): New variable.
2303 (coordinates_in_window, Fcoordinates_in_window_p):
2304 Handle dividers.
2305 (make_parent_window): Adjust sequence_number.
2306 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
2307 New functions.
2308 * window.h (struct window): New members new_pixel, pixel_left,
2309 pixel_top, pixel_width, pixel_height. Restore sequence_number.
2310 (wset_new_pixel): New function.
2311 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
2312 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
2313 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
2314 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
2315 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
2316 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
2317 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
2318 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
2319 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
2320 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
2321 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
2322 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
2323 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
2324 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
2325 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
2326 Rewrite.
2327 (resize_frame_windows, grow_mini_window, shrink_mini_window)
2328 (window_body_width, check_frame_size): Adapt external declarations.
2329 * xdisp.c (last_max_ascent): New integer.
2330 (window_text_bottom_y): Handle bottom divider.
2331 (window_box_width, window_box_height): Calculate pixelwise.
2332 (get_glyph_string_clip_rects): Handle right divider.
2333 (remember_mouse_glyph): When windows are resized pixelwise
2334 proceed with width and height set to 1.
2335 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
2336 WINDOW_TOTAL_WIDTH.
2337 (move_it_to): Calculate and return maximum x position
2338 encountered.
2339 (Fwindow_text_pixel_size): New function.
2340 (resize_mini_window, update_tool_bar): Calculate pixelwise.
2341 (tool_bar_lines_needed): Rename to tool_bar_height.
2342 Calculate pixelwise.
2343 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
2344 Calculate pixelwise.
2345 (redisplay_tool_bar): Calculate pixelwise.
2346 (redisplay_window): Calculate pixelwise. Handle dividers.
2347 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
2348 (x_draw_vertical_border): Handle dividers.
2349 (define_frame_cursor1): Handle vertical drag cursor.
2350 (x_draw_right_divider, x_draw_bottom_divider): New functions.
2351 (expose_window): Calculate pixelwise. Handle dividers.
2352 (init_xdisp): Initialize pixel values.
2353 * xfaces.c (Qwindow_divider): New face.
2354 (realize_basic_faces): Realize it.
2355 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
2356 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
2357 (x_set_scroll_bar_default_width): Default actual width to 16.
2358 (Fx_create_frame): Set sizes pixelwise.
2359 (x_create_tip_frame): Default divider widths to zero.
2360 Pixelize call of change_frame_size.
2361 (Fx_show_tip): Handle divider widths. Initial pixel position
2362 and sizes.
2363 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
2364 (Vx_window_vertical_drag_shape): New option.
2365 * xmenu.c (free_frame_menubar): Pixelize call of
2366 x_set_window_size.
2367 * xterm.c (x_draw_window_divider): New function.
2368 (x_update_window_end): Optionally draw right divider.
2369 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
2370 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
2371 (handle_one_xevent, x_new_font): Calculate pixelwise.
2372 (x_set_window_size_1, x_set_window_size): New argument
2373 pixelwise. Calculate pixelwise.
2374 (x_wm_set_size_hint): Pixelize call of check_frame_size.
2375 (struct x_redisplay_interface): Add x_draw_window_divider.
2376 * xterm.h (struct x_output): Add vertical_drag_cursor.
2377
2378 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
2379
2380 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
2381 Set invisible frames's `redisplay' when a full redisplay is requested.
2382 (redisplay_window): Set must_be_updated_p instead (bug#15999).
2383 (redisplay_mode_lines): Don't set must_be_updated_p any more.
2384 (display_mode_lines): Set it here instead.
2385
2386 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
2387
2388 * dispextern.h (set_window_update_flags): Remove.
2389
2390 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2391
2392 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
2393
2394 * xdisp.c (REDISPLAY_SOME_P): New macro.
2395 (redisplay_internal): Use it (bug#15999).
2396 (prepare_menu_bars, redisplay_window): Use it as well.
2397
2398 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
2399
2400 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
2401
2402 * w32font.c (g_b_init_get_char_width_32_w): New static var.
2403 (globals_of_w32font): Zero it out.
2404 (GetCharWidth32W_Proc): New function pointer.
2405 (get_char_width_32_w): New function.
2406 (compute_metrics): If get_glyph_outline_w returns an error, try
2407 get_char_width_32_w before declaring a failure. This avoids
2408 punishing raster (a.k.a. "bitmap") fonts by slowing down
2409 redisplay. (Bug#6364).
2410
2411 2013-11-29 Eli Zaretskii <eliz@gnu.org>
2412
2413 * xdisp.c (clear_mouse_face): Don't invalidate the entire
2414 mouse-highlight info, just signal frame_up_to_date_hook that mouse
2415 highlight needs to be redisplayed. (Bug#15913)
2416
2417 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
2418
2419 Fix minor problems found by static checking.
2420 * buffer.h (struct buffer_text, struct buffer):
2421 * frame.h (struct frame):
2422 * window.h (struct window):
2423 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
2424 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
2425 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
2426 no-longer-valid use of HAVE_MENUS.
2427 * xdisp.c (propagate_buffer_redisplay): Now static.
2428
2429 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2430
2431 * xmenu.c (Fmenu_or_popup_active_p):
2432 * window.c (Fset_window_configuration):
2433 * menu.c (Fx_popup_menu, Fx_popup_dialog):
2434 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
2435 * fns.c (Fyes_or_no_p):
2436 * editfns.c (Fmessage_box, Fmessage_or_box):
2437 * alloc.c (make_save_ptr_ptr):
2438 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
2439
2440 * window.c (Fset_window_configuration): Move select_window later.
2441
2442 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
2443
2444 Refine redisplay optimizations to only redisplay *some* frames/windows
2445 rather than all of them.
2446 * xdisp.c (REDISPLAY_SOME): New constant.
2447 (redisplay_other_windows, wset_redisplay, fset_redisplay)
2448 (bset_redisplay, bset_update_mode_line): New functions.
2449 (message_dolog): Use bset_redisplay.
2450 (clear_garbaged_frames): Use fset_redisplay.
2451 (echo_area_display): Use wset_redisplay.
2452 (buffer_shared_and_changed): Remove.
2453 (prepare_menu_bars): Call Vpre_redisplay_function before updating
2454 frame titles. Compute the actual set of windows redisplayed.
2455 Don't update frame titles and menu bars for frames that don't need to
2456 be redisplayed.
2457 (propagate_buffer_redisplay): New function.
2458 (AINC): New macro.
2459 (redisplay_internal): Use it. Be more selective in the set of windows
2460 we redisplay. Propagate windows_or_buffers_changed to
2461 update_mode_lines a bit later to simplify the code.
2462 (mark_window_display_accurate_1): Reset window and buffer's
2463 `redisplay' flag.
2464 (redisplay_window): Do nothing if neither the window nor the buffer nor
2465 the frame needs redisplay.
2466 * window.h (struct window): Add `redisplay' field.
2467 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
2468 (redisplay_other_windows, window_list): New declarations.
2469 * window.c (select_window, Fset_window_start): Use wset_redisplay.
2470 (window_list): Not static any more.
2471 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
2472 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
2473 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
2474 * frame.c (Fmake_frame_visible): Don't redisplay everything.
2475 * frame.h (struct frame): Add `redisplay' field.
2476 Move `external_menu_bar' bitfield next to other bit-fields.
2477 (SET_FRAME_GARBAGED): Use fset_redisplay.
2478 (SET_FRAME_VISIBLE): Don't garbage the frame;
2479 Use redisplay_other_windows.
2480 * buffer.h (struct buffer): Add `redisplay' field.
2481 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
2482 (modify_overlay): Use bset_redisplay.
2483 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
2484
2485 2013-11-28 Eli Zaretskii <eliz@gnu.org>
2486
2487 Support w32 file notifications in batch mode.
2488 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
2489 invalid (which happens in batch mode). If non-interactive, call
2490 handle_file_notifications to store file notification events in the
2491 input queue. (Bug#15933)
2492
2493 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
2494
2495 * w32inevt.c (handle_file_notifications): Now external, not static.
2496
2497 * w32term.h (handle_file_notifications): Provide prototype.
2498
2499 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
2500 init_crit, since init_display, which does that otherwise, is not
2501 called.
2502
2503 2013-11-27 Glenn Morris <rgm@gnu.org>
2504
2505 * Makefile.in ($(lispsource)/international/charprop.el): New.
2506 (emacs$(EXEEXT)): Depend on charprop.el.
2507
2508 2013-11-27 Eli Zaretskii <eliz@gnu.org>
2509
2510 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
2511 deleting portions of the buffer under non-nil REPLACE argument.
2512 (Bug#15973)
2513
2514 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
2515 directory, watch it and not its parent.
2516 (add_watch): Allow empty string in FILE.
2517
2518 2013-11-27 Martin Rudalics <rudalics@gmx.at>
2519
2520 * window.c (Fset_window_start, window_resize_apply)
2521 (window_scroll): Reset window_end_valid (Bug#15957).
2522
2523 2013-11-27 Glenn Morris <rgm@gnu.org>
2524
2525 * Makefile.in (leimdir): Now in lisp source directory.
2526 ($(leimdir)/leim-list.el): Just use ../leim .
2527 * epaths.in (PATH_DUMPLOADSEARCH):
2528 * lread.c (load_path_default):
2529 * nsterm.m (ns_load_path): No more leim directory.
2530
2531 2013-11-26 Andreas Schwab <schwab@suse.de>
2532
2533 * .gdbinit (xgettype): Add cast.
2534
2535 2013-11-26 Glenn Morris <rgm@gnu.org>
2536
2537 Preload leim-list.el.
2538 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
2539 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
2540 is a single directory.
2541
2542 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
2543
2544 bool-vector-subsetp is now the normal direction (Bug#15912).
2545 * data.c (Fbool_vector_subsetp): Test whether the first argument
2546 is a subset of the second one, not the reverse. Add doc string.
2547
2548 Fix minor problems found by static checking.
2549 * lread.c (load_path_default): Now static.
2550 * textprop.c (text_property_stickiness): Be consistent about the
2551 test used when deciding whether to consider the previous character.
2552 This simplifies the code a bit.
2553
2554 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
2555
2556 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
2557
2558 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
2559 (syms_of_frame): Don't defsubr them.
2560
2561 2013-11-25 Glenn Morris <rgm@gnu.org>
2562
2563 * lread.c (load_path_default): Change the sense of the argument.
2564 (init_lread): When EMACSLOADPATH is set, do not ignore changes
2565 from dump_path. When it is not, avoid checking dump_path twice.
2566
2567 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
2568 uninstalled dump_path against installed Vload_path. (Bug#15964)
2569
2570 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
2571
2572 Export get_pos_property to Elisp.
2573 * editfns.c (Fget_pos_property): Rename from get_pos_property.
2574 (syms_of_editfns): Export it to Elisp.
2575
2576 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
2577
2578 2013-11-23 Romain Francoise <romain@orebokech.com>
2579
2580 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
2581 initialization here ...
2582 (syms_of_fileio): ... from here.
2583
2584 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
2585
2586 * lread.c (init_lread): Fix int/Lisp_Object mixup.
2587 Please use --enable-check-lisp-object-type.
2588
2589 2013-11-23 Glenn Morris <rgm@gnu.org>
2590
2591 * process.c (get_process): Explicit error for dead buffers.
2592
2593 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
2594
2595 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
2596
2597 2013-11-23 Glenn Morris <rgm@gnu.org>
2598
2599 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
2600 * lread.c (load_path_check): Take path to check as argument.
2601 (load_path_default): New, split from init_lread.
2602 (init_lread): Move calc of default load-path to load_path_default.
2603 Empty elements in EMACSLOADPATH now stand for the default.
2604 (load-path): Doc fix.
2605 * emacs.c (decode_env_path): Add option to treat empty elements
2606 as nil rather than ".".
2607 * callproc.c (init_callproc_1, init_callproc):
2608 * image.c (Vx_bitmap_file_path):
2609 * lisp.h (decode_env_path):
2610 * lread.c (Vsource_directory):
2611 Update for new argument spec of decode_env_path.
2612
2613 2013-11-22 Eli Zaretskii <eliz@gnu.org>
2614
2615 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
2616 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
2617
2618 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
2619
2620 Fix some dependency problems that cause unnecessary recompiles.
2621 Problem reported by RMS in
2622 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
2623 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
2624 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
2625 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
2626 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
2627 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
2628 (boostrap-clean): No need to remove stamp-oldxmenu.
2629
2630 Fix recently introduced bool vector overrun.
2631 This was due to an optimization that went awry.
2632 Reported by Glenn Morris in
2633 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
2634 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
2635 for empty vectors, undoing the 2013-11-18 change.
2636 * data.c (bool_vector_binop_driver): Rely on this.
2637 Fix bug that occasionally overran the destination.
2638 * lisp.h (struct Lisp_Bool_vector): Document this.
2639
2640 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
2641
2642 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
2643 to handle dialogs.
2644
2645 * nsterm.m (init, run, stop:): Comment out for now, does not work
2646 with dialogs.
2647
2648 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
2649
2650 * charset.c (syms_of_charset): Don't read past end of string.
2651
2652 2013-11-19 Glenn Morris <rgm@gnu.org>
2653
2654 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
2655
2656 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
2657
2658 Add hooks to run on gaining/losing focus. (Bug#15029)
2659 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
2660 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
2661 (syms_of_frame): Add focus-in-hook, focus-out-hook.
2662
2663 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
2664
2665 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
2666 The old names predated the API change that put destination at end.
2667
2668 Improve API of recently-added bool vector functions (Bug#15912).
2669 The old API had (bool-vector-count-matches A B)
2670 and (bool-vector-count-matches-at A B I), which gave the
2671 misleading impression that the two functions were variants, one
2672 with a location I. The new API has (bool-vector-count-population A)
2673 and (bool-vector-count-consecutive A B I) to make the distinction
2674 clearer. The first function no longer has a B argument, since the
2675 caller can easily determine the number of nils if the length and
2676 number of ts is known.
2677 * data.c (Fbool_vector_count_population): Rename from
2678 bool_vector_count_matches, and accept just 1 argument.
2679 (Fbool_vector_count_consecutive): Rename from
2680 Fbool_vector_count_matches_at.
2681
2682 Always allocate at least one bits_word per bool vector.
2683 See Daniel Colascione in:
2684 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
2685 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
2686 * data.c (bool_vector_binop_driver): Rely on this. Tune.
2687 * lisp.h (struct Lisp_Bool_vector): Document this.
2688
2689 2013-11-18 Eli Zaretskii <eliz@gnu.org>
2690
2691 * insdel.c (invalidate_buffer_caches): New function, consolidated
2692 from part of prepare_to_modify_buffer.
2693 (insert_from_gap, prepare_to_modify_buffer):
2694 * coding.c (code_convert_region, code_convert_string):
2695 Call invalidate_buffer_caches. (Bug#15841)
2696
2697 * lisp.h (invalidate_buffer_caches): Add prototype.
2698
2699 2013-11-17 Eli Zaretskii <eliz@gnu.org>
2700
2701 * w32term.c (x_update_window_end): Don't invalidate the entire
2702 mouse-highlight info, just signal frame_up_to_date_hook that mouse
2703 highlight needs to be redisplayed. (Bug#15913)
2704
2705 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
2706
2707 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
2708
2709 2013-11-16 Eli Zaretskii <eliz@gnu.org>
2710
2711 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
2712 while we are using Vprin1_to_string_buffer.
2713
2714 * keymap.c (describe_map): Don't crash if PT is 1 both before and
2715 after inserting the description string. (Bug#15907)
2716
2717 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
2718
2719 * data.c: Work around bogus GCC diagnostic about shift count.
2720 Reported by Eli Zaretskii in
2721 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
2722 (pre_value): New function.
2723 (count_trailing_zero_bits): Use it.
2724
2725 2013-11-15 Eli Zaretskii <eliz@gnu.org>
2726
2727 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
2728 assume C macros are not supported even under -g3 in these old GCC
2729 versions.
2730
2731 2013-11-15 Leo Liu <sdl.web@gmail.com>
2732
2733 * minibuf.c (Ftry_completion, Fall_completions)
2734 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
2735
2736 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
2737
2738 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
2739 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
2740 This avoids placing unnecessary constants into the Emacs code.
2741
2742 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
2743
2744 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
2745 for Cygwin w32 build.
2746
2747 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
2748 for Cygwin w32 build. (Bug#15892)
2749
2750 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
2751
2752 Simplify, port and tune bool vector implementation.
2753 * alloc.c (bool_vector_exact_payload_bytes)
2754 (bool_vector_payload_bytes): Remove.
2755 (bool_vector_fill): Return its argument.
2756 * alloc.c (bool_vector_fill):
2757 * lread.c (read1):
2758 * print.c (print_object):
2759 Simplify by using bool_vector_bytes.
2760 * alloc.c (make_uninit_bool_vector):
2761 New function, broken out from Fmake_bool_vector.
2762 (Fmake_bool_vector): Use it. Use tail call.
2763 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
2764 * data.c (BITS_PER_ULL): New constant.
2765 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
2766 if long long versions don't exist.
2767 (shift_right_ull): New function.
2768 (count_one_bits_word): New function, replacing popcount_bits_word
2769 macro. Don't assume that bits_word is no wider than long long.
2770 (count_one_bits_word, count_trailing_zero_bits):
2771 Don't assume that bits_word is no wider than long long.
2772 * data.c (bool_vector_binop_driver, bool_vector_not):
2773 * fns.c (Fcopy_sequence):
2774 * lread.c (read1):
2775 Create an uninitialized destination, to avoid needless work.
2776 (internal_equal): Simplify.
2777 (Ffillarray): Prefer tail call.
2778 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
2779 contain at least one word.
2780 (bits_word_to_host_endian): Prefer if to #if. Don't assume
2781 chars are narrower than ints.
2782 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
2783 * fns.c (Fcopy_sequence):
2784 Simplify and tune.
2785 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
2786 Don't try to port to hosts where bits_word values have holes; the
2787 code wouldn't work there anyway. Verify this assumption, though.
2788 (bool_vector_bytes): New function.
2789 (make_uninit_bool_vector): New decl.
2790 (bool_vector_fill): Now returns Lisp_Object.
2791
2792 * xfns.c (xic_create_fontsetname):
2793 * xrdb.c (gethomedir): Prefer tail calls.
2794
2795 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
2796
2797 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
2798 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
2799
2800 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
2801 that requires a return value.
2802 (Fset_buffer_modified_p): Take advantage of this change to do
2803 a tail call.
2804
2805 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
2806
2807 * buffer.c (Frestore_buffer_modified_p): Sync it with
2808 Fset_buffer_modified_p.
2809 (Fforce_mode_line_update): New function, moved from subr.el.
2810 (Fset_buffer_modified_p): Use them.
2811 (syms_of_buffer): Defsubr Fforce_mode_line_update.
2812
2813 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
2814
2815 * search.c (find_newline): Rewrite to prefer offsets to pointers.
2816 This avoids undefined behavior when subtracting pointers into
2817 different aways. On my platform it also makes the code a tad
2818 smaller and presumably faster.
2819
2820 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
2821
2822 * keyboard.c (command_loop_1): Use region-extract-function.
2823 * insdel.c (Qregion_extract_function): Not static any more (can we
2824 stop pretending that these vars can benefit from being marked static?).
2825
2826 2013-11-09 Eli Zaretskii <eliz@gnu.org>
2827
2828 * search.c (find_newline): If buffer text is relocated during the
2829 "dumb loop", adjust C pointers into buffer text to follow suit.
2830 (Bug#15841)
2831
2832 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
2833
2834 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
2835 for conversion (Bug#15837).
2836
2837 2013-11-09 Eli Zaretskii <eliz@gnu.org>
2838
2839 * fileio.c (Finsert_file_contents): Invalidate the newline cache
2840 for the entire range of inserted characters. (Bug#15841)
2841
2842 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
2843
2844 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
2845 unspecified.
2846 (realize_default_face): Remove assignment to distant-foreground if
2847 unspecified (Bug#15815).
2848
2849 2013-11-08 Eli Zaretskii <eliz@gnu.org>
2850
2851 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
2852 cache-long-scans disabled, since we don't want to call
2853 prepare_to_modify_buffer (in insert_1_both) for each message we
2854 display.
2855
2856 * buffer.h (bset_cache_long_scans): New INLINE function, moved
2857 from buffer.c. Improve commentary to the buffer field setter
2858 functions.
2859
2860 * buffer.c (bset_cache_long_scans): Static function deleted.
2861 Improve commentary to the buffer field setter functions.
2862 (init_buffer_once): Default for cache-long-scans changed to t.
2863 (Bug#15797)
2864
2865 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
2866
2867 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
2868
2869 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
2870 This bug was introduced in my 2013-06-21 change, and caused
2871 struct Lisp_Sub_Char_Table objects to be given too many slots,
2872 which broke 'make -C admin/unidata'.
2873
2874 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
2875
2876 Import changes from mac-port 4.5.
2877 * macfont.m (mac_font_copy_default_descriptors_for_language)
2878 (mac_font_copy_default_name_for_charset_and_languages): Declare.
2879 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
2880 (macfont_language_default_font_names): New.
2881 (macfont_list): Rearrange language/charset code.
2882 (macfont_close): Don't check for macfont_info->cache.
2883 (mac_ctfont_create_preferred_family_for_attributes): New font
2884 selection code, call
2885 mac_font_copy_default_name_for_charset_and_languages.
2886 (mac_font_copy_default_descriptors_for_language)
2887 (mac_font_copy_default_name_for_charset_and_languages): New functions.
2888
2889 * macfont.h (kCTVersionNumber10_9): Define if not defined.
2890
2891 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
2892
2893 Port to C11 aligned_alloc, and fix some integer overflows.
2894 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
2895 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
2896 and use of posix_memalign replaced with aligned_alloc.
2897 (aligned_alloc): New function, defined or declared as needed.
2898 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
2899 Don't undef; configure.ac now does this.
2900 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
2901 (calloc, aligned_alloc): Check for integer overflow.
2902 (aligned_alloc): Rename from memalign. All uses changed.
2903 (memalign): New function, an alias for aligned_alloc.
2904
2905 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
2906
2907 * xdisp.c (redisplay_internal): Fix typo in last change.
2908
2909 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
2910
2911 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
2912
2913 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
2914
2915 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
2916 redisplay--mode-lines-cause.
2917 (redisplay_internal): Keep them uptodate. Remove redundant check of
2918 buffer_shared_and_changed.
2919 * *.[chm]: Number every assignment to update_mode_lines so we
2920 can track why it is set.
2921
2922 2013-11-06 Eli Zaretskii <eliz@gnu.org>
2923
2924 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
2925
2926 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
2927
2928 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
2929 can track why it is set.
2930
2931 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
2932
2933 Integer-related fixes for term.c etc.
2934 * dispextern.h (face_tty_specified_color): New function.
2935 * term.c (turn_on_face): Don't rely on undefined behavior when
2936 assigning an out-of-range value to 'long'.
2937 Simplify test for toggling highlight.
2938 (tty_capable_p): Omit last two (unused) args. All callers changed.
2939 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
2940 (read_menu_input, tty_menu_activate, tty_menu_show):
2941 * xfaces.c (x_supports_face_attributes_p)
2942 (tty_supports_face_attributes_p):
2943 Use bool for boolean. All callers changed.
2944 (tty_supports_face_attributes_p): Omit defaults for color indices;
2945 no longer needed. Simplify tail call.
2946
2947 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
2948
2949 * xdisp.c (prepare_menu_bars): Mark static.
2950 * lisp.h (prepare_menu_bars): Don't declare.
2951 * xselect.c (x_handle_selection_clear):
2952 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
2953
2954 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
2955
2956 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
2957 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
2958
2959 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
2960
2961 * keyboard.c (Fcommand_error_default_function): Rename from
2962 Fdefault_error_output.
2963
2964 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
2965
2966 * keyboard.c (Fdefault_error_output): New function, extracted from
2967 cmd_error_internal.
2968 (syms_of_keyboard): Use it for Vcommand_error_function.
2969
2970 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
2971
2972 * eval.c (handlerlist_sentinel): New variable (bug#15802).
2973 (init_eval): Use it to ensure handlerlist is non-NULL.
2974 (unwind_to_catch): Make sure we never set handlerlist to NULL.
2975 (Fsignal): Adjust NULLness test of handlerlist.
2976 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
2977
2978 2013-11-05 Eli Zaretskii <eliz@gnu.org>
2979
2980 * callproc.c (call_process): Call prepare_to_modify_buffer before
2981 decoding text read from the sub-process, as the decoded stuff will
2982 be inserted into the buffer. This will invalidate the various
2983 caches maintained for the buffer. (Bug#15148)
2984
2985 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
2986
2987 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
2988 string of glyphless-char-display.
2989
2990 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
2991
2992 * nsfns.m (ns_get_name_from_ioreg): New function.
2993 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
2994 OSX >= 10.9. Use ns_get_name_from_ioreg.
2995
2996 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
2997
2998 Simplify and port recent bool vector changes.
2999 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
3000 only in this file. Use a more-efficient implementation if the
3001 second argument is a power of 2.
3002 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
3003 Remove no-longer-necessary compile-time checks.
3004 (bool_vector_exact_payload_bytes): New function.
3005 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
3006 exact payload changed to call the new function. Do not assume
3007 that the arg or result fits in ptrdiff_t.
3008 (bool_vector_fill): New function.
3009 (Fmake_bool_vector): Use it. Don't assume bit counts fit
3010 in ptrdiff_t.
3011 (vroundup_ct): Don't assume arg fits in size_t.
3012 * category.c (SET_CATEGORY_SET): Remove. All callers now just
3013 invoke set_category_set.
3014 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
3015 All callers changed. Use bool_vector_set.
3016 * category.h (XCATEGORY_SET): Remove; no longer needed.
3017 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
3018 bool_vector_bitref.
3019 * data.c (Faref): Use bool_vector_ref.
3020 (Faset): Use bool_vector_set.
3021 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
3022 (Fbool_vector_not, Fbool_vector_count_matches)
3023 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
3024 * fns.c (concat): Use bool_vector_ref.
3025 (Ffillarray): Use bool_vector_fill.
3026 (mapcar1): Use bool_vector_ref.
3027 (sxhash_bool_vector): Hash words, not bytes.
3028 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
3029 a constant, since it's now used in #if.
3030 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
3031 unsigned char on unusual architectures, so that we no longer
3032 assume that the number of bits per bits_word is a power of two or
3033 is a multiple of 8 or of CHAR_BIT.
3034 (Qt): Add forward decl.
3035 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
3036 at least as strictly as bits_word.
3037 (bool_vector_data, bool_vector_uchar_data): New accessors.
3038 All data structure accesses changed to use them.
3039 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
3040 (bool_vector_set): New functions.
3041 (bool_vector_fill): New decl.
3042 (ROUNDUP): Move to alloc.c as described above.
3043
3044 Fix recent gnutls changes.
3045 * gnutls.c (Fgnutls_boot): Don't assume C99.
3046 * process.c (wait_reading_process_output): Fix typo in recent change.
3047
3048 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
3049
3050 * process.c (wait_reading_process_output, read_process_output)
3051 (send_process): Check gnutls_state is not NULL.
3052
3053 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
3054 (Fgnutls_boot): Set process gnutls_p later, after initialization.
3055
3056 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
3057
3058 * nsterm.m (init, run, stop:): New methods in EmacsApp for
3059 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
3060
3061 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
3062 OSX >= 10.9.
3063
3064 * nsfns.m (Fx_create_frame): Fix memory leak.
3065
3066 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
3067 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
3068 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
3069
3070 2013-11-04 Eli Zaretskii <eliz@gnu.org>
3071
3072 * xdisp.c (message3_nolog, message_with_string): Encode the string
3073 before writing it to the terminal in a non-interactive session.
3074
3075 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
3076 sure we concatenate them into a unibyte string.
3077
3078 * fileio.c (make_temp_name): Encode PREFIX, and decode the
3079 resulting temporary name before returning it to the caller.
3080 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
3081 is a unibyte string, convert NAME to a unibyte string to ensure
3082 that the result is also a unibyte string.
3083
3084 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
3085 create unibyte strings from default paths and directory/file
3086 names.
3087
3088 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
3089 string.
3090
3091 * callproc.c (init_callproc): Use build_unibyte_string to make
3092 sure we create unibyte strings from default paths and
3093 directory/file names.
3094
3095 * buffer.c (init_buffer): Don't store default-directory of
3096 *scratch* in multibyte form. The original problem which led to
3097 that is described in
3098 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
3099 but it was solved long ago. (Bug#15260)
3100
3101 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
3102
3103 Port to stricter C99 platforms.
3104 Especially, C99 prohibits nesting a struct X inside struct Y if
3105 struct X has a flexible array member.
3106 * alloc.c (struct sdata): New type.
3107 (sdata): Implement in terms of struct sdata.
3108 Remove u member; all uses replaced by next_vector, set_next_vector.
3109 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
3110 (SDATA_DATA_OFFSET): Now a constant, not a macro.
3111 (struct sblock): Rename first_data member to data, which is now
3112 a flexible array member. All uses changed.
3113 (next_vector, set_next_vector, large_vector_vec): New functions.
3114 (vector_alignment): New constant.
3115 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
3116 (struct large-vector): Now merely a NEXT member, since the old approach
3117 ran afoul of stricter C99. All uses changed to use
3118 large_vector_vec or large_vector_offset.
3119 (large_vector_offset): New constant.
3120 * dispnew.c: Include tparam.h, for tgetent.
3121 Do not include term.h; no longer needed.
3122 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
3123 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
3124 (struct Lisp_Vector): Use a flexible array member for contents,
3125 instead of a union with a member that is an array of size 1.
3126 All uses changed.
3127 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
3128 fact that the struct no longer contains a union.
3129 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
3130 (struct Lisp_Save_Value, struct Lisp_Free):
3131 Use unsigned, not int, for spacers, to avoid c99 warning.
3132 (union specbinding): Use unsigned, not bool, for bitfield, as
3133 bool is not portable to pre-C99 hosts.
3134
3135 2013-11-04 Glenn Morris <rgm@gnu.org>
3136
3137 * emacs.c (usage_message): Mention that `-L :...' appends.
3138
3139 2013-11-02 Glenn Morris <rgm@gnu.org>
3140
3141 * Makefile.in (abs_builddir): Remove.
3142 (bootstrap_exe): Use relative filename.
3143
3144 Use relative filenames in TAGS files.
3145 * Makefile.in (abs_srcdir): Remove it again.
3146 (.PHONY): Remove frc.
3147 (maintainer-clean): No more TAGS-LISP file.
3148 (TAGS): Pass relative file names to etags.
3149 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
3150
3151 * Makefile.in (abs_srcdir): New, set by configure.
3152 (lispdir): Remove.
3153 (maintainer-clean): Remove pointless echo. That should be in the
3154 top-level Makefile, if anywhere. Delete TAGS-LISP.
3155 (extraclean): No s/ and m/ directories for some time.
3156 (TAGS): Also depend on ctagsfiles3.
3157 Remove no-longer-defined S_FILE.
3158 Pass absolute filenames to etags once more.
3159 (TAGS-LISP): Replace lispdir with its expansion.
3160 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
3161 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
3162
3163 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
3164
3165 * xfaces.c (check_lface_attrs, realize_default_face):
3166 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
3167 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
3168
3169 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
3170
3171 * emacs.c (original_pwd): Remove global var by making it local.
3172 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
3173
3174 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
3175
3176 * xfaces.c: Declare color_distance.
3177 (QCdistant_foreground): New variable.
3178 (NEAR_SAME_COLOR_THRESHOLD): New define.
3179 (load_color2): New function.
3180 (load_color): Call load_color2.
3181 (load_face_colors): Call load_color2 and if distant-color is specified
3182 calculate distant and use distant-color if colors are near.
3183 (LFACE_DISTANT_FOREGROUND): New define.
3184 (merge_face_ref, Finternal_set_lisp_face_attribute)
3185 (Finternal_get_lisp_face_attribute)
3186 (x_supports_face_attributes_p): Handle distant-foreground similar to
3187 foreground.
3188 (syms_of_xfaces): DEFSYM QCdistant_foreground.
3189
3190 * dispextern.h (lface_attribute_index):
3191 Add LFACE_DISTANT_FOREGROUND_INDEX.
3192
3193 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
3194
3195 * image.c (pbm_next_char): New function.
3196 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
3197 (pbm_scan_number): Use it.
3198 (Qlibjpeg_version): New variable.
3199 (syms_of_image): DEFSYM and initialize it.
3200
3201 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
3202
3203 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
3204
3205 2013-10-31 Glenn Morris <rgm@gnu.org>
3206
3207 * emacs.c (original_pwd): New char.
3208 (main): If using --chdir, store original_pwd.
3209 (init_cmdargs): When setting Vinvocation_directory based on a
3210 relative argv[0], use original_pwd if set. (Bug#15768)
3211
3212 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3213
3214 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
3215
3216 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
3217
3218 * insdel.c: Fix minor problems found by static checking.
3219 (Qregion_extract_function): Now static.
3220 (prepare_to_modify_buffer_1): Remove unused locals.
3221
3222 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3223
3224 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
3225 (syms_of_xdisp): Declare pre-redisplay-function.
3226 (markpos_of_region): Remove function.
3227 (init_iterator, compute_stop_pos, handle_face_prop)
3228 (face_before_or_after_it_pos, reseat_to_string)
3229 (get_next_display_element, window_buffer_changed)
3230 (redisplay_internal, try_cursor_movement, redisplay_window)
3231 (try_window_reusing_current_matrix, try_window_id, display_line)
3232 (note_mode_line_or_margin_highlight, note_mouse_highlight)
3233 (display_string, mouse_face_from_buffer_pos): Remove region handling.
3234 * window.h (struct window): Remove field `region_showing'.
3235 * dispextern.h (struct it): Remove region_beg/end_charpos.
3236 (face_at_buffer_position, face_for_overlay_string)
3237 (face_at_string_position): Update prototypes.
3238 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
3239 (face_at_string_position): Remove `region_beg' and `region_end' args.
3240 * fontset.c (Finternal_char_font):
3241 * font.c (font_at, font_range): Adjust calls accordingly.
3242 * insdel.c (Qregion_extract_function): New var.
3243 (syms_of_insdel): Initialize it.
3244 (prepare_to_modify_buffer_1): Use it.
3245
3246 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
3247
3248 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
3249 * ftxfont.c (ftxfont_get_gcs):
3250 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
3251 * xfaces.c (x_free_colors, x_free_dpy_colors)
3252 (x_create_gc, unload_color):
3253 * xselect.c (x_property_data_to_lisp):
3254 * xsettings.c (parse_settings):
3255 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
3256 (get_bits_and_offset): Adjust definition.
3257 * frame.c (XParseGeometry): Adjust locals.
3258 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
3259 * regex.h (toplevel): Likewise for reg_syntax_t.
3260
3261 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
3262
3263 * eval.c (run_hook_with_args): Use FUNCTIONP.
3264
3265 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
3266
3267 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
3268 fields, drop 'allocated_p' member and use -1 for uninitialized value.
3269 * w32term.h (struct w32_output): Similarly but do not use -1 because...
3270 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
3271 on MS-Windows anyway.
3272 (free_face_colors): Define only if HAVE_X_WINDOWS and...
3273 (free_realized_face): ...adjust user.
3274 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
3275 white relief pixels to -1.
3276 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
3277 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
3278 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
3279
3280 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
3281
3282 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
3283 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
3284 in practice now. All callers changed.
3285
3286 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
3287
3288 * dispextern.h (struct face): Use bitfields for 'underline_type'
3289 and 'box' members. Remove set-but-unused members 'pixmap_w' and
3290 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
3291 'stipple' member. Move 'lface' member up to help...
3292 * xfaces.c (make_realized_face): ...this function to find and
3293 clear just the members that need clearing.
3294 (load_face_colors, realize_x_face):
3295 * xdisp.c (extend_face_to_end_of_line): Adjust user.
3296
3297 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
3298
3299 * xftfont.c (struct xftfont_info): Remove set-but-unused
3300 'screen' member.
3301 (xftfont_open): Adjust user.
3302 (xftfont_get_colors): Remove useless prototype.
3303
3304 2013-10-26 Eli Zaretskii <eliz@gnu.org>
3305
3306 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
3307 before passing them to 'unexec'. (Bug#15260)
3308
3309 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
3310
3311 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
3312
3313 2013-10-25 Eli Zaretskii <eliz@gnu.org>
3314
3315 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
3316 the changed signature of the font driver's 'close' method.
3317
3318 * w32font.h (w32font_close): Adjust the prototype to the change in
3319 function definition.
3320
3321 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
3322
3323 * w32uniscribe.c (uniscribe_close): Adapt the call to
3324 w32font_close to its new prototype.
3325
3326 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
3327
3328 Omit unused frame argument of font API's close function.
3329 * font.h (struct font): Drop frame argument. Adjust comment.
3330 * font.c (font_clear_cache, font_close_object): Adjust users.
3331 * ftfont.c (ftfont_close):
3332 * ftxfont.c (ftxfont_close):
3333 * macfont.m (macfont_close):
3334 * nsfont.m (nsfont_close):
3335 * w32font.c (w32font_close):
3336 * xfont.c (xfont_close):
3337 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
3338 tweak comments and make functions safe if called more than once for
3339 the same font object.
3340
3341 Perform font-specific cleanup when font object is swept by GC. See
3342 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
3343 * alloc.c (cleanup_vector): New function.
3344 (sweep_vector): Call it for each reclaimed vector object.
3345 * font.h (struct font): Adjust comment.
3346
3347 2013-10-24 Glenn Morris <rgm@gnu.org>
3348
3349 * Makefile.in (abs_top_srcdir): New, set by configure.
3350
3351 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
3352
3353 Adjust recent font-related changes to fix bug#15686.
3354 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
3355 is a live window system frame, mark its default font too.
3356
3357 2013-10-23 Glenn Morris <rgm@gnu.org>
3358
3359 * Makefile.in (RUN_TEMACS): Make relative (again).
3360 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
3361 (bootstrap-emacs$(EXEEXT)):
3362 Quote entities that might contain whitespace.
3363
3364 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
3365
3366 Port to Solaris 10 and its bundled GCC.
3367 Problem reported by Timothy C. Burt.
3368 * floatfns.c (isfinite, isnan): Redefine unconditionally.
3369
3370 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
3371
3372 Do not allow font caches to grow too large.
3373 * alloc.c (compact_font_cache_entry, compact_font_caches):
3374 New functions or stub if not HAVE_WINDOW_SYSTEM.
3375 (compact_undo_list): Factor out from Fgarbage_collect.
3376 Add comment.
3377 (mark_face_cache): Mark face font. Move down to avoid
3378 extra prototypes.
3379 (mark_terminals): Do not mark font cache here.
3380 (Fgarbage_collect): Call compaction functions described
3381 above. Adjust comment.
3382
3383 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
3384
3385 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
3386 chdir to HOME (bug#15607).
3387
3388 * nsterm.m (Qcocoa, Qgnustep): New variables.
3389 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
3390 (ns_get_color): Make selection color work for GNUstep also.
3391
3392 2013-10-18 Eli Zaretskii <eliz@gnu.org>
3393
3394 * keyboard.c (make_lispy_event): Remove GPM-specific code that
3395 handles mouse clicks. Instead, let GPM use the same code as all
3396 the other mice use. See the discussion starting at
3397 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
3398 for the details of the problem with the menu bar this fixes.
3399
3400 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
3401
3402 Remove port-specific display name lists to avoid extra
3403 complexity and data duplication with display info lists.
3404 * xterm.h (x_display_name_list): Remove declaration.
3405 * xterm.c (x_display_name_list): Remove.
3406 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
3407 * xfns.c (x_display_info_for_name, Fx_display_list):
3408 Likewise. Use x_display_list where appropriate.
3409 * w32term.h (w32_display_name_list): Remove declaration.
3410 * w32term.c (w32_display_name_list): Remove.
3411 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
3412 Adjust users.
3413 * w32fns.c (x_display_info_for_name, Fx_display_list):
3414 Likewise. Use x_display_list where appropriate.
3415 * nsterm.h (ns_display_name_list): Remove declaration.
3416 * nsterm.m (ns_display_name_list): Remove.
3417 (ns_term_init, syms_of_nsterm): Adjust users.
3418 * nsfns.m (ns_display_info_for_name, Fx_display_list):
3419 Likewise. Use x_display_list where appropriate.
3420 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
3421 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
3422 (mark_terminals): Mark per-terminal font cache.
3423
3424 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
3425
3426 Don't run timers in input-pending-p. Its new check-timers param
3427 provides the prior behavior. (Bug#15045).
3428 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
3429
3430 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
3431
3432 Make some functions static in non-Microsoft builds.
3433 On my platform (Fedora 19 x86-64), this shrinks the
3434 Emacs executable (text+data) by 0.25%.
3435 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
3436 (load_color) [!MSDOS]:
3437 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
3438 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
3439 * lisp.h (check_existing):
3440 * process.h (conv_sockaddr_to_lisp, network_interface_list)
3441 (network_interface_info) [!WINDOWSNT]:
3442 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
3443 Remove extern decls.
3444 * fileio.c (check_existing):
3445 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
3446 * process.c (conv_sockaddr_to_lisp, network_interface_list)
3447 (network_interface_info) [!WINDOWSNT]:
3448 * term.c (encode_terminal_code) [!WINDOWSNT]:
3449 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
3450 * xfaces.c (load_color) [!MSDOS]:
3451 Now static.
3452 * fileio.c (check_existing, check_executable, check_writable):
3453 * process.c (network_interface_list, network_interface_info):
3454 Move earlier, so that we don't need forward decls.
3455 * gnutls.c (fn_gnutls_transport_set_errno)
3456 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
3457 Remove; unused.
3458 * w32.c (init_environment): Use faccessat rather than
3459 check_existing, partly for consistency with the rest of the code
3460 in this file, partly so that check_existing can be static.
3461
3462 Make VALMASK visible to GDB even if clang is used (Bug#15574).
3463 * emacs.c (MAIN_PROGRAM): New macro.
3464 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
3465 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
3466
3467 bool vector int width fixes
3468 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
3469 (Fbool_vector_count_matches_at):
3470 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
3471 can exceed PTRDIFF_MAX, at least in theory.
3472 (Fbool_vector_count_matches_at):
3473 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
3474
3475 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
3476
3477 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
3478 (struct sockaddr): Add forward decl, for platforms that lack it.
3479
3480 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
3481
3482 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
3483 Qnil (Bug#15628).
3484
3485 2013-10-16 Eli Zaretskii <eliz@gnu.org>
3486
3487 * w32.c (network_interface_get_info, network_interface_list)
3488 (network_interface_info): New functions. (Bug#15610)
3489 (GetAdaptersInfo_Proc): New typedef.
3490 (get_adapters_info): New wrapper function.
3491 (globals_of_w32): Initialize g_b_init_get_adapters_info.
3492
3493 * process.h (network_interface_list, network_interface_info):
3494 New prototypes.
3495
3496 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
3497 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
3498 all systems. Return non-nil for systems that HAVE_NET_IF_H and
3499 for WINDOWSNT. Doc fix.
3500 (syms_of_process): Defsubr Snetwork_interface_list and
3501 Snetwork_interface_info unconditionally.
3502
3503 * menu.c (have_boxes): Fix redundant simulation of radio buttons
3504 in NS GUI sessions. (Bug#15629)
3505
3506 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
3507
3508 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
3509
3510 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
3511
3512 * print.c (print_object): Print " ..." when truncating bool vectors.
3513
3514 2013-10-15 Eli Zaretskii <eliz@gnu.org>
3515
3516 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
3517 standard mouse buttons.
3518
3519 * termhooks.h (struct input_event): Remove incorrect commentary.
3520
3521 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
3522
3523 Disallow bool vector operations on mixed-length operands.
3524 The old behavior left garbage in the result vector sometimes,
3525 and didn't seem to be useful.
3526 * data.c (Qwrong_length_argument): New static var.
3527 (wrong_length_argument): New function.
3528 (bool_vector_binop_driver): Check that args agree in length.
3529
3530 * keyboard.c, keyboard.h (all_kboards): Now static.
3531
3532 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
3533
3534 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
3535 note from the lispref.
3536
3537 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
3538
3539 * nsterm.h (struct ns_display_info): Remove set-but-unused
3540 member image_cache (image caches are per-terminal anyway).
3541 (FRAME_X_IMAGE_CACHE): Remove.
3542 * nsterm.m (ns_initialize_display_info): Adjust user.
3543
3544 2013-10-14 Eli Zaretskii <eliz@gnu.org>
3545
3546 * w32proc.c: Include mingw_time.h.
3547
3548 * w32.c: Include mingw_time.h.
3549
3550 Implement scrolling of TTY menus when the screen is too short.
3551
3552 * term.c (tty_menu_display): Accept an additional argument, the
3553 menu item from which to start displaying the menu. Account for
3554 the value of Y when limiting the menu to the number of available
3555 screen lines.
3556 (mi_result): New enumeration.
3557 (read_menu_input): Return enumerated value. When the y coordinate
3558 hits min_y or max_y, return scroll indication instead of wrapping
3559 around the menu.
3560 (tty_menu_activate): Handle the scrolling indications from
3561 read_menu_input. Compute the first menu item to display and pass
3562 it to tty_menu_display.
3563
3564 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
3565
3566 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
3567 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
3568 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
3569 Adjust to match the change described below.
3570 (struct terminal): Move must_write_spaces, line_ins_del_ok,
3571 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
3572 memory_below_frame members to...
3573 * termchar.h (struct tty_display_info): ...here because they're
3574 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
3575 * term.c (init_tty):
3576 * nsterm.m (ns_create_terminal):
3577 * w32term.c (w32_create_terminal):
3578 * xterm.c (x_create_terminal): Adjust users.
3579 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
3580 to filter out non-TTY frames. Adjust comment.
3581 (scrolling): Adjust user. Prefer eassert for debugging check.
3582
3583 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
3584
3585 * xfaces.c (PT_PER_INCH): Remove unused macro.
3586 * termhooks.h (struct terminal): Remove set-but-unused
3587 member fast_clear_end_of_line.
3588 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
3589 * nsterm.m (ns_create_terminal):
3590 * term.c (init_tty):
3591 * w32term.c (w32_create_terminal):
3592 * xterm.c (x_create_terminal): Adjust users.
3593
3594 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
3595
3596 * lisp.h (bool_vector_size): New function.
3597 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
3598 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
3599 (Fbool_vector_not, Fbool_vector_count_matches_at):
3600 Remove uses of 'eassume' that should no longer be needed,
3601 because they are subsumed by the 'eassume' in bool_vector_size.
3602
3603 2013-10-12 Eli Zaretskii <eliz@gnu.org>
3604
3605 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
3606 after inclusion of gif_lib.h, thus fixing compiler warnings caused
3607 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
3608
3609 2013-10-11 Eli Zaretskii <eliz@gnu.org>
3610
3611 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
3612 have different dimensions. (Bug#15575)
3613
3614 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
3615 visibility.
3616
3617 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
3618
3619 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
3620
3621 * term.c (tty_menu_show): Never return with unbalanced
3622 specpdl. Use eassert for debugging check. Adjust style.
3623
3624 2013-10-11 Eli Zaretskii <eliz@gnu.org>
3625
3626 * term.c (read_menu_input): Make selection of menu items
3627 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
3628 (tty_menu_activate): Fix off-by-one error when computing max_y.
3629
3630 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
3631
3632 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
3633 audit logging (only used with GnuTLS 3.x) and enable it.
3634
3635 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
3636
3637 * dispnew.c (redraw_frame): Remove useless #ifdef because
3638 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
3639 Also, move TTY fflush to...
3640 * term.c (tty_update_end): ...this function.
3641
3642 2013-10-11 Eli Zaretskii <eliz@gnu.org>
3643
3644 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
3645 the end of the frame's glyph matrix. (Bug#15575)
3646
3647 * term.c (tty_menu_display): Don't move cursor while overwriting
3648 frame's glyphs with menu items. Limit the number of items
3649 displayed to what can be shown on the available screen lines,
3650 excluding the echo area.
3651 (tty_menu_activate): Limit the Y coordinate allowed by
3652 read_menu_input to the last screen line used for menu display.
3653
3654 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
3655
3656 * lisp.h (eassume): New macro.
3657 Also, include <verify.h>, for 'assume'.
3658 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
3659 (vroundup, vector_nbytes):
3660 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
3661 (Fbool_vector_not, Fbool_vector_count_matches)
3662 (Fbool_vector_count_matches_at):
3663 Use eassume, not eassert.
3664 * casetab.c (set_identity, shuffle):
3665 * composite.c (composition_gstring_put_cache):
3666 * dispnew.c (update_frame_1):
3667 * ftfont.c (ftfont_shape_by_flt):
3668 * image.c (gif_load):
3669 * intervals.c (offset_intervals):
3670 * macfont.m (macfont_shape):
3671 Remove calls to 'assume' that are no longer needed, because
3672 --enable-gcc-warnings no longer generates bogus warnings
3673 when these calls are removed.
3674
3675 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
3676
3677 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
3678
3679 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
3680
3681 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
3682 (Qsubstitute_env_in_file_name): New var.
3683 (syms_of_fileio): Define it.
3684
3685 2013-10-10 Eli Zaretskii <eliz@gnu.org>
3686
3687 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
3688 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
3689 (Bug#15575)
3690
3691 * term.c (save_and_enable_current_matrix): Don't allocate and
3692 don't save margin areas.
3693 (restore_desired_matrix): Don't restore margin areas.
3694 (free_saved_screen): Don't free margin areas.
3695
3696 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
3697
3698 * image.c: Pacify --enable-gcc-warnings.
3699 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
3700 #define only if used.
3701
3702 2013-10-10 Eli Zaretskii <eliz@gnu.org>
3703
3704 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
3705 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
3706 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
3707 (gif_load): For giflib v5.x and later, display the error message
3708 produced by giflib when its functions fail.
3709 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
3710 (Bug#15531)
3711
3712 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
3713
3714 * keyboard.c (last_event_timestamp): Remove. For X selection and
3715 GTK popup menus, it may be obtained from per-frame X display info.
3716 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
3717 (process_special_events): Adjust users.
3718 * keyboard.h (last_event_timestamp): Remove declaration.
3719 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
3720 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
3721 * menu.h (xmenu_show): Adjust prototype.
3722 * menu.c (Fx_popup_menu): Adjust user.
3723 * xselect.c (x_own_selection, x_get_foreign_selection)
3724 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
3725
3726 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
3727
3728 * keyboard.c (init_kboard): Now static. Add arg
3729 to denote window system. Adjust comment.
3730 (init_keyboard): Adjust user.
3731 (allocate_kboard): New function.
3732 (syms_of_keyboard):
3733 * nsterm.m (ns_term_init):
3734 * term.c (init_tty):
3735 * w32term.c (w32_create_terminal):
3736 * xterm.c (x_term_init): Use it.
3737 * keyboard.h (init_kboard): Remove prototype.
3738 (allocate_kboard): Add prototype.
3739
3740 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
3741
3742 * image.c (GIFLIB_MAJOR): Ensure it's defined.
3743 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
3744
3745 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
3746
3747 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
3748
3749 2013-10-09 Eli Zaretskii <eliz@gnu.org>
3750
3751 * term.c (tty_menu_activate): Flush the output stream after
3752 showing the cursor, and don't mark the frame garbaged at exit from
3753 the function. Fixes redisplay glitches when moving from one menu
3754 to another.
3755
3756 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
3757
3758 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
3759 or throw error (Bug#15570).
3760
3761 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
3762
3763 * intervals.c (temp_set_point_both): Move test into 'eassert',
3764 for speed.
3765
3766 * lisp.h (eassert): Don't use 'assume'.
3767 Sometimes 'assume' wins in performance, and sometimes it loses,
3768 so it shouldn't be used all the time. Perhaps we need two
3769 flavors of 'eassert', one for where 'assume' is far more likely
3770 to help or to hurt; but that can be done later.
3771 Problem reported by Dmitry Antipov in
3772 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
3773 Also, don't include <verify.h>; no longer needed.
3774
3775 2013-10-09 Glenn Morris <rgm@gnu.org>
3776
3777 * eval.c (Fcond): Doc tweak.
3778
3779 2013-10-09 Eli Zaretskii <eliz@gnu.org>
3780
3781 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
3782 expressions with side effects to eassert. (Bug#15565)
3783
3784 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
3785
3786 * fns.c (hashfn_user_defined): Allow hash functions to return any
3787 Lisp_Object.
3788
3789 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
3790
3791 Fix minor problems found by static checking.
3792 * dispnew.c (save_current_matrix): Omit unnecessary casts.
3793 * dispnew.c (update_frame_with_menu): Mark debug local as used.
3794 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
3795 * keyboard.c (read_menu_command): Remove unused local.
3796 * lisp.h (read_menu_command): New decl.
3797 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
3798 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
3799 Return ptrdiff_t, not int.
3800 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
3801 not int, for benefit of xpalloc.
3802 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
3803 and xpalloc.
3804 (have_menus_p): Remove; unused.
3805 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
3806 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
3807 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
3808 Now static.
3809 (save_and_enable_current_matrix): Omit unnecessary casts.
3810 (read_menu_input): Omit local extern decl (now in lisp.h).
3811 Don't access uninitialized storage if mouse_get_xy fails.
3812 (tty_menu_activate): Mark local as initialized, for lint.
3813 (tty_menu_activate, tty_meny_show): Remove unused locals.
3814
3815 2013-10-08 Eli Zaretskii <eliz@gnu.org>
3816
3817 Support menus on text-mode terminals.
3818 * xterm.h (xw_popup_dialog): Add prototype.
3819
3820 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
3821 (xmenu_show): Block input here, instead in Fx_popup_menu.
3822 (xw_popup_dialog): New function, with X-specific bits of popup
3823 dialogs.
3824
3825 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
3826 New functions.
3827
3828 * window.c (Fset_window_configuration): Use run-time tests of the
3829 frame type instead of compile-time conditionals, when menu-bar
3830 lines are considered.
3831
3832 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
3833 (w32_popup_dialog): New prototypes.
3834
3835 * w32menu.c (Fx_popup_dialog): Function deleted.
3836 (w32_popup_dialog): New function, with w32 specific bits of popup
3837 dialogs. Block input here.
3838
3839 * w32inevt.c (w32_console_read_socket): Minor change to add
3840 debugging TTY events.
3841
3842 * w32fns.c (show_hourglass): If returning early because the frame
3843 is not a GUI frame, unblock input.
3844
3845 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
3846 (cursorY): New functions.
3847
3848 * termhooks.h (cursorX, cursorY): Prototypes of functions on
3849 WINDOWSNT, macros that call curX and curY elsewhere.
3850
3851 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
3852
3853 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
3854 specific function to hide and show cursor on a text-mode terminal.
3855 (tty_menu_struct, struct tty_menu_state): New structures.
3856 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
3857 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
3858 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
3859 (tty_menu_locate, save_and_enable_current_matrix)
3860 (restore_desired_matrix, screen_update, read_menu_input)
3861 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
3862 (tty_pop_down_menu, tty_menu_last_menubar_item)
3863 (tty_menu_new_item_coords, tty_menu_show): New functions.
3864 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
3865
3866 * nsterm.h (ns_popup_dialog): Adjust prototype.
3867
3868 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
3869 of in x-popup-menu.
3870 (ns_popup_dialog): Adapt order of arguments to the other
3871 *_menu_show implementations.
3872 (Fx_popup_dialog): Function deleted.
3873
3874 * msdos.c (x_set_menu_bar_lines): Delete unused function.
3875
3876 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
3877
3878 * menu.c (have_boxes): New function.
3879 (single_keymap_panes): Use it instead of a compile-time
3880 conditional.
3881 (single_menu_item): Use run-time tests of the frame type instead
3882 of compile-time conditionals.
3883 (encode_menu_string): New function.
3884 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
3885 the macro, since different types of frame need different encoding
3886 of menu items.
3887 (digest_single_submenu): Use run-time tests of frame type instead
3888 of, or in addition to, compile-time conditionals.
3889 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
3890 (Fx_popup_menu): Detect when the function is called from keyboard
3891 on a TTY. Don't barf when invoked on a text-mode frame.
3892 Check frame type at run time, instead of compile-time conditionals for
3893 invoking terminal-specific menu-show functions.
3894 Call tty_menu_show on text-mode frames.
3895 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
3896 run time to determine which alternative to invoke; support dialogs
3897 on TTYs.
3898
3899 * keyboard.h <Qmouse_movement>: Declare.
3900
3901 * keyboard.c <Qmouse_movement>: Now extern.
3902 <Qecho_keystrokes>: New static variable.
3903 (read_key_sequence): Accept an additional argument, a flag to
3904 prevent redisplay during reading of the key sequence. All callers
3905 changed.
3906 (read_menu_command): New function.
3907 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
3908 autosave.
3909 (toolkit_menubar_in_use): New function.
3910 (make_lispy_event): Use it instead of a compile-time test.
3911
3912 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
3913 window-system being available.
3914
3915 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
3916 to x-popup-dialog on the frame type, they all now support popup
3917 dialogs.
3918
3919 * dispnew.c (save_current_matrix): Save the margin areas.
3920 (restore_current_matrix): Restore margin areas.
3921 (update_frame_with_menu): New function.
3922
3923 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
3924 Add prototypes.
3925
3926 * alloc.c (make_save_ptr): Now compiled unconditionally.
3927
3928 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
3929
3930 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
3931 (redraw_frame, update_frame): Adjust users.
3932 * dispextern.h (set_window_update_flags): Adjust prototype.
3933 * xdisp.c (redisplay_internal): When updating all frames with zero
3934 windows_or_buffers_changed, assume that only the windows that shows
3935 current buffer should be really updated.
3936
3937 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
3938
3939 Do not allocate huge temporary memory areas and objects while encoding
3940 for file I/O, thus reducing an enormous memory usage for large buffers.
3941 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
3942 * coding.h (struct coding_system): New member raw_destination.
3943 * coding.c (setup_coding_system): Initialize it to zero.
3944 (encode_coding_object): If raw_destination is set, do not create
3945 dst_object. Add comment.
3946 * fileio.c (toplevel): New constant E_WRITE_MAX.
3947 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
3948 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
3949
3950 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
3951
3952 * nsterm.m (windowDidExitFullScreen:)
3953 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
3954
3955 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
3956
3957 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
3958 * keyboard.c (unblock_input_to): Don't process pending signals
3959 if a fatal error is in progress.
3960
3961 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
3962 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
3963 they're talking about words in Lisp bool vectors.
3964 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
3965 * data.c (popcount_bits_word): Rename from popcount_size_t.
3966 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
3967 All uses changed.
3968
3969 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
3970
3971 Improve support for popcount and counting trailing zeros (Bug#15550).
3972 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
3973 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
3974 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
3975 (popcount_size_t_msc, popcount_size_t_gcc):
3976 Remove; now done by Gnulib.
3977 (popcount_size_t): Now a macro that defers to Gnulib.
3978 (count_trailing_zero_bits): Return int, for consistency with
3979 Gnulib and because Emacs prefers signed to unsigned int.
3980 Don't assume that size_t is either unsigned int or unsigned long
3981 or unsigned long long.
3982 (size_t_to_host_endian): Do not assume that size_t is either
3983 exactly 32 or exactly 64 bits wide.
3984 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
3985 etc., so that it's now an enum constant, not a macro.
3986 No need to assume that it's either 32 or 64.
3987
3988 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
3989
3990 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
3991 on >= 10.7.
3992
3993 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
3994
3995 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
3996 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
3997
3998 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
3999
4000 emacs_read and emacs_write now use void *, not char *.
4001 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
4002 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
4003 Buffer arg is now void *, not char *. This matches plain
4004 'read' and 'write' better, and avoids a constraint violation
4005 on Solaris 9 with Oracle Studio.
4006
4007 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
4008
4009 * alloc.c (Fmake_string): For ASCII char initializer, prefer
4010 memset to explicit loop. Otherwise copy largest possible chunk
4011 from initialized to uninitialized part, thus allowing the longer
4012 memcpy runs and reducing the number of loop iterations.
4013
4014 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
4015
4016 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
4017 hide toolbar (Bug#15388).
4018 (windowDidEnterFullScreen:): If presentation options are zero,
4019 set them here (Bug#15388).
4020 (ns_update_auto_hide_menu_bar): Remove runtime check.
4021 Don't auto hide dock unless menubar is also auto hidden.
4022
4023 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
4024
4025 * editfns.c (message): Mention batch mode in doc string.
4026
4027 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
4028
4029 * nsterm.m (check_native_fs): Remove erroneous comment.
4030
4031 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
4032
4033 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
4034 uses find_newline instead of scan_newline and so doesn't move point.
4035
4036 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
4037
4038 Use hardware support for byteswapping on glibc x86 etc.
4039 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
4040 whereas the old swap64 needed 30.
4041 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
4042 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
4043 Use byteswap.h's macros to swap bytes.
4044 * lisp.h (swap16, swap32, swap64): Remove.
4045 All uses replaced by bswap_16, bswap_32, bswap_64.
4046
4047 * bytecode.c (exec_byte_code): Use some more volatile variables
4048 to work around local variables getting clobbered by longjmp.
4049 Port to pre-C99, which doesn't allow decls after stmts.
4050
4051 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
4052
4053 * lisp.h (eassert): Assume that COND is true when optimizing.
4054 In other words, take on the behavior of eassert_and_assume.
4055 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
4056 (eassert_and_assume): Remove. All uses replaced by eassert.
4057
4058 * xdisp.c (Qglyphless_char): Now static.
4059
4060 Adjust to merge from gnulib.
4061 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
4062 * lisp.h: Include <verify.h>, for 'assume'.
4063
4064 * eval.c (clobbered_eassert): New macro.
4065 (internal_catch, internal_condition_case)
4066 (internal_condition_case_1, internal_condition_case_2)
4067 (internal_condition_case_n): Use it instead of eassert
4068 when the argument contains locals clobbered by longjmp.
4069 Don't use clobbered locals outside of clobbered_eassert.
4070 (internal_lisp_condition_case): Use a volatile variable
4071 to work around a local variable's getting clobbered.
4072
4073 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
4074
4075 * lisp.h (struct handler): Merge struct handler and struct catchtag.
4076 (PUSH_HANDLER): New macro.
4077 (catchlist): Remove.
4078 (handlerlist): Always declare.
4079
4080 * eval.c (catchlist): Remove (merge with handlerlist).
4081 (handlerlist, lisp_eval_depth): Not static any more.
4082 (internal_catch, internal_condition_case, internal_condition_case_1)
4083 (internal_condition_case_2, internal_condition_case_n):
4084 Use PUSH_HANDLER.
4085 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
4086 handlerlist/catchlist.
4087 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
4088 handlerlist which can only handle a single condition-case handler at
4089 a time.
4090 (find_handler_clause): Simplify since we only a single branch here
4091 any more.
4092
4093 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
4094 and Bpophandler.
4095 (bcall0): New function.
4096 (exec_byte_code): Add corresponding cases. Improve error message when
4097 encountering an invalid byte-code. Let Bunwind_protect accept
4098 a function (rather than a list of expressions) as argument.
4099
4100 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
4101 and make them unconditional now that they're heap-allocated.
4102
4103 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
4104
4105 * charset.c (Fdecode_char, Fencode_char): Remove description of
4106 `restriction' arg. now that it's hidden by advertised-calling-convention.
4107
4108 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
4109
4110 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
4111 Remove unused variable (from mac-port).
4112 (macfont_draw): Use s->ybase for correct y position.
4113
4114 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4115
4116 * frame.h (struct frame): Drop has_minibuffer member because...
4117 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
4118 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
4119
4120 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4121
4122 * window.h (struct window): Prefer enum text_cursor_kinds to int
4123 for phys_cursor_type member. Move the latter, phys_cursor_width,
4124 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
4125 * window.c (replace_window, make_window): Adjust users.
4126
4127 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
4128
4129 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
4130 this module is never compiled otherwise.
4131
4132 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
4133
4134 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
4135 (Bug#15500).
4136
4137 2013-09-29 Eli Zaretskii <eliz@gnu.org>
4138
4139 * xdisp.c (get_next_display_element): Don't call face_for_font in
4140 a build configured --without-x. (Bug#15484)
4141
4142 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
4143
4144 * window.c (calc_absolute_offset): #elif should be #elif defined.
4145
4146 * frame.c (delete_frame): Block/unblock input to overcome race
4147 condition (Bug#15475).
4148
4149 2013-09-29 Andreas Politz <politza@hochschule-trier.de> (tiny change)
4150
4151 * frame.c (delete_frame): Record selected frame only after
4152 calling Qdelete_frame_functions (Bug#15477).
4153
4154 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
4155
4156 * nsterm.m (ns_selection_color): Remove.
4157 (ns_get_color): Check for ns_selection_(fg|bg)_color using
4158 NSColor selectedText(Background)Color. Only for COCOA.
4159 (ns_term_init): Remove assignment of ns_selection_color, logic
4160 moved to ns_get_color.
4161
4162 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
4163 NS_SELECTION_COLOR_DEFAULT.
4164 (NS_SELECTION_FG_COLOR_DEFAULT): New.
4165
4166 2013-09-28 Eli Zaretskii <eliz@gnu.org>
4167
4168 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
4169 frame' does not have the tool_bar_window member.
4170
4171 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
4172
4173 Signal error when reading an empty byte-code object (Bug#15405)
4174 * lread.c (read1): Signal error.
4175 * alloc.c (make_byte_code): eassert header size.
4176 (sweep_vectors): Change an int to size_t.
4177
4178 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4179
4180 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
4181 instead of ints, as it's the usual style for offsetof constants. See:
4182 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
4183
4184 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
4185 This is ugly, but it should fix the performance problem for older
4186 GCC versions in the short run. I'll look into integrating the
4187 Gnulib module for popcount, as a better fix.
4188 See the thread starting in:
4189 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
4190 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
4191 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
4192 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
4193 (popcount_size_t): Use it.
4194
4195 2013-09-24 Daniel Colascione <dancol@dancol.org>
4196
4197 * process.c (Fnetwork_interface_info): Fix build break due to
4198 vector changes.
4199
4200 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4201
4202 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
4203 Prefer signed to unsigned integers where either will do.
4204 No need for 'const' on locals that do not escape.
4205 Omit easserts with unnecessary and unportable assumptions about
4206 alignment. Avoid unnecessary casts to char *.
4207
4208 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
4209
4210 Use union for the payload of struct Lisp_Vector.
4211 This helps to avoid a few glitches dictated by C's aliasing rules.
4212 * lisp.h (struct Lisp_Vector): Use union for next and
4213 contents member. Adjust comment. Change related users.
4214 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
4215 Related users changed.
4216 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
4217 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
4218 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
4219 * xfaces.c, xfont.c, xmenu.c: Related users changed.
4220
4221 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
4222
4223 Optimize glyph row clearing and copying routines.
4224 * dispextern.h (struct glyph_row): Change layout of struct
4225 glyph_row to help copy_row_except_pointers. Adjust comment.
4226 * dispnew.c (null_row): Remove.
4227 (clear_glyph_row): Use offsetof and memset to find and clear
4228 just the members that need clearing. Adjust comment.
4229 (copy_row_except_pointers): Likewise for copying.
4230
4231 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
4232
4233 Some minor cleanups of recently-added bool vector code.
4234 * conf_post.h (assume): Always return void. Use lint version
4235 only if GCC and MSC versions don't apply.
4236 * conf_post.h (assume):
4237 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
4238 Depend on _MSC_VER, not __MSC_VER, for consistency with
4239 the rest of Emacs.
4240 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
4241 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
4242 (bool_vector_binop_driver, count_trailing_zero_bits)
4243 (size_t_to_host_endian): Now static, not static inline;
4244 the latter isn't needed with modern compilers and doesn't
4245 work with older compilers anyway.
4246
4247 * alloc.c (valgrind_p): Use bool for boolean.
4248
4249 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
4250
4251 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
4252 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
4253 (display_last_displayed_message_p, message_buf_print)
4254 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
4255 Use bool for boolean.
4256 * dispextern.h (cancel_line, init_desired_glyphs):
4257 Remove ancient leftover.
4258 (help_echo_showing_p, hourglass_shown_p):
4259 * lisp.h (noninteractive_need_newline): Adjust declaration.
4260
4261 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
4262
4263 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
4264 Move to...
4265 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
4266 ...this file and convert the latter to static. Adjust comment.
4267 (make_initial_frame):
4268 * window.c (init_window_once): Adjust user.
4269 * frame.h (last_nonminibuf_frame): Remove declaration.
4270 * lisp.h (selected_frame): Likewise.
4271 * msdos.c (the_only_display_info): Adjust comment.
4272
4273 2013-09-23 Eli Zaretskii <eliz@gnu.org>
4274
4275 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
4276 computing the end column of mouse-highlight that comes from
4277 display or overlay strings. (Bug#15437)
4278 (note_mouse_highlight): Adapt calculation of last argument to
4279 mouse_face_from_string_pos to the above change.
4280
4281 * conf_post.h (__has_builtin): Define to zero, if undefined, on
4282 all platforms, not just for clang.
4283
4284 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
4285
4286 * filelock.c (lock_file_1): Rearrange to remove compiler warning
4287 about excess arguments to snprintf.
4288
4289 * conf_post.h(assume): Use __builtin_unreachable for clang.
4290
4291 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
4292
4293 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
4294 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
4295
4296 2013-09-23 Daniel Colascione <dancol@dancol.org>
4297
4298 * alloc.c (USE_VALGRIND): New macro; on by default
4299 when ENABLE_CHECKING.
4300 (mark_maybe_object, mark_maybe_pointer)
4301 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
4302 valgrind purposes.
4303 (valgrind_p) [USE_VALGRIND]: New variable.
4304 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
4305
4306 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
4307
4308 * process.c (wait_reading_process_output): Change int pnamelen to
4309 socklen_t.
4310
4311 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
4312 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
4313 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
4314 argument to unsigned long to avoid warning.
4315 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
4316
4317 * conf_post.h (assume): Fix compiler error: x shall be cond.
4318
4319 2013-09-22 Daniel Colascione <dancol@dancol.org>
4320
4321 * xfns.c (x_get_monitor_attributes): Suppress unused variable
4322 warning when compiling without a window system.
4323
4324 2013-09-22 Daniel Colascione <dancol@dancol.org>
4325
4326 * data.c (Qbool_vector_p): New symbol.
4327 (bool_vector_spare_mask, popcount_size_t_generic)
4328 (popcount_size_t_msc, popcount_size_t_gcc)
4329 (popcount_size_t)
4330 (bool_vector_binop_driver)
4331 (count_trailing_zero_bits, size_t_to_host_endian)
4332 (Fbool_vector_exclusive_or)
4333 (Fbool_vector_union)
4334 (Fbool_vector_intersection, Fbool_vector_set_difference)
4335 (Fbool_vector_subsetp, Fbool_vector_not)
4336 (Fbool_vector_count_matches)
4337 (Fbool_vector_count_matches_at): New functions.
4338 (syms_of_data): Intern new symbol, functions.
4339 * alloc.c (bool_vector_payload_bytes): New function.
4340 (Fmake_bool_vector): Instead of calling Fmake_vector,
4341 which performs redundant initialization and argument checking,
4342 just call allocate_vector ourselves. Make sure we clear any
4343 terminating padding to zero.
4344 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
4345 instead of open-coding the size calculation.
4346 (vroundup_ct): New macro.
4347 (vroundup): Assume argument >= 0; invoke vroundup_ct.
4348 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
4349 * composite.c (composition_gstring_put_cache):
4350 Change lint_assume to assume.
4351 * conf_post.h (assume): New macro.
4352 (lint_assume): Remove.
4353 * dispnew.c (update_frame_1): Change lint_assume to assume.
4354 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
4355 to assume.
4356 * image.c (gif_load): Change lint_assume to assume.
4357 * lisp.h (eassert_and_assume): New macro.
4358 (Qbool_vector_p): Declare.
4359 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
4360 (swap16, swap32, swap64): New inline functions.
4361 * macfont.m (macfont_shape): Change lint_assume to assume.
4362 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
4363 * xsettings.c (parse_settings): Use new swap16 and
4364 swap32 from lisp.h instead of file-specific macros.
4365
4366 2013-09-22 Eli Zaretskii <eliz@gnu.org>
4367
4368 * xdisp.c (try_window_id): Don't abort if cursor row could not be
4369 found (which can legitimately happen when the glyph row at the
4370 window start is disabled in the current_matrix. (Bug#15365)
4371
4372 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
4373
4374 Fix syntax.h bug introduced by recent INLINE change.
4375 syntax.h defined an extern inline function SYNTAX_ENTRY that was
4376 conditionally compiled one way in some modules, and a different
4377 way in others. This doesn't work with extern inline functions,
4378 which must have the same definition in all modules, because the
4379 defining code might be shared across modules, depending on the
4380 implementation. Symptoms reported by Martin Rudalics in:
4381 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
4382 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
4383 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
4384 overriding the corresponding functions in syntax.h.
4385 * syntax.h (syntax_property_entry, syntax_property_with_flags)
4386 (syntax_property): New inline functions.
4387 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
4388 Rewrite in terms of these new functions.
4389
4390 2013-09-21 Eli Zaretskii <eliz@gnu.org>
4391
4392 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
4393 not chars_in_text, whose result depends on the multibyteness of
4394 the current buffer. (Bug#15426)
4395
4396 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
4397
4398 Port recent change to hosts where pointers aren't 'long'.
4399 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
4400 Don't assume that pointers are the same width as 'long'.
4401 Add a compile-time check that a pointer fits into two X slots.
4402
4403 A simpler, centralized INLINE.
4404 * conf_post.h (INLINE): Define only if not already defined.
4405 This allows us to use a single INLINE, defined by one file
4406 per executable.
4407 * emacs.c (INLINE): Define it.
4408 Also, include category.h, charset.h, composite.h, dispextern.h,
4409 syntax.h, systime.h, so that their INLINE definitions are expanded
4410 properly for Emacs.
4411 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
4412 * buffer.h, buffer.c (BUFFER_INLINE):
4413 * category.h, category.c (CATEGORY_INLINE):
4414 * character.h, character.c (CHARACTER_INLINE):
4415 * charset.h, charset.c (CHARSET_INLINE):
4416 * composite.h, composite.c (COMPOSITE_INLINE):
4417 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
4418 * frame.h, frame.c (FRAME_INLINE):
4419 * intervals.h, intervals.c (INTERVALS_INLINE):
4420 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
4421 * lisp.h, alloc.c (LISP_INLINE):
4422 * process.h, process.c (PROCESS_INLINE):
4423 * syntax.h, syntax.c (SYNTAX_INLINE):
4424 * systime.h, sysdep.c (SYSTIME_INLINE):
4425 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
4426 * window.h, window.c (WINDOW_INLINE):
4427 Remove. All uses replaced with INLINE.
4428
4429 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
4430
4431 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
4432 to avoid Bug#15398.
4433
4434 2013-09-19 Eli Zaretskii <eliz@gnu.org>
4435
4436 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
4437 'const char *' to avoid compiler warnings due to similar change in
4438 the prototype of x_get_string_resource.
4439
4440 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
4441
4442 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
4443 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
4444 going to replace static variables below. Adjust comments.
4445 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
4446 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
4447 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
4448 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
4449 Related users changed.
4450 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
4451 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
4452 last_mouse_movement_time, going to replace static variables below.
4453 Adjust comments.
4454 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
4455 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
4456 Remove.
4457 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
4458 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
4459 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
4460 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
4461 static variables below.
4462 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
4463 (last_mouse_scroll_bar): Remove.
4464 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
4465 (mouseExited): Related users changed.
4466
4467 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
4468
4469 Do not use external array to process X scroll bar messages.
4470 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
4471 (x_send_scroll_bar_event): Pack window pointer into two slots
4472 of XClientMessageEvent if we're 64-bit. Adjust comment.
4473 (x_scroll_bar_to_input_event): Unpack accordingly.
4474
4475 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4476
4477 Ifdef away recent changes which aren't relevant to NS port.
4478 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
4479 [!HAVE_NS]: Declare as such.
4480 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
4481 [!HAVE_NS]: Define as such.
4482
4483 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4484
4485 * frame.c (x_redo_mouse_highlight): New function
4486 to factor out common code used in W32 and X ports.
4487 * dispextern.h (x_redo_mouse_highlight): Add prototype.
4488 * xterm.h (struct x_display_info):
4489 * w32term.h (struct w32_display_info):
4490 * nsterm.h (struct ns_display_info): New members
4491 last_mouse_motion_frame, last_mouse_motion_x and
4492 last_mouse_motion_y, going to replace static variables below.
4493 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
4494 (redo_mouse_highlight): Remove.
4495 (note_mouse_movement, syms_of_xterm): Adjust user.
4496 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
4497 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
4498 (redo_mouse_highlight): Remove.
4499 (note_mouse_movement, syms_of_w32term): Adjust user.
4500 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
4501 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
4502 Remove.
4503 (note_mouse_movement, mouseMoved, syms_of_nsterm):
4504 * nsfns.m (compute_tip_xy): Adjust user.
4505
4506 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
4507
4508 * frame.c (x_mouse_grabbed): New function.
4509 * dispextern.h (x_mouse_grabbed): Add prototype.
4510 (last_mouse_frame): Remove declaration.
4511 * xterm.h (struct x_display_info):
4512 * w32term.h (struct w32_display_info):
4513 * nsterm.h (struct ns_display_info): New member
4514 last_mouse_frame, going to replace...
4515 * xdisp.c (last_mouse_frame): ...global variable.
4516 (note_tool_bar_highlight):
4517 * w32term.c (w32_mouse_position, w32_read_socket):
4518 * xterm.c (XTmouse_position, handle_one_xevent):
4519 Use x_mouse_grabbed.
4520 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
4521
4522 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4523
4524 * w32term.c (w32_read_socket): Avoid temporary
4525 variables in a call to x_real_positions.
4526 * xterm.c (handle_one_xevent): Likewise.
4527
4528 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4529
4530 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
4531 (x_icon_type): Remove prototype.
4532 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
4533 * frame.c (x_icon_type): Remove.
4534 * w32term.c (x_make_frame_visible, x_iconify_frame):
4535 * xterm.c (x_make_frame_visible, x_iconify_frame):
4536 Use x_set_bitmap_icon to factor out common code.
4537
4538 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4539
4540 * dispextern.h (check_x_display_info, x_get_string_resource):
4541 Declare here just once and unify the latter.
4542 * frame.c (check_x_display_info, x_get_string_resource):
4543 * nsterm.h (check_x_display_info):
4544 * xrdb.c (x_get_string_resource):
4545 * xterm.h (check_x_display_info): Remove prototypes.
4546 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
4547 * w32reg.c (x_get_string_resource): Likewise.
4548 (w32_get_rdb_resource): Adjust user.
4549
4550 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4551
4552 * xterm.h (struct x_display_info): New member
4553 x_pending_autoraise_frame, going to replace...
4554 * xterm.c (pending_autoraise_frame): ...static variable.
4555 (x_new_focus_frame, XTread_socket): Adjust users.
4556 * w32term.h (struct w32_display_info): New member
4557 w32_pending_autoraise_frame, going to replace...
4558 * w32term.c (pending_autoraise_frame): ...global variable.
4559 (x_new_focus_frame, w32_read_socket): Adjust users.
4560
4561 2013-09-17 Glenn Morris <rgm@gnu.org>
4562
4563 * xdisp.c (message_dolog): If we create *Messages*,
4564 switch it to messages-buffer-mode.
4565
4566 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
4567
4568 Don't overuse 'const' in types of locals.
4569 * bidi.c (bidi_count_bytes):
4570 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
4571 (xg_event_is_for_scrollbar):
4572 * xselect.c (x_handle_property_notify)
4573 (x_handle_selection_notify, x_handle_dnd_message):
4574 * xsettings.c, xsettings.h (xft_settings_event):
4575 * xterm.c (x_handle_net_wm_state, handle_one_event)
4576 (x_menubar_window_to_frame, x_detect_focus_change)
4577 (construct_mouse_click, note_mouse_movement)
4578 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
4579 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
4580 (handle_one_xevent, x_handle_net_wm_state):
4581 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
4582 (x_handle_dnd_message):
4583 Avoid unnecessary 'const', typically the second 'const' in
4584 'const foo * const arg', a 'const' that does not affect the API
4585 and doesn't significantly help the human reader.
4586
4587 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
4588
4589 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
4590 only if Glib < 2.36.0.
4591 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
4592 * xsettings.c (init_gconf, init_gsettings): Do not check
4593 for g_type_init.
4594 * xterm.c (handle_one_xevent): Do not call to x_clear_area
4595 if GTK >= 2.7.0.
4596 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
4597
4598 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
4599
4600 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
4601 before calling g_type_init.
4602
4603 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
4604
4605 * nsterm.m (syms_of_nsterm): ... to here.
4606
4607 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
4608
4609 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
4610 (ignore_next_mouse_click_timeout): Use Time as X does.
4611 (handle_one_xevent): Avoid cast and use unsigned comparison.
4612
4613 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
4614
4615 Do not copy X event in handle_one_xevent except KeyPress case.
4616 Wnen XEvent is processed, it is unlikely to be changed except
4617 KeyPress case, so we can avoid copying and use const pointer to
4618 const data to make sure that an event is not changed elsewhere.
4619 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
4620 const' and do not create local copy except for the KeyPress event.
4621 Use casts to avoid a few glitches. Adjust formatting. Add comments.
4622 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
4623 (x_handle_net_wm_state, x_menubar_window_to_frame)
4624 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
4625 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
4626 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
4627 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
4628 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
4629 (x_handle_dnd_message):
4630 * xsettings.c (xft_settings_event):
4631 Use 'const XEvent * const' where appropriate.
4632 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
4633
4634 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
4635
4636 Fix X event waiting to handle multiple frames.
4637 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
4638 * xterm.c (pending_event_wait): Remove. Adjust users.
4639 (x_detect_focus_change): Pass frame arg.
4640 (handle_one_xevent): Find related frame early and clear per-frame
4641 wait_event_type only if this is an event for the relevant frame.
4642 (x_wait_for_event): Use per-frame wait_event_type.
4643
4644 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
4645
4646 * nsfns.m (Fx_create_frame): Fix font driver registration for
4647 GNUstep.
4648
4649 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
4650 for syms_of_macfont.
4651
4652 * nsterm.m: Include macfont.h.
4653 (ns_tmp_flags, ns_tmp_font): Remove.
4654 (ns_compute_glyph_string_overhangs): Check for driver Qns.
4655 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
4656 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
4657 (changeFont:): Fix code style. Check for font driver type when
4658 getiing font.
4659
4660 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
4661 (f)->descent.
4662
4663 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
4664 (nsfont_open): Set font driver type.
4665 Set font->ascent and font->descent. Figure out font instead of
4666 ns_tmp_font, and flags instead of ns_tmp_flags.
4667 Fix indentation. Remove call to ns_draw_text_decoration,
4668 moved to nsterm.
4669
4670 * nsfns.m: Include macfont.h.
4671 (Fx_create_frame): Register macfont driver, make a better default font.
4672 (Fns_popup_font_panel): Get font from macfont driver, if used.
4673
4674 * macfont.m, macfont.h, macuvs.h: New files.
4675
4676 * font.h: Declare syms_of_macfont.
4677
4678 * font.c (syms_of_font): Call syms_of_macfont.
4679
4680 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
4681
4682 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
4683
4684 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
4685 and it is always zero for others, so I assume that this is an ancient
4686 leftover which nobody will want to change any more.
4687 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
4688 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
4689 * frame.c (x_set_scroll_bar_width):
4690 * w32fns.c (w32_createscrollbar):
4691 * w32term.c (w32_set_vertical_scroll_bar):
4692 * xfns.c (x_set_scroll_bar_default_width):
4693 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
4694 (x_scroll_bar_expose): Related users changed.
4695
4696 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
4697
4698 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
4699 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
4700 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
4701 Define as such.
4702 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
4703 Define once here...
4704 * nsterm.h, w32term.h, xterm.h: ...and not here.
4705 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
4706 Remove unused Xisms.
4707 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
4708 these modules are never compiled otherwise.
4709
4710 2013-09-14 Eli Zaretskii <eliz@gnu.org>
4711
4712 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
4713 Doc fix. (Bug#15375)
4714
4715 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
4716
4717 Unify Fx_focus_frame between all ports.
4718 * frame.h (x_focus_frame): New prototype.
4719 * xfns.c (Fx_focus_frame): Remove.
4720 (syms_of_xfns): Do not defsubr it.
4721 (x_focus_frame): X implementation.
4722 * nsfns.m (Fx_focus_frame): Remove.
4723 (syms_of_nsfns): Do not defsubr it.
4724 (x_focus_frame): NS implementation.
4725 * w32term.c (Fx_focus_frame): Remove.
4726 (x_focus_on_frame): Rename to...
4727 (x_focus_frame): W32 implementation.
4728 * w32term.h (x_focus_on_frame): Remove prototype.
4729 * w32fns.c (Fx_focus_frame): Remove.
4730 (syms_of_w32fns): Do not defsubr it.
4731 * frame.c (Fx_focus_frame): Define here.
4732 (syms_of_frame): Defsubr here.
4733 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
4734
4735 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
4736
4737 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
4738 All of them are replaced with FRAME_DISPLAY_INFO, defined in
4739 each port to reference the port-specific window system data.
4740 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
4741 (FRAME_DISPLAY_INFO): Define.
4742 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
4743 (FRAME_DISPLAY_INFO): Define. Adjust users.
4744 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
4745 (FRAME_DISPLAY_INFO): Define. Adjust users.
4746 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
4747 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
4748 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
4749 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
4750 * xselect.c, xterm.c: All related users changed.
4751
4752 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
4753
4754 * xterm.h (x_window_to_frame, x_any_window_to_frame)
4755 (x_menubar_window_to_frame): Remove prototypes.
4756 * xfns.c (x_window_to_frame, x_any_window_to_frame)
4757 (x_menubar_window_to_frame, x_top_window_to_frame):
4758 Move from here...
4759 * xterm.c (x_window_to_frame, x_any_window_to_frame)
4760 (x_menubar_window_to_frame, x_top_window_to_frame):
4761 ...to here and convert all but the last to static.
4762
4763 2013-09-12 Eli Zaretskii <eliz@gnu.org>
4764
4765 * lisp.mk (lisp): Add w32-common-fns.elc.
4766
4767 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
4768
4769 * charset.c (char_charset): Document an exception for char-charset.
4770
4771 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
4772
4773 * xterm.h (x_display_info): New field last_user_time...
4774 * xterm.c (toplevel): ...to replace static last_user_time.
4775 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
4776
4777 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
4778
4779 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
4780 scroll bar values to prevent thumb from disappear and update comment.
4781
4782 2013-09-11 Glenn Morris <rgm@gnu.org>
4783
4784 * emacs.c (usage_message): Possessive apostrophe tweak.
4785
4786 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
4787
4788 * nsterm.m (syms_of_nsterm): Use Qns.
4789 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
4790 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
4791 * xfns.c (x_display_info_for_name, Fx_open_connection):
4792 Remove old '#if 0' code.
4793 (syms_of_xfns): Use Qx.
4794 * termhooks.h (fullscreen_hook): Remove the leftover.
4795 (struct terminal): Fix typo in comment.
4796
4797 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
4798
4799 Cleaning up a few X scroll bar bits.
4800 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
4801 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
4802 New member last_seen_part, going to replace...
4803 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
4804 (xt_action_hook) [USE_LUCID]: Adjust user.
4805 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
4806 Lucid-specific scroll bar support.
4807 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
4808 to int and adjust to use last_seen_part member.
4809 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
4810 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
4811 Initialize last_seen_part.
4812
4813 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
4814
4815 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
4816 insert-buffer-substring an empty string.
4817
4818 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
4819
4820 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
4821 avoiding a GCC warning.
4822
4823 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
4824
4825 Ifdef away frame tool bar code when it is not really used.
4826 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
4827 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
4828 and minimize_tool_bar_window_p under the above.
4829 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
4830 (fset_tool_bar_window): Likewise.
4831 * dispnew.c (clear_current_matrices, clear_desired_matrices)
4832 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
4833 (change_frame_size_1):
4834 * window.c (window_from_coordinates, Frecenter): Adjust users.
4835 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
4836 code is not really used.
4837 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
4838 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
4839 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
4840 [!USE_GTK && !HAVE_NS]: Define as such.
4841 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
4842 (note_mouse_highlight, expose_frame):
4843 * xfns.c (x_set_tool_bar_lines):
4844 * xterm.c (handle_one_xevent): Adjust users.
4845
4846 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
4847
4848 Fix corruption with multiple emacsclient -t instances (Bug#15222).
4849 This bug was introduced by my 2013-08-26 patch, which incorrectly
4850 assumed that the terminfo implementation doesn't use termcap buffers.
4851 * term.c (init_tty) [TERMINFO]: Remove optimization, as
4852 these buffers apparently are used after all.
4853 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
4854 (struct tty_display_info): Define members termcap_term_buffer and
4855 termcap_strings_buffer even if TERMINFO.
4856
4857 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
4858
4859 Fix last change.
4860 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
4861 'usage' docstring entry to pacify make-docfile.
4862
4863 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
4864
4865 Change comparison functions =, <, >, <=, >= to take many arguments.
4866 * data.c: Change comparison functions' interface and implementation.
4867 * lisp.h: Make arithcompare available for efficient two arg
4868 comparisons.
4869 * bytecode.c: Use arithcompare.
4870 * fileio.c: Use new interface.
4871
4872 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
4873
4874 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
4875
4876 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
4877
4878 * eval.c (Feval): Document the new use of `lexical'.
4879
4880 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
4881
4882 Review and drop old frame resize hack.
4883 * frame.h (struct frame): Remove force_flush_display_p.
4884 * dispnew.c (update_frame): Adjust user and don't call
4885 flush_frame here. The comment has said that there was an issues
4886 with redisplaying fringes, but I don't see any differences with
4887 and without this hack. Hopefully we can continue without it.
4888 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
4889 current frame matrices twice if resized_p is set.
4890
4891 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
4892
4893 Do not populate pure Xism x_sync to other ports.
4894 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
4895 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
4896 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
4897 * w32term.h (x_sync): Remove prototype.
4898
4899 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
4900
4901 Cleanup frame flushing.
4902 * dispextern.h (struct redisplay_interface):
4903 Drop flush_display_optional because flush_display is enough
4904 for X and flushing via RIF is just a no-op for others.
4905 * frame.h (flush_frame): New function.
4906 * dispnew.c (update_frame):
4907 * minibuf.c (read_minibuf):
4908 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
4909 Use it.
4910 * keyboard.c (detect_input_pending_run_timers): Do not flush
4911 all frames but selected one in redisplay_preserve_echo_area.
4912 * nsterm.m (ns_flush): Remove no-op.
4913 (ns_redisplay_interface): Adjust user.
4914 * w32term.h (x_flush): Remove no-op.
4915 (w32_redisplay_interface): Adjust user.
4916 * xterm.c (x_flush): Simplify because we do not flush all
4917 frames at once any more. Adjust comment.
4918 (x_redisplay_interface): Adjust user.
4919
4920 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
4921
4922 Port --without-x --enable-gcc-warnings to Fedora 19.
4923 * gfilenotify.c (globals_of_gfilenotify):
4924 Call g_type_init only if using an older glib version that needs it.
4925
4926 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4927
4928 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
4929 (last_glyphless_glyph_merged_face_id): Remove declarations.
4930 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
4931 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
4932 (last_glyphless_glyph_merged_face_id): Now static.
4933 (merge_escape_glyph_face): New function, refactored from...
4934 (get_next_display_element): ...here.
4935 (merge_glyphless_glyph_face): New function, refactored from...
4936 (produce_glyphless_glyph): ...here...
4937 * term.c (produce_glyphless_glyph): ...and here.
4938
4939 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
4940
4941 * eval.c (eval_sub): Only call Ffunction if necessary.
4942
4943 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4944
4945 Attempt to make redisplay more selective when changing cursor type.
4946 * frame.h (struct frame): New bitfield cursor_type_changed.
4947 * xdisp.c (cursor_type_changed): Remove.
4948 (try_cursor_movement, redisplay_window, try_window_id)
4949 (set_frame_cursor_types, try_window_reusing_current_matrix):
4950 Adjust to use per-frame bitfield.
4951 (redisplay_internal): Look for cursor type change on each visible
4952 frame and consider all frames if cursor type has been changed on
4953 the frame other than selected. If cursor type has been changed on
4954 selected frame only, do not use fast update.
4955
4956 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4957
4958 Attempt to make redisplay more selective when changing fonts.
4959 * frame.h (struct frame): New bitfield fonts_changed.
4960 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
4961 (adjust_frame_glyphs): Add prototype.
4962 * dispnew.c (fonts_changed_p): Remove.
4963 (adjust_glyphs): Remove because we do not
4964 adjust matrices on all frames at once any more.
4965 (adjust_frame_glyphs): Block and unblock input here.
4966 (adjust_glyph_matrix): Use fonts_changed.
4967 (change_frame_size_1): Use adjust_frame_glyphs.
4968 * font.c (font_open_entity): Use fonts_changed.
4969 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
4970 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
4971 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
4972 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
4973 (shrink_mini_window, Fresize_mini_window_internal)
4974 (window_scroll_pixel_based, Fset_window_configuration)
4975 (apply_window_adjustment, Fset_window_vscroll):
4976 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
4977 Use adjust_frame_glyphs.
4978 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
4979 (try_window_reusing_current_matrix, try_window_id, display_line)
4980 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
4981 (redisplay_internal): Consider fonts_changed and adjust frame
4982 matrices for each frame only if the frame is visible. If font
4983 has been changed on some frame during full redisplay, retry
4984 only visible frames where the font has been actually changed.
4985
4986 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4987
4988 Cache current header and mode line height for each window.
4989 * window.h (struct window): New fields mode_line_height
4990 and header_line_height.
4991 * window.c (make_window): Initialize them.
4992 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
4993 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
4994 (current_mode_line_height, current_header_line_height):
4995 Remove declaration.
4996 * xdisp.c (current_mode_line_height, current_header_line_height):
4997 Remove.
4998 (pos_visible_p, init_xdisp): Adjust user.
4999 (redisplay_window): Invalidate mode_line_height and
5000 header_line_height if current and desired matrices do not agree.
5001
5002 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5003
5004 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
5005 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
5006
5007 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5008
5009 Make --without-x compatible with --enable-gcc-warnings.
5010 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
5011 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
5012 members under HAVE_WINDOW_SYSTEM.
5013 * keyboard.c (make_lispy_focus_out): Likewise.
5014 (record_menu_key): Move under HAVE_MENUS.
5015 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
5016 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
5017 (syms_of_xdisp): Adjust user.
5018 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
5019 (start_hourglass, cancel_hourglass):
5020 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
5021 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
5022 and CLEAR_FONT_TABLE_NFONTS.
5023 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
5024 Declare only if HAVE_WINDOW_SYSTEM.
5025 (lface_same_font_attributes_p, clear_face_gcs): Define only
5026 if HAVE_WINDOW_SYSTEM.
5027
5028 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
5029
5030 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
5031 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
5032 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
5033
5034 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
5035
5036 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
5037
5038 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
5039
5040 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
5041 This fixes a type error on hosts where ptrdiff_t is wider than int.
5042
5043 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
5044
5045 * keyboard.c (read_key_sequence_vs): New function.
5046 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
5047 common code.
5048
5049 * callint.c (Fcall_interactively): Always return a vector for 'K'.
5050
5051 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
5052
5053 Makefile improvements.
5054 * Makefile.in (config.status): Don't use double-colon rules, as
5055 they are not portable according to POSIX. Fix shell typo with `;
5056 I guess this rule has never been tested?
5057 (VCSWITNESS): New macro, to override any environment var.
5058
5059 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
5060
5061 * xterm.h (struct x_display_info): Do not track X connection
5062 fd separately because it is always available from Display.
5063 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
5064 Adjust users.
5065
5066 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5067
5068 * buffer.c (drop_overlay):
5069 * fileio.c (restore_point_unwind): Prefer unchain_marker to
5070 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
5071
5072 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5073
5074 * buffer.c (Fmake_overlay, Fmove_overlay):
5075 * intervals.c (set_point_from_marker):
5076 * print.c (PRINTPREPARE): Prefer signal_error
5077 to plain error and report unsuitable marker too.
5078
5079 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
5080
5081 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
5082 for 'dragging' member.
5083 (struct x_output): Remove set-but-unused leftovers
5084 'left_before_move' and 'top_before_move'.
5085 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
5086 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
5087 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
5088 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
5089 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
5090 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
5091 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
5092 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
5093
5094 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
5095
5096 * nsfont.m (INVALID_GLYPH): New define.
5097 (nsfont_encode_char): Use INVALID_GLYPH.
5098 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
5099
5100 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5101
5102 * xterm.c (x_last_mouse_movement_time): Revert last change.
5103 This code should use XDisplayMotionBufferSize to check display's
5104 motion history first, and there are few other issues as well.
5105 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
5106 (handle_one_xevent): Adjust user.
5107
5108 2013-09-02 Martin Rudalics <rudalics@gmx.at>
5109
5110 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
5111 * frame.c (Flast_nonminibuf_frame): ... to here.
5112 (check_minibuf_window): Don't abort if no window was found
5113 (Bug#15247).
5114
5115 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5116
5117 Use XGetMotionEvents to ask the last mouse motion time from X server.
5118 * xterm.c (X_MOTION_HISTORY): Default to 1.
5119 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
5120 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
5121 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
5122 Ifdef away legacy code.
5123 (XTmouse_position, x_scroll_bar_report_motion):
5124 Use x_last_mouse_movement_time.
5125 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
5126 UnmapNotify event.
5127
5128 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5129
5130 * msdos.c (last_mouse_window): Move to...
5131 (dos_rawgetc): ...this function and adjust comment.
5132 * nsterm.m (last_window): Rename to last_mouse_window, move to...
5133 (mouseMoved): ...this function and adjust comment.
5134 * w32term.c (last_window): Likewise with...
5135 (w32_read_socket): ...this function.
5136 * xterm.c (last_window): Likewise with...
5137 (handle_one_xevent): ...this function.
5138
5139 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5140
5141 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
5142 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
5143 (handle_one_xevent): ...to here.
5144 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
5145 otherwise.
5146
5147 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
5148
5149 * msdos.c (IT_set_terminal_window): Remove no-op.
5150 (initialize_msdos_display): Adjust terminal setup.
5151 * w32console.c (w32con_set_terminal_window): Remove no-op.
5152 (initialize_w32_display): Adjust terminal setup.
5153 * w32term.c (w32_set_terminal_window): Remove no-op.
5154 (w32_create_terminal): Adjust terminal setup.
5155 * xterm.c (XTset_terminal_window): Remove no-op.
5156 (x_create_terminal): Adjust terminal setup.
5157
5158 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
5159
5160 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
5161 Remove no-ops.
5162 (ns_create_terminal): Adjust terminal setup.
5163 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
5164 Remove no-ops.
5165 (w32_create_terminal): Adjust terminal setup.
5166 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
5167 Remove no-ops.
5168 (x_create_terminal): Adjust terminal setup.
5169
5170 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
5171
5172 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
5173 (CLIP_TEXT_POS_FROM_MARKER): New macro.
5174 * dispnew.c (buffer_posn_from_coords):
5175 * window.c (Fwindow_end, displayed_window_lines):
5176 * xdisp.c (redisplay_mode_lines): Use it.
5177
5178 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
5179
5180 * fontset.c (face_for_char): Check char in the current face font first
5181 if HAVE_NS (Bug#15138).
5182
5183 2013-08-31 Martin Rudalics <rudalics@gmx.at>
5184
5185 * window.c (temp_output_buffer_show): Make sure window returned
5186 by display_buffer is live (Bug#15213).
5187
5188 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
5189
5190 Minor cleanup to avoid forward declarations.
5191 * coding.h (struct ccl_spec): Remove forward declaration.
5192 * composite.h (toplevel): Include font.h.
5193 (struct composition_it, struct face, struct font_metrics):
5194 Remove forward declaration.
5195 * dispextern.h (struct image, struct atimer): Likewise.
5196 * emacsgtkfixed.h (struct frame): Likewise.
5197 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
5198 * font.h (struct font_driver, struct font, struct glyph_string)
5199 (struct face): Remove forward declaration.
5200 * fontset.h (struct face, struct font): Likewise.
5201 * frame.h (toplevel): Style cleanup.
5202 (enum output_method): Move to...
5203 * termhooks.h (enum output_method): ...here.
5204 (struct glyph, struct frame, struct ns_display_info)
5205 (struct x_display_info, struct w32_display_info):
5206 Remove forward declaration.
5207 * xterm.h (toplevel): Include termhooks.h.
5208 (struct font, struct window, struct glyph_matrix, struct frame)
5209 (struct input_event, struct face, struct image): Remove forward
5210 declaration.
5211 * gtkutil.h (struct _widget_value): Likewise.
5212 * keyboard.h (toplevel): Include termhooks.h.
5213 (struct input_event): Remove forward declaration.
5214
5215 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5216
5217 * intervals.c (set_point_from_marker): New function.
5218 * editfns.c (Fgoto_char):
5219 * process.c (Finternal_default_process_filter):
5220 * window.c (select_window_1): Use it.
5221 * buffer.h (set_point_from_marker): Add prototype.
5222
5223 2013-08-29 Eli Zaretskii <eliz@gnu.org>
5224
5225 * w32.c (term_winsock): Call release_listen_threads before calling
5226 WSACleanup.
5227 (_sys_wait_accept): Wait for accept event in a loop with a finite
5228 timeout, instead of waiting indefinitely. Will hopefully avoid
5229 hanging during exit because WSACleanup deadlocks waiting for the
5230 event object to be released. (Bug#14333)
5231
5232 * w32proc.c (release_listen_threads): New function, signals all
5233 the reader threads that listen for connections to stop waiting.
5234
5235 * w32.h (release_listen_threads): Add prototype.
5236
5237 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5238
5239 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
5240 field of new marker (for sanity and safety).
5241 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
5242 anyway because XMISCTYPE is a function and can't be an lvalue).
5243
5244 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5245
5246 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
5247 (x_after_update_window_line, x_scroll_bar_create)
5248 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
5249 (handle_one_xevent, x_clear_frame_area):
5250 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
5251 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
5252 * xterm.h (x_clear_area): Adjust prototype.
5253
5254 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
5255
5256 Hook scanning and indentation functions to find_newline. This helps
5257 to avoid duplicated code and renders more respect to newline cache.
5258 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
5259 * cmds.c (Fforward_line):
5260 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
5261 Use find_newline and avoid unnecessary point movements.
5262 * search.c (scan_newline): Implement on top of find_newline.
5263
5264 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
5265
5266 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
5267 scoped code (bug#11258).
5268
5269 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
5270
5271 * nsterm.m (last_window): New variable.
5272 (EV_TRAILER2): New macro.
5273 (EV_TRAILER): Call EV_TRAILER2.
5274 (mouseMoved:): Add support for mouse-autoselect-window
5275 on nextstep (Bug#6888).
5276
5277 2013-08-28 Andreas Schwab <schwab@suse.de>
5278
5279 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
5280 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
5281 Remove unused macro definitions.
5282 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
5283 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
5284 Only define if emacs.
5285
5286 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5287
5288 Prefer enum glyph_row_area to int where appropriate.
5289 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
5290 Fix comment.
5291 (window_box, window_box_width, window_box_left, window_box_left_offset)
5292 (window_box_right, window_box_right_offset): Adjust prototypes.
5293 * xdisp.c (window_box, window_box_width, window_box_left)
5294 (window_box_left_offset, window_box_right, window_box_right_offset):
5295 Use enum glyph_row_area. Adjust users and tweak comment where needed.
5296 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
5297 * nsterm.m (ns_clip_to_row):
5298 * w32term.c (w32_clip_to_row):
5299 * xterm.c (x_clip_to_row): Likewise.
5300
5301 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5302
5303 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
5304 (Fprevious_overlay_change): Fast path for buffer with no overlays.
5305
5306 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
5307
5308 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
5309 for portability to hosts where /bin/sh has problems.
5310
5311 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
5312
5313 Redesign redisplay interface to drop global output_cursor.
5314 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
5315 (toplevel): Remove declaration of output_cursor.
5316 (set_output_cursor, x_cursor_to): Remove prototype.
5317 * window.h (struct window): New member output_cursor.
5318 (output_cursor_to): New function to replace RIF member.
5319 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
5320 (update_text_area, set_window_cursor_after_update): Use it.
5321 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
5322 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5323 * nsterm.m (ns_update_window_begin, ns_update_window_end):
5324 * w32term.c (x_update_window_begin, x_update_window_end):
5325 * xterm.c (x_update_window_begin, x_update_window_end):
5326 Adjust to use per-window output cursor.
5327
5328 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
5329
5330 Simplify SELECT_TYPE-related code.
5331 Like EMACS_TIME, this portability layer is no longer needed, since
5332 Emacs has been using fd_set as a portability layer for some time.
5333 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
5334 (SELECT_TYPE): Remove. All uses changed to fd_set.
5335 (fd_set) [!FD_SET]: New typedef.
5336
5337 Simplify EMACS_TIME-related code.
5338 This portability layer is no longer needed, since Emacs has been
5339 using struct timespec as a portability layer for some time.
5340 * atimer.h, buffer.h, dispextern.h, xgselect.h:
5341 Include <time.h> rather than "systime.h"; that's all that's needed now.
5342 * dispnew.c: Include <timespec.h> rather than "systime.h";
5343 that's all that's needed now.
5344 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
5345 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
5346 TIMESPEC_RESOLUTION.
5347 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
5348 LOG10_TIMESPEC_RESOLUTION.
5349 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
5350 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
5351 (make_emacs_time): Remove. All used changed to make_timespec.
5352 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
5353 (current_timespec): Rename from current_emacs_time. All uses changed.
5354 (add_emacs_time): Remove. All uses changed to timespec_add.
5355 (sub_emacs_time): Remove. All uses change dot timespec_sub.
5356 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
5357 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
5358 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
5359 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
5360 (current_timespec): Rename from current_emacs_time. All uses changed.
5361 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
5362 changed to timespec_cmp.
5363 * xgselect.c: Include <timespec.h>, since our .h files don't.
5364
5365 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5366
5367 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
5368 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
5369 Remove the leftovers.
5370 * gtkutil.c (toplevel): Do not declare Qxft but include
5371 font.h to do so.
5372 * image.c (toplevel): Do not declare Vlibrary_cache because
5373 it's already done in lisp.h.
5374
5375 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
5376
5377 * lisp.h (Mouse_HLInfo): Move from here...
5378 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
5379 (reset_mouse_highlight): New function.
5380 * msdos.c (dos_set_window_size, IT_update_begin)
5381 (internal_terminal_init):
5382 * nsterm.m (ns_update_window_end, x_free_frame_resources)
5383 (ns_initialize_display_info):
5384 * w32console.c (initialize_w32_display):
5385 * w32term.c (x_update_window_end, x_free_frame_resources)
5386 (w32_initialize_display_info):
5387 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
5388 * window.c (Fdelete_other_windows_internal):
5389 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
5390 * termchar.h (toplevel):
5391 * xterm.h (toplevel): Include dispextern.h.
5392
5393 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
5394
5395 Fix minor problems found by static checking.
5396 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
5397 (expect): Avoid nested-if warning.
5398 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
5399 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
5400 * nsterm.h, nsterm.m (ns_select):
5401 * xgselect.c, xgselect.h (xg_select):
5402 Adjust signature to better match pselect's.
5403 * nsterm.m (ns_select):
5404 Don't set *TIMEOUT, since pselect doesn't.
5405 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
5406 diagnostic about assigning const char * to it.
5407 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
5408
5409 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
5410
5411 * lread.c (substitute_object_recurse): Handle hash-tables as well
5412 (bug#15190).
5413
5414 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
5415
5416 Fix unlikely core dump in init_tty, and simplify terminfo case.
5417 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
5418 The old version incorrectly dumped core if malloc returned a
5419 buffer containing only non-NUL bytes.
5420 (init_tty): Do not allocate or free termcap buffers; the
5421 struct does that for us now.
5422 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
5423 (struct tty_display_info): Define members termcap_term_buffer and
5424 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
5425 use them. Allocate them directly in struct rather than indirectly
5426 via a pointer, to simplify init_tty.
5427
5428 * frame.c (check_minibuf_window): Initialize 'window' properly,
5429 so that Emacs reliably aborts later if 'window' is not initialized.
5430
5431 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
5432
5433 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
5434 of VoidSymbol (Bug#15154).
5435
5436 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5437
5438 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
5439 mouse_face_beg_y and mouse_face_end_y.
5440 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
5441 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
5442 Adjust users and update comment where appropriate.
5443
5444 2013-08-26 Martin Rudalics <rudalics@gmx.at>
5445
5446 * frame.c (check_minibuf_window): New function.
5447 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
5448 Call check_minibuf_window (Bug#15183).
5449
5450 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5451
5452 * window.h (struct window): Replace last_cursor with last_cursor_vpos
5453 because this is the only last cursor data we need to keep and consult.
5454 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
5455 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
5456 Adjust users.
5457
5458 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5459
5460 Fix recovering from possible decompression error.
5461 Since insert_from_gap doesn't always move point, we can't use PT as
5462 the position where the partially decompressed data ends, and
5463 should count how many bytes was produced so far.
5464 * decompress.c (struct decompress_unwind_data): Add nbytes member.
5465 (unwind_decompress): Really delete partially uncompressed data.
5466 (Fzlib_decompress_region): Take decompressed data size into account.
5467
5468 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
5469
5470 * syntax.c (init_syntax_once): Adjust comment and do an early
5471 initialization of Qchar_table_extra_slots just once...
5472 * casetab.c (init_casetab_once):
5473 * category.c (init_category_once):
5474 * character.c (syms_of_character):
5475 * coding.c (syms_of_coding):
5476 * xdisp.c (syms_of_xdisp): ...and omit it here.
5477
5478 2013-08-24 Eli Zaretskii <eliz@gnu.org>
5479
5480 * xdisp.c (get_next_display_element): Don't apply to characters
5481 from a display vector the logic of setting it->end_of_box_run_p
5482 suitable for characters from a buffer. (Bug#15175)
5483
5484 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
5485 to handle directories, rather than '_utime' which doesn't.
5486 (Bug#15176)
5487
5488 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
5489
5490 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
5491 or fullscreen (Bug#14627).
5492
5493 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
5494
5495 System-dependent integer overflow fixes.
5496 * process.c (Fset_process_window_size): Signal an error if
5497 the window size is outside the range supported by the lower level.
5498 * sysdep.c (set_window_size): Return negative on error,
5499 nonnegative on success, rather than -1, 0, 1 on not in system,
5500 failure, success. This is simpler. Caller changed.
5501 (serial_configure): Remove unnecessary initialization of local.
5502 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
5503 size fits in unsigned long; this isn't true on some 32-bit hosts.
5504 Avoid buffer overrun if some future version of /proc/meminfo has a
5505 variable name longer than 20 bytes.
5506 (system_process_attributes) [__FreeBSD__]:
5507 Don't assume hw.availpages fits in 'int'.
5508
5509 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
5510
5511 Don't let very long directory names overrun the stack.
5512 Fix some related minor problems involving "//", vfork.
5513 * callproc.c (encode_current_directory): New function.
5514 (call_process): Don't append "/"; not needed.
5515 * fileio.c (file_name_as_directory_slop): New constant.
5516 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
5517 this can save the caller having to alloca.
5518 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
5519 Use SAFE_ALLOCA, not alloca.
5520 (directory_file_name, Fexpand_file_name): Leave leading "//"
5521 alone, since it can be special even on POSIX platforms.
5522 * callproc.c (call_process):
5523 * process.c (Fformat_network_address):
5524 * sysdep.c (sys_subshell):
5525 Use encode_current_directory rather than rolling our own.
5526 (create_process): No need to encode directory; caller does that now.
5527 * process.h (encode_current_directory): New decl.
5528 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
5529 Rework to avoid 'goto xyzzy;'.
5530
5531 2013-08-23 Eli Zaretskii <eliz@gnu.org>
5532
5533 * xdisp.c (handle_face_prop): If the default face was remapped use
5534 the remapped face for strings from prefix properties. (Bug#15155)
5535
5536 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
5537
5538 Minor cleanup for redisplay interface and few related functions.
5539 * frame.h (enum text_cursor_kinds): Move from here...
5540 * dispextern.h (enum text_cursor_kinds): ...to here.
5541 (toplevel): Drop unnecessary declarations.
5542 (struct redisplay_interface): Use bool and enum text_cursor_kinds
5543 in update_window_end_hook and draw_window_cursor functions.
5544 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
5545 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
5546 * w32term.c (x_update_window_end, w32_draw_window_cursor):
5547 * xterm.c (x_update_window_end, x_draw_window_cursor):
5548 * xdisp.c (display_and_set_cursor, update_window_cursor)
5549 (update_cursor_in_window_tree, x_update_cursor): Use bool and
5550 enum text_cursor_kinds where appropriate.
5551
5552 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
5553
5554 Redesign redisplay interface to drop updated_row and updated_area.
5555 * dispextern.h (updated_row, updated_area): Remove declaration.
5556 (struct redisplay_interface): Pass glyph row and row area parameters
5557 to write_glyphs, insert_glyphs and clear_end_of_line functions.
5558 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5559 Adjust prototypes.
5560 * dispnew.c (updated_row, updated_area): Remove.
5561 (redraw_overlapped_rows, update_window_line): Adjust user.
5562 (update_marginal_area, update_text_area): Likewise. Pass updated row
5563 as a parameter. Prefer enum glyph_row_area to int where appropriate.
5564 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
5565 Adjust users.
5566
5567 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
5568
5569 * process.c (flush_pending_output): Remove stub.
5570 All uses removed.
5571
5572 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
5573
5574 * callproc.c: Fix race that killed background processes (Bug#15144).
5575 (call_process): New arg TEMPFILE_INDEX. Callers changed.
5576 Record deleted process-id in critical section, not afterwards.
5577 Don't mistakenly kill process created by a call-process invocation
5578 that discards output and does not wait.
5579
5580 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
5581
5582 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
5583 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
5584 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
5585 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
5586 to shut up compiler in mark_object.
5587 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
5588
5589 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
5590
5591 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
5592 We can't portably rely on PTY_OPEN doing that, even if
5593 it calls posix_openpt with O_CLOEXEC.
5594
5595 2013-08-20 Kenichi Handa <handa@gnu.org>
5596
5597 * character.c (string_char): Improve commentary.
5598
5599 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
5600
5601 * image.c (SIGNATURE_DIGESTSIZE): Remove.
5602 (struct animation_cache): Make signature a flexible array member.
5603 All uses changed. This is a tad slower but may insulate us better
5604 from future changes to ImageMagick.
5605
5606 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
5607
5608 * image.c: Shrink memory needed for animation cache.
5609 (SIGNATURE_DIGESTSIZE): New constant.
5610 (struct animation_cache): Make 'signature' a fixed size array of bytes.
5611 (imagemagick_create_cache): Copy the signature. This saves
5612 several KB of memory that ImageMagick wastes per signature.
5613 Don't bother updating the update_time, as the caller does that now.
5614 (imagemagick_prune_animation_cache): Don't destroy the signature, as
5615 it's a fixed size struct member now.
5616 (imagemagick_get_animation_cache): Always destroy the signature,
5617 as it's now imagemagick_create_cache's responsibility to copy it.
5618 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
5619 and use memcmp rather than strcmp.
5620 eassert that ImageMagick returns a signature of the specified length.
5621
5622 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
5623
5624 * image.c (imagemagick_get_animation_cache): Don't segfault on
5625 each invocation.
5626 (imagemagick_get_animation_cache): Revert to previous definition
5627 so that it actually works. But keep the memory leak fix.
5628 (imagemagick_get_animation_cache): Fix memory leak.
5629
5630 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
5631
5632 * image.c: Fix animation cache signature memory leak.
5633 Fix some other minor performance problems while we're at it.
5634 (imagemagick_create_cache): Clear just the members that
5635 need clearing. Don't set update_time, as caller does that now.
5636 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
5637 Simplify by using pointer-to-pointer instead of a prev pointer.
5638 (imagemagick_prune_animation_cache): Use make_emacs_time rather
5639 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
5640 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
5641 it's already a copy. Free the signature probe unless it's cached.
5642
5643 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
5644 This was introduced by my 2013-08-12 fix for Bug#15035.
5645
5646 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
5647
5648 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
5649 (imagemagick_prune_animation_cache): Now static.
5650
5651 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
5652
5653 * image.c (imagemagick_get_animation_cache): Don't segfault when
5654 pruning all entries.
5655
5656 2013-08-18 Ken Brown <kbrown@cornell.edu>
5657
5658 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
5659 static heap if ENABLE_CHECKING is defined.
5660 (max_bss_sbrk_ptr): New variable.
5661 (bss_sbrk): Use it.
5662 (report_sheap_usage): Report maximum static heap usage instead of
5663 ending static heap usage.
5664
5665 2013-08-17 Eli Zaretskii <eliz@gnu.org>
5666
5667 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
5668 of zlib_initialized according to the results of calling
5669 init_zlib_functions.
5670
5671 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
5672
5673 * image.c: Implement an ImageMagick per-image cache.
5674 (imagemagick_get_animation_cache): Fix a double-free error.
5675 (imagemagick_load_image): Remove the ping_wand code, which only
5676 apparently saved time on invalid animated images, and slowed down
5677 everything else. Optimise for the common case.
5678
5679 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
5680
5681 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
5682
5683 * editfns.c (insert_before_markers): Mention overlay in the doc string.
5684
5685 * marker.c (set_marker): Remove documentation of undefined behavior.
5686
5687 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
5688
5689 * image.c (imagemagick_compute_animated_image): Animate correctly
5690 when sub-images are smaller than the main image.
5691 (imagemagick_compute_animated_image): Setting the iterator row to
5692 zero is apparently not allowed.
5693 (imagemagick_compute_animated_image): Allow images that say they
5694 have sub-images that are bigger than the main image, but just crop
5695 them.
5696
5697 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
5698
5699 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
5700
5701 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
5702
5703 * image.c (imagemagick_compute_animated_image): Respect the GIF
5704 disposal methods.
5705
5706 2013-08-15 Ken Brown <kbrown@cornell.edu>
5707
5708 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
5709 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
5710 needed.
5711
5712 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
5713
5714 Fix minor problems found by static checking.
5715 * frame.c (delete_frame):
5716 * xdisp.c (next_element_from_display_vector):
5717 Avoid uninitialized local.
5718 * image.c (imagemagick_compute_animated_image): Port to C89.
5719 Prefer usual GNU indentation style for loops.
5720 Be more careful about bizarrely large sizes, by using ptrdiff_t
5721 instead of int.
5722
5723 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5724
5725 Fix infinite frame selection loop (Bug#15025).
5726 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
5727
5728 2013-08-15 Eli Zaretskii <eliz@gnu.org>
5729
5730 * xdisp.c (compute_window_start_on_continuation_line):
5731 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
5732 to make sure we end up setting the window start at the leftmost
5733 visible character of the display line. This avoids funky
5734 horizontal shifting because the window start is not kept on the
5735 same position. (Bug#15090)
5736 (next_element_from_display_vector): Support 'box' face attribute
5737 in the face definitions of a display vector. (Bug#15099)
5738
5739 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
5740
5741 * image.c (imagemagick_compute_animated_image): Implement animated
5742 images (bug#14700).
5743 (imagemagick_compute_animated_image): Fix some compilation
5744 warnings. Implement a very simple cache to make the animation
5745 usable at all, but it should be replaced with a per-image cache.
5746
5747 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5748
5749 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
5750 to do `for' loops over alist values.
5751 * buffer.h (FOR_EACH_BUFFER):
5752 * process.c (FOR_EACH_PROCESS): Use it.
5753 (handle_child_signal, status_notify, Fget_buffer_process)
5754 (kill_buffer_processes): Use FOR_EACH_PROCESS.
5755
5756 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
5757
5758 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
5759 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
5760 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
5761 to xzalloc and so avoid redundant call to memset.
5762 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
5763 members because it is allocated with xzalloc and so already zeroed.
5764
5765 2013-08-14 Ken Brown <kbrown@cornell.edu>
5766
5767 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
5768 (Bug#15094).
5769
5770 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5771
5772 Utility function and macro to copy Lisp string to C string.
5773 * lisp.h (xlispstrdupa): New macro.
5774 (xlispstrdup): New prototype.
5775 * alloc.c (xlispstrdup): New function.
5776 * callint.c (Fcall_interactively):
5777 * fileio.c (Ffile_name_directory, Fexpand_file_name)
5778 (Fsubstitute_in_file_name):
5779 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
5780 * image.c (x_create_bitmap_from_file):
5781 * w32term.c (w32_term_init):
5782 * xterm.c (x_term_init): Use xlispstrdup.
5783
5784 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
5785
5786 * image.c (imagemagick_load_image): Make animated pictures work.
5787 There's still some problems with background color settings, though
5788 (bug#14700).
5789
5790 * decompress.c (unwind_decompress): Always restore point.
5791
5792 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
5793
5794 * marker.c (set_marker): Reformat documentation.
5795
5796 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
5797
5798 * xdisp.c (cursor_type_changed): Now static.
5799
5800 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
5801 Use changed. This avoids the need to call xmalloc and for the
5802 caller to call xfree, and avoids memory leaks in some situations.
5803
5804 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5805
5806 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
5807 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
5808 (redisplay_window): If window_end_valid is cleared due to non-zero
5809 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
5810 so do not call to try_cursor_movement for that window.
5811
5812 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5813
5814 * window.h (struct window): Convert window_end_pos and
5815 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
5816 (wset_window_end_pos, wset_window_end_vpos): Remove.
5817 * dispnew.c (adjust_glyph_matrix):
5818 * window.c (Fwindow_end, replace_window, set_window_buffer)
5819 (make_window):
5820 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
5821 (set_vertical_scroll_bar, redisplay_window, try_window)
5822 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
5823 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
5824 (note_mouse_highlight): Adjust users.
5825 (try_cursor_movement): Likewise. Convert old precondition to eassert.
5826 Add comment.
5827
5828 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5829
5830 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
5831 * image.c (imagemagick_filename_hint): Use `const char *' and
5832 prefer SSDATA to SDATA to avoid warnings.
5833
5834 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5835
5836 Cleanup window fringes, margins and scroll bars adjustments.
5837 * window.c (set_window_fringes, set_window_margins)
5838 (set_window_scroll_bars, apply_window_adjustment): New functions.
5839 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
5840 (Fset_window_scroll_bars): Use them.
5841
5842 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
5843
5844 * window.h (struct window): Convert scroll_bar_width
5845 from Lisp_Object to integer. Adjust comment.
5846 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
5847 Adjust users.
5848 * window.c (wset_scroll_bar_width): Remove.
5849 (make_window): Initialize scroll_bar_width.
5850 (Fsplit_window_internal): Use direct assignment.
5851 (Fset_window_configuration, save_window_save):
5852 Convert Lisp_Object to integer and back where appropriate.
5853 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
5854 bar was actually changed, and mention this in docstring.
5855
5856 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
5857
5858 * decompress.c: Minor simplifications.
5859 (Fzlib_decompress_region): Don't bother verifying
5860 that avail_out <= UINT_MAX, as that was confusing.
5861 Mention the restriction in a comment instead.
5862 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
5863
5864 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
5865
5866 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
5867 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
5868
5869 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
5870
5871 * image.c (imagemagick_filename_hint): Check for errors in the
5872 alist structure.
5873
5874 2013-08-13 Eli Zaretskii <eliz@gnu.org>
5875
5876 * window.c (Fwindow_margins): Return nil when there's no marginal
5877 area, as per the documented API.
5878
5879 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
5880 Fmake_vector, as scroll bar's struct members are not all Lisp
5881 objects now. This avoids crashes in GC.
5882
5883 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
5884 bool, so its address could be taken.
5885
5886 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
5887
5888 * image.c (imagemagick_filename_hint): New function to possibly
5889 apply `image-content-type-suffixes'.
5890 (imagemagick_load_image): Use it.
5891
5892 2013-08-13 Eli Zaretskii <eliz@gnu.org>
5893
5894 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
5895 if loading zlib failed.
5896
5897 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
5898
5899 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
5900 2013-08-13 checkin below. Change bool to BOOL, rule is:
5901 All Obj-C code uses BOOL, except for interfaces callable from C.
5902
5903 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
5904
5905 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5906
5907 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
5908 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
5909 bool instead of BOOL.
5910 * w32term.h (struct scroll_bar): Convert fringe_extended_p
5911 from Lisp_Object to bitfield. Adjust comment.
5912 * w32term.c (x_scroll_bar_create): Adjust user.
5913 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
5914 * xterm.c (XTset_vertical_scroll_bar): Likewise.
5915 Use bool for boolean.
5916 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
5917 to `unsigned int' when defining a bitfield.
5918
5919 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
5920
5921 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
5922
5923 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5924
5925 * window.h (struct window): Convert left_margin_cols and
5926 right_margin_cols from Lisp_Objects to integers. Adjust comment.
5927 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
5928 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
5929 Adjust users.
5930 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
5931 Adjust comment.
5932 (showing_window_margins_p, update_window_line, update_frame_1):
5933 * fringe.c (draw_fringe_bitmap_1):
5934 * xdisp.c (window_box_width): Adjust users.
5935 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
5936 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
5937 Use direct assignment.
5938 (Fset_window_configuration, save_window_save, Fwindow_margins):
5939 Convert Lisp_Object to integer and back where appropriate.
5940 (Fset_window_margins): Adjust user. Return t if any margin
5941 was actually changed, and mention this in docstring.
5942
5943 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
5944
5945 * syntax.c (forward_word):
5946 * cmds.c (forward_char, backward_char): Mention the optional argument.
5947
5948 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5949
5950 * window.h (struct window): Convert left_fringe_width
5951 and right_fringe_width from Lisp_Objects to integers.
5952 Adjust comment.
5953 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
5954 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
5955 * window.c (wset_left_fringe_width, wset_right_fringe_width):
5956 Remove.
5957 (make_window): Initialize new integer fields to -1.
5958 (Fsplit_window_internal): Use direct assignment.
5959 (Fset_window_configuration, save_window_save):
5960 Convert Lisp_Object to integer and back where appropriate.
5961 (Fset_window_fringes): Adjust user. Return t if any fringe
5962 was actually changed, and mention this in docstring.
5963
5964 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5965
5966 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
5967 * nsfns.m (x_set_cursor_type):
5968 * w32fns.c (x_set_cursor_type):
5969 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
5970 * xdisp.c (set_frame_cursor_types): ...but in common code.
5971
5972 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5973
5974 * font.c (clear_font_cache): New function, stripped from...
5975 (Fclear_font_cache): ...here, which now uses the function
5976 above. Adjust comment.
5977 * font.h (clear_font_cache): Add prototype.
5978 * xfaces.c (clear_face_cache): Use clear_font_cache.
5979
5980 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
5981
5982 * window.c (Fset_window_start): Compare `w', not `window' because
5983 `w' might not be equal to `window' after call to decode_live_window.
5984
5985 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
5986
5987 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
5988 This fixes a problem introduced by the Bug#15035 patch
5989 when using GPG. Reported by Herbert J. Skuhra.
5990
5991 2013-08-12 Eli Zaretskii <eliz@gnu.org>
5992
5993 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
5994 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
5995 not yet initialized.
5996
5997 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
5998
5999 * decompress.c (Fzlib_decompress_region): Support zlib
6000 decompression, too, and rename.
6001
6002 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6003
6004 Minor zlib configuration tweaks.
6005 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
6006 Don't assume presence of fn_inflateInit2_ zlib internal function.
6007
6008 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
6009
6010 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
6011 include the zlib prefix.
6012
6013 2013-08-12 Eli Zaretskii <eliz@gnu.org>
6014
6015 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
6016 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
6017 define static variables that are pointers to zlib functions to be
6018 dynamically loaded.
6019 (init_zlib_functions) [WINDOWSNT]: New function.
6020 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
6021 New macros.
6022 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
6023 macros instead of invoking the zlib functions directly.
6024 (syms_of_decompress): DEFSYM Qzlib_dll.
6025 Staticpro Szlib_available_p.
6026
6027 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
6028
6029 Avoid looping over all frame windows to freeze and unfreeze.
6030 * window.h (struct window): Drop frozen_window_start_p.
6031 (freeze_window_starts): Drop prototype.
6032 * frame.h (struct frame): New frozen_window_starts flag.
6033 (FRAME_WINDOWS_FROZEN): New macro.
6034 * window.c (freeze_window_start, freeze_window_starts):
6035 Remove.
6036 (select_window, replace_window): Adjust users.
6037 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
6038 (window_frozen_p): New function.
6039 (redisplay_window): Use it.
6040
6041 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
6042
6043 Fix some fd issues when running subprocesses (Bug#15035).
6044 Fix bugs that can leak files or file descriptors on errors.
6045 Don't unlink open temp files, as that's hard for users to diagnose
6046 when things go awry (e.g., temp disk exhausted).
6047 Don't bother to lock temp files. Check for invalid recursion.
6048 * callproc.c (synch_process_fd): Remove. All uses removed.
6049 (synch_process_tempfile): New var or macro.
6050 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
6051 New constants.
6052 (record_kill_process): New arg, the temp name. All callers changed.
6053 (delete_temp_file): Now just a simple wrapper around unlink.
6054 (call_process_kill): New arg, the call_process_fd array.
6055 Close them all. Clear synch_process_pid. Remove the temp file,
6056 or arrange for it to be removed.
6057 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
6058 that's been moved to synch_process_tempfile. Caller changed.
6059 Do not remove the tempfile; that's now call_process_kill's
6060 responsibility.
6061 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
6062 call_process_kill; the caller now does that.
6063 (call_process_cleanup): Do not close the process fd; that's now
6064 call_process_kill's responsibility.
6065 (Fcall_process): Implement via new function call_process, which
6066 has most of the old body of Fcall_process, but with a different API.
6067 (call_process): New function that does not open or close filefd if
6068 it is nonnegative. Record which fds need to be closed, and let
6069 call_process_kill close (and remove the tempfile, on MSDOS) on error.
6070 Signal an error if invoked recursively (could be done via a hook).
6071 Simplify creation of the tempfile in the MSDOS case.
6072 Don't create the output file until after checking for the executable.
6073 Report any failure to open /dev/null.
6074 Don't open /dev/null for writing twice; once is enough.
6075 Don't create pipe if all output is being discarded or sent to file.
6076 Don't worry about setting up the coding system or reading from the
6077 pipe if all output is being discarded.
6078 Hoist fd_error local into top level, to lessen block nesting.
6079 Don't record deleted pid here; now done by Fcall_process_region.
6080 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
6081 and note its success in synch_process_tempfile.
6082 Do not leak resources when child_setup fails.
6083 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
6084 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
6085 (create_temp_file): Now returns open fd, with an additional
6086 Lisp_Object * argument to return the name. All callers changed.
6087 Do not close the file; rewind it instead, and leave it open for
6088 the caller. Do not lock the temp file. Unwind-protect the file
6089 and the file-descriptor.
6090 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
6091 If an asynchrounous process, record it here, not in call_process.
6092 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
6093 * eval.c (set_unwind_protect): New function.
6094 * fileio.c (write_region): New function, generalized from the
6095 old Fwrite_region. Do not lock temp files.
6096 (Fwrite_region): Use it.
6097 * lisp.h (set_unwind_protect, write_region): New decls.
6098 * process.c: Include <verify.h>.
6099 (make_process): Mark fds as initially closed.
6100 (deleted_pid_list): Now a list of pid-filename pairs.
6101 All uses changed.
6102 (close_process_fd): New function.
6103 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
6104 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
6105 New constants. Verify that their number matches PROCESS_OPEN_FDS.
6106 (create_process, create_pty, Fmake_serial_process)
6107 (server_accept_connection): Record which fds need to be closed,
6108 and let deactivate_process close them.
6109 (Fmake_network_process): Do not discard the unwind-protect
6110 until it's safe to do so.
6111 (deactivate_process): Close the fds opened by create_process etc.
6112 (Fprocess_send_eof): Adjust to new way of recording open fds.
6113 Report an error if /dev/null can't be opened, instead of aborting.
6114 * process.h (PROCESS_OPEN_FDS): New constant.
6115 (struct Lisp_Process): New member open_fds.
6116 (record_kill_process, record_deleted_pid): Adjust signatures.
6117 (record_deleted_pid): Move decl here ...
6118 * syswait.h (record_deleted_pid): ... from here.
6119
6120 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
6121
6122 * decompress.c: Fix bugs with large buffers and weird inputs.
6123 Tune a bit. Reindent as per usual Emacs style.
6124 (BUFFER_SIZE): Remove.
6125 (Fdecompress_gzipped_region): Do not mishandle input buffers with
6126 more than UINT_MAX bytes. Decompress into the gap instead of into
6127 an auto buffer, as this should avoid copying. Return nil if
6128 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
6129 set immediate_quit; we shouldn't trust zlib code that much.
6130
6131 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
6132
6133 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
6134 errors, and really move the gap to where we want it.
6135
6136 * lisp.h: Include decompress.c support.
6137
6138 * emacs.c (main): Include decompress.c support.
6139
6140 * Makefile.in: Include -lz if present.
6141
6142 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
6143
6144 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
6145 (initWithTitle:): Initialize frame to 0.
6146 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
6147 (fillWithWidgetValue:frame:): Rename from
6148 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
6149
6150 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
6151 fillWithWidgetValue:frame:
6152
6153 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
6154 remove memory leak warnings.
6155
6156 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
6157 (ns_check_menu_open): Handle menu == nil. Remove assignment to
6158 menu_pending_title.
6159
6160 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
6161 (x_activate_menubar): Update the whole menu.
6162 (trackingNotification:): Call ns_check_menu_open if tracking ends.
6163 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
6164 current event is not NSSystemDefined (Bug#15001).
6165 Call ns_check_menu_open only if trackingMenu is 2.
6166 (menuDidClose:): New method, decrease trackingMenu.
6167 (fillWithWidgetValue:setDelegate:): New method.
6168 (fillWithWidgetValue:): Call the above.
6169
6170 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
6171
6172 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
6173
6174 Omit some unnecessary casts.
6175 Many of these go back to the old pre-C89 days, when they may have
6176 been needed, but we've been assuming C89 or later for a while now.
6177 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
6178 (live_float_p, live_misc_p, live_vector_p):
6179 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
6180 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
6181 (defvar_per_buffer):
6182 * callint.c (Fcall_interactively):
6183 * doc.c (Fsubstitute_command_keys):
6184 * filelock.c (get_boot_time):
6185 * frame.c (xrdb_get_resource):
6186 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
6187 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
6188 (xg_get_file_name_from_selector, menuitem_destroy_callback)
6189 (menuitem_highlight_callback, menu_destroy_callback)
6190 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
6191 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
6192 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
6193 (xg_tool_bar_help_callback, tb_size_cb):
6194 * image.c (xpm_alloc_color, png_read_from_memory)
6195 (png_read_from_file, png_load_body, our_memory_skip_input_data)
6196 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
6197 (syms_of_image):
6198 * keymap.c (describe_map):
6199 * nsfns.m (Fns_display_monitor_attributes_list):
6200 * nsmenu.m (process_dialog:):
6201 * nsterm.m (hold_event):
6202 * process.c (wait_reading_process_output):
6203 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
6204 * scroll.c (do_direct_scrolling, scrolling_1):
6205 * termcap.c (tgetent):
6206 * window.c (check_window_containing, add_window_to_list)
6207 (freeze_window_starts):
6208 * xdisp.c (compare_overlay_entries, vmessage):
6209 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
6210 (x_get_monitor_attributes_xrandr)
6211 (Fx_display_monitor_attributes_list, x_display_info_for_name)
6212 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
6213 * xfont.c (xfont_match, xfont_open):
6214 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
6215 (menubar_selection_callback, menu_position_func)
6216 (popup_selection_callback, create_and_show_popup_menu)
6217 (dialog_selection_callback, create_and_show_dialog):
6218 * xrdb.c (x_get_string_resource)
6219 (main) [TESTRM]:
6220 * xsmfns.c (x_session_check_input):
6221 * xterm.c (x_draw_glyphless_glyph_string_foreground)
6222 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
6223 (xaw_jump_callback, xaw_scroll_callback):
6224 Omit unnecessary casts.
6225
6226 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
6227
6228 Minor string-length refactoring.
6229 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
6230 * frame.c (make_monitor_attribute_list):
6231 Prefer build_string to strlen + make_string.
6232
6233 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
6234
6235 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
6236 don't check minor_code (Bug#14417).
6237
6238 2013-08-09 Eli Zaretskii <eliz@gnu.org>
6239
6240 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
6241 vertical positions instead. This avoids calling MATRIX_ROW with
6242 row numbers that are possibly beyond valid limits. (Bug#15064)
6243
6244 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
6245
6246 Use xstrdup and build_unibyte_string where applicable.
6247 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
6248 * xfns.c (x_window):
6249 * xrdb.c (x_get_customization_string):
6250 * xterm.c (xim_initialize):
6251 * w32fns.c (w32_window): Use xstrdup.
6252 (w32_display_monitor_attributes_list):
6253 * emacs.c (init_cmdargs):
6254 * keyboard.c (PUSH_C_STR):
6255 * nsfont.m (nsfont_open):
6256 * sysdep.c (system_process_attributes):
6257 * w32.c (system_process_attributes):
6258 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
6259
6260 2013-08-09 Eli Zaretskii <eliz@gnu.org>
6261
6262 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
6263 variables of these types so that GDB would know about them, as aid
6264 for debugging fatal exceptions. (Bug#15024) See also
6265 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
6266 discussions.
6267
6268 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
6269
6270 * nsterm.m (ns_update_begin): Don't change clip path if it would be
6271 larger than the NSWindow (Bug#14934).
6272
6273 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6274
6275 Redesign redisplay interface to drop global variable updated_window.
6276 Always pass currently updated window as a parameter to update routines.
6277 * dispextern.h (updated_window): Remove declaration.
6278 (struct redisplay_interface): Pass window parameter to
6279 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
6280 and after_update_window_hook.
6281 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
6282 Adjust prototypes.
6283 * dispnew.c (updated_window): Remove.
6284 (redraw_overlapped_rows, update_marginal_area, update_text_area)
6285 (update_window_line): Adjust to match redisplay interface changes.
6286 * nsterm.m (ns_update_window_begin, ns_update_window_end)
6287 (ns_scroll_run, ns_after_update_window_line):
6288 * w32term.c (x_update_window_begin, x_update_window_end)
6289 (x_after_update_window_line, x_scroll_run):
6290 * xterm.c (x_update_window_begin, x_update_window_end)
6291 (x_after_update_window_line, x_scroll_run):
6292 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
6293 Likewise. Adjust comments where appropriate.
6294 (x_cursor_to): Simplify because this is always called during window
6295 update (but install debugging check anyway).
6296 (expose_window): Check must_be_updated_p flag to see whether this
6297 function is called during window update.
6298
6299 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
6300
6301 Do not reset window modification event counters excessively.
6302 These leftovers and poor man's tricky methods to catch extra
6303 redisplay's attention are no longer needed.
6304 * frame.c (set_menu_bar_lines_1):
6305 * minibuf.c (read_minibuf_unwind):
6306 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
6307 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
6308 (window_scroll_line_based, Fset_window_configuration):
6309 * xdisp.c (redisplay_window): Do not reset last_modified and
6310 last_overlay_modified counters.
6311
6312 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
6313
6314 * xselect.c (x_send_client_event): Set send_event and serial, memset
6315 data.l as it might be bigger than data.b. Use 24 bit mask to
6316 XSendEvent (Bug#15034).
6317
6318 2013-08-07 Eli Zaretskii <eliz@gnu.org>
6319
6320 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
6321 for TTY frames that are not the top frame on their console.
6322 (Bug#14616)
6323
6324 2013-08-07 Martin Rudalics <rudalics@gmx.at>
6325
6326 * w32term.c (w32fullscreen_hook): Really maximize frame when
6327 asked for (Bug#14841).
6328
6329 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6330
6331 Prefer selected_window to Fselected_window, likewise for frames.
6332 * buffer.c (Fbuffer_swap_text):
6333 * data.c (Fvariable_binding_locus):
6334 * window.c (run_window_configuration_change_hook): Adjust users.
6335 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
6336 Use decode_live_frame.
6337
6338 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
6339
6340 Be more careful if selected window shows the buffer other than current,
6341 use window_outdated only if this is not so. This change should also
6342 address some weird issues discussed in Bug#13012.
6343 * window.h (window_outdated): New prototype.
6344 * window.c (window_outdated): Now here. Convert from static and
6345 always assume window's buffer.
6346 (Fwindow_end, Fwindow_line_height): Use it.
6347 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
6348 and always assume window's buffer.
6349 (redisplay_window): Adjust user.
6350 (redisplay_internal): Call to reconsider_clip_changes once and
6351 check whether mode line should be updated only if selected window
6352 shows current buffer.
6353 (run_window_scroll_functions): Use eassert for debugging check.
6354 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
6355
6356 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6357
6358 * window.c (window_scroll, window_scroll_pixel_based)
6359 (window_scroll_line_based): Use bool for booleans.
6360
6361 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
6362
6363 * process.c: Fix minor off-by-one issues in descriptor counts.
6364 This shouldn't fix any real bugs, but it cleans up the code a bit.
6365 (max_process_desc, max_input_desc): -1, not 0, means none.
6366 All uses changed.
6367 (delete_input_desc): New function.
6368 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
6369 (deactivate_process): Scan backwards when recomuting max_process_desc;
6370 that should be faster.
6371 (init_process_emacs): Initialize max_input_desc.
6372
6373 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6374
6375 Use region cache to speedup bidi_find_paragraph_start.
6376 * buffer.h (struct buffer): New member bidi_paragraph_cache.
6377 Rename cache_long_line_scans to cache_long_scans.
6378 * buffer.c (bset_cache_long_line_scans): Rename to
6379 bset_cache_long_scans.
6380 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
6381 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
6382 into account.
6383 (syms_of_buffer): Rename cache-long-line-scans to
6384 cache-long-scans. Adjust docstring.
6385 * search.c (newline_cache_on_off):
6386 * indent.c (width_run_cache_on_off): Adjust users.
6387 * bidi.c (bidi_paragraph_cache_on_off): New function.
6388 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
6389 * insdel.c (prepare_to_modify_buffer):
6390 Invalidate bidi_paragraph_cache if enabled.
6391
6392 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
6393
6394 Invalidate region caches only if buffer text is going to be changed.
6395 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
6396 (modify_text): ...new prototype.
6397 (prepare_to_modify_buffer_1): New prototype.
6398 * textprop.c (modify_region): Rename to...
6399 (modify_text_properties): ...new function.
6400 (add_text_properties_1, set_text_properties, Fremove_text_properties)
6401 (Fremove_list_of_text_properties): Adjust users.
6402 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
6403 (modify_text): ...new function.
6404 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
6405 (prepare_to_modify_buffer_1): ...new function.
6406 * casefiddle.c (casify_region):
6407 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
6408 (Ftranspose_regions): Use modify_text.
6409
6410 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
6411
6412 * lisp.mk (lisp): Add nadvice.elc.
6413
6414 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
6415
6416 New macro to iterate over live buffers similar to frames.
6417 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
6418 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
6419 Declare buffer-related variables here to offload lisp.h.
6420 * buffer.c (Vbuffer_alist): Adjust comment.
6421 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
6422 (other_buffer_safely):
6423 * data.c (store_symval_forwarding):
6424 * dispnew.c (Fframe_or_buffer_changed_p):
6425 * fileio.c (Fdo_auto_save):
6426 * filelock.c (unlock_all_files):
6427 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
6428
6429 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
6430
6431 Fix some minor races in hosts lacking mkostemp (Bug#15015).
6432 * callproc.c (create_temp_file):
6433 * filelock.c (create_lock_file):
6434 Assume mkostemp, since it's now provided by Gnulib.
6435
6436 2013-08-04 Eli Zaretskii <eliz@gnu.org>
6437
6438 * w32.c (mkostemp): New function.
6439 (mktemp): Remove, no longer used. Most of the code reused in
6440 mkostemp. (Bug#15015)
6441 (mktemp): Don't undef.
6442
6443 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
6444
6445 * dispnew.c (glyph_matrix_count, glyph_pool_count):
6446 Move under GLYPH_DEBUG and ENABLE_CHECKING.
6447 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
6448 (free_glyph_pool, check_glyph_memory): Likewise for
6449 all users. Adjust comments where appropriate.
6450
6451 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
6452
6453 * composite.h: Minor fixups.
6454 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
6455 to fix a misspelling, and change it to an inline function while
6456 we're at it (it need not be a macro). All uses changed.
6457 (composition_method, composition_valid_p):
6458 Rewrite to avoid assignments in if-conditions.
6459
6460 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
6461
6462 Do not use global Lisp_Object in composition macros.
6463 * composite.h (composition_temp): Remove declaration.
6464 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
6465 (composition_method, composition_valid_p): ...inline functions.
6466 (compose_region): Remove the leftover.
6467 * composite.c (composition_temp): Remove.
6468 (run_composition_function, update_compositions)
6469 (composition_compute_stop_pos, composition_adjust_point)
6470 (Ffind_composition_internal):
6471 * coding.c (handle_composition_annotation):
6472 * xdisp.c (handle_composition_prop, check_point_in_composition):
6473 Related users changed.
6474
6475 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
6476
6477 Drop FRAME_PTR typedef.
6478 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
6479 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
6480 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
6481 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
6482 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
6483 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
6484 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
6485 All related users changed.
6486
6487 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
6488
6489 * eval.c (default_toplevel_binding): New function.
6490 (Fdefvar): Use it.
6491 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
6492 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
6493 (syms_of_eval): Export them.
6494 * data.c (Fdefault_value): Micro cleanup.
6495 * term.c (init_tty): Use "false".
6496
6497 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6498
6499 Fix X GC leak in GTK and raw (no toolkit) X ports.
6500 * xterm.c (x_free_frame_resources): If white and black relief
6501 GCs are allocated, always free them here.
6502 * xfns.c (x_make_gc): Omit redundant initialization.
6503 * widget.c (create_frame_gcs): Remove the leftover.
6504 (EmacsFrameDestroy): Do nothing because all GCs are now freed
6505 in x_free_frame_resources.
6506
6507 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
6508
6509 * nsterm.m (windowWillResize:toSize:): Only change title if
6510 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
6511 modifying it.
6512 (viewDidEndLiveResize): New method.
6513
6514 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
6515 inside NS_IMPL_COCOA.
6516
6517 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6518
6519 * insdel.c (adjust_after_replace, replace_range, del_range_2):
6520 Do not check whether undo is enabled because record_insert and
6521 record_delete does that themselves.
6522
6523 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
6524
6525 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
6526 member which is not really used any more.
6527 (FRAME_XIC_BASE_FONTNAME): Remove.
6528 * xfns.c (xic_free_fontset): Adjust user.
6529 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
6530 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
6531 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
6532 (xdialog_show): Use eassert for debugging check.
6533 * w32term.c (x_unfocus_frame): Remove unused dummy function.
6534
6535 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
6536
6537 * fileio.c, fns.c (merge): Move extern decl from here ...
6538 * lisp.h (merge): ... to here.
6539
6540 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6541
6542 Fix last font-related change.
6543 * w32font.h (w32font_list_internal, w32font_match_internal):
6544 Fix prototype.
6545 * w32uniscribe.c (uniscribe_list, uniscribe_match)
6546 (uniscribe_list_family): Adjust to match font API change.
6547 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
6548 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
6549
6550 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6551
6552 * frame.h (FRAME_MOUSE_UPDATE):
6553 * nsterm.m (ns_frame_up_to_date): Omit redundant check
6554 whether hlinfo->mouse_face_mouse_frame is non-NULL.
6555
6556 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6557
6558 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
6559 * font.h (struct font_driver): Change list, match, and list_family
6560 functions to accept struct frame * as first arg.
6561 * font.c (font_score, font_compare, font_sort_entities):
6562 Remove prototypes.
6563 (font_sort_entities, font_list_entities, font_select_entity)
6564 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
6565 match font API change.
6566 * xfont.c (xfont_list, xfont_match, xfont_list_family):
6567 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
6568 * ftxfont.c (ftxfont_list, ftxfont_match):
6569 * xftfont.c (xftfont_list, xftfont_match):
6570 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
6571 * w32font.c (w32font_list, w32font_match, w32font_list)
6572 (w32font_list_internal, w32_font_match_internal): Likewise.
6573 * xfaces.c (Fx_family_fonts): Adjust user.
6574
6575 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6576
6577 Do not use pure Xism x_wm_set_icon_position in non-X ports.
6578 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
6579 only if HAVE_X_WINDOWS is in use.
6580 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
6581 * nsterm.m (x_wm_set_icon_position): Remove no-op.
6582 * w32term.c (x_wm_set_icon_position): Likewise.
6583 * w32fns.c (x_icon): Adjust user.
6584
6585 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
6586
6587 * xterm.c (last_mouse_press_frame): Remove the
6588 leftover which is not really used any more.
6589 (handle_one_xevent, syms_of_xterm): Adjust users.
6590 (x_flush): Call XFlush once per each X display, not frame.
6591 This is better because this code always unconditionally skips
6592 non-X frames in Vframe_list and issues the only XFlush if we
6593 have more than one X frame on the same X display.
6594 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
6595 Use bool for booleans.
6596 (x_draw_glyph_string_background, cvt_string_to_pixel)
6597 (cvt_pixel_dtor): Drop unnecessary prototypes.
6598 * xterm.h (x_display_ok): Adjust prototype.
6599
6600 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6601
6602 Drop unnecessary functions that deals with frame pixel size.
6603 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
6604 (x_pixel_height): Drop prototypes.
6605 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
6606 (x_pixel_height): Drop implementations.
6607 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
6608 which should be always valid for window frame.
6609 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
6610 * w32menu.c (Fx_popup_dialog):
6611 * xmenu.c (Fx_popup_dialog): Likewise for both.
6612
6613 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6614
6615 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
6616 frame parameters and call to Fmodify_frame_parameters just once.
6617 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
6618 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
6619 and mention nil frame in docstring.
6620
6621 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
6622
6623 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
6624 (x_figure_window_size): Likewise. Adjust to return long.
6625 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
6626 (toplevel): Move Qterminal_live_p to...
6627 * terminal.c (toplevel): ...here, make it static, and...
6628 (syms_of_terminal): ...DEFSYM here.
6629 * frame.h (Qterminal_live_p): Remove declaration.
6630 (make_frame, x_figure_window_size): Adjust prototype.
6631 * nsfns.m (Fx_create_frame): Use long for window flags.
6632
6633 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
6634
6635 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
6636 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
6637 Do not assume that emacs_close (INT_MAX) is a no-op.
6638
6639 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6640
6641 * xfaces.c (make_face_cache): For struct face_cache, prefer
6642 xmalloc to xzalloc and so avoid redundant call to memset.
6643 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
6644
6645 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6646
6647 * fringe.c (draw_window_fringes, update_window_fringes)
6648 (compute_fringe_widths):
6649 * w32term.c (x_draw_glyph_string):
6650 * window.c (candidate_window_p, Frecenter):
6651 * xfaces.c (realize_basic_faces, realize_default_face)
6652 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
6653 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
6654 * xfns.c (x_set_cursor_color, xic_free_xfontset):
6655 * xmenu.c (Fx_menu_bar_open_internal):
6656 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
6657 * xsettings.c (xft_settings_event):
6658 * xterm.c (x_draw_glyph_string, x_had_errors_p):
6659 Use bool for booleans. Adjust style and comments where
6660 appropriate.
6661 * dispextern.h (draw_window_fringes, update_window_fringes)
6662 (compute_fringe_widths):
6663 * xterm.h (x_had_errors_p): Adjust prototype.
6664
6665 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
6666
6667 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
6668 CHECK_LIST. Rewrite the loop to avoid useless local variable.
6669
6670 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
6671
6672 * fns.c (toplevel): Remove comment before Fsafe_length because
6673 it checks for QUIT.
6674
6675 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
6676
6677 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
6678
6679 2013-07-28 Eli Zaretskii <eliz@gnu.org>
6680
6681 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
6682 frame which got the message is still alive, before dereferencing
6683 its pointer. (Bug#14970)
6684
6685 * frame.c (delete_frame): Test "this" frame's minibuffer window to
6686 be a live window, before using it as such. (Bug#14970)
6687
6688 2013-07-27 Eli Zaretskii <eliz@gnu.org>
6689
6690 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
6691 w32_detect_focus_change instead of doing part of its job by hand.
6692 This fixes the problem whereby FOCUS_OUT events were not sent to
6693 the event queue.
6694
6695 2013-07-26 Eli Zaretskii <eliz@gnu.org>
6696
6697 * process.c (Fprocess_list): Doc fix.
6698
6699 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
6700 being re-exposed only if it didn't ask to become visible.
6701 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
6702 was previously iconified. (Bug#14841)
6703 (x_iconify_frame): Mark the frame iconified.
6704
6705 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
6706
6707 Fix minor problems found by static checking.
6708 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
6709 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
6710
6711 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
6712
6713 * eval.c (set_specpdl_old_value): New function.
6714 (unbind_to): Minor simplification.
6715 (get_backtrace_frame): New function.
6716 (Fbacktrace_frame): Use it. Add `base' argument.
6717 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
6718 (syms_of_eval): Export backtrace-eval.
6719 * xterm.c (x_focus_changed): Simplify.
6720
6721 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
6722
6723 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
6724
6725 2013-07-24 Eli Zaretskii <eliz@gnu.org>
6726
6727 * xdisp.c (redisplay_window): Instead of moving point out of
6728 scroll margin, reject the force_start method, and try scrolling
6729 instead. (Bug#14780)
6730
6731 2013-07-24 Ken Brown <kbrown@cornell.edu>
6732
6733 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
6734 (Bug#14944).
6735
6736 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
6737
6738 * eval.c (Fprogn): Do not check that BODY is a proper list.
6739 This undoes the previous change. The check slows down the
6740 interpreter, and is not needed to prevent a crash. See
6741 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
6742
6743 2013-07-23 Glenn Morris <rgm@gnu.org>
6744
6745 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
6746
6747 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
6748
6749 Port to GNU/Linux systems with tinfo but not ncurses.
6750 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
6751 to decide whether ncurses is being used. Without this change,
6752 GCC complains about tgetent not being declared, on a system
6753 that has tinfo installed but ncurses not installed.
6754
6755 * eval.c (Fprogn): Check that BODY is a proper list.
6756
6757 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
6758 * data.c (Fsetq_default):
6759 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
6760 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
6761 (Fcondition_case):
6762 Tune by taking advantage of the fact that ARGS is always a list
6763 when a function is declared to have UNEVALLED args.
6764
6765 * emacsgtkfixed.c: Port to GCC 4.6.
6766 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
6767
6768 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
6769
6770 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
6771 here to silence compiler warnings.
6772
6773 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
6774
6775 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
6776 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
6777 from messing up Emacs's 'struct frame' (Bug#14923).
6778
6779 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
6780
6781 * alloc.c (make_save_ptr_ptr): Define this function.
6782 It was inadvertently omitted. It's needed only if
6783 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
6784
6785 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
6786
6787 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
6788 frame have focus (Bug#14895).
6789
6790 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
6791
6792 Avoid vfork-related deadlock more cleanly.
6793 * callproc.c (child_setup): When the child's exec fails, output
6794 the program name, as that's more useful. Use O_NONBLOCK to avoid
6795 deadlock.
6796 * process.c (create_process_1): Remove; no longer needed.
6797 (create_process): Remove timer hack; no longer needed, now that
6798 the child avoids deadlock.
6799
6800 2013-07-20 Glenn Morris <rgm@gnu.org>
6801
6802 * image.c (Fimage_flush): Fix doc typo.
6803
6804 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
6805
6806 Fix array bounds violation when pty allocation fails.
6807 * process.c (PTY_NAME_SIZE): New constant.
6808 (pty_name): Remove static variable; it's now auto.
6809 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
6810 Take pty_name as an arg rather than using a static variable.
6811 All callers changed.
6812 (create_process): Recover pty_flag from process, not from volatile local.
6813 (create_pty): Stay inside array even when pty allocation fails.
6814 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
6815
6816 * lread.c (Fload): Avoid initialization only when lint checking.
6817 Mention that it's needed only for older GCCs.
6818
6819 2013-07-20 Kenichi Handa <handa@gnu.org>
6820
6821 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
6822 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
6823
6824 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
6825
6826 * lread.c (Fload): Avoid uninitialized warning.
6827
6828 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
6829
6830 Fix some minor file descriptor leaks and related glitches.
6831 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
6832 (create_lock_file): Use write, not emacs_write.
6833 * image.c (slurp_file, png_load_body):
6834 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
6835 (server_accept_connection):
6836 Don't leak an fd on memory allocation failure.
6837 * image.c (slurp_file): Add a cheap heuristic for growing files.
6838 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
6839 as that's what the other routines do. Maybe input need not be
6840 blocked at all, but it's better to be consistent.
6841 Avoid undefined behavior when strlen is zero.
6842
6843 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
6844 (NSTATICS): Now a constant; doesn't need to be a macro.
6845
6846 2013-07-19 Richard Stallman <rms@gnu.org>
6847
6848 * coding.c (decode_coding_utf_8): Add simple loop for fast
6849 processing of ASCII characters.
6850
6851 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
6852
6853 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
6854
6855 2013-07-19 Eli Zaretskii <eliz@gnu.org>
6856
6857 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
6858 unportable 'struct x_display_info'.
6859 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
6860 is a portable type.
6861
6862 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
6863
6864 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
6865 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
6866 or fscanf fails.
6867 (system_process_attributes): Prefer plain char to unsigned char
6868 when either will do. Clean up properly if interrupted or if
6869 memory allocations fail. Don't assume sscanf succeeds.
6870 Remove no-longer-needed workaround to stop GCC from whining.
6871 Read command-line once, instead of multiple times. Check read status a
6872 bit more carefully.
6873
6874 Fix obscure porting bug with varargs functions.
6875 The code assumed that int is treated like ptrdiff_t in a vararg
6876 function, which is not a portable assumption. There was a similar
6877 -- though these days less likely -- porting problem with various
6878 assumptions that pointers of different types all smell the same as
6879 far as vararg functions is conserved. To make this problem less
6880 likely in the future, redo the API to use varargs functions.
6881 * alloc.c (make_save_value): Remove this vararg function.
6882 All uses changed to ...
6883 (make_save_int_int_int, make_save_obj_obj_obj_obj)
6884 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
6885 New functions.
6886 (make_save_ptr): Rename from make_save_pointer, for consistency with
6887 the above. Define only on platforms that need it. All uses changed.
6888
6889 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
6890
6891 * keyboard.c: Try to fix typos in previous change.
6892 (DISPLAY_LIST_INFO): New macro.
6893 (kbd_buffer_get_event): Do not access members that are not present
6894 in X11. Revert inadvertent change of "!=" to "=".
6895
6896 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
6897
6898 * keyboard.c (kbd_buffer_get_event):
6899 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
6900 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
6901
6902 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
6903
6904 * filelock.c: Fix unlikely file descriptor leaks.
6905 (get_boot_time_1): Rework to avoid using emacs_open.
6906 This doesn't actually fix a leak, but is better anyway.
6907 (read_lock_data): Use read, not emacs_read.
6908
6909 * doc.c: Fix minor memory and file descriptor leaks.
6910 * doc.c (get_doc_string): Fix memory leak when doc file absent.
6911 (get_doc_string, Fsnarf_documentation):
6912 Fix file descriptor leak on error.
6913
6914 * term.c: Fix minor fdopen-related file descriptor leaks.
6915 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
6916 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
6917
6918 * charset.c: Fix file descriptor leaks and errno issues.
6919 Include <errno.h>.
6920 (load_charset_map_from_file): Don't leak file descriptor on error.
6921 Use plain record_xmalloc since the allocation is larger than
6922 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
6923 of entries.
6924 * eval.c (record_unwind_protect_nothing):
6925 * fileio.c (fclose_unwind):
6926 New functions.
6927 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
6928 The replacement doesn't block input, but that no longer seems
6929 necessary.
6930
6931 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
6932
6933 * lread.c: Fix file descriptor leaks and errno issues.
6934 (Fload): Close some races that leaked fds or streams when 'load'
6935 was interrupted.
6936 (Fload, openp): Report error number of last nontrivial failure to open.
6937 ENOENT counts as trivial.
6938 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
6939 New functions.
6940 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
6941 now that the function is always called with a nonnegative arg.
6942 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
6943 All uses replaced with ...
6944 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
6945
6946 A few more minor file errno-reporting bugs.
6947 * callproc.c (Fcall_process):
6948 * doc.c (Fsnarf_documentation):
6949 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
6950 * process.c (set_socket_option):
6951 Don't let a constructor trash errno.
6952 * doc.c: Include <errno.h>.
6953
6954 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
6955
6956 * w32fns.c (unwind_create_tip_frame): Fix declaration.
6957
6958 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
6959
6960 Fix w32 bug with call-process-region (Bug#14885).
6961 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
6962 to Fcall_process when the input is empty. This simplifies the
6963 code a bit. It makes no difference on POSIXish platforms but
6964 apparently it fixes a bug on w32.
6965
6966 Fix bug where insert-file-contents closes a file twice (Bug#14839).
6967 * fileio.c (close_file_unwind): Don't close if FD is negative;
6968 this can happen when unwinding a zapped file descriptor.
6969 (Finsert_file_contents): Unwind-protect the fd before the point marker,
6970 in case Emacs runs out of memory between the two unwind-protects.
6971 Don't trash errno when closing FD.
6972 Zap the FD in the specpdl when closing it, instead of deferring
6973 the removal of the unwind-protect; this fixes a bug where a child
6974 function unwinds the stack past us.
6975
6976 New unwind-protect flavors to better type-check C callbacks.
6977 This also lessens the need to write wrappers for callbacks,
6978 and the need for make_save_pointer.
6979 * alloc.c (free_save_value):
6980 * atimer.c (run_all_atimers):
6981 Now extern.
6982 * alloc.c (safe_alloca_unwind):
6983 * atimer.c (unwind_stop_other_atimers):
6984 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
6985 * menu.c (cleanup_popup_menu) [HAVE_NS]:
6986 * minibuf.c (choose_minibuf_frame_1):
6987 * process.c (make_serial_process_unwind):
6988 * xdisp.c (pop_message_unwind):
6989 * xselect.c (queue_selection_requests_unwind):
6990 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
6991 * alloc.c (record_xmalloc):
6992 Prefer record_unwind_protect_ptr to record_unwind_protect with
6993 make_save_pointer.
6994 * alloc.c (Fgarbage_collect):
6995 Prefer record_unwind_protect_void to passing a dummy.
6996 * buffer.c (restore_buffer):
6997 * window.c (restore_window_configuration):
6998 * xfns.c, w32fns.c (do_unwind_create_frame)
6999 New wrapper. All record-unwind uses of wrappee changed.
7000 * buffer.c (set_buffer_if_live):
7001 * callproc.c (call_process_cleanup, delete_temp_file):
7002 * coding.c (code_conversion_restore):
7003 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
7004 * editfns.c (save_excursion_restore)
7005 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
7006 (save_restriction_restore):
7007 * eval.c (restore_stack_limits, un_autoload):
7008 * fns.c (require_unwind):
7009 * keyboard.c (recursive_edit_unwind, tracking_off):
7010 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
7011 * macros.c (pop_kbd_macro, restore_menu_items):
7012 * nsfns.m (unwind_create_frame):
7013 * print.c (print_unwind):
7014 * process.c (start_process_unwind):
7015 * search.c (unwind_set_match_data):
7016 * window.c (select_window_norecord, select_frame_norecord):
7017 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
7018 (fast_set_selected_frame):
7019 * xfns.c, w32fns.c (unwind_create_tip_frame):
7020 Return void, not a dummy Lisp_Object. All uses changed.
7021 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
7022 * callproc.c (call_process_kill):
7023 * fileio.c (restore_point_unwind, decide_coding_unwind)
7024 (build_annotations_unwind):
7025 * insdel.c (Fcombine_after_change_execute_1):
7026 * keyboard.c (read_char_help_form_unwind):
7027 * menu.c (unuse_menu_items):
7028 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
7029 * sound.c (sound_cleanup):
7030 * xdisp.c (unwind_redisplay):
7031 * xfns.c (clean_up_dialog):
7032 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
7033 Accept no args and return void, instead of accepting and returning
7034 a dummy Lisp_Object. All uses changed.
7035 * cygw32.c (fchdir_unwind):
7036 * fileio.c (close_file_unwind):
7037 * keyboard.c (restore_kboard_configuration):
7038 * lread.c (readevalllop_1):
7039 * process.c (wait_reading_process_output_unwind):
7040 Accept int and return void, rather than accepting an Emacs integer
7041 and returning a dummy object. In some cases this fixes an
7042 unlikely bug when the corresponding int is outside Emacs integer
7043 range. All uses changed.
7044 * dired.c (directory_files_internal_unwind):
7045 * fileio.c (do_auto_save_unwind):
7046 * gtkutil.c (pop_down_dialog):
7047 * insdel.c (reset_var_on_error):
7048 * lread.c (load_unwind):
7049 * xfns.c (clean_up_file_dialog):
7050 * xmenu.c, nsmenu.m (pop_down_menu):
7051 * xmenu.c (cleanup_widget_value_tree):
7052 * xselect.c (wait_for_property_change_unwind):
7053 Accept pointer and return void, rather than accepting an Emacs
7054 save value encapsulating the pointer and returning a dummy object.
7055 All uses changed.
7056 * editfns.c (Fformat): Update the saved pointer directly via
7057 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
7058 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
7059 (unwind_body): New function.
7060 (record_unwind_protect): First arg is now a function returning void,
7061 not a dummy Lisp_Object.
7062 (record_unwind_protect_ptr, record_unwind_protect_int)
7063 (record_unwind_protect_void): New functions.
7064 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
7065 * fileio.c (struct auto_save_unwind): New type.
7066 (do_auto_save_unwind): Use it.
7067 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
7068 * insdel.c (struct rvoe_arg): New type.
7069 (reset_var_on_error): Use it.
7070 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
7071 New constants.
7072 (specbinding_func): Remove; there are now several such functions.
7073 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
7074 (set_unwind_protect_ptr): New function.
7075 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
7076
7077 Be simpler and more consistent about reporting I/O errors.
7078 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
7079 Say "Read error" and "Write error", rather than "I/O error", or
7080 "IO error reading", or "IO error writing", when a read or write
7081 error occurs.
7082 * process.c (Fmake_network_process, wait_reading_process_output)
7083 (send_process, Fprocess_send_eof, wait_reading_process_output):
7084 Capitalize diagnostics consistently. Put "failed foo" at the
7085 start of the diagnostic, so that we don't capitalize the
7086 function name "foo". Consistently say "failed" for such
7087 diagnostics.
7088 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
7089 All callers changed. This is so it can use report_file_error.
7090 * sysdep.c (serial_open, serial_configure): Capitalize I/O
7091 diagnostics consistently as above.
7092
7093 * fileio.c (report_file_errno): Fix errno reporting bug.
7094 If the file name is neither null nor a pair, package it up as a
7095 singleton list. All callers changed, both to this function and to
7096 report_file_error. This fixes a bug where the memory allocator
7097 invoked by list1 set errno so that the immediately following
7098 report_file_error reported the wrong errno value.
7099
7100 Fix minor problems found by --enable-gcc-warnings.
7101 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
7102 * keyboard.c (kbd_buffer_get_event): Remove unused local.
7103
7104 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
7105
7106 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
7107 Set event->arg to Qt if switch-event shall be generated.
7108 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
7109
7110 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
7111
7112 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
7113 FOCUS_OUT_EVENT.
7114
7115 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
7116 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
7117 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
7118 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
7119 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
7120 and there is a focused frame.
7121 (head_table): Add focus-in and focus-out.
7122 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
7123 bind to handle-focus-in/out.
7124
7125 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
7126 (Fhandle_switch_frame): Call Fhandle_focus_in.
7127 (syms_of_frame): defsubr handle-focus-in/out.
7128
7129 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
7130
7131 Fix porting bug to older POSIXish platforms (Bug#14862).
7132 * sysdep.c (emacs_pipe): New function, that implements
7133 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
7134 This should port better to CentOS 5 and to Mac OS X 10.6.
7135 All calls to pipe2 changed.
7136
7137 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
7138 This makes the code easier to read and the executable a bit smaller.
7139 Do not replace all calls to Fcons that happen to create lists,
7140 just calls that are intended to create lists. For example, when
7141 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
7142 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
7143 Similarly for list2 through list5.
7144 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
7145 * bytecode.c (exec_byte_code):
7146 * callint.c (quotify_arg, Fcall_interactively):
7147 * callproc.c (Fcall_process, create_temp_file):
7148 * charset.c (load_charset_map_from_file)
7149 (Fdefine_charset_internal, init_charset):
7150 * coding.c (get_translation_table, detect_coding_system)
7151 (Fcheck_coding_systems_region)
7152 (Fset_terminal_coding_system_internal)
7153 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
7154 * composite.c (update_compositions, Ffind_composition_internal):
7155 * dired.c (directory_files_internal, file_name_completion)
7156 (Fsystem_users):
7157 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
7158 * doc.c (Fsnarf_documentation):
7159 * editfns.c (Fmessage_box):
7160 * emacs.c (main):
7161 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
7162 (Feval, eval_sub, Ffuncall, apply_lambda):
7163 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
7164 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
7165 (Fset_file_times, Finsert_file_contents)
7166 (Fchoose_write_coding_system, Fwrite_region):
7167 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
7168 * font.c (font_registry_charsets, font_parse_fcname)
7169 (font_prepare_cache, font_update_drivers, Flist_fonts):
7170 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
7171 * frame.c (make_frame, Fmake_terminal_frame)
7172 (x_set_frame_parameters, x_report_frame_params)
7173 (x_default_parameter, Fx_parse_geometry):
7174 * ftfont.c (syms_of_ftfont):
7175 * image.c (gif_load):
7176 * keyboard.c (command_loop_1):
7177 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
7178 (Fcopy_keymap, append_key, Fcurrent_active_maps)
7179 (Fminor_mode_key_binding, accessible_keymaps_1)
7180 (Faccessible_keymaps, Fwhere_is_internal):
7181 * lread.c (read_emacs_mule_char):
7182 * menu.c (find_and_return_menu_selection):
7183 * minibuf.c (get_minibuffer):
7184 * nsfns.m (Fns_perform_service):
7185 * nsfont.m (ns_script_to_charset):
7186 * nsmenu.m (ns_popup_dialog):
7187 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
7188 (Fx_own_selection_internal):
7189 * nsterm.m (append2):
7190 * print.c (Fredirect_debugging_output)
7191 (print_prune_string_charset):
7192 * process.c (Fdelete_process, Fprocess_contact)
7193 (Fformat_network_address, set_socket_option)
7194 (read_and_dispose_of_process_output, write_queue_push)
7195 (send_process, exec_sentinel):
7196 * sound.c (Fplay_sound_internal):
7197 * textprop.c (validate_plist, add_properties)
7198 (Fput_text_property, Fadd_face_text_property)
7199 (copy_text_properties, text_property_list, syms_of_textprop):
7200 * unexaix.c (report_error):
7201 * unexcoff.c (report_error):
7202 * unexsol.c (unexec):
7203 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
7204 (Fformat_mode_line, syms_of_xdisp):
7205 * xfaces.c (set_font_frame_param)
7206 (Finternal_lisp_face_attribute_values)
7207 (Finternal_merge_in_global_face, syms_of_xfaces):
7208 * xfns.c (x_default_scroll_bar_color_parameter)
7209 (x_default_font_parameter, x_create_tip_frame):
7210 * xfont.c (xfont_supported_scripts):
7211 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
7212 (menu_help_callback, xmenu_show):
7213 * xml.c (make_dom):
7214 * xterm.c (set_wm_state):
7215 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
7216 and similarly for list2 through list5.
7217
7218 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
7219
7220 * callproc.c (Fcall_process_region): Fix minor race and tune.
7221 (create_temp_file): New function, with the temp-file-creation part
7222 of the old Fcall_process_region. Use Fcopy_sequence to create the
7223 temp file name, rather than alloca + build_string, for simplicity.
7224 Don't bother to block input around the temp file creation;
7225 shouldn't be needed. Simplify use of mktemp.
7226 Use record_unwind_protect immediately after creating the temp file;
7227 this closes an unlikely race where the temp file was not removed.
7228 Use memcpy rather than an open-coded loop.
7229 (Fcall_process_region): Use the new function. If the input is
7230 empty, redirect from /dev/null rather than from a newly created
7231 empty temp file; this avoids unnecessary file system traffic.
7232
7233 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
7234
7235 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
7236 Simplify by making this case like the other two. This is a bit
7237 slower on obsolete hosts, but the extra complexity isn't worth it.
7238
7239 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
7240 * process.c (create_process) [!DOS_NT]:
7241 Remove now-unnecessary calls to emacs_close.
7242
7243 2013-07-13 Eli Zaretskii <eliz@gnu.org>
7244
7245 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
7246 returning early. (Bug#14850)
7247
7248 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
7249 and inhibit-iso-escape-detection attributes of 'undecided'.
7250 (Bug#14822)
7251
7252 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
7253
7254 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
7255 Reported by Herbert J. Skuhra in
7256 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
7257
7258 Don't lose top specpdl entry when memory is exhausted.
7259 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
7260 specpdl overflow here, to simplify callers; all callers changed.
7261 Always reserve an unused entry at the stack top; this avoids
7262 losing the top entry's information when memory is exhausted.
7263
7264 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
7265
7266 Clean up errno reporting and fix some errno-reporting bugs.
7267 * callproc.c (Fcall_process):
7268 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
7269 * process.c (create_process, Fmake_network_process):
7270 * unexaix.c (report_error):
7271 * unexcoff.c (report_error):
7272 Be more careful about reporting the errno of failed operations.
7273 The code previously reported the wrong errno sometimes.
7274 Also, prefer report_file_errno to setting errno + report_file_error.
7275 (Fcall_process): Look at openp return value rather than at path,
7276 as that's a bit faster and clearer when there's a numeric predicate.
7277 * fileio.c (report_file_errno): New function, with most of the
7278 old contents of report_file_error.
7279 (report_file_error): Use it.
7280 (Ffile_exists_p, Ffile_accessible_directory_p):
7281 Set errno to 0 when it is junk.
7282 * fileio.c (Faccess_file):
7283 * image.c (x_create_bitmap_from_file):
7284 Use faccessat rather than opening the file, to avoid the hassle of
7285 having a file descriptor open.
7286 * lisp.h (report_file_errno): New decl.
7287 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
7288
7289 Minor EBADF fixes.
7290 * process.c (create_process, wait_reading_process_output) [AIX]:
7291 Remove obsolete SIGHUP-related code, as Emacs no longer disables
7292 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
7293 a multithreaded environment anyway).
7294 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
7295
7296 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
7297
7298 * image.c (x_find_image_file): Don't close a remote file handle.
7299
7300 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
7301
7302 Fix races with threads and file descriptors.
7303 * callproc.c (Fcall_process_region):
7304 * dired.c (open_directory):
7305 * emacs.c (main, Fdaemon_initialized):
7306 * image.c (x_find_image_file):
7307 * inotify.c (Finotify_rm_watch):
7308 * lread.c (Flocate_file_internal):
7309 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
7310 * term.c (term_mouse_moveto, init_tty):
7311 * termcap.c (tgetent):
7312 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
7313 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
7314 * unexhp9k800.c, unexmacosx.c (unexec):
7315 * callproc.c (Fcall_process_region):
7316 Use emacs_close, not close.
7317 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
7318 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
7319 and posix_close function on current platforms (which all lack them).
7320 (emacs_close): Use it. This should fix the races on GNU/Linux and
7321 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
7322 and it should avoid closing random victim file descriptors on
7323 other platforms.
7324
7325 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
7326
7327 * inotify.c (uninitialized): Remove. All uses replaced by -1.
7328 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
7329 Touch up doc a bit.
7330
7331 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
7332 This is for .gdbinit xbacktrace.
7333
7334 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
7335 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
7336 (emacs_set_tty): Now static.
7337 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
7338 * term.c (tty_capable_p, tty_default_color_capabilities)
7339 (get_tty_terminal, term_mouse_movement)
7340 (handle_one_term_event, init_tty, maybe_fatal):
7341 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
7342 (tgetent, scan_file, name_match, compare_contin):
7343 * terminal.c (get_terminal):
7344 Use bool for boolean.
7345 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
7346 Prefer char to unsigned char if either will do.
7347 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
7348 (tty_write_glyphs): Prefer int to unsigned.
7349 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
7350 All callers changed.
7351 * termcap.c (tprint, main) [TEST]: Remove non-working test.
7352
7353 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
7354
7355 Port to C89.
7356 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
7357 (B__dummy__): New dummy symbol, to pacify C89.
7358 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
7359 they can't grok varargs macros.
7360 * dispnew.c (add_window_display_history)
7361 (add_frame_display_history):
7362 * print.c (print_object):
7363 * xdisp.c (debug_method_add):
7364 Use %p printf format only for void pointers.
7365 * emacs.c (usage_message): New constant, replacing ...
7366 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
7367 (main): Adjust to usage reorg.
7368 * fns.c (syms_of_fns):
7369 * profiler.c (syms_of_profiler):
7370 Don't use non-constant struct initializers.
7371 * gnutls.h (gnutls_initstage_t):
7372 * lisp.h (enum Lisp_Fwd_Type):
7373 * lread.c (lisp_file_lexically_bound_p):
7374 * xsettings.c (anonymous enum):
7375 Remove trailing comma.
7376 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
7377 * lisp.h (ENUM_BF): Use unsigned if pedantic.
7378 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
7379 (DEFUN): Use it.
7380 * regex.c (const_re_char): New type, to pacify strict C89.
7381 All uses of 'const re_char' replaced to use it.
7382 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
7383 with glibc when strict C89. This change is imported from gnulib.
7384 All uses changed.
7385 (_Restrict_arr_): Rename from __restrict_arr, similarly.
7386 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
7387 Omit GNU_LINUX implementation, since it requires long long.
7388 * xterm.c (x_draw_underwave):
7389 Do not assume the traditional order of struct's members.
7390 (x_term_init): Rewrite to avoid the need for non-constant structure
7391 initializers.
7392
7393 Syntax cleanup, mostly replacing macros with functions.
7394 This removes the need for the syntax_temp hack.
7395 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
7396 * syntax.c (SYNTAX_INLINE): New macro.
7397 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
7398 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
7399 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
7400 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
7401 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
7402 (SYNTAX_COMEND_FIRST): Now functions, not macros.
7403 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
7404 Now constants, not macros.
7405 (syntax_temp) [!__GNUC__]: Remove.
7406 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
7407 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
7408 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
7409 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
7410 Move here from syntax.h; now functions, not macros. Except for the
7411 last function, these are static since only syntax.c uses them.
7412 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
7413 All uses changed. Now a function, not a macro; use this fact
7414 to simplify the code.
7415 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
7416 compiler bugs; no longer relevant.
7417 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7418 (SYNTAX_INLINE): New macro.
7419 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
7420 for the new functions. Use bool for boolean member.
7421 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
7422 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
7423 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
7424 (SETUP_BUFFER_SYNTAX_TABLE):
7425 Now extern inline functions, not macros.
7426 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
7427 Remove; all uses replaced by implementation.
7428 (syntax_temp) [!__GNUC__]: Remove decl.
7429 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
7430
7431 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
7432
7433 * emacs.c (main): Fix syntax error.
7434
7435 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
7436
7437 Timestamp fixes for undo (Bug#14824).
7438 * atimer.c (schedule_atimer):
7439 * fileio.c (Ffile_newer_than_file_p):
7440 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
7441 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
7442 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
7443 (syms_of_fileio): Remove Sclear_visited_file_name.
7444 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
7445 file doesn't exist; this avoids an ambiguity with negative timestamps.
7446 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
7447 * systime.h (make_emacs_time, invalid_emacs_time):
7448 Don't assume struct timespec layout; POSIX doesn't guarantee it.
7449 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
7450 * undo.c (record_first_change): Push (visited-file-modtime) onto
7451 undo list rather than reimplementing it by hand, incorrectly.
7452
7453 2013-07-09 Ken Brown <kbrown@cornell.edu>
7454
7455 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
7456
7457 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
7458
7459 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
7460
7461 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
7462
7463 Handle errno and exit status a bit more carefully.
7464 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
7465 number into an exit status. Instead, use EXIT_CANCELED.
7466 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
7467 * callproc.c (relocate_fd):
7468 * emacs.c (close_output_streams, main):
7469 * process.c (create_process):
7470 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
7471 Use emacs_perror for simplicity.
7472 * callproc.c (relocate_fd, main):
7473 * sysdep.c (sys_subshell):
7474 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
7475 (shut_down_emacs): Use emacs_write, not write.
7476 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
7477 * fileio.c (Fcopy_file, e_write):
7478 * nsterm.m (ns_select):
7479 * process.c (send_process):
7480 * sound.c (vox_write):
7481 Use emacs_write_sig, not emacs_write.
7482 * lisp.h (emacs_write_sig, emacs_perror): New decls.
7483 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
7484 New constants.
7485 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
7486 of write.
7487 (emacs_full_write): New function.
7488 (emacs_write): Rewrite to use it.
7489 (emacswrite_sig, emacs_perror): New functions.
7490 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
7491
7492 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
7493
7494 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
7495 on NS even if it is present. Pixmap on NS is a void*.
7496
7497 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7498
7499 Port to Ubuntu 10 (Bug#14803).
7500 Problem reported by T.V. Raman.
7501 * process.c (close_on_exec, accept4, process_socket):
7502 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
7503
7504 2013-07-07 Eli Zaretskii <eliz@gnu.org>
7505
7506 * w32.c (sys_dup): Declare prototype.
7507
7508 * filelock.c:
7509 * emacs.c:
7510 * callproc.c [WINDOWSNT]: Include sys/socket.h.
7511
7512 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7513
7514 Make file descriptors close-on-exec when possible (Bug#14803).
7515 This simplifies Emacs a bit, since it no longer needs to worry
7516 about closing file descriptors by hand in some cases.
7517 It also fixes some unlikely races. Not all such races, as
7518 libraries often open files internally without setting
7519 close-on-exec, but it's an improvement.
7520 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
7521 * callproc.c (Fcall_process) [!MSDOS]:
7522 * emacs.c (main) [!DOS_NT]:
7523 * nsterm.m (ns_term_init):
7524 * process.c (create_process):
7525 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
7526 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
7527 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
7528 Prefer mkostemp with O_CLOEXEC to mkstemp.
7529 * callproc.c (relocate_fd) [!WINDOWSNT]:
7530 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
7531 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
7532 now using pipe2.
7533 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
7534 Make the resulting file descriptor close-on-exec.
7535 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
7536 * lread.c (load_descriptor_list, load_descriptor_unwind):
7537 Remove; no longer needed. All uses removed.
7538 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
7539 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
7540 New functions.
7541 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
7542 (Fmake_network_process, Fnetwork_interface_list)
7543 (Fnetwork_interface_info, server_accept_connection):
7544 Make newly-created socket close-on-exec.
7545 * sysdep.c (emacs_open, emacs_fopen):
7546 Make new-created descriptor close-on-exec.
7547 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
7548 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
7549
7550 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
7551
7552 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
7553 for NS_IMPL_GNUSTEP.
7554
7555 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
7556
7557 Fix openp errno handling.
7558 * callproc.c (Fcall_process): Preserve openp errno around close.
7559 * lread.c (openp): Set errno when returning -1, as some callers
7560 expect this.
7561
7562 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
7563
7564 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
7565
7566 * nsterm.h (NSSavePanel): Update comment.
7567 (NSAPP_DATA2_RUNFILEDIALOG): Define.
7568 (ns_run_file_dialog): Declare.
7569
7570 * nsfns.m: Remove panelOK.
7571 (ns_fd_data): New.
7572 (ns_run_file_dialog): New function.
7573 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
7574 event loop, so file dialog is popped up by ns_run_file_dialog, called
7575 by sendEvent (Bug#14578).
7576 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
7577
7578 2013-07-06 Eli Zaretskii <eliz@gnu.org>
7579
7580 * xdisp.c (default_line_pixel_height): New function.
7581 (pos_visible_p, move_it_vertically_backward, try_scrolling)
7582 (try_cursor_movement, redisplay_window, try_window)
7583 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
7584
7585 * window.c (window_scroll_pixel_based):
7586 use default_line_pixel_height.
7587
7588 * dispextern.h (default_line_pixel_height): Add prototype.
7589
7590 * frame.c (x_set_line_spacing): Accept a float value for
7591 line-spacing parameter, per the documentation.
7592
7593 * data.c (Fmultibyte_string_p): Doc fix.
7594
7595 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
7596
7597 Use emacs_open more consistently when opening files.
7598 This handles EINTR more consistently now, and makes it easier
7599 to introduce other uniform changes to file descriptor handling.
7600 * sysstdio.h: New file.
7601 * buffer.c (mmap_init):
7602 * cygw32.c (chdir_to_default_directory):
7603 * dispnew.c (Fopen_termscript):
7604 * emacs.c (Fdaemon_initialized):
7605 * fileio.c (Fdo_auto_save):
7606 * image.c (slurp_file, png_load_body, jpeg_load_body):
7607 * keyboard.c (Fopen_dribble_file):
7608 * lread.c (Fload):
7609 * print.c (Fredirect_debugging_output):
7610 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
7611 * termcap.c (tgetent):
7612 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
7613 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
7614 * w32term.c (w32_initialize) [CYGWIN]:
7615 * xfaces.c (Fx_load_color_file):
7616 Use emacs_open instead of plain open, and emacs_fopen instead of
7617 plain fopen.
7618 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
7619 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
7620 * callproc.c (default_output_mode): New constant.
7621 (Fcall_process): Use it to call emacs_open instead of plain creat.
7622 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
7623 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
7624 (emacs_fopen): New function.
7625 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
7626 Include <lisp.h>, for emacs_open.
7627 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
7628
7629 Remove duplicate #include directives.
7630 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
7631 * xfaces.c:
7632 Don't include stdio.h twice.
7633 * buffer.c [USE_MMAP_FOR_BUFFERS]:
7634 Don't include sys/types.h or stdio.h twice.
7635 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
7636 * lread.c: Don't include coding.h twice.
7637 * nsfont.m: Don't include frame.h twice.
7638 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
7639 * ralloc.c: Don't include <unistd.h> twice.
7640 * xdisp.c: Don't include font.h twice.
7641 * xterm.c: Don't include fontset.h twice.
7642 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
7643
7644 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
7645
7646 Scale ImageMagick images more carefully.
7647 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
7648 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
7649 Be more careful about avoiding undefined behavior after
7650 integer overflow and division by zero.
7651
7652 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7653
7654 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
7655 (syms_of_w32fns): DEFSYM them.
7656 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
7657 (CCHDEVICENAME): Define macros if not defined.
7658 (struct MONITOR_INFO_EX): New struct.
7659 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
7660 (enum_display_monitors_fn): New variable.
7661 (globals_of_w32fns): Initialize it.
7662 (Fx_display_pixel_width, Fx_display_pixel_height)
7663 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
7664 multi-monitor setups in docstrings.
7665 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
7666 screen size by primary monitor's millimeter per pixel.
7667 (w32_monitor_enum, w32_display_monitor_attributes_list)
7668 (w32_display_monitor_attributes_list_fallback)
7669 (Fw32_display_monitor_attributes_list): New functions.
7670 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
7671
7672 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
7673 if not defined.
7674 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
7675
7676 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
7677
7678 * fileio.c (Qfile_notify_error): New error symbol.
7679
7680 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
7681 * inotify.c (inotify_callback, symbol_to_inotifymask)
7682 (Finotify_add_watch, Finotify_rm_watch): Use it.
7683 (inotifyevent_to_event): Exchange order of cookie and file name.
7684 (Finotify_add_watch): Adapt docstring.
7685
7686 * lisp.h (Qfile_notify_error): Declare.
7687
7688 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
7689
7690 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
7691 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
7692 Do not clear _malloc_thread_enabled_p, undoing the previous change,
7693 which did not work (see <http://bugs.gnu.org/14569#307>).
7694 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
7695 && (!noninteractive || initialized)). This attempts to thread
7696 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
7697
7698 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
7699
7700 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
7701 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
7702
7703 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
7704
7705 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
7706 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
7707 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
7708 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
7709
7710 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
7711
7712 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
7713 Define to __sys_siglist.
7714
7715 2013-07-02 Eli Zaretskii <eliz@gnu.org>
7716
7717 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
7718 word-wrap, so that overflow-newline-into-fringe would work in
7719 visual-line-mode. (Bug#2749)
7720 (move_it_in_display_line_to): When the last scanned display
7721 element fits exactly on the display line, and
7722 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
7723 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
7724 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
7725 finding buffer position that corresponds to pixel coordinates,
7726 e.g. in buffer_posn_from_coords.
7727
7728 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
7729
7730 * process.c (handle_child_signal): Call catch_child_signal if
7731 NS_IMPL_GNUSTEP.
7732
7733 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
7734
7735 Don't convert function pointers to void * and back.
7736 It isn't portable C, and it's easy enough to avoid.
7737 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
7738 (make_save_value): Add support for SAVE_FUNCPOINTER.
7739 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
7740 * print.c (print_object):
7741 Distinguish function from object pointers.
7742 * lisp.h (SAVE_FUNCPOINTER): New constant.
7743 (SAVE_SLOT_BITS): Adjust to it.
7744 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
7745 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
7746 (voidfuncptr): New typedef.
7747 (struct Lisp_Save_Value): New member data[0].funcpointer.
7748 (XSAVE_FUNCPOINTER): New function.
7749
7750 Simplify buildobj processing.
7751 * Makefile.in (buildobj.h): Make it a sequence of strings each
7752 followed by comma, rather than a single string. Put it into a
7753 .tmp file in case there's an error while generating it.
7754 (gl-stamp): Use .tmp for temp files.
7755 (mostlyclean): Clean .tmp files.
7756 * doc.c (buildobj): Move to just the routine that needs it.
7757 It's now an array of strings, so processing is simpler.
7758
7759 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
7760
7761 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
7762 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
7763 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
7764 Invoke malloc_enable_thread even when not interactive.
7765 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
7766 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
7767 in this case, since the underlying bug has now been fixed.
7768
7769 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
7770
7771 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
7772 unlinking it (bug#14691).
7773
7774 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
7775
7776 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
7777 before checking whether buffer is modified. This lets
7778 `kill-buffer-query-functions' cancel killing of the buffer or save
7779 its content before `kill-buffer' asks user the "Buffer %s
7780 modified; kill anyway?" question.
7781
7782 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
7783
7784 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
7785 Let the super performKeyEquivalent deal with them (Bug#14747).
7786
7787 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
7788
7789 * widget.c (resize_cb): Remove unused local.
7790
7791 Do not use GTK 3 if it exists but cannot be compiled.
7792 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
7793 * xterm.c (x_error_handler) [!USE_GTK]:
7794 Do not use GTK 3.
7795
7796 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
7797
7798 2013-06-30 Eli Zaretskii <eliz@gnu.org>
7799
7800 * intervals.c (get_local_map): Instead of aborting, clip POSITION
7801 to the valid range of values. (Bug#14753)
7802
7803 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
7804 when moving point by using the current glyph matrix. This avoids
7805 the need to force redisplay when this function is called in a
7806 loop.
7807
7808 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
7809
7810 Fix minor problems found by static checking.
7811 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
7812 Redo the latter's body to sidestep GCC parenthesization warnings.
7813 (setup_coding_system, detect_coding, detect_coding_system): Use them.
7814 * coding.c (detect_coding, detect_coding_system):
7815 * coding.h (struct undecided_spec):
7816 Use bool for boolean.
7817 * image.c (QCmax_width, QCmax_height): Now static.
7818 * xdisp.c (Fmove_point_visually): Remove unused local.
7819
7820 2013-06-29 Eli Zaretskii <eliz@gnu.org>
7821
7822 * xdisp.c (Fmove_point_visually): New function.
7823
7824 2013-06-28 Kenichi Handa <handa@gnu.org>
7825
7826 * coding.h (define_coding_undecided_arg_index): New enum.
7827 (coding_attr_index): New members
7828 coding_attr_undecided_inhibit_null_byte_detection,
7829 coding_attr_undecided_inhibit_iso_escape_detection,
7830 coding_attr_undecided_prefer_utf_8.
7831 (undecided_spec): New struct.
7832 (struct coding_system): New member `undecided' of the member
7833 `spec'.
7834
7835 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
7836 (detect_coding): Likewise.
7837 (detect_coding_system): Likewise.
7838 (Fdefine_coding_system_internal): New coding system properties
7839 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
7840 :prefer-utf-8.
7841 (syms_of_coding): Adjust for coding_arg_undecided_max.
7842
7843 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
7844
7845 * image.c (x_from_xcolors): Remove unused local.
7846
7847 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7848
7849 Defer image data transfer between X client and server until actual
7850 display happens.
7851
7852 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
7853 and `mask_img'.
7854
7855 * image.c (Destroy_Image): Remove.
7856 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
7857 `mask_p', and `colors_p'. All uses changed.
7858 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
7859 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
7860 New macros for `flags' arg to x_clear_image_1.
7861 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
7862 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
7863 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
7864 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
7865 (image_get_x_image, image_unget_x_image): New functions or macros.
7866 (image_background, image_background_transparent, x_to_xcolors)
7867 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
7868 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
7869 instead of Destroy_Image.
7870 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
7871 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
7872 (png_load_body, jpeg_load_body, tiff_load, gif_load)
7873 (imagemagick_load_image, svg_load_image): Use them instead of
7874 x_create_x_image_and_pixmap, and x_put_x_image followed by
7875 x_destroy_x_image, respectively.
7876 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
7877 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
7878 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
7879 background_transparent fields.
7880 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
7881 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
7882
7883 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
7884
7885 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
7886 This mostly consists of undoing recent changes.
7887 * callproc.c (Fcall_process):
7888 * process.c (create_process):
7889 Do not worry about catching SIGCHLD here, undoing previous change.
7890 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
7891 * process.c, process.h (catch_child_signal):
7892 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
7893 * process.c (catch_child_handler): Don't worry about being called
7894 lazily and do not assume caller has blocked SIGCHLD, undoing
7895 previous change. Move first-time stuff back to
7896 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
7897 tickle glib, as that causes Cygwin bootstrap to fail. Do not
7898 set lib_child_handler if it's already initialized, which may
7899 help avoid problems on GNUstep.
7900
7901 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
7902
7903 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
7904 * callproc.c (Fcall_process):
7905 * process.c (create_process):
7906 Make sure SIGCHLD is caught before we fork,
7907 since Emacs startup no arranges to catch SIGCHLD.
7908 * process.c (lib_child_handler): Initialize to null, not to
7909 dummy_handler.
7910 (catch_child_signal): Allow self to be called lazily.
7911 Do nothing if it's already been called.
7912 Assume caller has blocked SIGCHLD (all callers do now).
7913 * emacs.c (main): Do not catch SIGCHLD here; defer it until
7914 just before it's really needed.
7915 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
7916 since it hasn't been caught yet.
7917
7918 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
7919
7920 * image.c (compute_image_size): New function to implement
7921 :max-width and :max-height.
7922 (imagemagick_load_image): Use it.
7923
7924 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
7925
7926 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
7927 * callproc.c, process.h (block_child_signal, unblock_child_signal):
7928 Now extern.
7929 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
7930 * process.c (catch_child_signal): Block SIGCHLD while futzing with
7931 the SIGCHLD handler, since the code is not atomic and (due to glib)
7932 signals may be arriving now.
7933 * sysdep.c (init_signals): Do not catch child signals here;
7934 'main' now does that later, at a safer time.
7935
7936 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
7937
7938 Clean up SIGCHLD handling a bit (Bug#14569).
7939 * process.c, process.h (catch_child_signal):
7940 Now always extern, even if !NS_IMPL_GNUSTEP.
7941 * process.c (catch_child_signal): Move glib tickler here from
7942 init_process_emacs, so that it's done earlier in Emacs
7943 initialization. Also move the noninteractive && !initialized
7944 check here from init_process_emacs. This is all a bit cleaner for
7945 GNUish platforms, and I hope it works around the Cygwin bug.
7946 * sysdep.c (init_signals): Invoke catch_child_signal here, so
7947 that glib signal handling is tickled before glib creates threads.
7948
7949 * process.c (wait_reading_process_output): Avoid int overflow
7950 when reading more than 2 GiB total from a process.
7951
7952 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
7953
7954 * process.c (create_process): Handle a couple more cases,
7955 i.e., work even if new_argv and wait_child_setup[i] are cached.
7956 Use Fcall_process's style for volatile vars.
7957
7958 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
7959
7960 * process.c (create_process): Mark PROCESS volatile.
7961
7962 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
7963
7964 Use C99-style flexible array members if available.
7965 This avoids some subtle aliasing issues, which typically
7966 aren't a problem with GCC but may be a problem elsewhere.
7967 * alloc.c (sdata): New typedef, replacing the old struct sdata.
7968 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
7969 In either case, it uses a flexible array member rather than
7970 the old struct hack. All uses changed.
7971 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
7972 Adjust to sdata reorganization.
7973 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
7974 Use offsetof (struct, flex_array_member), not sizeof (struct), as
7975 that ports better to pre-C99 non-GCC.
7976 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
7977 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
7978 as the latter has changed.
7979 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
7980 and port better to pre-C99 GCC.
7981 * image.c (struct xpm_cached_color):
7982 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
7983 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
7984 Use FLEXIBLE_ARRAY_MEMBER.
7985 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
7986 Move decl to top level so it gets checked against implementation.
7987 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
7988 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
7989
7990 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
7991
7992 * syntax.c: Integer cleanups.
7993 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
7994 All uses that need 0-or-2 changed to:
7995 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
7996 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
7997 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
7998 (char_quoted, prev_char_comend_first, back_comment)
7999 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
8000 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
8001 Use bool for boolean.
8002 (update_syntax_table, skip_chars, skip_syntaxes):
8003 Prefer int to unsigned when either will do.
8004 (back_comment): Return boolean success flag, like forw_comment,
8005 instead of positive-or-minus-1 (which might have overflowed int anyway).
8006 Don't stuff ptrdiff_t into int.
8007 (syntax_spec_code, syntax_code_spec): Now const.
8008 (Fmatching_paren, scan_lists, scan_sexps_forward):
8009 Use enum syntaxcode for syntax code.
8010 (Fmatching_paren): Check that arg is a character, not just an integer.
8011 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
8012 (Finternal_describe_syntax_value): Omit no-longer-needed
8013 comparison to 0.
8014 (skip_chars): Use char, not unsigned char, when the distinction
8015 doesn't matter.
8016 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
8017 * bytecode.c (exec_byte_code):
8018 * syntax.c (syntax_spec_code, Fchar_syntax)
8019 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
8020 (init_syntax_once):
8021 * syntax.h (SYNTAX_WITH_FLAGS):
8022 Omit unnecessary casts.
8023
8024 2013-06-20 Eli Zaretskii <eliz@gnu.org>
8025
8026 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
8027 line dimensions here, to avoid race conditions with the main
8028 thread. (Bug#14062, bug#14630, bug#14669)
8029
8030 * w32term.c (w32_draw_window_cursor): Compute the header line and
8031 mode line dimensions here.
8032 <w32_system_caret_window, w32_system_caret_hdr_height>:
8033 <w32_system_caret_mode_height>: New variables.
8034
8035 * w32term.h: Declare them.
8036
8037 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
8038
8039 * alloc.c (die): Move "assertion failed" string here ...
8040 * lisp.h (eassert): ... from here. Also, suppress evaluation of
8041 COND when SUPPRESS_CHECKING. This shrinks the executable text
8042 size by 0.8% to 2.2% when configured with --enable-checking,
8043 depending on optimization flags (GCC 4.8.1 x86-64).
8044
8045 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
8046
8047 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
8048
8049 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
8050 base is 2; this is more accurate.
8051
8052 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
8053
8054 * sound.c (string_default): Move to !WINDOWSNT section.
8055 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
8056
8057 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
8058
8059 * sound.c: Integer cleanups.
8060 Remove unnecessary forward decls.
8061 (struct sound_device): The 'file' member is now a Lisp_Object, not
8062 a char *, so that we needn't invoke alloca on a huge size.
8063 (Fplay_sound_internal): Adjust to this.
8064 (string_default): New function.
8065 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
8066 Use it to adjust to the struct sound_device change.
8067 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
8068 (be2hs) [0]: Remove.
8069
8070 * syntax.c (skip_chars): Don't use uninitialized storage
8071 when searching a multibyte buffer for characters that are not in a
8072 unibyte string that contains non-ASCII characters.
8073
8074 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
8075
8076 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
8077 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
8078
8079 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
8080
8081 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
8082
8083 2013-06-18 Kenichi Handa <handa@gnu.org>
8084
8085 * font.c (Ffont_spec): Signal an error for an invalid font name
8086 (Bug#14648).
8087
8088 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
8089
8090 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
8091 In particular this ports to 32-bit sparc Sun cc.
8092 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
8093 array with a dummy element at specpdl[-1], so that its address can
8094 be taken portably.
8095 (unbind_to): Do not copy the binding; not needed, now that we
8096 copy old_value in the one place where the copy is needed.
8097 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
8098 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
8099 (union specbinding): Rename from struct specbinding. Redo layout
8100 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
8101 which is not portable. With Sun C 5.12 32-bit sparc, the
8102 declaration causes nargs to be an unsigned bitfield, a behavior
8103 that the C standard allows; but Emacs wants nargs to be signed.
8104 The overall type is now a union of structures rather than a
8105 structure of union of structures, and the 'kind' member is now a
8106 bitfield, so that the overall type doesn't grow. All uses changed.
8107 * process.c (Fmake_serial_process): Remove unnecessary initialization.
8108
8109 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
8110
8111 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
8112 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
8113
8114 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
8115
8116 2013-06-17 Eli Zaretskii <eliz@gnu.org>
8117
8118 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
8119 unless we know that the window w's frame is a frame object.
8120 Another attempt at solving bug#14062 and bug#14630.
8121
8122 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
8123
8124 * textprop.c (property_set_type): New enum.
8125 (add_properties): Allow appending/prepending text properties.
8126 (add_text_properties_1): Factored out of Fadd_text_properties.
8127 (Fadd_text_properties): Move all the code into
8128 add_text_properties_1.
8129 (Fadd_face_text_property): New function that calls
8130 add_text_properties_1.
8131
8132 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
8133
8134 Move functions from lisp.h to individual modules when possible.
8135 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
8136 * alloc.c (XFLOAT_INIT, set_symbol_name):
8137 * buffer.c (CHECK_OVERLAY):
8138 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
8139 (set_char_table_parent):
8140 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
8141 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
8142 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
8143 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
8144 (set_blv_valcell):
8145 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
8146 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
8147 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
8148 (backtrace_args, backtrace_debug_on_exit):
8149 * floatfns.c (CHECK_FLOAT):
8150 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
8151 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
8152 (set_hash_hash, set_hash_hash_slot, set_hash_index)
8153 (set_hash_index_slot):
8154 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
8155 * marker.c (CHECK_MARKER):
8156 * textprop.c (CHECK_STRING_OR_BUFFER):
8157 * window.c (CHECK_WINDOW_CONFIGURATION):
8158 Move here from lisp.h, and make these functions static rather than
8159 extern inline.
8160 * buffer.c (Qoverlayp):
8161 * data.c (Qsubrp):
8162 * fns.c (Qhash_table_p):
8163 * window.c (Qwindow_configuration_p):
8164 Now static.
8165 * lisp.h: Remove the abovementioned defns and decls.
8166
8167 Use functions, not macros, for XINT etc (Bug#11935).
8168 In lisp.h, prefer functions to function-like macros, and
8169 constants to object-like macros, when either will do. This:
8170 . simplifies use, as there's no more need to worry about
8171 arguments' side effects being evaluated multiple times.
8172 . makes the code easier to debug on some platforms.
8173 However, when using gcc -O0, keep using function-like macros
8174 for a few critical operations, for performance reasons.
8175 This sort of thing isn't needed with gcc -Og, but -Og
8176 is a GCC 4.8 feature and isn't widely-enough available yet.
8177 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
8178 Remove enum lsb_bits; no longer needed.
8179 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
8180 * buffer.c (Qoverlap):
8181 * data.c (Qsubrp):
8182 * fns.c (Qhash_table_p):
8183 Now extern, so lisp.h can use these symbols.
8184 * dispextern.h: Include character.h, for MAX_CHAR etc.
8185 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
8186 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8187 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
8188 (GLYPH_CODE_P): Move here from lisp.h.
8189 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8190 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
8191 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
8192 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
8193 XUNTAG now returns void *.
8194 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
8195 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
8196 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
8197 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
8198 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
8199 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
8200 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
8201 (lisp_h_XPNTR, lisp_h_XSYMBOL):
8202 New macros, renamed from their sans-lisp_h_ counterparts.
8203 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
8204 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
8205 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
8206 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
8207 If compiling via GCC without optimization, define these as macros
8208 in addition to inline functions.
8209 To disable this, compile with -DINLINING=0.
8210 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
8211 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
8212 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
8213 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
8214 (INTMASK, VALMASK): Now macros, since static values cannot be
8215 accessed from extern inline functions.
8216 (VALMASK): Also a constant, for benefit of old GDB.
8217 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
8218 is INTEGERP, which can fold it in.
8219 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
8220 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
8221 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
8222 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
8223 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
8224 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
8225 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
8226 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
8227 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
8228 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
8229 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
8230 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
8231 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
8232 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
8233 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
8234 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
8235 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
8236 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
8237 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
8238 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
8239 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
8240 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
8241 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
8242 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
8243 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
8244 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
8245 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
8246 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
8247 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
8248 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
8249 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
8250 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
8251 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
8252 Now functions.
8253 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
8254 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
8255 (VALMASK): Define in one place rather than in two, merging the
8256 USE_LSB_TAG parts; this is simpler.
8257 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
8258 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
8259 Move up, to avoid use before definition.
8260 Also include "globals.h" earlier, for the same reason.
8261 (make_natnum): New function.
8262 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
8263 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
8264 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
8265 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
8266 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
8267 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
8268 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
8269 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
8270 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
8271 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
8272 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
8273 (Qwindow_configuration_p, Qimage): New forward declarations.
8274 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
8275 (STRING_COPYIN): Remove; unused.
8276 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
8277 (xcar_addr, xcdr_addr): New functions. All uses changed.
8278 (IEEE_FLOATING_POINT): Now a constant, not a macro.
8279 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
8280 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
8281 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
8282 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
8283 (TYPE_RANGED_INTEGERP): Simplify.
8284 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
8285 (setlocale, fixup_locale, synchronize_system_messages_locale)
8286 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
8287 Now empty functions, not macros.
8288 (functionp): Return bool, not int.
8289 * window.c (Qwindow_configuration_p): Now extern,
8290 so window.h can use it.
8291 * window.h (Qwindowp): Move decl back to lisp.h.
8292
8293 2013-06-15 Eli Zaretskii <eliz@gnu.org>
8294
8295 * xdisp.c (Fline_pixel_height): New function, required for solving
8296 bug #14567.
8297
8298 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
8299
8300 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
8301
8302 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
8303
8304 * lread.c (syms_of_lread):
8305 * fns.c (Fprovide): Adjust to new format of after-load-alist.
8306
8307 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
8308
8309 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
8310
8311 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
8312
8313 * fileio.c (expand_file_name): Doc fix.
8314
8315 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
8316
8317 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
8318 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
8319 Wait for self, not for 0. This can't hurt on GNU or similar
8320 system, and may help with Cygwin.
8321
8322 * keyboard.c: Don't use PROP (...) as an lvalue.
8323 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
8324 Use set_prop (A, B), not PROP (A) = B.
8325
8326 2013-06-10 Eli Zaretskii <eliz@gnu.org>
8327
8328 * xdisp.c (get_it_property): Use it->window instead of generating
8329 a Lisp object from it->w.
8330
8331 2013-06-09 Eli Zaretskii <eliz@gnu.org>
8332
8333 * xdisp.c (get_it_property): If it->object is a buffer, pass to
8334 get-char-property the window that is being rendered, instead of
8335 the buffer, to support window-specific overlays. (Bug#14575)
8336 (compute_display_string_pos): When W is NULL, use the current
8337 buffer as the object to pass to get-char-property.
8338 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
8339 pointer member of the bidi iterator, since no window is pertinent
8340 to this function.
8341
8342 2013-06-08 Eli Zaretskii <eliz@gnu.org>
8343
8344 * bidi.c (bidi_fetch_char): Accept additional argument, the window
8345 being displayed, and pass it to compute_display_string_pos.
8346 (bidi_level_of_next_char, bidi_resolve_explicit_1)
8347 (bidi_paragraph_init): All callers changed.
8348
8349 * xdisp.c (init_from_display_pos, init_iterator)
8350 (handle_single_display_spec, next_overlay_string)
8351 (get_overlay_strings_1, reseat_1, reseat_to_string)
8352 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
8353 Set bidi_it.w member from it->w.
8354 (compute_display_string_pos): Accept additional argument, the
8355 window being displayed, and pass it to Fget_char_property.
8356 (Bug#14575)
8357
8358 * dispextern.h (struct bidi_it): New member w, the window being
8359 displayed.
8360 (compute_display_string_pos): Adjust prototype.
8361
8362 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
8363
8364 * xgselect.c: Remove unneeded include xterm.h.
8365
8366 * process.c (wait_reading_process_output): Check for NS before GLIB.
8367 GLIB may be linked in due to rsvg, but ns_select must be called.
8368
8369 * xgselect.c (xg_select): Remove call to window_system_available
8370 and g_main_context_pending at the top, so Gdk events (i.e. file
8371 notify) are processed when Emacs is started with -nw.
8372
8373 2013-06-07 Eli Zaretskii <eliz@gnu.org>
8374
8375 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
8376 (ctagsfiles3): New variable, includes only *.m files.
8377 (TAGS): Use an explicit language name in the regular expressions,
8378 to avoid transformation of '/SOMETHING' by MSYS to
8379 'c:\MSYS\SOMETHING'.
8380
8381 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
8382
8383 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
8384
8385 2013-06-06 Eli Zaretskii <eliz@gnu.org>
8386
8387 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
8388 still need to set the mouse pointer shape and activate help-echo.
8389 (Bug#14558)
8390
8391 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
8392
8393 A few porting etc. fixes for the new file monitor code.
8394 See the thread containing
8395 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
8396 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
8397 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
8398 (dir_monitor_callback, Fgfile_rm_watch):
8399 Use assq_no_quit instead of Fassoc, for speed.
8400 (dir_monitor_callback, Fgfile_rm_watch):
8401 eassert that the monitor is a fixnum.
8402 (dir_monitor_callback): No need for CDR_SAFE.
8403 Simplify building of lisp with alternative tails.
8404 (Fgfile_add_watch, Fgfile_rm_watch):
8405 Do not assume glib functions set errno reliably on failure.
8406 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
8407 and signal an error otherwise.
8408 (Fgfile_rm_watch): Prefer CONSP to !NILP.
8409 Use Fdelq instead of Fdelete, for speed.
8410
8411 2013-06-05 Eli Zaretskii <eliz@gnu.org>
8412
8413 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
8414 don't insist on being invoked on a highlighted tool-bar button.
8415 Avoids losing tool-bar functionality when mouse-highlight is nil.
8416 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
8417 Don't highlight when mouse-highlight is nil.
8418 (note_mouse_highlight): When mouse-highlight is nil, don't return
8419 right away; instead, run tool-bar and mode-line highlight
8420 subroutine, clear any existing highlight, and revert the mouse
8421 pointer to its default shape. (Bug#14558)
8422
8423 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
8424
8425 * lisp.mk (lisp): Add prog-mode.el.
8426
8427 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
8428
8429 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
8430 * process.c (dummy_handler): New function.
8431 (lib_child_handler): New static var.
8432 (handle_child_signal): Invoke it.
8433 (catch_child_signal): If a library has set up a signal handler,
8434 save it into lib_child_handler.
8435 (init_process_emacs): If using glib and not on Windows, tickle glib's
8436 child-handling code so that it initializes its private SIGCHLD handler.
8437 * syssignal.h (SA_SIGINFO): Default to 0.
8438 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
8439 31; it should no longer be needed now.
8440
8441 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
8442
8443 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
8444
8445 * gfilenotify.c (globals_of_gfilenotify): New function.
8446 (syms_of_gfilenotify): Move global initialization there.
8447
8448 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
8449
8450 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
8451
8452 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
8453 * keyboard.c (menu_bar_items, tool_bar_items):
8454 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
8455 not override local keymaps any more.
8456
8457 2013-06-04 Eli Zaretskii <eliz@gnu.org>
8458
8459 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
8460
8461 2013-06-03 Eli Zaretskii <eliz@gnu.org>
8462
8463 * w32console.c (initialize_w32_display): Return the dimensions of
8464 the console window via 2 additional arguments, not via the current
8465 frame. This avoids crashes due to overrunning the bounds of
8466 frame's decode_mode_spec_buffer, which is not resized following
8467 the change of the frame dimensions from the initial 10x10.
8468
8469 * w32term.h (w32_initialize_display_info): Adjust prototype.
8470
8471 * term.c (init_tty): Take dimensions of the frame from the values
8472 returned by initialize_w32_display.
8473
8474 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
8475 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
8476 (LIBES): Add $(GFILENOTIFY_LIBS).
8477
8478 * w32inevt.c (handle_file_notifications): Add dummy implementation
8479 for !HAVE_W32NOTIFY.
8480
8481 * w32term.c: Wrap code with HAVE_W32NOTIFY.
8482
8483 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
8484
8485 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
8486
8487 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
8488
8489 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
8490
8491 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
8492
8493 Fix minor problems found by static checking.
8494 * data.c (pure_write_error):
8495 Use xsignal2, not Fsignal, as Fsignal might return.
8496 * eval.c (set_backtrace_debug_on_exit): Now static.
8497 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
8498 No longer inline. EXTERN_INLINE is needed only for functions
8499 defined in .h files. Reindent function header as per GNU style.
8500 (backtrace_p, backtrace_top, backtrace_next):
8501 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
8502 compiler or linker. Add extern decls to pacify gcc -Wall.
8503 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
8504 Now static.
8505 * frame.c (free_monitors): Define only on platforms that need it.
8506 * nsterm.m (ns_term_init):
8507 * process.c (catch_child_signal):
8508 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
8509 defined on all porting targets these days.
8510 * process.c, process.h (catch_child_signal):
8511 Make it extern only if NS_IMPL_GNUSTEP is defined.
8512
8513 2013-06-03 Eli Zaretskii <eliz@gnu.org>
8514
8515 * w32.c (gettimeofday): Make the signature identical to prototype
8516 in nt/inc/sys/time.h.
8517
8518 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
8519
8520 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
8521 .gdbinit.
8522
8523 * keyboard.c (safe_run_hooks_error): Improve error message.
8524
8525 * data.c (pure_write_error): Add `object' argument.
8526 * puresize.h (CHECK_IMPURE): Use it.
8527
8528 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
8529
8530 * Makefile.in (NOTIFY_OBJ): New variable.
8531 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
8532
8533 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
8534 Call syms_of_gfilenotify.
8535
8536 * gfilenotify.c: New file.
8537
8538 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
8539 and Qfile_w32notify.
8540 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
8541 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
8542
8543 * lisp.h: Declare syms_of_gfilenotify.
8544
8545 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
8546
8547 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
8548
8549 Merge the specpdl and backtrace stacks. Make the structure of the
8550 specpdl entries more obvious via a tagged union of structs.
8551 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
8552 (enum specbind_tag): New enum.
8553 (struct specbinding): Make it a tagged union of structs.
8554 Add a case for backtrace records.
8555 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
8556 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
8557 (backtrace_debug_on_exit): New accessors.
8558 (struct backtrace): Remove.
8559 (struct catchtag): Remove backlist field.
8560 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8561 Move to eval.c.
8562 (Flocal_variable_p): Speed up the common case where the binding is
8563 already loaded.
8564 * eval.c (backtrace_list): Remove.
8565 (set_specpdl_symbol, set_specpdl_old_value): Remove.
8566 (set_backtrace_args, set_backtrace_nargs)
8567 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
8568 (backtrace_next): New functions.
8569 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
8570 (unwind_to_catch, internal_lisp_condition_case)
8571 (internal_condition_case, internal_condition_case_1)
8572 (internal_condition_case_2, internal_condition_case_n): Don't bother
8573 with backtrace_list any more.
8574 (Fsignal): Adjust to new backtrace format.
8575 (grow_specpdl): Move up.
8576 (record_in_backtrace): New function.
8577 (eval_sub, Ffuncall): Use it.
8578 (apply_lambda): Adjust to new backtrace format.
8579 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
8580 data.c.
8581 (specbind): Adjust to new specpdl format. Simplify.
8582 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
8583 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
8584 backtrace format.
8585 (mark_backtrace): Remove.
8586 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
8587 * xdisp.c (redisplay_internal): Use record_in_backtrace.
8588 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
8589 Use mark_specpdl.
8590 * profiler.c (record_backtrace): Use get_backtrace.
8591 (handle_profiler_signal): Use backtrace_top_function.
8592 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
8593 accessor functions.
8594
8595 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
8596
8597 * process.h (catch_child_signal): Declare.
8598
8599 * process.c (catch_child_signal): New function.
8600 (init_process_emacs): Call it.
8601
8602 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
8603 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
8604 NS_IMPL_COCOA.
8605 (x_set_cursor_type): Remove declaration.
8606 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
8607 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
8608 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
8609 (ns_get_color): Use F suffix on float.
8610 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
8611 (ns_get_rgb_color): Remove.
8612 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
8613 (note_mouse_movement): x and y are CGFloat.
8614 (ns_draw_fringe_bitmap): Remove unused rowY.
8615 Change #if to COCOA && >= 10_6.
8616 (ns_draw_window_cursor): Remove unused overspill.
8617 (ns_draw_underwave): width and x are EamcsCGFloat.
8618 (ns_draw_box): thickness is CGFloat.
8619 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
8620 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
8621 if not in main thread.
8622 (ns_get_pending_menu_title, ns_check_menu_open)
8623 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
8624 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
8625 (sendFromMainThread:): New method.
8626 (changeFont:): size is CGFloat.
8627 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
8628 Disable warning about permanent text.
8629 (characterIndexForPoint:): Adjust return type depending on GNUstep
8630 version.
8631 (mouseDown:): delta is CGFloat.
8632 (updateFrameSize): Remove unised variable f.
8633 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
8634 Cast float to EmacsCGFloat.
8635 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
8636 also to -1 when restoring.
8637 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
8638 inside NS_IMPL_COCOA.
8639 (toggleFullScreen:): Put call to toggleFullScreen inside
8640 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
8641 (setPosition:portion:whole:): por is CGFloat.
8642 (getMouseMotionPart:window:x:y:): Add F suffix to float.
8643 (mouseDown:): Use CGFloat.
8644 (mouseDragged:): Remove unised variable edge.
8645 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
8646
8647 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
8648 of CGFloat differs.
8649 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
8650 when NS_IMPL_GNUSTEP.
8651 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
8652 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
8653 (EmacsToolbar): Add clearAll. Add tag argument to
8654 addDisplayItemWithImage.
8655 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
8656
8657 * nsselect.m (ns_get_local_selection): Remove unused variable type.
8658
8659 * nsmenu.m (ns_update_menubar): Make static.
8660 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
8661 (fillWithWidgetValue:): Add cast to SEL for setAction.
8662 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
8663 (update_frame_tool_bar): Update code for GNUstep.
8664 (clearAll): New method.
8665 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
8666 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
8667 Move identifierToItem setObject and activeIdentifiers addObject before
8668 call to insertItemWithItemIdentifier.
8669 (validateVisibleItems): Fix indentation.
8670 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
8671 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
8672 UtilityWindow to aStyle, remove call to setStyleMask.
8673
8674 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
8675
8676 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
8677 (ns_charset_covers, ns_get_covering_families, nsfont_open):
8678 Use F suffix on floats.
8679 (ns_char_width): Returns CGFloat.
8680 (ns_ascii_average_width): w is CGFloat instead of float.
8681 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
8682 DPSxshow.
8683 (ns_glyph_metrics): CGFloat instead of float.
8684
8685 * nsfns.m (x_set_foreground_color, x_set_background_color):
8686 Use EmacsCGFloat.
8687 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
8688 remove unused variables.
8689 (Fns_read_file_name): Keep track if panel is for save.
8690 Use ns_filename_from_panel/ns_directory_from_panel.
8691 (Fns_list_services): delegate only used for COCOA.
8692 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
8693 Just return the input if GNUstep.
8694 (x_screen_planes): Remove.
8695 (Fxw_color_values): Use EmacsCGFloat
8696 (Fns_display_monitor_attributes_list): Only get screen number for
8697 Cocoa.
8698 (getDirectory, getFilename): Remove from EmacsOpenPanel and
8699 EmacsSavePanel.
8700 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
8701 ns_directory_from_panel.
8702
8703 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
8704
8705 * process.c (handle_child_signal): Also use WCONTINUED.
8706 This is so that list-processes doesn't mistakenly list the process
8707 as stopped, when the process has actually been continued and is
8708 now running.
8709
8710 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
8711
8712 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
8713 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
8714 not already configured.
8715
8716 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
8717
8718 2013-05-29 Eli Zaretskii <eliz@gnu.org>
8719
8720 * Makefile.in (mostlyclean): Remove *.res files.
8721
8722 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
8723
8724 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
8725 a buffer (bug#8447).
8726
8727 2013-05-27 Eli Zaretskii <eliz@gnu.org>
8728
8729 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
8730 display vector, and we backtrack, handle the case that the
8731 previous character position is also displayed from a display
8732 vector or covered by a display string or image. (Bug#14476)
8733
8734 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
8735
8736 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
8737 (struct MonitorInfo, free_monitors): Remove.
8738 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
8739 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
8740 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
8741 Qframes, Qsource.
8742
8743 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
8744 (struct MonitorInfo, free_monitors): Remove.
8745 (ns_screen_name): Make static.
8746 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
8747 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
8748 Qframes, Qsource.
8749
8750 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
8751 (struct MonitorInfo): New struct.
8752 (free_monitors, make_monitor_attribute_list): Declare.
8753
8754 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
8755 New Lisp_Object:s.
8756 (free_monitors, make_monitor_attribute_list): New functions.
8757 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
8758 Qsource.
8759
8760 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
8761
8762 * callproc.c (call_process): Refine the doc string. (Bug#14045)
8763
8764 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
8765
8766 * keyboard.c: Apply keyboard decoding only to events that come directly
8767 from the tty, not from unread-command-events (bug#14368).
8768 (read_event_from_main_queue): New function, extracted from read_char.
8769 (read_decoded_char): Remove.
8770 (read_decoded_event_from_main_queue): New function to replace it.
8771 (read_char): Use it.
8772 (read_key_sequence): Use read_char rather than read_decoded_char.
8773
8774 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
8775
8776 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
8777
8778 * casetab.c (init_casetab_once): Fix last change (bug#14424).
8779
8780 2013-05-22 Kenichi Handa <handa@gnu.org>
8781
8782 The following changes are to fix the setting of
8783 buffer-file-coding-system on, for instance, C-x RET c unix RET
8784 _FILE_OF_DOS_EOL_TYPE_ RET.
8785
8786 * coding.h (struct coding_system): New member detected_utf8_chars.
8787
8788 * coding.c (detect_coding_utf_8): Count characters and check EOL
8789 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
8790 BOM is there.
8791 (setup_coding_system): Do not initialize coding->head_ascii.
8792 (check_ascii): Do not set coding->eol_seen but update it. Do not
8793 call adjust_coding_eol_type here.
8794 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
8795 If the eol-type of CODING is already specified, adjust the eol type
8796 of the found coding-system.
8797 (decode_coding_gap): Cancel previous change. Utilize the
8798 character numbers counted by detect_coding_utf_8. Fix detection
8799 of BOM for utf-8.
8800
8801 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
8802
8803 * search.c (looking_at_1): Only set last_thing_searched if the match
8804 changed the match-data (bug#14281).
8805
8806 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
8807
8808 * xdisp.c (reseat_at_previous_visible_line_start):
8809 Already declared in dispextern.h, so remove it here.
8810 (move_it_vertically_backward): Likewise.
8811
8812 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8813
8814 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
8815 (Fx_display_pixel_width, Fx_display_pixel_height)
8816 (Fx_display_mm_width, Fx_display_mm_height):
8817 Mention `display-monitor-attributes-list' in docstrings.
8818
8819 * nsfns.m (ns_get_screen): Remove function. All uses removed.
8820 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
8821 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
8822 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
8823 (Fx_display_backing_store, Fx_display_visual_class)
8824 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
8825 (Fx_display_grayscale_p, Fx_display_pixel_width)
8826 (Fx_display_pixel_height, Fx_display_planes)
8827 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
8828 (Fx_display_screens): Don't confuse X11 screens with NS screens.
8829 (Fx_display_mm_width, Fx_display_mm_height)
8830 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
8831 height for all physical monitors as in X11.
8832
8833 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
8834 Return pixel width or height for all physical monitors as in X11.
8835
8836 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
8837
8838 Port --enable-gcc-warnings to clang.
8839 * bytecode.c (exec_byte_code):
8840 * regex.c:
8841 Redo diagnostic pragmas to pacify clang, too.
8842 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
8843 * editfns.c (Fencode_time):
8844 * fileio.c (file_accessible_directory_p):
8845 * font.c (font_unparse_xlfd):
8846 Use '&"string"[index]' instead of '"string" + (index)'.
8847 * undo.c (user_error): Remove; unused.
8848
8849 2013-05-16 Eli Zaretskii <eliz@gnu.org>
8850
8851 * insdel.c (insert_1_both): Document the arguments, instead of
8852 referring to insert_1, which no longer exists.
8853
8854 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
8855 some window, increment windows_or_buffers_changed, so that
8856 *Messages* display in that window is updated. (Bug#14408)
8857
8858 * w32.c: Include epaths.h.
8859 (init_environment): Use cmdproxy.exe without leading directories.
8860 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
8861 case.
8862 (gettimeofday): Adjust signature and return value to Posix
8863 expectations.
8864
8865 * unexw32.c (open_output_file): Delete the existing emacs.exe
8866 before creating it, to break the hard link to the versioned
8867 executable.
8868
8869 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
8870 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
8871 (FIRSTFILE_OBJ): New variables.
8872 (W32_RES): Rename to EMACSRES. All users changed.
8873 (base_obj): Use $(CM_OBJ).
8874 (ALLOBJS): Use $(FIRSTFILE_OBJ).
8875 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
8876 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
8877 $(W32_RES_LINK) before $(LIBES).
8878 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
8879
8880 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
8881
8882 * makefile.w32-in (DOC): Use just "DOC".
8883
8884 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
8885
8886 * process.c: Export default filters and sentinels to Elisp.
8887 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
8888 New constants.
8889 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
8890 (Fset_process_sentinel, Fformat_network_address):
8891 Default to them instead of nil.
8892 (server_accept_connection): Sentinels can't be nil any more.
8893 (read_and_dispose_of_process_output): New function, extracted from
8894 read_process_output.
8895 (read_process_output): Use it; filters can't be nil.
8896 (Finternal_default_process_filter): New function, extracted from
8897 read_process_output.
8898 (exec_sentinel_unwind): Remove function.
8899 (exec_sentinel): Don't zilch sentinel while running.
8900 (status_notify): Sentinels can't be nil.
8901 (Finternal_default_process_sentinel): New function extracted from
8902 status_notify.
8903 (setup_process_coding_systems): Default filter is not nil any more.
8904 (syms_of_process): Export new Elisp functions and initialize
8905 new constants.
8906 * lisp.h (make_lisp_proc): New function.
8907
8908 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
8909
8910 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
8911
8912 2013-05-14 Eli Zaretskii <eliz@gnu.org>
8913
8914 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
8915 unless we know that the window w is a leaf window.
8916 Another attempt at solving bug#14062.
8917
8918 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
8919
8920 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
8921 fdesc (Bug#14375).
8922
8923 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
8924
8925 * image.c (gif_load): Check that subimages fit (Bug#14345).
8926
8927 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
8928
8929 * lread.c (skip_dyn_eof): New function.
8930 (read1): Use it to skip the end of a file in response to #@00.
8931
8932 * doc.c (get_doc_string): Slightly relax the sanity checking.
8933
8934 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
8935
8936 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
8937 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
8938 (MonitorInfo): New struct.
8939 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
8940 (Fns_display_monitor_attributes_list): New functions.
8941 (display-usable-bounds): Remove.
8942 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
8943 Qsource.
8944
8945 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
8946
8947 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
8948 (GTK_CHECK_VERSION): New macro, if not already defined.
8949 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
8950 replaced by GTK_CHECK_VERSION.
8951
8952 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
8953
8954 * xterm.h (GTK_PREREQ): New macro.
8955 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
8956 to use this macro instead, for consistency and clarity.
8957
8958 2013-05-08 Eli Zaretskii <eliz@gnu.org>
8959
8960 * xdisp.c (row_for_charpos_p): New function, with code of
8961 cursor_row_p, but accepts an additional argument CHARPOS instead
8962 of using a hardcoded PT.
8963 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
8964 (row_containing_pos): Call row_for_charpos_p instead of partially
8965 doing the same. Fixes cursor positioning under longlines-mode
8966 when longlines-show-effect includes more than one newline, when
8967 moving the cursor vertically up.
8968
8969 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
8970
8971 * makefile.w32-in (ACL_H): New macro.
8972 ($(BLD)/fileio.$(O)): Update dependencies.
8973
8974 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
8975
8976 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
8977 * Makefile.in (LIB_ACL): New macro.
8978 (LIBACL_LIBS): Remove.
8979 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
8980 * fileio.c: Include <acl.h>.
8981 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
8982 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
8983 !acl_errno_valid.
8984 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
8985 it ourselves.
8986
8987 * unexelf.c: Don't assume ElfW (Half) fits in int.
8988 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
8989 when dealing with ElfW (Half) values, since they can exceed 2**31
8990 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
8991 (entry_address): Omit unused NUM arg. All uses changed.
8992
8993 2013-05-07 Juri Linkov <juri@jurta.org>
8994
8995 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
8996 to the string converted from number with `Fnumber_to_string'.
8997 (Bug#14254)
8998
8999 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9000
9001 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
9002 This fixes a problem introduced by my previous change.
9003
9004 2013-05-07 Glenn Morris <rgm@gnu.org>
9005
9006 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
9007
9008 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
9009
9010 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
9011
9012 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
9013
9014 Static checking by GCC 4.8.0.
9015 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
9016 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
9017 (x_get_monitor_attributes_fallback)
9018 (x_get_monitor_attributes_xinerama)
9019 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
9020 Define only if USE_GTK.
9021 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
9022 (x_get_monitor_attributes_fallback): Omit unused locals.
9023 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
9024 Use double, not float, to avoid mixed-mode floating point arithmetic.
9025
9026 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9027 Jan Djärv <jan.h.d@swipnet.se>
9028
9029 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
9030 (XINERAMA_CFLAGS): New macros.
9031 (ALL_CFLAGS, LIBES): Use them.
9032
9033 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
9034 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
9035 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
9036 (syms_of_xfns): DEFSYM them.
9037 (struct MonitorInfo): New struct.
9038 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
9039 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
9040 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
9041 (x_get_monitor_attributes_xinerama): New functions.
9042 (Fx_display_monitor_attributes_list): New primitive.
9043 (syms_of_xfns): Defsubr it.
9044
9045 * xterm.h (x_display_info): Add Xatom_net_workarea and
9046 Xatom_net_current_desktop.
9047
9048 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
9049 and dpyinfo->Xatom_net_current_desktop.
9050
9051 2013-05-06 Eli Zaretskii <eliz@gnu.org>
9052
9053 * xdisp.c (pos_visible_p): Use the special code for finding the
9054 beginning of a display property or overlay for any "replacing"
9055 display property, not just for display strings. This solves
9056 incorrect reporting of position by posn-at-point. (Bug#14241)
9057
9058 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
9059
9060 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
9061 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
9062 Verify that ElfW (Half) fits in int.
9063 (fatal): Use same signature as lisp.h.
9064 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
9065 configure and build with -DUNEXELF_DEBUG without worrying about
9066 other modules that use DEBUG.
9067 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
9068 possibly-wide integers now uses it instead of plain fprintf.
9069 (entry_address): New function, which avoids problems with 32-bit
9070 overflow on 64-bit hosts.
9071 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
9072 (round_up): Don't assume the remainder fits in int.
9073 (find_section): Use bool for boolean. Simplify debug code.
9074 (unexec): Don't assume file sizes fit in int or size_t.
9075 Omit unnecessary trailing newline in 'fatal' format.
9076 Use strerror rather than outputting decimal error number.
9077 Remove unused code when emacs is not defined;
9078 this file relies on Emacs now.
9079 Don't assume e_phnum and e_shnum are positive.
9080
9081 * regex.c: Fix problems when DEBUG is defined.
9082 (extract_number, extract_number_and_incr): Define regardless of
9083 whether DEBUG is defined; that's simpler and makes the code less
9084 likely to go stale in the normal case when DEBUG is not defined.
9085 Return int rather than taking an int * arg. All callers changed.
9086 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
9087 Remove, replacing with ...
9088 (DEBUG_PRINT): New macro. All callers changed.
9089 (DEBUG_COMPILES_ARGUMENTS): New macro.
9090 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
9091 (print_compiled_pattern, print_double_string) [DEBUG]:
9092 Use prototype rather than old-style definition.
9093 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
9094 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
9095 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
9096 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
9097 Don't assume ptrdiff_t, size_t, and long are the same width as int.
9098 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
9099 This matters only when DEBUG is defined.
9100
9101 2013-05-05 Eli Zaretskii <eliz@gnu.org>
9102
9103 * xdisp.c (set_iterator_to_next): Set the
9104 ignore_overlay_strings_at_pos_p flag only if we are _really_
9105 iterating over an overlay string, as indicated by the
9106 current.overlay_string_index member. (Bug#14306)
9107
9108 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
9109
9110 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
9111 to where it is used, to avoid autorelease issues (Bug#14050).
9112
9113 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
9114
9115 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
9116 * fileio.c (syms_of_fileio): Implement this.
9117 * filelock.c (create_lock_file): If symbolic links don't work, so
9118 we use a regular file as a lock file, do not fsync the lock file;
9119 it's not needed.
9120
9121 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9122
9123 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
9124 (syms_of_minibuf): Adjust accodingly.
9125 * lread.c (Fread):
9126 * callint.c (Fcall_interactively): Adjust calls accordingly.
9127
9128 2013-05-04 Eli Zaretskii <eliz@gnu.org>
9129
9130 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
9131 w->contents is a buffer before computing everything else.
9132 Use parentheses to disambiguate last part of the condition.
9133
9134 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
9135 assertion violations. (Bug#14062)
9136
9137 2013-05-01 David Reitter <david.reitter@gmail.com>
9138
9139 * nsfns.m (ns_tooltip): Initialize.
9140
9141 2013-04-28 Eli Zaretskii <eliz@gnu.org>
9142
9143 * coding.c (decode_coding_gap): Don't remove the character before
9144 a newline unless it's a CR character. (Bug#14287)
9145
9146 2013-04-28 Dan Nicolaescu <dann@gnu.org>
9147
9148 * dispextern.h (struct face): Move enum face_underline_type
9149 earlier so that bitfields can be in the same word.
9150
9151 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
9152
9153 * nsfns.m (handlePanelKeys): New function.
9154 (EmacsOpenPanel:performKeyEquivalent:)
9155 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
9156 arrows/function/control and copy/paste keys (Bug#14296).
9157
9158 2013-04-27 Juri Linkov <juri@jurta.org>
9159
9160 * callint.c (Fcall_interactively): Call `Qread_number' for
9161 interactive code letter `n' instead of using duplicate code.
9162 (Bug#14254)
9163
9164 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
9165
9166 * systime.h (make_timeval): Declare as 'const'.
9167
9168 2013-04-27 Kenichi Handa <handa@gnu.org>
9169
9170 * font.c (font_open_entity): Always open a font of manageable
9171 size.
9172
9173 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
9174
9175 Port better to AIX (Bug#14258).
9176 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
9177 to pacify AIX xlc.
9178
9179 2013-04-24 Kenichi Handa <handa@gnu.org>
9180
9181 * coding.c (decode_coding_iso_2022): When an invalid escape
9182 sequence is encountered, reset the invocation and designation
9183 status to the safest one.
9184
9185 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
9186
9187 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
9188 Without this fix, "make distclean" leaves stamp-h1 behind.
9189
9190 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
9191
9192 * w32fns.c (w32_fullscreen_rect): New function to compute the
9193 window rectangle for the given fullscreen mode.
9194 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
9195 longer tunes the window size. This keeps the window's edges flush
9196 with the screen and allows the taskbar to hide itself in fullboth.
9197
9198 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
9199 window decorations and uses the entire screen.
9200
9201 * w32term.h (w32_fullscreen_rect) Add prototype.
9202 (struct w32_output): Replace normal_width, normal_height,
9203 normal_top, and normal_left members with a single normal_placement
9204 struct.
9205 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
9206 Remove macros.
9207 (FRAME_NORMAL_PLACEMENT): New macro.
9208
9209 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
9210
9211 * minibuf.c (Ftest_completion): Silence compiler warning.
9212
9213 2013-04-15 Eli Zaretskii <eliz@gnu.org>
9214
9215 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
9216 bug#14062.
9217
9218 * frame.h (WINDOW_FRAME): Protect macro and its argument with
9219 parentheses.
9220
9221 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
9222 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
9223 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
9224 parentheses where appropriate.
9225
9226 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
9227
9228 * keyboard.c (timer_start_idle): Remove no-longer-used local.
9229
9230 2013-04-14 Eli Zaretskii <eliz@gnu.org>
9231
9232 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
9233 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
9234 Mention in the doc string that setting these variables takes
9235 effect only after a call to set-window-buffer. (Bug#14200)
9236
9237 2013-04-13 Eli Zaretskii <eliz@gnu.org>
9238
9239 * indent.c (Fvertical_motion): Don't consider display strings on
9240 overlay strings as display strings on the buffer position we
9241 started from. This prevents vertical cursor motion from jumping
9242 more than one line when there's an overlay string with a display
9243 property at end of line.
9244 Reported by Karl Chen <Karl.Chen@quarl.org> in
9245 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
9246
9247 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
9248
9249 * window.c (select_window): `record_buffer' even if window is
9250 already selected (bug#14191).
9251
9252 2013-04-11 Eli Zaretskii <eliz@gnu.org>
9253
9254 * window.c (Fwindow_end): Test more flags, including the buffer's
9255 last_overlay_modified flag, to determine whether the window's
9256 display is really up-to-date. Prevents the function from
9257 returning a stale value. (Bug#14170)
9258 (Fwindow_line_height): Fix the test for up-to-date-ness of the
9259 current matrix.
9260
9261 2013-04-10 Eli Zaretskii <eliz@gnu.org>
9262
9263 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
9264 garbaged only if it is not already the top frame on its TTY.
9265 This prevents flickering due to constant redrawing of TTY frames when
9266 there are GUI frames open in the same session. (Bug#13864)
9267
9268 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
9269
9270 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
9271 of marking the idle timers directly.
9272
9273 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
9274
9275 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
9276 tables (bug#14054).
9277
9278 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
9279
9280 * window.c (select_window): Don't record_buffer while the invariant is
9281 temporarily broken (bug#14161).
9282
9283 * fns.c (Fdelq): Don't assume !NILP => CONSP.
9284
9285 2013-04-07 Eli Zaretskii <eliz@gnu.org>
9286
9287 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
9288
9289 2013-04-07 Romain Francoise <romain@orebokech.com>
9290
9291 Ignore additional platform-specific ACL errors (Bug#13702).
9292 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
9293 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
9294
9295 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
9296
9297 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
9298 f->output_data.ns.
9299
9300 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
9301
9302 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
9303 This bug was introduced by my 2013-02-25 change that simplified
9304 data_start configuration. Without this change, on GNU/Linux
9305 an Emacs configured with --enable-profiling fails immediately
9306 due to a profiler signal.
9307 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
9308 with these flags. On platforms where special flags are needed
9309 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
9310 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
9311 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
9312
9313 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
9314
9315 Get rid of some platform-specific functions examining window
9316 system and its capabilities. This is a partial rework of the
9317 2013-04-05 change.
9318 * lisp.h (have_menus_p): Remove prototype. This function is
9319 replaced with platform-independent window_system_available.
9320 (check_window_system): Move to...
9321 * frame.h (decode_window_system_frame, window_system_available):
9322 ...here, add new prototypes.
9323 * frame.c (window_system_available, decode_window_system_frame):
9324 New functions.
9325 (check_window_system): Platform-independent now.
9326 * xterm.h (x_in_use): Remove declaration.
9327 (check_x_frame):
9328 * w32term.h (check_x_frame):
9329 * nsterm.h (check_x_frame): Remove prototypes. This function
9330 is replaced with platform-independent decode_window_system_frame.
9331 * msdos.c (have_menus_p): Remove.
9332 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
9333 Remove platform-specific functions. Use check_window_system,
9334 decode_window_system_frame and check_ns_display_info where
9335 appropriate. Minor style and comment tweaks.
9336 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
9337 (check_x_frame): Likewise.
9338 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
9339 Likewise.
9340 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
9341 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
9342 * xmenu.c, xselect.c: All related users changed.
9343
9344 2013-04-03 Kenichi Handa <handa@gnu.org>
9345
9346 The following changes is to optimize the code for reading UTF-8
9347 files.
9348
9349 * coding.c (check_ascii): Rename from detect_ascii. Return value
9350 changed. Check EOL format. Do not call adjust_coding_eol_type
9351 here.
9352 (check_utf_8): New function.
9353 (adjust_coding_eol_type): Do nothing if already adjusted.
9354 (detect_coding): Compare the return value of check_ascii with
9355 coding->src_bytes. Call adjust_coding_eol_type if necessary.
9356 (decode_coding_gap): Optimize for valid UTF-8.
9357
9358 2013-03-21 Kenichi Handa <handa@gnu.org>
9359
9360 * coding.c (syms_of_coding): Cancel previous change.
9361
9362 * insdel.c (insert_from_gap): Fix previous change.
9363
9364 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
9365
9366 Consistently use platform-specific function to detect window system.
9367 * lisp.h (check_window_system): New prototype. This function is
9368 going to replace check_x, check_w32 and check_ns.
9369 (have_menus_p): Mention msdos.c in comment.
9370 * fontset.c (check_window_system_func): Remove. Adjust all users.
9371 * fontset.h (check_window_system_func): Remove prototype.
9372 * nsterm.h (check_ns):
9373 * xterm.h (check_x):
9374 * w32term.h (check_w32): Likewise.
9375 * menu.c (Fx_popup_menu): Use check_window_system.
9376 * msdos.c (check_window_system): Define for MS-DOS.
9377 * nsfns.m (check_window_system): Define for NS. Adjust all users.
9378 * w32fns.c (check_window_system): Likewise for MS-Windows.
9379 * xfns.c (check_window_system): Likewise for X.
9380 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
9381 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
9382
9383 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
9384
9385 Prefer < to > in range checks such as 0 <= i && i < N.
9386 This makes it easier to visualize quantities on a number line.
9387 This patch doesn't apply to all such range checks,
9388 only to the range checks affected by the 2013-03-24 change.
9389 This patch reverts most of the 2013-03-24 change.
9390 * alloc.c (xpalloc, Fgarbage_collect):
9391 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
9392 * character.c (string_escape_byte8):
9393 * charset.c (read_hex):
9394 * data.c (cons_to_unsigned):
9395 * dispnew.c (update_frame_1):
9396 * doc.c (Fsubstitute_command_keys):
9397 * doprnt.c (doprnt):
9398 * editfns.c (hi_time, decode_time_components):
9399 * fileio.c (file_offset):
9400 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
9401 * font.c (font_intern_prop):
9402 * frame.c (x_set_alpha):
9403 * gtkutil.c (get_utf8_string):
9404 * indent.c (check_display_width):
9405 * keymap.c (Fkey_description):
9406 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
9407 * lread.c (read1):
9408 * minibuf.c (read_minibuf_noninteractive):
9409 * process.c (wait_reading_process_output):
9410 * search.c (Freplace_match):
9411 * window.c (get_phys_cursor_glyph):
9412 * xdisp.c (redisplay_internal):
9413 * xsmfns.c (smc_save_yourself_CB):
9414 Prefer < to > for range checks.
9415 * dispnew.c (sit_for): Don't mishandle NaNs.
9416 This fixes a bug introduced in the 2013-03-24 change.
9417 * editfns.c (decode_time_components): Don't hoist comparison.
9418 This fixes another bug introduced in the 2013-03-24 change.
9419
9420 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
9421
9422 * frame.h (struct frame): Drop scroll_bottom_vpos
9423 member becaue all real users are dead long ago.
9424 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
9425 * xdisp.c (redisplay_internal): Adjust user.
9426
9427 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
9428
9429 * nsmenu.m (showAtX:Y:for:): setLevel to
9430 NSPopUpMenuWindowLevel (Bug#13998).
9431
9432 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
9433
9434 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
9435 (ns_check_pending_open_menu): Declare.
9436
9437 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
9438 (x_activate_menubar): Update the menu with title that matches
9439 ns_get_pending_menu_title, and call
9440 ns_check_pending_openmenu (Bug#12698).
9441 (menuWillOpen:): New method.
9442 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
9443
9444 * nsterm.m (menu_will_open_state, menu_mouse_point)
9445 (menu_pending_title): New varaibles.
9446 (ns_get_pending_menu_title, ns_check_menu_open)
9447 (ns_check_pending_open_menu): New functions.
9448
9449 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
9450
9451 * indent.c (current_column_bol_cache): Remove leftover which is not
9452 used in Fmove_to_column any more.
9453 (current_column, scan_for_column): Adjust users.
9454 * keyboard.c (last_point_position_buffer, last_point_position_window):
9455 Remove leftovers which are not used for recording undo any more.
9456 (command_loop_1, syms_of_keyboard): Adjust users.
9457 * xdisp.c (last_max_ascent): Remove leftover which is not used in
9458 redisplay_window any more.
9459 (move_it_to): Adjust user.
9460
9461 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
9462
9463 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
9464 Update dependencies.
9465
9466 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9467
9468 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
9469 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
9470 forward references.
9471
9472 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
9473
9474 * window.h (struct window): Replace hchild, vchild and buffer slots
9475 with a single slot 'contents'. This is possible because each valid
9476 window may have either the child window (in vertical or horizontal
9477 combination) or buffer to display (for the leaf window). Using that,
9478 a lot of operations to traverse and/or change window hierarchies may
9479 be simplified. New member horizontal is used to distinguish between
9480 horizontal and vertical combinations of internal windows.
9481 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
9482 (WINDOW_VERTICAL_COMBINATION_P): New macros.
9483 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
9484 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
9485 Use contents slot, not buffer, where appropriate.
9486 (wset_combination): New function.
9487 (wset_buffer): Add eassert.
9488 (Fframe_first_window): Simplify the loop reaching first window.
9489 (Fwindow_buffer): Use WINDOW_LEAF_P.
9490 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
9491 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
9492 (unshow_buffer): Convert initial debugging check to eassert.
9493 (replace_window, recombine_windows, Fdelete_other_windows_internal)
9494 (make_parent_window, window_resize_check, window_resize_apply)
9495 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
9496 (Fset_window_configuration, delete_all_child_windows, save_window_save):
9497 Adjust to match struct window changes.
9498 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
9499 (mark_window_cursors_off, count_windows, get_leaf_windows)
9500 (foreach_window_1): Simplify the loop.
9501 * alloc.c (mark_object): Do not check for the leaf window because
9502 internal windows has no glyph matrices anyway.
9503 * dispnew.c (clear_window_matrices, showing_window_margins_p)
9504 (allocate_matrices_for_window_redisplay, fake_current_matrices)
9505 (allocate_matrices_for_frame_redisplay, free_window_matrices)
9506 (build_frame_matrix_from_window_tree, mirror_make_current)
9507 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
9508 (update_window_tree, set_window_update_flags): Simplify the loop.
9509 (sync_window_with_frame_matrix_rows): Enforce live window.
9510 Use contents slot, not buffer, where appropriate.
9511 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
9512 and WINDOW_HORIZONTAL_COMBINATION_P.
9513 (make_frame_visible_1): Simplify the loop.
9514 Use contents slot, not buffer, where appropriate.
9515 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
9516 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
9517 (expose_window_tree): Likewise.
9518 Use contents slot, not buffer, where appropriate.
9519 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
9520 to avoid deleted windows. Use contents slot instead of buffer.
9521 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
9522 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
9523 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
9524 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
9525
9526 2013-03-28 Eli Zaretskii <eliz@gnu.org>
9527
9528 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
9529 identify the reasons for assertion violations in bug#14062 and
9530 similar ones.
9531 (Fx_show_tip): Fix compilation error under
9532 "--enable-check-lisp-object-type". (Bug#14073)
9533
9534 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
9535 Reported by <rzl24ozi@gmail.com>.
9536
9537 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
9538
9539 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
9540 start marker...
9541 (unwind_with_echo_area_buffer): ...to restore it here.
9542 This is needed to ensure that...
9543 (redisplay_window): ...both window markers are valid here,
9544 which is verified by eassert.
9545 * editfns.c (save_excursion_save): Do not assume that
9546 selected_window always displays the buffer.
9547 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
9548 Fix comment.
9549
9550 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
9551
9552 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
9553 the upcase table.
9554
9555 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
9556
9557 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
9558
9559 2013-03-27 Eli Zaretskii <eliz@gnu.org>
9560
9561 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
9562 since MinGW's w32api headers do. This avoids compiler warnings.
9563
9564 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
9565 if already defined.
9566
9567 2013-03-26 Eli Zaretskii <eliz@gnu.org>
9568
9569 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
9570
9571 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
9572
9573 * gtkutil.c (style_changed_cb): Check if frame is live and an
9574 X frame (Bug#14038).
9575
9576 2013-03-26 Eli Zaretskii <eliz@gnu.org>
9577
9578 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
9579 Define only for _WIN32_WINNT less than 0x0500.
9580 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
9581 MinGW64.
9582 Move inclusion of time.h before sys/time.h, so that MinGW64 could
9583 see its own definitions of 'struct timeval' and 'struct timezone'.
9584
9585 Fix incompatibilities between MinGW.org and MinGW64 headers.
9586 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
9587
9588 * w32.c (REPARSE_DATA_BUFFER): Guard with
9589 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
9590
9591 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
9592
9593 * xterm.c: Include X11/XKBlib.h
9594 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
9595
9596 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
9597
9598 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
9599 written backwards.
9600 * blockinput.h (input_blocked_p): Likewise.
9601 * bytecode.c (exec_byte_code): Likewise.
9602 * callproc.c (call_process_kill, call_process_cleanup)
9603 (Fcall_process): Likewise.
9604 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
9605 (Fccl_execute_on_string): Likewise.
9606 * character.c (string_escape_byte8): Likewise.
9607 * charset.c (read_hex): Likewise.
9608 * cm.c (calccost): Likewise.
9609 * data.c (cons_to_unsigned): Likewise.
9610 * dired.c (directory_files_internal, file_name_completion):
9611 Likewise.
9612 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
9613 (sit_for): Likewise.
9614 * doc.c (Fsubstitute_command_keys): Likewise.
9615 * doprnt.c (doprnt): Likewise.
9616 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
9617 * emacsgtkfixed.c: Likewise.
9618 * fileio.c (file_offset, Fwrite_region): Likewise.
9619 * floatfns.c (Fexpt, fmod_float): Likewise.
9620 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
9621 Likewise.
9622 * font.c (font_intern_prop): Likewise.
9623 * frame.c (x_set_alpha): Likewise.
9624 * gtkutil.c (get_utf8_string): Likewise.
9625 * indent.c (check_display_width): Likewise.
9626 * intervals.c (create_root_interval, rotate_right, rotate_left)
9627 (split_interval_right, split_interval_left)
9628 (adjust_intervals_for_insertion, delete_node)
9629 (interval_deletion_adjustment, adjust_intervals_for_deletion)
9630 (merge_interval_right, merge_interval_left, copy_intervals)
9631 (set_intervals_multibyte_1): Likewise.
9632 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
9633 * keymap.c (Fkey_description): Likewise.
9634 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
9635 * lread.c (openp, read_integer, read1, string_to_number):
9636 Likewise.
9637 * menu.c (ensure_menu_items): Likewise.
9638 * minibuf.c (read_minibuf_noninteractive): Likewise.
9639 * print.c (printchar, strout): Likewise.
9640 * process.c (create_process, Faccept_process_output)
9641 (wait_reading_process_output, read_process_output, send_process)
9642 (wait_reading_process_output): Likewise.
9643 * profiler.c (make_log, handle_profiler_signal): Likewise.
9644 * regex.c (re_exec): Likewise.
9645 * regex.h: Likewise.
9646 * search.c (looking_at_1, Freplace_match): Likewise.
9647 * sysdep.c (get_child_status, procfs_ttyname)
9648 (procfs_get_total_memory): Likewise.
9649 * systime.h (EMACS_TIME_VALID_P): Likewise.
9650 * term.c (dissociate_if_controlling_tty): Likewise.
9651 * window.c (get_phys_cursor_glyph): Likewise.
9652 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
9653 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
9654 Likewise.
9655 * xfns.c (Fx_window_property): Likewise.
9656 * xmenu.c (set_frame_menubar): Likewise.
9657 * xselect.c (x_get_window_property, x_handle_dnd_message):
9658 Likewise.
9659 * xsmfns.c (smc_save_yourself_CB): Likewise.
9660 * xterm.c (x_scroll_bar_set_handle): Likewise.
9661
9662 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
9663
9664 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
9665 to be optional or nil. Adjust comment and convert it to docstring.
9666 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
9667 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
9668
9669 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
9670
9671 Static checking by GCC 4.8-20130319.
9672 * image.c (gif_load): Assume pass < 3 to pacify GCC.
9673 * process.c (Fset_process_datagram_address)
9674 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
9675 * xdisp.c (get_char_face_and_encoding)
9676 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
9677 (get_glyph_face_and_encoding): Prepare face before possibly using it.
9678 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
9679
9680 2013-03-24 Ken Brown <kbrown@cornell.edu>
9681
9682 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
9683 fix compilation on 64-bit Cygwin, where underscores are not
9684 automatically prepended.
9685
9686 * w32term.c (w32_initialize): Silence compiler warning.
9687
9688 2013-03-23 Eli Zaretskii <eliz@gnu.org>
9689
9690 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
9691 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
9692 variables, to save and restore frame dimensions.
9693 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
9694 after returning from a 'fullscreen' configuration.
9695 use SendMessage instead of PostMessage to send the SC_RESTORE message,
9696 to avoid races between the main thread and the input thread.
9697
9698 * w32term.h (struct w32_output): New members normal_width,
9699 normal_height, normal_top, normal_left, and prev_fsmode.
9700 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
9701 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
9702 members of a frame.
9703
9704 * w32term.c (w32fullscreen_hook): Record last value of the frame's
9705 'fullscreen' parameter. Always record previous width and height
9706 of the frame, except when switching out of maximized modes, so
9707 that they could be restored correctly, instead of resetting to the
9708 default frame dimensions. Send SC_RESTORE command to the frame,
9709 unless we are going to send SC_MAXIMIZE, to restore the frame
9710 resize hints in the mouse pointer shown by the window manager.
9711 (Bug#14032)
9712
9713 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
9714
9715 * lisp.h (get_frame_param): Adjust conditions for prototype
9716 declaration.
9717
9718 2013-03-22 Ken Brown <kbrown@cornell.edu>
9719
9720 * unexcw.c: Drop unneeded inclusion of w32common.h.
9721 (report_sheap_usage): Declare.
9722 (read_exe_header): Add magic numbers for x86_64.
9723 (fixup_executable): Fix printf format specifier for unsigned long
9724 argument.
9725
9726 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
9727
9728 * frame.h (struct frame): Put menu_bar_window under #ifdef
9729 because this member is not needed when X toolkit is in use.
9730 (fset_menu_bar_window):
9731 * dispnew.c (clear_current_matrices, clear_desired_matrices)
9732 (free_glyphs, update_frame):
9733 * xdisp.c (expose_frame): Likewise.
9734 (display_menu_bar): Likewise. Remove redundant eassert.
9735 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
9736 toolkit is in use.
9737
9738 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
9739
9740 Use functions and constants to manipulate Lisp_Save_Value objects.
9741 This replaces code that used macros and strings and token-pasting.
9742 The change makes the C source a bit easier to follow,
9743 and shrinks the Emacs executable a bit.
9744 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
9745 (make_save_value): Change 1st arg from string to enum. All callers
9746 changed.
9747 (INTX): Remove.
9748 (mark_object): Use if, not #if, for GC_MARK_STACK.
9749 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
9750 (XSAVE_OBJECT): Now functions, not macros.
9751 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
9752 the constant was never used.
9753 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
9754 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
9755 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
9756 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
9757 New constants.
9758 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
9759 type3 with a single member save_type. All uses changed.
9760 (save_type, set_save_pointer, set_save_integer): New functions.
9761 * print.c (PRINTX): Remove.
9762
9763 * alloc.c: Remove redundant static declarations.
9764
9765 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
9766
9767 * window.h (struct window): Convert left_col, top_line, total_lines
9768 and total_cols from Lisp_Objects to integers. Adjust comments.
9769 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
9770 Remove.
9771 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
9772 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
9773 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
9774 Adjust users where appropriate.
9775
9776 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
9777
9778 * frame.h (struct frame): Drop resx and resy because the same data is
9779 available from window system-specific output context. Adjust users.
9780 (default_pixels_per_inch_x, default_pixels_per_inch_y):
9781 New functions to provide defaults when no window system available.
9782 (FRAME_RES_X, FRAME_RES_Y): New macros.
9783 (NUMVAL): Move from xdisp.c.
9784 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
9785 (Ffont_face_attributes, Fopen_font):
9786 * image.c (gs_load):
9787 * w32font.c (fill_in_logfont):
9788 * xdisp.c (calc_pixel_width_or_height):
9789 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
9790 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
9791
9792 2013-03-20 Kenichi Handa <handa@gnu.org>
9793
9794 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
9795 to 1 (temporary workaround until a bug related to ASCII
9796 optimization is fixed).
9797
9798 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
9799
9800 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
9801 Signal error if window is not internal. Adjust docstring.
9802 (delete_all_child_windows): Use combination_limit to save the buffer.
9803 (Fset_window_configuration): Adjust accordingly.
9804 * print.c (syms_of_print): Initialize debugging output not here...
9805 (init_print_once): ...but in a new function here.
9806 * lisp.h (init_print_once): Add prototype.
9807 * emacs.c (main): Add call to init_print_once. Adjust comments.
9808
9809 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
9810
9811 * window.c (window_resize_check, window_resize_apply)
9812 (window_from_coordinates, recombine_windows, set_window_buffer)
9813 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
9814 (Fsplit_window_internal, Fdelete_window_internal)
9815 (freeze_window_starts): Use bool for booleans.
9816 * window.h (window_frame_coordinates, resize_frame_windows)
9817 (freeze_window_starts, set_window_buffer): Adjust prototypes.
9818
9819 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
9820
9821 * dispnew.c (bitch_at_user): Use `user-error'.
9822
9823 2013-03-17 Ken Brown <kbrown@cornell.edu>
9824
9825 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
9826 as return type of image_background. (Bug#13981)
9827 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
9828
9829 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
9830
9831 * nsterm.m (updateFrameSize:): Change resize increments if needed.
9832 (ns_select): Don't return with result uninitialized.
9833
9834 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
9835 and getDirectory.
9836
9837 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
9838 New functions.
9839 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
9840 directories. If filename is nil, get directory name (Bug#13932).
9841 Use getFilename and getDirectory.
9842 (getFilename, getDirectory): New methods for EmacsSavePanel and
9843 EmacsOpenPanel.
9844 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
9845
9846 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
9847
9848 * coding.c (decode_coding_gap): Fix typo caught by static checking.
9849
9850 2013-03-15 Kenichi Handa <handa@gnu.org>
9851
9852 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
9853 (adjust_after_replace): Make it back to static. Delete the third
9854 arg text_at_gap_tail. Cancel the code for handling it.
9855
9856 * coding.h (struct coding_system): New member eol_seen.
9857
9858 * coding.c (detect_ascii): New function.
9859 (detect_coding): Set coding->head_ascii and coding->eol_seen only
9860 when the source bytes are actually scanned. On detecting for
9861 coding_category_utf_8_auto, call detect_ascii instead of scanning
9862 source bytes directly.
9863 (produce_chars): Call insert_from_gap with the new arg 0.
9864 (encode_coding): Likewise.
9865 (decode_coding_gap): Control ASCII optimization by the variable
9866 disable_ascii_optimization instead of #ifndef .. #endif.
9867 Deccode EOL format according to coding->eol_seen.
9868 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
9869 variable.
9870
9871 * lisp.h (adjust_after_replace): Cancel externing it.
9872 (insert_from_gap): Adjust prototype.
9873
9874 2013-03-15 Eli Zaretskii <eliz@gnu.org>
9875
9876 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
9877 FULLSCREEN_MAXIMIZED. (Bug#13935)
9878
9879 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
9880
9881 * region-cache.c (find_cache_boundary, move_cache_gap)
9882 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
9883 Simplify debugging check and convert to eassert. Adjust comment.
9884 (pp_cache): Put under ENABLE_CHECKING.
9885
9886 2013-03-14 Eli Zaretskii <eliz@gnu.org>
9887
9888 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
9889 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
9890 and WM_ACTIVATEAPP.
9891 (w32fullscreen_hook): If the frame is visible, reset
9892 f->want_fullscreen flag after changing the frame size. If the
9893 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
9894 (Bug#13953)
9895
9896 2013-03-13 Daniel Colascione <dancol@dancol.org>
9897
9898 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
9899 too so that these builds can use Cygwin's file conversion
9900 functions. (We've been building and linking cygw32.o all along
9901 and just not using it.)
9902
9903 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
9904
9905 File synchronization fixes (Bug#13944).
9906 * Makefile.in (LIB_FDATASYNC): New macro.
9907 (LIBES): Use it.
9908 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
9909 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
9910 Don't worry about HAVE_FSYNC, since a substitute fsync is
9911 available if the system lacks one.
9912 (Fwrite_regin): Retry fsync if interrupted.
9913
9914 2013-03-13 Eli Zaretskii <eliz@gnu.org>
9915
9916 * w32term.c (w32_read_socket): If the Emacs frame is being
9917 activated, call w32fullscreen_hook, to make sure the new frame
9918 dimensions are in effect. (Bug#13937)
9919
9920 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
9921
9922 * xdisp.c (init_iterator): Simplify because both character and byte
9923 positions are either specified or -1. Add eassert. Adjust comment.
9924 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
9925 character and byte positions can be obtained from marker.
9926
9927 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
9928
9929 Static checking by Sun C 5.12.
9930 * alloc.c (buffer_memory_full) [REL_ALLOC]:
9931 * bytecode.c (exec_byte_code):
9932 * dispnew.c (init_display):
9933 * eval.c (error):
9934 * fileio.c (Fsubstitute_in_file_name):
9935 * keyboard.c (Fevent_convert_list):
9936 * keymap.c (Fsingle_key_description):
9937 * term.c (maybe_fatal, fatal):
9938 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
9939 * xsmfns.c (Fhandle_save_session):
9940 Omit unreachable code.
9941 * keymap.c (map_keymap_char_table_item): Cast void * to
9942 a function pointer type; the C Standard requires this.
9943
9944 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
9945 Include <sys/param.h> unconditionally, as that works elsewhere and
9946 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
9947 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
9948 and FreeBSD now.
9949
9950 See ChangeLog.12 for earlier changes.
9951
9952 ;; Local Variables:
9953 ;; coding: utf-8
9954 ;; End:
9955
9956 Copyright (C) 2011-2014 Free Software Foundation, Inc.
9957
9958 This file is part of GNU Emacs.
9959
9960 GNU Emacs is free software: you can redistribute it and/or modify
9961 it under the terms of the GNU General Public License as published by
9962 the Free Software Foundation, either version 3 of the License, or
9963 (at your option) any later version.
9964
9965 GNU Emacs is distributed in the hope that it will be useful,
9966 but WITHOUT ANY WARRANTY; without even the implied warranty of
9967 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9968 GNU General Public License for more details.
9969
9970 You should have received a copy of the GNU General Public License
9971 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.