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