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