]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Minor cleanups of str_collate fix.
[gnu-emacs] / src / ChangeLog
1 2014-08-25 Paul Eggert <eggert@cs.ucla.edu>
2
3 Minor cleanups of str_collate fix (Bug#18051).
4 * fns.c (str_collate): Move decl from here ...
5 * lisp.h (str_collate): ... to here.
6 * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
7 Remove unnecessary casts. Use SAFE_NALLOCA to avoid
8 potential problems with integer overflow. Don't assume
9 setlocale succeeds. Remove unnecessary test before restoring
10 locale via setlocale, and free the copied setlocale string
11 when done with it.
12
13 2014-08-24 Michael Albinus <michael.albinus@gmx.de>
14
15 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
16
17 * sysdep.c (str_collate): New function. (Bug#18051)
18
19 2014-08-23 Karol Ostrovsky <karol.ostrovsky@gmail.com> (tiny change)
20
21 * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
22 if the initial "rm -f" fails. This is for MinGW builds, where
23 MS-Windows will not allow deleting the executable file of a
24 running program.
25
26 2014-08-20 Eli Zaretskii <eliz@gnu.org>
27
28 * w32term.c (w32_scroll_bar_handle_click)
29 (w32_horizontal_scroll_bar_handle_click)
30 (x_scroll_bar_report_motion)
31 (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
32 SB_THUMBTRACK, use the 32-bit position information returned by
33 GetScrollInfo, not the 16-bit information returned in the Windows
34 message sent to us.
35
36 2014-08-19 Eli Zaretskii <eliz@gnu.org>
37
38 * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
39 second coordinate ('y') reported for dragging the horizontal
40 scroll bar thumb.
41
42 2014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
43
44 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
45 and text area-relative x-coordinates.
46
47 2014-08-17 Eli Zaretskii <eliz@gnu.org>
48
49 Avoid overwriting the reversed_p flags in the glyph matrices when
50 init_iterator or start_display are called.
51 * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
52 the glyph row here.
53 (tool_bar_height, redisplay_tool_bar, try_window)
54 (try_window_reusing_current_matrix, try_window_id)
55 (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
56 reversed_p flag of the iterator's glyph row where the glyph row
57 is going to be redrawn.
58
59 2014-08-16 Paul Eggert <eggert@cs.ucla.edu>
60
61 * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
62
63 2014-08-16 Martin Rudalics <rudalics@gmx.at>
64
65 * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
66 of emacs_event return length from si.nPage to si.nMax.
67 * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
68 interchange start and end of thumb.
69
70 2014-08-15 Ken Brown <kbrown@cornell.edu>
71
72 * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
73 ERRORCHECK mutexes. (Bug#18222)
74
75 2014-08-12 Martin Rudalics <rudalics@gmx.at>
76
77 * frame.c (set_menu_bar_lines_1): Remove.
78 (set_menu_bar_lines): Call change_frame_size instead of
79 set_menu_bar_lines_1.
80
81 2014-08-11 Jan Djärv <jan.h.d@swipnet.se>
82
83 * nsfns.m (Fx_create_frame): Call adjust_frame_size,
84 set f->official.
85
86 2014-08-11 Glenn Morris <rgm@gnu.org>
87
88 * fileio.c: Revert 2013-01-31 change, which chose coding system for
89 writing before backing up, since it causes a more serious problem
90 than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
91 (choose_write_coding_system): No longer callable from Lisp.
92 Move last piece back here from Fwrite_region.
93 (Fwrite_region, syms_of_fileio): Update for above changes.
94
95 2014-08-11 Martin Rudalics <rudalics@gmx.at>
96
97 * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
98 (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
99 (Fwindow_new_pixel, Fset_window_new_pixel)
100 (Fset_window_new_total, Fset_window_new_normal)
101 (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
102 See also:
103 http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
104
105 2014-08-11 Eli Zaretskii <eliz@gnu.org>
106
107 * fontset.c (Finternal_char_font): Recompute basic faces if the
108 frame's face cache was cleared. (Bug#18162)
109
110 2014-08-11 Dmitry Antipov <dmantipov@yandex.ru>
111
112 Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
113 * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
114 base buffer's undo list.
115
116 2014-08-10 Reuben Thomas <rrt@sc3d.org>
117
118 Fix a couple of recent inadvertent breaks of the MSDOS port.
119 * msdos.c: include required menu.h
120 * term.c: set correct menu_show_hook on MSDOS.
121
122 2014-08-10 Martin Rudalics <rudalics@gmx.at>
123
124 Fix handling of menu bar line on TTY frames (Bug#18136)
125 (Bug#18196).
126 * dispnew.c (handle_window_change_signal):
127 * keyboard.c (Fsuspend_emacs): Call change_frame_size with
128 frame's menu bar lines subtracted from height.
129 * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
130 frames.
131 (adjust_frame_size): Count in menu bar when setting FrameRows.
132 (make_terminal_frame): When setting up the frame's lines and
133 text height don't count in the menu bar.
134 (Fmake_terminal_frame): Call adjust_frame_size with menu bar
135 lines subtracted from height.
136 (do_switch_frame): Set tty's FrameRows to number of total lines
137 of frame.
138 (Fframe_pixel_height, Fframe_pixel_width): If no window system
139 is used, return total number of lines and columns.
140 * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
141 of FRAME_LINES.
142 * term.c (OUTPUT, tty_set_terminal_modes)
143 (tty_set_terminal_window, tty_set_scroll_region)
144 (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
145 (tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use
146 FRAME_TOTAL_LINES instead of FRAME_LINES.
147 (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
148 Call change_frame_size with frame's menu bar lines subtracted
149 from height.
150 * w32console.c (w32con_clear_to_end, w32con_clear_frame)
151 (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
152 FRAME_LINES.
153
154 2014-08-09 Reuben Thomas <rrt@sc3d.org>
155
156 * alloc.c (Fmemory_info): Remove a stray brace.
157 * process.c: Fix a comment typo.
158 * msdos.c:
159 * dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
160
161 2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
162
163 * widgetprv.h (EmacsFramePart): Remove font.
164
165 * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
166 (resources, setup_frame_cursor_bits): Remove unused variables and
167 functions, esp. wrt. font (Bug#18227).
168
169 2014-08-07 Paul Eggert <eggert@cs.ucla.edu>
170
171 * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
172
173 2014-08-07 Reuben Thomas <rrt@sc3d.org>
174
175 Refer to MS-DOS using the same name everywhere.
176
177 * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
178 commit.
179 * xfaces.c: ditto.
180
181 2014-08-05 Martin Rudalics <rudalics@gmx.at>
182
183 * w32term.c (w32_redeem_scroll_bar):
184 * xterm.c (XTredeem_scroll_bar): Revert part of last change by
185 not redeeming scroll bars that have been turned off.
186
187 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
188
189 * keyboard.c (safe_run_hooks): Follow the convenient style to bind
190 inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See
191 <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
192 (safe_run_hook_funcall): Adjust accordingly.
193
194 2014-08-04 Martin Rudalics <rudalics@gmx.at>
195
196 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition
197 correctly according to toolkit used.
198 * frame.c (make_initial_frame, make_terminal_frame)
199 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
200 (Vdefault_frame_horizontal_scroll_bars): Correctly condition
201 assignments according to presence of toolkit scrollbars.
202 * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition
203 correctly according to toolkit used.
204 * window.c (set_window_scroll_bars): Set horizontal scroll bar
205 only if toolkit supports it.
206 * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
207 present.
208 * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
209 non-toolkit builds.
210 (XTredeem_scroll_bar): Always redeem scroll bar if present.
211
212 2014-08-04 Dmitry Antipov <dmantipov@yandex.ru>
213
214 * keyboard.c (safe_run_hook_funcall): Avoid consing around
215 Vinhibit_quit and prefer internal_condition_case_n to pass args.
216 (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
217 (safe_run_hooks): Remove comment which is not relevant any more.
218
219 2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
220
221 Don't let big frames overrun the stack.
222 * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
223 Use SAFE_NALLOCA, not alloca.
224
225 Fix bug with clang + directory_files_internal + GC (Bug#16986).
226 * dired.c (directory_files_internal): Use a volatile variable
227 to prevent the compiler from optimizing away all copies of a local.
228 I wonder how many other GC-related bugs like this lurk elsewhere?
229
230 Avoid 100% CPU utilization on ssh session exit (Bug#17691).
231 * xterm.h (struct x_display_info): New member 'connection'.
232 * xterm.c (x_term_init, x_delete_terminal): Set and use it,
233 so that x_delete_terminal has a file descriptor to pass to
234 delete_keyboard_wait_descriptor.
235
236 Don't mishandle year-9999 dates (Bug#18176).
237 * editfns.c (decode_time_components): Store an invalid timespec
238 on overflow, instead of returning false, so that the caller can
239 distinguish overflow from other errors.
240 (lisp_time_argument, lisp_seconds_argument): If the time is out
241 of range, signal a time overflow instead of an invalid time spec.
242 * keyboard.c (decode_timer): Treat time overflow like other
243 timespec errors.
244
245 Avoid undefined behavior with signed left shift.
246 Caught by 'gcc -fsanitize=undefined'.
247 * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
248 * dispnew.c (line_hash_code, scrolling):
249 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
250 Use 'unsigned', not 'int', for line hashes.
251 (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
252
253 2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
254
255 Make compare-strings more compatible with old behavior (Bug#17903).
256 * fns.c (Fcompare_strings): Silently bring too-large ends into range.
257
258 2014-08-02 Jan Djärv <jan.h.d@swipnet.se>
259
260 * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
261 Don't add label between left and right buttons (Bug#18129).
262
263 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
264
265 Make functions static that no longer need to be extern.
266 * frame.c, frame.h (set_menu_bar_lines):
267 * keyboard.c (Qleftmost, Qrightmost):
268 * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
269 (x_set_internal_border_width):
270 Now static.
271
272 2014-08-01 Eli Zaretskii <eliz@gnu.org>
273
274 Fix display of R2L lines when the last character fits only partially.
275 See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
276 for the details.
277 * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
278 R2L row is visible only partially, give the row a negative x
279 offset.
280 (display_line): Fix the calculation of the glyph whose pixel width
281 is used to decide whether the last produced glyph fits on the
282 line. When the last glyph fits only partially, give the row a
283 negative x offset.
284
285 Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
286 * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
287 pixel width of the first glyph that is hscrolled from display.
288 (display_line): In R2L glyph rows, don't give a negative offset to
289 row->x when the first glyph begins before first_visible_x.
290
291 * xdisp.c (display_line): If called with iterator set up to write
292 to a marginal area, delay the call to handle_line_prefix until we
293 switch back to the text area. (Bug#18035)
294
295 * .gdbinit (xwindow): The members total_cols, total_lines,
296 left_col, and top_line are C integers (and has been so for the
297 last 1.5 years).
298
299 2014-08-01 Andreas Schwab <schwab@suse.de>
300
301 * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
302 kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
303
304 2014-08-01 Dmitry Antipov <dmantipov@yandex.ru>
305
306 * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
307 (timerfd_callback): Ignore weird events with no data. Add tight
308 assertions and comments.
309 (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
310 disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor.
311
312 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
313
314 * frame.c (x_set_frame_parameters): Fix typo in previous patch.
315 I had confused && with ||.
316
317 2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
318
319 Simplify timerfd configuration and fix some minor glitches.
320 * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
321 (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
322 Fall back on timer_create if timerfd_create fails at runtime.
323 (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
324 kernel primitives to do resolution. All uses removed.
325 (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
326 (turn_on_atimers): Clear timer_create-based timers too,
327 for consistency.
328
329 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
330 Without this change, the code can access the local variable 'width'
331 even when it has not been initialized, and likewise for 'height';
332 in either case this leads to undefined behavior.
333
334 2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
335
336 * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
337 necessary, put horizontal scroll bar resources as well. See
338 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
339 * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
340
341 2014-07-29 Dmitry Antipov <dmantipov@yandex.ru>
342
343 * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
344 background value to match the resource of its vertical counterpart.
345
346 2014-07-29 Martin Rudalics <rudalics@gmx.at>
347
348 * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
349 FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
350
351 2014-07-28 Martin Rudalics <rudalics@gmx.at>
352
353 * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
354 change that added the top margin height to the requested height
355 and revert (undocumented) part of 2014-07-28 change that changed
356 the logic of whether a size change occurred.
357
358 2014-07-28 Eli Zaretskii <eliz@gnu.org>
359
360 * .gdbinit (xwindow): The members total_cols, total_lines,
361 left_col, and top_line are C integers (and has been so for the
362 last 1.5 years).
363
364 * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
365 now C integers.
366
367 2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
368
369 On GNU/Linux, use timerfd for asynchronous timers.
370 * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
371 (toplevel): Rename alarm_timer_ok to special_timer_available.
372 [HAVE_TIMERFD]: Declare timerfd.
373 [HAVE_CLOCK_GETRES]: Declare resolution.
374 (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
375 system timer resolution.
376 (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
377 (timerfd_callback) [HAVE_TIMERFD]: New function.
378 (atimer_result, debug_timer_callback, Fdebug_timer_check)
379 [ENABLE_CHECKING]: New function for the sake of automated tests.
380 (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
381 [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
382 [ENABLE_CHECKING]: Defsubr test function.
383 * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
384 * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
385 * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
386
387 Fix --without-x build and pacify --enable-gcc-warnings.
388 Problems reported in Bug#18122 and Bug#18124.
389 * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
390 (frame_windows_min_size): Now static.
391 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
392 Define as no-op.
393 (adjust_frame_size): Always declare prototype.
394
395 Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
396 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
397 * atimer.c (timerfd_callback): Always read expiration data.
398 Add comment.
399 (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
400 * process.c (add_timer_wait_descriptor): Add timer descriptor
401 to input_wait_mask and non_process_wait_mask as well.
402
403 2014-07-28 Paul Eggert <eggert@cs.ucla.edu>
404
405 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
406
407 2014-07-27 Jan Djärv <jan.h.d@swipnet.se>
408
409 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
410 Reinstate code removed by the prevoius commit to this file.
411
412 2014-07-27 Martin Rudalics <rudalics@gmx.at>
413
414 * buffer.h (struct buffer): New fields scroll_bar_height and
415 horizontal_scroll_bar_type.
416 * buffer.c (bset_scroll_bar_height)
417 (bset_horizontal_scroll_bar_type): New functions.
418 (Fbuffer_swap_text): Handle old_pointm field.
419 (init_buffer_once): Set defaults for scroll_bar_height and
420 horizontal_scroll_bar_type.
421 (syms_of_buffer): New variables scroll_bar_height and
422 horizontal_scroll_bar_type.
423 * dispextern.h (window_part): Rename ON_SCROLL_BAR to
424 ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR.
425 (set_vertical_scroll_bar): Remove prototype.
426 (x_change_tool_bar_height): Add prototype.
427 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
428 (window_to_frame_vpos, update_frame_1, scrolling, init_display):
429 Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
430 and FRAME_LINES.
431 (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
432 (update_window): Start mode_line_row->y after horizontal scroll
433 bar.
434 (change_frame_size_1): Call adjust_frame_size.
435 (init_display): When changing the size of a tty frame do not
436 pass height of menu bar.
437 (Qframe_windows_min_size): New symbol.
438 * frame.h (struct frame): List tool bar fields after menu bar
439 fields. Add official, total_lines, horizontal_scroll_bars,
440 config_scroll_bar_height and config_scroll_bar_lines fields.
441 (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
442 (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
443 (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
444 (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
445 (FRAME_WINDOWS_HEIGHT): New macros.
446 (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
447 (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
448 (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
449 horizontal scroll bar.
450 (frame_inhibit_resize, adjust_frame_size)
451 (frame_windows_min_size): Add declarations.
452 (Qscroll_bar_height, Qhorizontal_scroll_bars)
453 (x_set_scroll_bar_default_height, x_set_left_fringe)
454 (x_set_right_fringe, x_set_vertical_scroll_bars)
455 (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
456 (x_set_scroll_bar_height): Add external declarations.
457 * frame.c: (frame_inhibit_resize, frame_windows_min_size)
458 (adjust_frame_size): New functions.
459 (make_frame): Initial horizontal_scroll_bars field. Use
460 SET_FRAME_LINES. Don't allow horizontal scroll bar in
461 minibuffer window.
462 (make_initial_frame, make_terminal_frame): No horizontal scroll
463 bar in initial and terminal frames. Use adjust_frame_size.
464 (Fframe_total_cols): Fix doc-string.
465 (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
466 (Fset_frame_height, Fset_frame_width, Fset_frame_size): Rewrite
467 using adjust_frame_size.
468 (Qscroll_bar_height, Qhorizontal_scroll_bars)
469 (Qframe_windows_min_size): New symbols.
470 (x_set_frame_parameters): Remove call of check_frame_size.
471 (x_report_frame_params): Return scroll_bar_height value.
472 (x_set_left_fringe, x_set_right_fringe): New functions.
473 (adjust_frame_height, x_set_internal_border_width)
474 (x_set_fringe_width): Remove.
475 (x_set_internal_border_width, x_set_vertical_scroll_bars)
476 (x_set_scroll_bar_width, x_set_right_divider_width)
477 (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
478 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): New
479 functions.
480 (x_figure_window_size): Rewrite to make frame display the
481 expected number of lines.
482 (Vdefault_frame_scroll_bars): Rewrite doc-string.
483 (Vdefault_frame_horizontal_scroll_bars)
484 (Vframe_initial_frame_tool_bar_height)
485 (frame_inhibit_implied_resize): New variables.
486 * fringe.c (compute_fringe_widths): Remove.
487 * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
488 (xg_create_horizontal_scroll_bar)
489 (xg_update_horizontal_scrollbar_pos)
490 (xg_set_toolkit_horizontal_scroll_bar_thumb)
491 (xg_get_default_scrollbar_height)
492 (xg_clear_under_internal_border): Extern.
493 * gtkutil.c (xg_frame_resized): Don't call
494 do_pending_window_change.
495 (xg_frame_set_char_size): Use adjust_frame_size.
496 (style_changed_cb): Call update_theme_scrollbar_height and
497 x_set_scroll_bar_default_height.
498 (x_wm_set_size_hint): Don't call check_frame_size.
499 (update_theme_scrollbar_height)
500 (xg_get_default_scrollbar_height)
501 (xg_create_horizontal_scroll_bar)
502 (xg_update_horizontal_scrollbar_pos)
503 (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
504 (xg_create_scroll_bar): Set horizontal slot of bar.
505 (xg_initialize): Call update_theme_scrollbar_height.
506 (xg_clear_under_internal_border): No more static.
507 * insdel.c (adjust_suspend_auto_hscroll): New function.
508 (adjust_markers_for_delete, adjust_markers_for_insert)
509 (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
510 * keyboard.c (readable_events, discard_mouse_events)
511 (make_lispy_event): Handle horizontal scroll bar click events.
512 (Fsuspend_emacs): When changing the size of a tty frame do not
513 pass height of menu bar.
514 (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
515 (Qright, Qleftmost, Qrightmost): New symbols.
516 * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
517 FRAME_LINES.
518 * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
519 * nsfns.m (x_set_internal_border_width): New function.
520 * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
521 Remove extended fringe code.
522 (x_set_window_size, x_new_font): Don't call
523 compute_fringe_widths.
524 * term.c (Fresume_tty): When changing the size of a tty frame do
525 not pass height of menu bar.
526 (clear_tty_hooks, set_tty_hooks): Clear
527 horizontal_scroll_bar_hook.
528 (init_tty): Frame has no horizontal scroll bars.
529 * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
530 scroll_bar_before_handle, scroll_bar_horizontal_handle,
531 scroll_bar_after_handle, scroll_bar_left_arrow,
532 scroll_bar_right_arrow, scroll_bar_to_leftmost and
533 scroll_bar_to_rightmost entries.
534 (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
535 (struct terminal): Add set_horizontal_scroll_bar_hook.
536 * w32console.c (initialize_w32_display): Clear
537 horizontal_scroll_bar_hook.
538 * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
539 FRAME_X_DISPLAY.
540 (x_clear_under_internal_border, x_set_internal_border_width):
541 New functions.
542 (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize. Set
543 windows_or_buffers_changed when adding the menu bar.
544 (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
545 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
546 (w32_createhscrollbar): New functions.
547 (w32_createscrollbar): Rename to w32_createvscrollbar.
548 (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
549 (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
550 WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR. Add
551 WM_EMACS_SHOWCURSOR.
552 (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
553 case do not artificially impose WM size hints. Handle
554 WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
555 by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
556 cases.
557 (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
558 WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
559 (unwind_create_frame_1): Remove.
560 (Fx_create_frame): Make both scrollbars the system standard
561 width and height. Use official field of frame structure to
562 inhibit running window-configuration-change-hook.
563 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
564 pixelwise. Handle frame's official field.
565 (w32_frame_parm_handlers): Remove x_set_fringe_width
566 entries. Add x_set_scroll_bar_height,
567 x_set_horizontal_scroll_bars, x_set_left_fringe and
568 x_set_right_fringe.
569 * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
570 pass height of menu bar to change_frame_size.
571 * w32menu.c (set_frame_menubar): Rewrite using
572 frame_inhibit_resize.
573 * w32term.h (struct w32_display_info): Add
574 horizontal_scroll_bar_cursor and cursor_display_counter.
575 (struct scroll_bar): Add horizontal.
576 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
577 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
578 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
579 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
580 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
581 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
582 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
583 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
584 (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): Define
585 instead of WM_EMACS_CREATESCROLLBAR.
586 (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
587 WND_SCROLLBAR_INDEX.
588 * w32term.c (horizontal_scroll_bar_min_handle)
589 (horizontal_scroll_bar_left_border)
590 (horizontal_scroll_bar_right_border): New integers.
591 (x_set_frame_alpha): Replace x_highlight_frame by
592 w32_focus_frame.
593 (x_window_to_scroll_bar): New argument "type". Update callers
594 accordingly.
595 (w32_set_horizontal_scroll_bar_thumb)
596 (x_horizontal_scroll_bar_report_motion)
597 (w32_set_horizontal_scroll_bar)
598 (w32_horizontal_scroll_bar_handle_click)
599 (x_horizontal_scroll_bar_report_motion): New functions.
600 (w32_mouse_position): Discriminate horizontal and vertical
601 scrollbar cases.
602 (my_create_scrollbar): Replace with two new functions
603 my_create_vscrollbar and my_create_hscrollbar.
604 (x_scroll_bar_create): New argument "horizontal". Update
605 callers accordingly.
606 (x_scroll_bar_remove, w32_condemn_scroll_bars)
607 (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
608 scroll bar case.
609 (w32_read_socket): Handle WM_HSCROLL cae.
610 (x_new_font): Don't recompute fringe widths. Use
611 frame_inhibit_resize. Calculate new menu bar height iff we
612 build without toolkit. Always clear under internal border.
613 (x_set_window_size): Don't check frame size or recompute
614 fringes. Reset fullscreen status before applying sizes. Always
615 resize as requested by pixelwise argument. Don't call
616 do_pending_window_change.
617 (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
618 (w32_initialize_display_info): Initialize dpyinfo's
619 horizontal_scroll_bar_cursor entry.
620 (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
621 (w32_initialize): Init horizontal_scroll_bar_min_handle and
622 horizontal_scroll_bar_left_border.
623 (w32fullscreen_hook): Intermittently resize window to normal
624 when switching from fullscreen to maximized state.
625 (run_window_configuration_change_hook): Don't run it if frame is
626 not official yet.
627 (unwind_change_frame): Remove.
628 (Fset_window_configuration): Rewrite using frame's official field.
629 * widget.c (set_frame_size): Don't call compute_fringe_widths.
630 (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
631 * window.h (struct window): New fields old_pointm,
632 horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
633 scroll_bar_height and suspend_auto_hscroll.
634 (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
635 New functions.
636 (sanitize_window_sizes): Extern.
637 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
638 (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
639 (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
640 (WINDOW_CONFIG_SCROLL_BAR_LINES)
641 (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): New
642 macros.
643 (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
644 (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
645 (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
646 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
647 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
648 (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
649 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
650 (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
651 * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
652 (Fwindow_old_point, sanitize_window_sizes): New functions.
653 (Qwindow_sanitize_window_sizes): New symbol.
654 (window_body_height): Count in horizontal scroll bar.
655 (set_window_hscroll, Fscroll_left, Fscroll_right): Set
656 suspend_auto_hscroll slot.
657 (Fwindow_inside_edges): Count fringes pixelwise.
658 (coordinates_in_window, Fcoordinates_in_window_p): Consider
659 horizontal scroll bar.
660 (check_frame_size, adjust_window_margins): Remove functions and
661 corresponding calls.
662 (set_window_buffer): Initialize old_pointm and horizontal scroll
663 bars.
664 (temp_output_buffer_show): Reset hscroll related fields.
665 Initialize old_pointm.
666 (make_parent_window): Initialize old_pointm.
667 (make_window): Initialize old_pointm, horizontal scroll bar type,
668 and scroll bar height.
669 (resize_frame_windows): Don't count top margin in new sizes.
670 Don't use safe sizes when shrinking a frame; let the window
671 manager do the clipping.
672 (Fsplit_window_internal): Inherit horizontal scroll bar type and
673 height.
674 (Fdelete_window_internal): Unchain old_pointm marker.
675 (window_scroll_pixel_based, Fscroll_other_window): Adjust
676 old_pointm.
677 (Fwindow_text_width, Fwindow_text_height): New argument
678 "pixelwise".
679 (struct saved_window): New fields, old_pointm, hscroll_whole,
680 suspend_auto_hscroll, scroll_bar_height and
681 horizontal_scroll_bar_type.
682 (Fset_window_configuration, save_window_save): Set new fields of
683 saved_window.
684 (apply_window_adjustment): Don't call adjust_window_margins.
685 (set_window_margins): Don't change margins if new sizes don't
686 fit into window.
687 (set_window_scroll_bars): New argument "horizontal_type".
688 Handle horizontal scroll bars. Don't change scroll bars if they
689 don't fit into window.
690 (Fset_window_scroll_bars): New argument "horizontal_type".
691 (Fwindow_scroll_bars): Return values for horizontal scroll bars.
692 (compare_window_configurations): Compare horizontal scroll bar
693 settings.
694 * xdisp.c (window_text_bottom_y, window_box_height): Count in
695 horizontal scroll bar height.
696 (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
697 instead of FRAME_LINES.
698 (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
699 ON_VERTICAL_SCROLL_BAR.
700 (with_echo_area_buffer): Initialize old_pointm.
701 (with_echo_area_buffer_unwind_data): Store old_pointm values in
702 vector.
703 (unwind_with_echo_area_buffer): Handle old_pointm.
704 (update_tool_bar): Set do_update when the tool bar window has at
705 least one line (since this is what the user sets).
706 (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
707 (redisplay_tool_bar): Return early when toolbar has zero lines.
708 Call x_change_tool_bar_height. Don't use max_tool_bar_height.
709 (hscroll_window_tree): Handle suspension of auto_hscroll and
710 old_pointm.
711 (set_horizontal_scroll_bar): New function.
712 (redisplay_window): Set ignore_mouse_drag_p when tool bar has
713 more than one line. Handle horizontal scroll bars.
714 (note_mouse_highlight): Handle horizontal scrol bars.
715 (expose_frame): Set dimensions of XRectangle from frame's text
716 sizes.
717 (Vvoid_text_area_pointer): Update doc-string.
718 * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
719 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
720 (x_set_internal_border_width): New functions.
721 (x_set_tool_bar_lines): Call x_change_tool_bar_height.
722 (unwind_create_frame_1): Remove.
723 (Fx_create_frame): Handle horizontal scroll bars. Use official
724 field of frame structure to inhibit running
725 window-configuration-change-hook.
726 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
727 pixelwise. Handle frame's official field.
728 (x_frame_parm_handlers): Add x_set_scroll_bar_height,
729 x_set_horizontal_scroll_bars, x_set_left_fringe,
730 x_set_right_fringe.
731 * xmenu.c (update_frame_menubar, free_frame_menubar): Use
732 adjust_frame_size.
733 * xterm.h (struct x_display_info): Add
734 horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
735 slots.
736 (struct scroll_bar): Add horizontal slot.
737 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
738 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
739 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
740 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
741 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
742 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
743 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
744 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
745 (x_clear_under_internal_border): Remove.
746 * xterm.c (XTmouse_position): Handle horizontal scroll bars.
747 (x_window_to_scroll_bar): New argument TYPE. Update callers.
748 (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
749 HORIZONTAL. Update callers.
750 (horizontal_action_hook_id): New action hook id.
751 (x_horizontal_scroll_bar_to_input_event)
752 (x_create_horizontal_toolkit_scroll_bar)
753 (xt_horizontal_action_hook)
754 (x_set_toolkit_horizontal_scroll_bar_thumb)
755 (XTset_horizontal_scroll_bar, x_net_wm_state)
756 (x_horizontal_scroll_bar_report_motion): New functions.
757 (xg_scroll_callback, x_scroll_bar_handle_click): Handle
758 horizontal scroll bars.
759 (SCROLL_BAR_HORIZONTAL_NAME): Define.
760 (XTset_vertical_scroll_bar): Attempt to clear areas not covered
761 by scroll bar.
762 (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite. Handle
763 horizontal scroll bars.
764 (handle_one_xevent): Handle horizontal scroll bar events. Call
765 x_net_wm_state.
766 (x_set_window_size_1, x_wm_set_size_hint): Don't call
767 check_frame_size.
768 (x_set_window_size): Don't call check_frame_size and
769 do_pending_window_change.
770 (x_term_init): Init horizontal_scroll_bar_cursor display info.
771 (x_create_terminal): Add set_horizontal_scroll_bar_hook.
772 (x_scroll_bar_set_handle): Add some checks when calling
773 x_clear_area.
774
775 2014-07-26 Paul Eggert <eggert@cs.ucla.edu>
776
777 Revert previous change.
778 There is certainly nothing wrong with writing code like 'lo <= i
779 && i <= hi', even if LO happens to a constant. There isn't even
780 anything wrong in general with writing 'a <= b' if A happens to
781 be a constant. At any rate stylistic changes shouldn't
782 be done like this without discussion.
783
784 2014-07-26 Andreas Schwab <schwab@linux-m68k.org>
785
786 * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
787 (Fgarbage_collect): Reorder conditions that are written backwards.
788 * data.c (cons_to_unsigned): Likewise.
789 * dispnew.c (update_frame_1, sit_for): Likewise.
790 * fileio.c (file_offset): Likewise.
791 * filelock.c (read_lock_data, lock_file): Likewise.
792 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
793 Likewise.
794 * font.c (font_intern_prop, font_style_symbolic): Likewise.
795 * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
796 * lread.c (read1): Likewise.
797 * minibuf.c (read_minibuf_noninteractive): Likewise.
798 * nsterm.m (x_set_frame_alpha): Likewise.
799 * process.c (wait_reading_process_output): Likewise.
800 * region-cache.c (delete_cache_boundaries): Likewise.
801 * xterm.c (x_set_frame_alpha): Likewise.
802
803 2014-07-25 Paul Eggert <eggert@cs.ucla.edu>
804
805 * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
806 Now static.
807
808 2014-07-26 Dmitry Antipov <dmantipov@yandex.ru>
809
810 * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
811 because atimer expiration is absolute rather than relative.
812
813 2014-07-25 Eli Zaretskii <eliz@gnu.org>
814
815 * w32term.h (current_popup_menu, menubar_in_use): Move
816 declarations from w32term.c.
817
818 2014-07-25 Martin Rudalics <rudalics@gmx.at>
819
820 * w32fns.c (menubar_in_use): No more static.
821 * w32term.c (current_popup_menu, menubar_in_use): Declare.
822
823 2014-07-25 Dmitry Antipov <dmantipov@yandex.ru>
824
825 Move hourglass machinery to RIF.
826 * dispextern.h (struct redisplay_interface): New members
827 show_hourglass and hide_hourglass. Indent comments.
828 (show_hourglass, hide_hourglass): Remove prototypes.
829 * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
830 (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
831 (ns_redisplay_interface): Add them.
832 * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
833 * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
834 (w32_arrow_cursor): New function to hack around non-GUI frames.
835 (w32_redisplay_interface): Add new functions.
836 * w32term.h (w32_arror_cursor): Add prototype.
837 * xdisp.c (show_hourglass): New function, refactored out from
838 platform-dependent code.
839 (cancel_hourglass): Now call to RIF function.
840 * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
841 * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
842 (x_redisplay_interface): Add new functions.
843
844 2014-07-24 Dmitry Antipov <dmantipov@yandex.ru>
845
846 Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
847 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
848 and complete previous change.
849 * frame.c (adjust_frame_height): New function.
850 (Fset_frame_height, Fset_frame_size): Use it.
851 (x_set_frame_parameters): Take frame top margin into account.
852
853 2014-07-23 Dmitry Antipov <dmantipov@yandex.ru>
854
855 * frame.c (Fset_frame_height): Take frame top margin into account.
856 Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
857 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
858
859 2014-07-22 Dmitry Antipov <dmantipov@yandex.ru>
860
861 * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
862 menubar_height as such. Tweak comment.
863 [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
864 scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
865 All related users changed.
866 (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
867 * xterm.c (handle_one_xevent):
868 * gtkutil.c (xg_event_is_for_menubar):
869 * xfns.c (x_window) [USE_X_TOOLKIT]:
870 * xmenu.c (set_frame_menubar, free_frame_menubar): Prefer
871 to use FRAME_MENUBAR_HEIGHT.
872
873 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
874
875 * frame.c (Fframe_parameters): Always report frame height without
876 menu and tool bar lines.
877
878 2014-07-21 Jan Djärv <jan.h.d@swipnet.se>
879
880 * nsterm.m (applicationDidFinishLaunching:): Call
881 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
882 (antialiasThresholdDidChange:): New method for EmacsApp.
883
884 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
885
886 * macfont.m (macfont_update_antialias_threshold): Remove static.
887
888 * macfont.h (macfont_update_antialias_threshold): Declare.
889
890 2014-07-21 Eli Zaretskii <eliz@gnu.org>
891
892 * w32select.c (setup_windows_coding_system): Apply
893 CODING_ANNOTATION_MASK to the common_flags member of struct
894 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
895
896 * w16select.c (Fw16_get_clipboard_data): Apply
897 CODING_ANNOTATION_MASK to the common_flags member of struct
898 coding_system.
899
900 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
901 buffer position where we are to start the iteration.
902 (handle_invisible_prop): Record in it->stop_charpos the position
903 where the invisible text ends. (Bug#18035)
904 (hscroll_window_tree): Don't try hscrolling windows whose cursor
905 row has zero buffer position as their start position. Reported by
906 martin rudalics <rudalics@gmx.at>.
907
908 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
909 infinite looping in redisplay when display lines don't have enough
910 space to display even a single character. (Bug#18036)
911
912 2014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
913
914 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
915 * xfns.c (x_window): Use it to allow xfree later.
916 (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users
917 where appropriate. Use bool for booleans and remove redundant checks.
918 (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
919 * xterm.c (x_free_frame_resources): Free shell_position.
920
921 2014-07-19 K. Handa <handa@gnu.org>
922
923 * xfaces.c (realize_x_face): Call font_load_for_lface with no
924 mandatory font spec (Bug#17973).
925
926 2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
927
928 * font.c (font_score): Return the worst score if the size of
929 ENTITY is wrong by more than a factor 2 (Bug#17973).
930
931 2014-07-18 Dmitry Antipov <dmantipov@yandex.ru>
932
933 * frame.c (frame_unspecified_color): New function
934 refactored out from ...
935 (Fframe_parameters, Fframe_parameter): ... adjusted users.
936 (x_fullscreen_adjust, set_frame_param): Move Windows-specific
937 function to ...
938 * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
939 * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
940 * lisp.h (set_frame_param): Remove prototype.
941 * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
942 * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
943 inlined from here.
944
945 Prefer 'x_display_info *' to 'Display *' in X selection code.
946 This helps to avoid unneeded calls to x_display_info_for_display.
947 * xterm.h (struct selection_input_event): Record 'x_display_info *'
948 instead of 'Display *'.
949 (SELECTION_EVENT_DPYINFO): New macro.
950 (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
951 it as an lvalue. Mention this in comment.
952 * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
953 * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
954 (selection_data_to_lisp_data, receive_incremental_selection):
955 Convert to use 'x_display_info *'. Adjust users where appropriate.
956 (lisp_data_to_selection_data): Likewise. Also pass 'struct
957 selection data *' as last arg to not return values in args.
958 (unexpect_property_change): Use common removal technique.
959
960 2014-07-17 Dmitry Antipov <dmantipov@yandex.ru>
961
962 * print.c (print_preprocess): Adjust to match changed
963 sub char-table structure and avoid crash (Bug#18038).
964
965 * data.c (wrong_choice): Not static any more.
966 * lisp.h (wrong_choice): Add prototype.
967 * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
968 Declare namebuf as such. Tweak comment.
969 [USE_GTK]: Likewise for tool_bar_position.
970 (fset_tool_bar_position) [USE_GTK]: Ditto.
971 (FRAME_TOOL_BAR_POSITION): New macro.
972 * frame.c (x_report_frame_params):
973 * gtkutil.c (update_frame_tool_bar):
974 * xfns.c (Fx_create_frame): Use it.
975 (x_set_tool_bar_position): Add meaningful diagnostic messages.
976
977 2014-07-16 Eli Zaretskii <eliz@gnu.org>
978
979 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
980 buffer's default-directory only if it is a string. (Bug#17986)
981
982 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
983
984 More precise control over values of some buffer-local variables.
985 * keyboard.c (Qvertical_scroll_bar):
986 * frame.c (Qleft, Qright): Move to ...
987 * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
988 * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
989 (syms_of_buffer): DEFSYM all of the above, attach special properties.
990 Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
991 vertical-scroll-bar, scroll-up-aggressively
992 and scroll-down-aggressively.
993 * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
994 Add declarations.
995 * nsfns.m, frame.h (Qleft, Qright):
996 * nsterm.m (Qleft): Remove declarations.
997 * gtkutil.c (toplevel): Include buffer.h.
998 * data.c (wrong_choice, wrong_range): New functions.
999 (store_symval_forwarding): Handle special properties of buffer-local
1000 variables and use functions from the above to signal error, if any.
1001
1002 * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
1003 values. Add comment.
1004 (struct frame): Re-arrange layout to avoid extra padding and use bit
1005 fields for output_method, want_fullscreen and vertical_scroll_bar_type.
1006 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
1007 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
1008 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
1009 Define as no-ops because there are no scroll bars anyway.
1010 * frame.c (make_frame, make_terminal_frame, make_initial_frame):
1011 Adjust users.
1012
1013 * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
1014 Add convenient setter.
1015 (font_put_frame_data, font_get_frame_data): Use it.
1016
1017 2014-07-15 Daiki Ueno <ueno@gnu.org>
1018
1019 * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
1020 pointer argument, before dereferencing.
1021 (XCHAR2B_BYTE2): Likewise.
1022
1023 2014-07-15 Dmitry Antipov <dmantipov@yandex.ru>
1024
1025 * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
1026 (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
1027 (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
1028 Use record_unwind_protect_int and avoid consing.
1029 (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
1030
1031 * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
1032
1033 2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
1034
1035 Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
1036 * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
1037 * emacs.c [MSDOS]:
1038 * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
1039 (main) [MSDOS]: Use SET_BINARY instead of setmode.
1040 * minibuf.c: Include binary-io.h instead of fcntl.h.
1041 (read_minibuf_noninteractive):
1042 Use set_binary_mode instead of handcrafted code.
1043 Don't call emacs_set_tty if emacs_get_tty failed.
1044 * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
1045 * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
1046 * w32.c (pipe2): Adjust eassert to include O_BINARY.
1047
1048 * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
1049 This works around a GCC compiler bug when Emacs is configured with
1050 --enable-gcc-warnings.
1051
1052 2014-07-14 Dmitry Antipov <dmantipov@yandex.ru>
1053
1054 * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
1055 or characters in string, respectively. Add comment.
1056 * fringe.c (Fdefine_fringe_bitmap):
1057 * fns.c (Fsubstring, substring_both): Use it.
1058 * keymap.c (Fdefine_key, Flookup_key):
1059 * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
1060
1061 * term.c (tty_menu_add_pane, tty_menu_add_selection):
1062 Use menu_item_width.
1063 (tty_menu_show): Simplify because tty_menu_create never return NULL.
1064
1065 2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
1066
1067 Improve behavior of 'bzr up; cd src; make -k'.
1068 * Makefile.in (top_srcdir): New var.
1069 (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
1070 Use '$(top_srcdir)' instead of '$(srcdir)/..';
1071 its expansion is a bit shorter.
1072 (../config.status): Actually build config.status instead of
1073 just complaining.
1074 (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
1075 New macros, copied and relocated from ../Makefile.in.
1076 ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
1077 (../config.status, Makefile): New dependencies and rules,
1078 copied with relocation from ../Makefile.in. This should be more
1079 likely to rebuild the build machinery properly if you do a 'make'
1080 in the src directory.
1081
1082 2014-07-12 Eli Zaretskii <eliz@gnu.org>
1083
1084 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
1085 than 1. (Bug#17962)
1086
1087 * w32fns.c (Fx_file_dialog): Mention in the doc string the
1088 behavior on Windows 7 and later when the function is repeatedly
1089 invoked with the same value of DIR. (Bug#17950)
1090
1091 * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
1092 string to match the one in w32fns.c.
1093
1094 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
1095 stdin to binary mode only if it is connected to a terminal.
1096
1097 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
1098
1099 Coalesce extern decls.
1100 * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
1101 * sysdep.c (emacs_get_tty, emacs_set_tty):
1102 Move duplicate extern decls from here ...
1103 * systty.h: ... to here, so that there's just one copy.
1104
1105 2014-07-11 Jan Djärv <jan.h.d@swipnet.se>
1106
1107 * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
1108
1109 * nsfns.m (Fns_popup_font_panel): Ditto.
1110
1111 2014-07-11 Eli Zaretskii <eliz@gnu.org>
1112
1113 * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
1114 not only on '\n'.
1115 [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
1116
1117 * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
1118 [DOS_NT]: Implement for WINDOWSNT.
1119
1120 * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
1121 unsigned.
1122
1123 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
1124
1125 * sysdep.c (suppress_echo_on_tty): New function.
1126 * minibuf.c (read_minibuf_noninteractive): Use it.
1127
1128 2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
1129
1130 * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
1131 sysinfo failed. Adjust docstring.
1132
1133 2014-07-11 Eli Zaretskii <eliz@gnu.org>
1134
1135 Implement memory-info for MS-DOS.
1136 * dosfns.c (dos_memory_info): New function.
1137 * dosfns.h (dos_memory_info): Add prototype.
1138 * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
1139 * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
1140 of doing some of its job.
1141
1142 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
1143 reference termios structure members.
1144
1145 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
1146
1147 * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
1148
1149 * minibuf.c (top): Include systty.h. Declare external
1150 emacs_get_tty and emacs_set_tty.
1151 (Vread_hide_char): New lisp variable.
1152 (read_minibuf_noninteractive): Hide characters with
1153 Vread_hide_char if it is a character. (Bug#17839)
1154
1155 2014-07-10 Eli Zaretskii <eliz@gnu.org>
1156
1157 Implement memory-info for MS-Windows.
1158 * w32.c (w32_memory_info): New function.
1159 * w32.h (w32_memory_info): Prototype it.
1160 * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
1161
1162 2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
1163
1164 * coding.h (struct coding_system): Remove 'error_positions' (unused)
1165 and 'errors' (set but unused) fields. Use bitfields for 'eol_seen',
1166 'mode', 'common_flags' and 'result' fields, adjust layout to avoid
1167 extra padding and shrink struct coding_system by 56 bytes (x86_64).
1168 * coding.c (decode_coding_utf_8, decode_coding_utf_16)
1169 (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
1170 (decode_coding_big5, decode_coding_charset, decode_coding)
1171 (encode_coding): Adjust users.
1172
1173 * alloc.c (Fmemory_info): New function.
1174
1175 2014-07-09 Paul Eggert <eggert@cs.ucla.edu>
1176
1177 * syntax.c (back_comment): Use more-natural location for label.
1178
1179 * font.c, font.h (font_unparse_fcname): Now static.
1180 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
1181
1182 2014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
1183
1184 Next minor cleanup of font subsystem.
1185 * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
1186 users) and FONT_FORMAT_INDEX (set by a few font drivers but never
1187 really used).
1188 (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
1189 unused.
1190 * ftfont.h (ftfont_font_format): Remove prototype.
1191 * ftfont.c (ftfont_font_format): Remove; now unused.
1192 (ftfont_open):
1193 * nsfont.m (nsfont_open):
1194 * w32font.c (w32font_open_internal):
1195 * w32uniscribe.c (uniscribe_open):
1196 * xfont.c (xfont_open):
1197 * xftfont.c (xftfont_open): All users changed.
1198
1199 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
1200 so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
1201
1202 2014-07-09 Eli Zaretskii <eliz@gnu.org>
1203
1204 * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
1205 x_produce_glyphs does when it generates a stretch glyph that
1206 represents a TAB. (Bug#17969)
1207
1208 * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
1209 and there is a display property at that position, don't call
1210 move_it_to to move to a position before window start. (Bug#17942)
1211 Fix condition for finding CHARPOS by the first call to move_it_to.
1212 (Bug#17944)
1213
1214 2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
1215
1216 * syntax.c (find_defun_start): Try the cache even
1217 if !open_paren_in_column_0_is_defun_start.
1218 (back_comment): If find_defun_start was pessimistic, use the
1219 scan_sexps_forward result to improve the cache (bug#16526).
1220
1221 2014-07-09 Eli Zaretskii <eliz@gnu.org>
1222
1223 * xdisp.c (redisplay_window): If redisplay of a window ends up
1224 with point in a partially visible line at end of the window, make
1225 sure the amended position of point actually has smaller Y
1226 coordinate; if not, give up and scroll the display. (Bug#17905)
1227
1228 * window.c (window_scroll_pixel_based): When point ends up at the
1229 last fully visible line, don't let move_it_to stop at the left
1230 edge of the line and dupe us into thinking point is inside the
1231 scroll margin.
1232
1233 * w32.c (network_interface_info): Make sure the argument is a
1234 Lisp string.
1235
1236 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
1237
1238 * process.c (read_and_dispose_of_process_output): Fix typo
1239 in previous patch: we want nonnegative fds, not nonzero fds.
1240
1241 2014-07-08 Dmitry Antipov <dmantipov@yandex.ru>
1242
1243 * chartab.c (char_table_translate): Move to...
1244 * character.h (char_table_translate): ... inline function here.
1245 Avoid Faref and assume that args are always valid. This helps to
1246 speedup search, which is especially important for a huge buffers.
1247 * lisp.h (char_table_translate): Remove prototype.
1248
1249 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
1250 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
1251 New function, with an intention to avoid code duplication between
1252 a few font drivers.
1253 * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
1254 Add prototype.
1255 * ftfont.c (ftfont_open):
1256 * macfont.m (macfont_open):
1257 * xftfont.c (xftfont_open): Use it.
1258
1259 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
1260
1261 * process.c: Add sanity checks for file descriptors (Bug#17844).
1262 (wait_reading_process_output, Fprocess_filter_multibyte_p):
1263 Check that infd is nonnegative before using it as an fd.
1264 (read_and_dispose_of_process_output, Fprocess_send_eof):
1265 Likewise, for outfd.
1266 (wait_reading_process_output): Omit unnecessary check of infd.
1267
1268 2014-07-07 Paul Eggert <eggert@cs.ucla.edu>
1269
1270 Minor fixups related to usage of the 'long' type.
1271 * gnutls.c (emacs_gnutls_handshake):
1272 * xfaces.c (dump_realized_face):
1273 Work even if 'long' is narrower than 'void *'.
1274 * termcap.c (scan_file):
1275 * xselect.c (x_decline_selection_request)
1276 (x_reply_selection_request, x_get_window_property):
1277 * xterm.c (x_set_frame_alpha):
1278 Remove unnecessary 'L' suffixes of integer constants.
1279 * xfns.c (hack_wm_protocols):
1280 * xselect.c (x_fill_property_data):
1281 * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
1282 Remove unnecessary casts to 'long'.
1283 (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
1284
1285 Minor ImageMagick safety fixes.
1286 * image.c (imagemagick_compute_animated_image):
1287 Remove useless assignment to local. Avoid problems if dest_width is 0.
1288 (imagemagick_load_image): Use int for pixel counts that can't
1289 exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns
1290 a row width greater than the image width (or greater than LONG_MAX!).
1291
1292 2014-07-04 K. Handa <handa@gnu.org>
1293
1294 * coding.c (MIN_CHARBUF_SIZE): Delete it.
1295 (MAX_CHARBUF_EXTRA_SIZE): New macro.
1296 (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
1297
1298 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru>
1299
1300 * font.h (struct font_driver): Remove get_outline and free_outline;
1301 not used by any font driver.
1302 * ftfont.c (ftfont_driver):
1303 * macfont.m (macfont_driver):
1304 * nsfont.m (nsfont_driver):
1305 * w32font.c (w32font_driver):
1306 * w32uniscribe.c (uniscribe_font_driver):
1307 * xfont.c (xfont_driver): Related users changed.
1308 * xselect.c (x_get_window_property): Use convenient xmalloc.
1309 Call to xfree only if some data was really allocated.
1310
1311 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
1312
1313 On MS-Windows, display busy cursor on all GUI frames.
1314 This is similar to what we have on X. Quickly tested by Dani Moncayo.
1315 * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
1316 (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
1317 Likewise.
1318 (hide_hourglass, show_hourglass): Redesign to match X counterparts.
1319 * xdisp.c (start_hourglass): Remove Windows-specific bits.
1320
1321 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
1322
1323 Use convenient alists to manage per-frame font driver-specific data.
1324 * frame.h (struct frame): Rename font_data_list to...
1325 [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
1326 * font.h (struct font_data_list): Remove; no longer need a special
1327 data type.
1328 (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
1329 Adjust prototypes.
1330 * font.c (font_put_frame_data, font_get_frame_data)
1331 [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
1332 management.
1333 * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
1334 Related users changed.
1335 * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
1336 Prefer convenient xmalloc and xfree.
1337
1338 2014-07-03 Eli Zaretskii <eliz@gnu.org>
1339
1340 * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
1341 the window whose glyph row is being prepared and a flag whether it
1342 is for mode/header line. Make sure the glyph row's marginal areas
1343 are in sync with what the window wants.
1344 (Bug#17892)
1345
1346 * xdisp.c (display_line, display_mode_line): Call
1347 prepare_desired_row with additional arguments, as appropriate.
1348
1349 * dispextern.h (prepare_desired_row): Adjust prototype.
1350
1351 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
1352
1353 * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
1354 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
1355 caused by xw_popup_dialog in daemon mode (Bug#17891).
1356
1357 2014-07-03 Eli Zaretskii <eliz@gnu.org>
1358
1359 * frame.c (do_switch_frame): When switching to another TTY frame,
1360 make sure FrameCols and FrameRows are in sync with the new frame's
1361 data. (Bug#17875)
1362
1363 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru>
1364
1365 Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
1366 * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
1367 min_char slots. Adjust comment.
1368 (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
1369 Add SUB_CHAR_TABLE_OFFSET member.
1370 (make_uninit_sub_char_table): New function.
1371 (toplevel): Add compile-time assert to verify suitable member layout
1372 in Lisp_Sub_Char_Table.
1373 * alloc.c (mark_char_table): Add extra argument to denote char table
1374 subtype. Adjust to match new layout of sub char-table.
1375 (mark_object): Always mark sub char-tables with mark_char_table.
1376 * chartab.c (make_sub_char_table, copy_sub_char_table)
1377 (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
1378 (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
1379 (map_sub_char_table_for_charset, uniprop_table_uncompress):
1380 All related users changed.
1381 * lread.c (read1): Adjust to match new layout of sub char-table.
1382 * print.c (print_object): Likewise (Bug#17898).
1383
1384 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
1385
1386 * keymap.c (get_keyelt): Simplify.
1387 (copy_keymap_item): Remove left-over code for when we had
1388 key-shortcut caches.
1389
1390 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
1391
1392 * nsterm.m (judge): EmacsScroller: Move dealloc code here.
1393 (dealloc): Remove for EmacsScroller.
1394
1395 * nsterm.h (EmacsScroller): Remove dealloc.
1396
1397 2014-06-30 Eli Zaretskii <eliz@gnu.org>
1398
1399 * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881)
1400
1401 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
1402
1403 * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
1404 when setNeedsDisplay is called so we don't trigger redisplay for every
1405 tool bar update.
1406
1407 * nsterm.m (any_help_event_p): New variable.
1408 (mouseMoved:): Set any_help_event_p to YES if help event is
1409 generated. Remove else with empty help event that triggered redisplay
1410 for every mouse move.
1411 (windowDidResignKey:): If any_help_event_p, generate empty help event.
1412
1413 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
1414
1415 * xfns.c (Qsuppress_icon): Remove; no real users.
1416 (syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
1417 * w32fns.c (Qsuppress_icon): Remove, for the same reason.
1418 (syms_of_w32fns): Don't DEFSYM it.
1419
1420 2014-06-29 Glenn Morris <rgm@gnu.org>
1421
1422 * Makefile.in (ns-app): Mark as PHONY.
1423
1424 2014-06-28 Glenn Morris <rgm@gnu.org>
1425
1426 * Makefile.in (mostlyclean): There are no libXMenu11.a,
1427 liblw.a in this directory.
1428
1429 2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
1430
1431 * coding.c (encode_coding_utf_8): Correctly count produced_chars
1432 also in unibyte case. (Bug#17865)
1433
1434 2014-06-28 K. Handa <handa@gnu.org>
1435
1436 * coding.c (MAX_CHARBUF_SIZE): Renamed from CHARBUF_SIZE.
1437 (MIN_CHARBUF_SIZE): New macro.
1438 (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
1439
1440 2014-06-27 Glenn Morris <rgm@gnu.org>
1441
1442 * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
1443 with an order-only dependence on bootstrap-emacs. (Bug#2151)
1444 (.el.elc): Replace suffix rule with pattern rule.
1445 (%.elc): New pattern rule, with order-only prerequisite.
1446 ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
1447 ($(lispsource)/loaddefs.el): Use an order-only prerequisite
1448 in place of BOOTSTRAPEMACS.
1449
1450 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
1451
1452 * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
1453
1454 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
1455
1456 Consistently use validate_subarray to verify substring.
1457 * fns.c (validate_substring): Not static any more. Adjust to
1458 use ptrdiff_t, not EMACS_INT, because string and vector limits
1459 can't exceed ptrdiff_t even if EMACS_INT is wider.
1460 (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
1461 (secure_hash): Adjust user.
1462 * lisp.h (validate_subarray): Add prototype.
1463 * coding.c (Fundecodable_char_position):
1464 * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
1465 Use validate_subarray. Adjust comment to mention substring.
1466
1467 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
1468
1469 Do not allow out-of-range character position in Fcompare_strings.
1470 * fns.c (validate_subarray): Add prototype.
1471 (Fcompare_substring): Use validate_subarray to check ranges.
1472 Adjust comment to mention that the semantics was changed. Also see
1473 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
1474
1475 2014-06-24 Paul Eggert <eggert@cs.ucla.edu>
1476
1477 Be more consistent about the 'Qfoo' naming convention.
1478 * image.c (Fimagemagick_types):
1479 * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
1480 * process.c (Fmake_network_process):
1481 Rename C local identifier 'Qfoo to avoid giving the false
1482 impression that it stands for the symbol 'foo'.
1483
1484 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru>
1485
1486 Simplify and cleanup character conversion stuff.
1487 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
1488 Remove prototypes.
1489 * character.c (multibyte_char_to_unibyte)
1490 (multibyte_char_to_unibyte_safe): Remove; no longer used.
1491 * character.h (make_char): Remove; unused.
1492 (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
1493 (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
1494 * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
1495 * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
1496 * search.c, term.c, xdisp.c, xterm.c: Related users changed.
1497
1498 2014-06-22 Mario Lang <mlang@delysid.org>
1499
1500 * w32fns.c (Fw32_shell_execute): The the -> the.
1501
1502 2014-06-22 Dmitry Antipov <dmantipov@yandex.ru>
1503
1504 * xmenu.c (mouse_position_for_popup):
1505 * xselect.c (mouse_position_for_drop): Do not duplicate ...
1506 * xfns.c (x_relative_mouse_position): ... and prefer this function.
1507 * menu.c (Fx_popup_menu):
1508 * xselect.c (x_handle_dnd_message): Adjust users.
1509 * menu.h (mouse_position_for_popup): Remove prototype.
1510 * xterm.h (x_relative_mouse_position): Add prototype.
1511 * xterm.c (x_find_topmost_parent): Break from the loop and do not
1512 call XFree if XQueryTree returns zero.
1513
1514 2014-06-21 Eli Zaretskii <eliz@gnu.org>
1515
1516 * indent.c (Fvertical_motion): Doc fix.
1517 Move to the goal column, if any, with a single call to
1518 move_it_in_display_line, not in two calls. Doing this with two
1519 calls causes move_it_in_display_line apply the line-prefix
1520 handling twice instead of just once. (Bug#17823)
1521
1522 2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
1523
1524 Port to OS X ACLs (Bug#17810).
1525 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
1526 ACL_TYPE_ACCESS) doesn't work.
1527
1528 2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
1529
1530 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
1531 before checking key-translation-map (bug#17659).
1532
1533 2014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
1534
1535 * font.c (font_make_object): Avoid dangling pointer which may
1536 crash GC (Bug#17771).
1537
1538 2014-06-21 Eli Zaretskii <eliz@gnu.org>
1539
1540 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
1541 prototype of DGifCloseFile as appropriate for older and newer
1542 versions of giflib.
1543 (gif_close): New function, encapsulates the differences in the
1544 calling sequence of DGifCloseFile before v5.1.0 and after it.
1545 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
1546 error string where appropriate. (Bug#17790)
1547
1548 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
1549 macro execution, make sure point didn't move since last complete
1550 redisplay, as the condition for using the glyph matrix
1551 information. (Bug#17777)
1552
1553 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
1554
1555 Minor cleanup of fonset code.
1556 * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
1557 (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
1558 (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
1559 (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
1560 (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
1561 (set_fontset_fallback): Reorder extra slots and avoid unused slots.
1562 (free_realized_fontset): Remove because a no-op since 2008.
1563 (free_face_fontset): Adjust user.
1564 (syms_of_fontset): Shrink fontset by one extra slot.
1565
1566 2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
1567
1568 Omit redundant extern decls.
1569 Most of this patch is from Dmitry Antipov, in:
1570 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
1571 * commands.h (update_mode_lines):
1572 * frame.h (Qbackground_color, Qforeground_color)
1573 (x_set_menu_bar_lines):
1574 * ftfont.c (ftfont_font_format):
1575 * intervals.h (Qkeymap, Qfont):
1576 * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
1577 * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
1578 (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
1579 (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
1580 (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
1581 (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
1582 (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
1583 (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
1584 (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
1585 (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
1586 (Qtool_bar, Qheader_line):
1587 * macros.c (Fexecute_kbd_macro):
1588 * xdisp.c (Ftool_bar_height, Ftool_bar_height):
1589 * xterm.c (x_delete_terminal, XSetIMValues):
1590 * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
1591 (x_implicitly_set_name, popup_activated)
1592 (widget_store_internal_border):
1593 Remove redundant decls.
1594 * frame.c [USE_X_TOOLKIT]: Include widget.h.
1595 * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
1596 Remove _Noreturn, as make-docfile now does that for us.
1597 * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
1598 (Qregion_extract_function): New decl.
1599 * window.c, xfns.c: Include menu.h.
1600
1601 2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
1602
1603 * callint.c (Fcall_interactively): Fix up last change (bug#17701).
1604
1605 2014-06-17 Dmitry Antipov <dmantipov@yandex.ru>
1606
1607 * fileio.c (Fread_file_name): Do not pass redundant args and ...
1608 * callint.c (read_file_name): ... convert to static here.
1609 * lisp.h (Fread_file_name): Do not EXFUN it.
1610 (STRING_COPYIN): Remove; unused.
1611 * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
1612 (char_composable_p): ... static function. All users changed.
1613 * eval.c (toplevel): Remove redundant #include directives.
1614 * xterm.c (x_initialize): Add static to match prototype.
1615 * ccl.c (Fccl_execute_on_string):
1616 * font.c (fon_intern_prop): Use make_specified_string.
1617
1618 2014-06-16 Paul Eggert <eggert@cs.ucla.edu>
1619
1620 * Makefile.in (ns-app): Fix typo that broke build on OS X.
1621 Reported by David Caldwell in:
1622 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
1623
1624 2014-06-16 Dmitry Antipov <dmantipov@yandex.ru>
1625
1626 Do not ask for XRender extension each time XFT font is opened.
1627 * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
1628 * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment.
1629
1630 2014-06-15 Glenn Morris <rgm@gnu.org>
1631
1632 * Makefile.in: Use `make -C' rather than `cd && make' throughout.
1633
1634 2014-06-15 Eli Zaretskii <eliz@gnu.org>
1635
1636 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
1637 information if we are in the middle of executing a keyboard macro,
1638 since redisplay doesn't update the screen until the macro is
1639 finished. (Bug#17777)
1640
1641 * alloc.c (cleanup_vector): Don't dereference a font driver
1642 pointer if it is NULL. (Bug#17771)
1643
1644 2014-06-13 Glenn Morris <rgm@gnu.org>
1645
1646 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
1647 ($(lispsource)/international/charprop.el)
1648 ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
1649 ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
1650 ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
1651 GNU make automatically passes command-line arguments to sub-makes.
1652
1653 2014-06-13 Paul Eggert <eggert@cs.ucla.edu>
1654
1655 Avoid hangs in accept-process-output (Bug#17647).
1656 * lisp.h, process.c (wait_reading_process_input):
1657 Return int, not bool. All uses changed.
1658 * process.c (SELECT_CANT_DO_WRITE_MASK):
1659 Remove macro, replacing with ...
1660 (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
1661 All uses changed.
1662 (status_notify): New arg WAIT_PROC. Return int, not void.
1663 All uses changed.
1664
1665 2014-06-13 Eli Zaretskii <eliz@gnu.org>
1666
1667 * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
1668 the frame is the initial frame, because the hook is not set up
1669 then, and Emacs crashes.
1670 Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
1671
1672 2014-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
1673
1674 * keymap.c (silly_event_symbol_error): Don't recommend the use
1675 of strings.
1676
1677 2014-06-11 Eli Zaretskii <eliz@gnu.org>
1678
1679 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
1680 matching overlay strings with 'cursor' property against buffer
1681 positions traversed in the glyph row. (Bug#17744)
1682
1683 2014-06-11 Jan Djärv <jan.h.d@swipnet.se>
1684
1685 * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
1686 on Cocoa.
1687
1688 * nsterm.m (run): Always compile for Cocoa. Use runtime check to
1689 determine 10.9 (Bug#17751).
1690
1691 * macfont.m (macfont_draw): Positions were not freed.
1692
1693 2014-06-10 Dmitry Antipov <dmantipov@yandex.ru>
1694
1695 * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
1696 * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
1697 function. Also adjust comment.
1698 * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
1699
1700 * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
1701 * font.c (font_done_for_face):
1702 * xface.c (realize_non_ascii_face): Adjust user.
1703 * font.h (struct font_driver): Convert 'prepare_face' to return
1704 void because its return value is never used anyway.
1705 * xfont.c (xfont_prepare_face): Return void.
1706 * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
1707 (xftfont_done_face): Use xfree.
1708
1709 * dispextern.h (last_tool_bar_item): Remove declaration.
1710 * frame.h (struct frame): New member last_tool_bar_item.
1711 * frame.c (make_frame): Initialize it.
1712 * xdisp.c (toplevel): Remove last_tool_bar_item.
1713 (handle_tool_bar_click, note_tool_bar_highlight):
1714 * w32term.c (w32_read_socket, w32_initialize):
1715 * xterm.c (handle_one_xevent, x_initialize): Adjust users.
1716
1717 * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
1718 * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
1719
1720 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
1721
1722 Say (accept-process-output P)'s result pertains to P if P is non-nil.
1723 * process.c (Faccept_process_output)
1724 (wait_reading_process_output): Mention that if PROCESS is non-nil,
1725 the return value is about PROCESS, not about other processes.
1726
1727 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru>
1728
1729 Further adjustments to mark_object and friends.
1730 Now the mark_object's stack is just 32 bytes on a 64-bit
1731 system, which means extra 20% off the stack usage.
1732 * alloc.c (mark_save_value): As before, refactored out from ...
1733 (mark_object): ... adjusted user. Also add comment.
1734
1735 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
1736
1737 Fix core dump after a dropped X connection (Bug#17704).
1738 * sysdep.c (stuff_char): Don't abort merely because the selected frame
1739 is dead, as we may be shutting down.
1740
1741 2014-06-08 Glenn Morris <rgm@gnu.org>
1742
1743 * fileio.c (write-region-inhibit-fsync): Doc tweak.
1744
1745 * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
1746
1747 2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
1748
1749 If a C name must be extern on some platforms, make it extern on all.
1750 * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
1751 (load_color):
1752 * font.h (ftxfont_driver) [HAVE_XFT]:
1753 * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
1754 * lisp.h (get_frame_param):
1755 * menu.h (tty_menu_show):
1756 * process.h (conv_sockaddr_to_lisp, catch_child_signal):
1757 * termhooks.h (encode_terminal_code):
1758 * xterm.h (x_menu_wait_for_event):
1759 Always declare.
1760 * frame.c (get_frame_param):
1761 * fringe.c (max_used_fringe_bitmap):
1762 * ftxfont.c (ftxfont_driver):
1763 * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
1764 * menu.c (menu_items_inuse):
1765 * process.c (conv_sockaddr_to_lisp, catch_child_signal):
1766 * term.c (encode_terminal_code, tty_menu_show):
1767 * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
1768 * xfaces.c (load_color):
1769 * xmenu.c (x_menu_wait_for_event):
1770 Now always extern.
1771
1772 2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
1773
1774 Change object marking routines to minimize stack usage.
1775 This change moves a few cold paths from mark_object to NO_INLINE
1776 functions and adjusts symbol marking loop. According to GCC 4.8.2
1777 -Wstack-usage, this reduces mark_object's stack usage from 80 to
1778 48 bytes on a 64-bit system. For a long byte-force-recompile runs,
1779 stack usage at the mark phase is reduced up to 28%. Surprisingly,
1780 it also gains up to 3% in speed (with default '-O2 -g3' flags).
1781 * alloc.c (mark_compiled, mark_localized_symbol): New functions,
1782 refactored out from ...
1783 (mark_object): ... adjusted user. Also mark symbols in a tight
1784 inner loop.
1785 (mark_face_cache): Add NO_INLINE.
1786
1787 2014-06-08 Eli Zaretskii <eliz@gnu.org>
1788
1789 * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
1790 contains garbage on WINDOWSNT (which could potentially infloop at
1791 exit).
1792
1793 Minimize cursor motion during TTY menu updates.
1794 * term.c (tty_menu_display): Don't position cursor here.
1795 Instead, pass the cursor coordinates to update_frame_with_menu.
1796 (tty_menu_activate): Send the hide cursor command only once in an
1797 iteration through the outer 'while' loop.
1798
1799 * dispnew.c (update_frame_1): Accept an additional argument
1800 SET_CURSOR_P, and position the cursor at the end of the frame
1801 update only if that argument is non-zero. All callers changed to
1802 provide the additional argument as non-zero, except for
1803 update_frame_with_menu.
1804 (update_frame_with_menu): Accept 2 additional arguments ROW and
1805 COL; if they are non-negative, instruct update_frame_1 not to
1806 position the cursor, and instead position it according to ROW and COL.
1807
1808 * dispextern.h (update_frame_with_menu): Update prototype.
1809
1810 2014-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
1811
1812 * callproc.c (call_process): Don't check read-only if we don't insert
1813 anything (bug#17666).
1814
1815 2014-06-08 Eli Zaretskii <eliz@gnu.org>
1816
1817 * dispnew.c (update_frame_with_menu): Set display_completed.
1818
1819 2014-06-07 Eli Zaretskii <eliz@gnu.org>
1820
1821 * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
1822 only for WINDOWSNT.
1823 * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
1824
1825 2014-06-06 Paul Eggert <eggert@cs.ucla.edu>
1826
1827 * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
1828 * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
1829
1830 2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
1831
1832 * window.c (Frecenter): Signal an error if window-buffer is not
1833 current-buffer.
1834
1835 * keyboard.c (make_lispy_position): Don't include a buffer position in
1836 mode/header-line mouse events.
1837
1838 * keyboard.c (read_char): Handle (t . <event>) in the second use of
1839 Vunread_command_events (bug#17650).
1840
1841 2014-06-06 Dmitry Antipov <dmantipov@yandex.ru>
1842
1843 * xterm.c (x_setup_pointer_blanking):
1844 Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
1845
1846 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru>
1847
1848 * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
1849 because it will be defined in generated config.h if needed.
1850
1851 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
1852
1853 Use terminal-specific hooks to display popup dialogs.
1854 * termhooks.h (struct terminal): New field popup_dialog_hook.
1855 * menu.c (emulate_dialog_with_menu): New function, refactored from ...
1856 (Fx_popup_dialog): ... adjusted user. Also remove old #if 0
1857 code and use popup_dialog_hook.
1858 * nsmenu.m (ns_popup_dialog): Make hook-compatible.
1859 * nsterm.h (ns_popup_dialog): Adjust prototype.
1860 * nsterm.m (ns_create_terminal):
1861 * w32term.c (w32_create_terminal):
1862 * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
1863 Setup popup_dialog_hook.
1864
1865 2014-06-04 Eli Zaretskii <eliz@gnu.org>
1866
1867 * w32heap.c (report_temacs_memory_usage): Improve the report by
1868 reporting the large blocks that are actually occupied at dump time.
1869
1870 * w32console.c (initialize_w32_display): Set the console
1871 menu_show_hook, otherwise TTY menus are broken on w32.
1872
1873 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
1874
1875 Use terminal-specific hooks to display menus.
1876 * termhooks.h (struct terminal): New field menu_show_hook.
1877 * menu.h (<anonymous enum>): Bit flags for menu hooks.
1878 (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
1879 Adjust prototypes.
1880 * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
1881 * nsmenu.m (ns_menu_show):
1882 * w32menu.c (w32_menu_show):
1883 * xmenu.c (x_menu_show):
1884 * term.c (tty_menu_show): Adjust to use bit flags.
1885 (set_tty_hooks): Set menu_show_hook.
1886 * xterm.c (x_create_terminal):
1887 * nsterm.m (ns_create_terminal):
1888 * msdos.c (initialize_msdos_display):
1889 * w32term.c (w32_create_terminal): Likewise.
1890
1891 2014-06-03 Juanma Barranquero <lekktu@gmail.com>
1892
1893 * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
1894
1895 2014-06-03 Eli Zaretskii <eliz@gnu.org>
1896
1897 * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
1898 (FD_SET): Don't define on WINDOWSNT.
1899
1900 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
1901
1902 * emacs.c: Include "sysselect.h", to define its inline functions.
1903 Problem reported by Glenn Morris in:
1904 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
1905
1906 Do not require libXt-devel when building with gtk.
1907 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
1908 dependency on libXt-devel.
1909 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
1910 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
1911 lwlib-widget.h now does this.
1912 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
1913
1914 2014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
1915
1916 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
1917 * process.c (add_read_fd, delete_read_fd, add_write_fd)
1918 (delete_write_fd, wait_reading_process_output):
1919 Remove now-redundant easserts.
1920 * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
1921 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1922 (fd_CLR, fd_ISSET, fd_SET): New inline functions.
1923 (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
1924
1925 2014-06-03 Eli Zaretskii <eliz@gnu.org>
1926
1927 * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
1928 HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
1929 (calloc): Don't undef, it is never defined.
1930 (HEAP_ENTRY_SHIFT): Remove unused macro.
1931
1932 * Makefile.in (C_HEAP_SWITCH): Remove.
1933 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
1934
1935 Fix MS-Windows build broken by menu changes on 2014-06-02.
1936 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
1937
1938 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
1939 Define instead of including ../lwlib/lwlib.h, which causes
1940 compilation errors due to missing X11 headers.
1941
1942 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
1943
1944 * process.c (wait_reading_process_output): Omit incorrect test of
1945 p->infd against zero. Add easserts for infd having a plausible value.
1946
1947 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
1948
1949 Adjust to match recent lwlib changes.
1950 * menu.h (xmalloc_widget_value): Replace by ...
1951 (make_widget_value): ... new prototype.
1952 * menu.c (xmalloc_widget_value): Replace by ...
1953 (make_widget_value): ... new function.
1954 (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
1955 * gtkutil.c (malloc_widget_value, free_widget_value):
1956 (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
1957 * keyboard.h (enum button_type, struct _widget_value):
1958 * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
1959 Likewise.
1960 * nsmenu.m (ns_update_menubar, ns_menu_show):
1961 * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
1962 * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
1963 * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
1964
1965 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
1966
1967 * image.c (x_query_frame_background_color)
1968 [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
1969 Fix --enable-gcc-warnings compilation without image libraries.
1970
1971 2014-06-02 Eli Zaretskii <eliz@gnu.org>
1972
1973 * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
1974 emulated break value only if it goes up.
1975 (sbrk): Add assertion that the INCREMENT argument is strictly
1976 zero. Improve and correct the commentary.
1977
1978 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
1979
1980 Improve AIX-related merge from emacs-24.
1981 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
1982 * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
1983 not on AIX; since we're on the trunk we can use enums more broadly.
1984
1985 * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
1986
1987 2014-06-02 Jan Djärv <jan.h.d@swipnet.se>
1988
1989 * xterm.c (xg_scroll_callback): Remove position, for jump set portion
1990 to min(value, whole).
1991
1992 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
1993
1994 Bring back the changes to GDB-visible symbols, but only on AIX.
1995 And only if it's not pre-4.2 GCC.
1996 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
1997 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
1998 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
1999 New macros.
2000
2001 2014-06-02 Eli Zaretskii <eliz@gnu.org>
2002
2003 * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
2004 with PT, not GPT. (Bug#16433)
2005
2006 Revert last changes to GDB-visible symbols.
2007 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
2008 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
2009 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
2010 Delete macros.
2011
2012 2014-06-02 Glenn Morris <rgm@gnu.org>
2013
2014 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
2015
2016 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
2017
2018 Fix port to 32-bit AIX with xlc (Bug#17598).
2019 * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
2020 * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
2021 * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
2022 to work around a compiler bug in IBM xlc 12.1.
2023
2024 2014-06-02 Eli Zaretskii <eliz@gnu.org>
2025
2026 * xterm.c (x_update_window_end): Don't invalidate the entire
2027 mouse-highlight info, just signal frame_up_to_date_hook that mouse
2028 highlight needs to be redisplayed. (Bug#17588)
2029
2030 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
2031
2032 Port the GDB-visible symbols to AIX.
2033 Without them, GDB doesn't work to debug Emacs, since the AIX linker
2034 optimizes away the relevant external symbols. Use enums instead;
2035 this suffices for the AIX port, which is 32-bit-only anyway.
2036 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
2037 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
2038 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
2039 New macros.
2040
2041 Include sources used to create macuvs.h.
2042 * Makefile.in ($(srcdir)/macuvs.h): New rule.
2043 * macuvs.h: Use automatically-generated header.
2044
2045 2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
2046
2047 Port signal-handling to DragonFly BSD (Bug#17646).
2048 * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
2049 Move implementations from callproc.c to sysdep.c.
2050 * process.h, syssignal.h (block_child_signal, unblock_child_signal):
2051 Move declarations from process.h to syssignal.h.
2052
2053 2014-06-01 Juanma Barranquero <lekktu@gmail.com>
2054
2055 * callint.c (Ffuncall_interactively): Add usage.
2056
2057 2014-06-01 Jan Djärv <jan.h.d@swipnet.se>
2058
2059 * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
2060
2061 2014-05-30 Eli Zaretskii <eliz@gnu.org>
2062
2063 * w32heap.c (malloc_before_dump, malloc_after_dump)
2064 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
2065 (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
2066 set errno where appropriate to emulate CRT functions.
2067
2068 2014-05-30 Dmitry Antipov <dmantipov@yandex.ru>
2069
2070 Debugging facility to check whether 'const char *' points to
2071 relocatable data of non-pure Lisp string.
2072 * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
2073 (mark_maybe_pointer): ... adjusted user.
2074 (relocatable_string_data_p): New function.
2075 * lisp.h (relocatable_string_data_p): Add prototype.
2076 * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
2077 the pointer to relocatable Lisp data is not used.
2078
2079 2014-05-30 Paul Eggert <eggert@cs.ucla.edu>
2080
2081 Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
2082 * atimer.c (block_atimers):
2083 * callproc.c (block_child_signal): Block SIGINT too;
2084 otherwise, its handler might now unblock signals that it shouldn't.
2085 * keyboard.c (read_char): Clear signal mask, since we may
2086 be in a SIGINT handler, and many signals may be masked.
2087 * keyboard.c (handle_interrupt):
2088 * sysdep.c (handle_arith_signal):
2089 Clear signal mask instead of just unblocking the signal that
2090 was received, since several signals may be blocked at this point.
2091
2092 2014-05-29 Eli Zaretskii <eliz@gnu.org>
2093
2094 * Makefile.in (TEMACS_POST_LINK): Remove target.
2095 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
2096 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
2097
2098 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
2099
2100 * xmenu.c (xdialog_show): Remove prototype, rename to
2101 x_dialog_show, remove 2nd arg because it's always zero
2102 and simplify accordingly.
2103 (xw_popup_dialog): Adjust user.
2104 * w32menu.c (w32_dialog_show): Adjust prototype, remove
2105 2nd arg because it's always zero and simplify accordingly.
2106 (w32_popup_dialog): Adjust user.
2107
2108 2014-05-29 Eli Zaretskii <eliz@gnu.org>
2109
2110 * w32heap.c (report_temacs_memory_usage): New function.
2111
2112 * unexw32.c (unexec) [ENABLE_CHECKING]:
2113 Call report_temacs_memory_usage.
2114
2115 * w32heap.h (report_temacs_memory_usage): Add prototype.
2116
2117 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
2118
2119 Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
2120 * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
2121
2122 2014-05-29 Eli Zaretskii <eliz@gnu.org>
2123
2124 * buffer.c (init_buffer): Accept an argument 'initialized'.
2125 [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
2126 mmap_regions and mmap_fd, to avoid referencing stale data from the
2127 dump phase. Add an assertion for buffer text of buffers created
2128 in temacs before this function is called. (Bug#17622)
2129 (mmap_regions_1, mmap_fd_1): Remove unused variables.
2130
2131 * lisp.h (init_buffer): Update prototype.
2132
2133 * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
2134
2135 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
2136
2137 * alloc.c (Fgarbage_collect): Fix compilation with
2138 GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
2139
2140 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
2141
2142 * frame.c, frame.h (frame_char_to_pixel_position)
2143 (frame_set_mouse_position): Now static, and made private in
2144 frame.c rather than public in frame.h.
2145
2146 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
2147
2148 Refactor mouse positioning stuff to avoid code duplication.
2149 * frame.h (frame_char_to_pixel_position): New function.
2150 (x_set_mouse_position): Rename to...
2151 (frame_set_mouse_position): ...new function.
2152 (frame_set_mouse_pixel_position): Add prototype.
2153 * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
2154 Rename to frame_set_mouse_pixel_position.
2155 * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
2156 Adjust users.
2157 * xterm.h, w32term.h ( x_set_mouse_position)
2158 (x_set_mouse_pixel_position): Remove prototypes.
2159
2160 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
2161
2162 On X, always make pointer visible when deleting frame (Bug#17609).
2163 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
2164 Pass frame as arg.
2165 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
2166 Adjust prototypes.
2167 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
2168 * keyboard.c (gobble_input): If there is no terminal input error,
2169 make sure the pointer is visible for all frames on this terminal.
2170 * xterm.c (x_free_frame_resources): Enable pointer visibility if
2171 it was previously disabled.
2172
2173 2014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
2174
2175 * data.c (Fzerop): Move to Elisp.
2176 (syms_of_data): Don't defsubr it.
2177 * keyboard.c (echo_keystrokes_p): New function.
2178 (read_char, record_menu_key, read_key_sequence): Use it.
2179
2180 * callint.c (Qfuncall_interactively): New var.
2181 (Qcall_interactively): Remove.
2182 (Ffuncall_interactively): New function.
2183 (Fcall_interactively): Use it.
2184 (syms_of_callint): Defsubr it.
2185
2186 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
2187
2188 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
2189 relocated from under us.
2190
2191 2014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
2192
2193 Use mmap(2) emulation for allocating buffer text on MS-Windows.
2194 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
2195 configure.
2196 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
2197
2198 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
2199 for MinGW, since it no longer uses gmalloc.
2200
2201 * buffer.c: Do not define mmap allocations functions for Windows.
2202 Remove mmap_find which is unused. Remove mmap_set_vars which does
2203 nothing useful.
2204 [WINDOWSNT]: Include w32heap.h.
2205 (init_buffer): Always allocate new memory for buffers.
2206
2207 * emacs.c: Remove mmap_set_vars calls.
2208
2209 * image.c (free_image): Undef free for Windows because it is
2210 redirected to our private version.
2211
2212 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
2213 (copy_executable_and_dump_data): Remove dumping the heap section.
2214 (unexec): Restore using_dynamic_heap after dumping.
2215
2216 * w32heap.c (dumped_data_commit, malloc_after_dump)
2217 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
2218 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
2219 (mmap_free): New functions.
2220
2221 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
2222
2223 2014-05-27 Paul Eggert <eggert@cs.ucla.edu>
2224
2225 * image.c (imagemagick_load_image): Use MagickRealType for local
2226 'color_scale', instead of double, to avoid a GCC warning about
2227 double promotion.
2228
2229 * xfns.c (Fx_window_property): Remove unused local.
2230
2231 Don't kill already-reaped process (Bug#17561).
2232 * process.c (process_send_signal): Fix race condition where a
2233 subprocess was reaped by a signal handler between the check for
2234 liveness and calling 'kill', which meant that Emacs could in
2235 theory kill an innocent bystander process. Do the fix by blocking
2236 SIGCHLD in a critical section that checks liveness before killing.
2237
2238 2014-05-26 Eli Zaretskii <eliz@gnu.org>
2239
2240 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
2241
2242 2014-05-26 Ken Brown <kbrown@cornell.edu>
2243
2244 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
2245 even if !CYGWIN (see bug#17510).
2246
2247 2014-05-26 Jan Djärv <jan.h.d@swipnet.se>
2248
2249 * nsfns.m (Fns_do_applescript): Surround NSApp run
2250 with calls to ns_init_events, ns_finish_events (Bug#17424).
2251
2252 * nsterm.h (ns_init_events, ns_finish_events): Declare.
2253
2254 * nsterm.m (ns_init_events, ns_finish_events): New functions.
2255 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
2256
2257 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
2258 with calls to ns_init_events, ns_finish_events (Bug#17424).
2259
2260 2014-05-26 Eli Zaretskii <eliz@gnu.org>
2261
2262 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
2263 if we are iterating over an object that generates glyphs for
2264 marginal areas. (Bug#17585)
2265
2266 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
2267
2268 * xdisp.c (safe__call1, safe__eval): Now static.
2269
2270 2014-05-26 Eli Zaretskii <eliz@gnu.org>
2271
2272 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
2273 (safe_call, safe__call1): Construct a va_list argument for safe_call.
2274 (safe_call1): Call safe_call instead of safe__call directly.
2275
2276 2014-05-26 Ken Brown <kbrown@cornell.edu>
2277
2278 * w32term.c (x_delete_display) [CYGWIN]: Don't free
2279 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
2280 once. (Bug#17510)
2281
2282 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
2283
2284 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
2285 (safe__call, safe__call1, safe__eval): New functions.
2286 (safe_call): Use it.
2287 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
2288 (display_mode_element): Same for `:eval'.
2289
2290 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
2291
2292 Fix port to 32-bit AIX (Bug#17540).
2293 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
2294 twice. _text already includes this offset.
2295 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
2296
2297 2014-05-26 Eli Zaretskii <eliz@gnu.org>
2298
2299 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
2300 when closest_pos is identical to to_charpos, don't recurse, since
2301 we already tried that, and failed. (Bug#17539)
2302
2303 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
2304 unwinding when frame's faces were not initialized yet, increment
2305 the frame's image-cache reference count before calling
2306 x_free_frame_resources. Don't dereference
2307 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
2308
2309 2014-05-25 Jan Djärv <jan.h.d@swipnet.se>
2310
2311 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
2312 nsterm.m now.
2313
2314 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
2315 macfont.m, call draw with adjusted arguments so font drivers
2316 don't need to do that.
2317
2318 * macfont.m (macfont_draw): Merge changes from Macport.
2319
2320 2014-05-24 Eli Zaretskii <eliz@gnu.org>
2321
2322 * alloc.c (garbage_collect_1): New function, with all of the guts
2323 of Fgarbage_collect.
2324 (mark_stack): Accept an argument END and don't mark Lisp objects
2325 on the stack beyond the address given by END. Calculation of END
2326 was moved to Fgarbage_collect.
2327 (Fgarbage_collect): Calculate the end address of the stack portion
2328 that needs to be examined by mark_stack, and pass that address to
2329 garbage_collect_1, which will pass it to mark_stack.
2330 See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
2331 for more details about the underlying problems. In particular,
2332 this avoids dumping Emacs with the large hash-table whose value is
2333 held in purify-flag for most of the time loadup.el runs.
2334
2335 2014-05-24 Jan Djärv <jan.h.d@swipnet.se>
2336
2337 * xfns.c (x_window_property_intern): New function (code from
2338 x_window_property).
2339 (Fx_window_property): Call x_window_property_intern. If property
2340 not found and NILP (source) and outer window != inner window,
2341 check outer window for property (Bug#17537).
2342
2343 2014-05-22 Paul Eggert <eggert@cs.ucla.edu>
2344
2345 Supply malloc and alloc_size attributes for extern allocators.
2346 This documents the C API, and helps GCC generate a bit better code.
2347 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
2348 (ATTRIBUTE_MALLOC_SIZE): New macros.
2349 * gmalloc.c (malloc, realloc, calloc):
2350 * gtkutil.h (malloc_widget_value):
2351 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
2352 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
2353 Use them.
2354
2355 2014-05-21 Paul Eggert <eggert@cs.ucla.edu>
2356
2357 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
2358 * image.c (imagemagick_load_image): Port to hosts that do not use
2359 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
2360
2361 2014-05-21 Leo Liu <sdl.web@gmail.com>
2362
2363 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
2364
2365 2014-05-20 Michael Albinus <michael.albinus@gmx.de>
2366
2367 * dbusbind.c (xd_signature): Revert last 2 patches.
2368
2369 2014-05-19 Paul Eggert <eggert@cs.ucla.edu>
2370
2371 Allow any non-nil value to count as true in bool-vector.
2372 Likewise for xd_signature in dbusbind.c.
2373 This is more consistent with the usual practice in Emacs, which is
2374 that any non-nil value counts as true.
2375 * alloc.c (Fbool_vector): Don't require args to be t or nil.
2376 * dbusbind.c (xd_signature): Likewise, for booleans.
2377 * data.c, lisp.h (Qbooleanp):
2378 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
2379
2380 2014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
2381
2382 * lisp.h (CHECK_BOOLEAN): New function.
2383 * alloc.c (Fbool_vector): New function.
2384 (syms_of_alloc): Defsubr it.
2385 * data.c (Qbooleanp): New symbol.
2386 (syms_of_data): DEFSYM it.
2387 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
2388
2389 * font.c (font_matching_entity): Extract font-entity object
2390 from the vector of matching entities (Bug#17486).
2391
2392 2014-05-17 Paul Eggert <eggert@cs.ucla.edu>
2393
2394 Assume C99 or later (Bug#17487).
2395 * bytecode.c (B__dummy__): Remove.
2396 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
2397 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
2398 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
2399 * regex.c (DEBUG_PRINT): Assume varargs macros.
2400 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
2401
2402 2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
2403
2404 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
2405 memory for every buffer that was dumped.
2406
2407 2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
2408
2409 * fns.c (Freverse): Allow vectors, bool vectors and strings.
2410 (Fnreverse): Allow vectors and bool vectors.
2411
2412 2014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
2413
2414 Minor cleanup for terminal setup.
2415 * termhooks.h (create_terminal): Adjust prototype.
2416 * terminal.c (create_terminal): Pass output method and RIF as args.
2417 (init_initial_terminal):
2418 * nsterm.m (ns_create_terminal):
2419 * term.c (init_tty):
2420 * w32term.c (w32_create_terminal):
2421 * xterm.c (x_create_terminal): Adjust users.
2422 Avoid redundant NULL initializers and add comments.
2423
2424 2014-05-13 Paul Eggert <eggert@cs.ucla.edu>
2425
2426 * keyboard.c (Qdeactivate_mark): Now static.
2427
2428 2014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
2429
2430 If available, use Xfixes extension to do pointer blanking.
2431 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
2432 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
2433 (make_invisible_cursor): Move to...
2434 * xterm.c (make_invisible_cursor): ...here.
2435 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
2436 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
2437 (x_term_init): Call to x_setup_pointer_blanking.
2438 (XTtoggle_invisible_pointer): Use blanking specific to this display.
2439 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
2440
2441 2014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2442
2443 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
2444
2445 2014-05-12 Glenn Morris <rgm@gnu.org>
2446
2447 * fileio.c (Ffile_executable_p): Doc tweak.
2448
2449 2014-05-12 Jan Djärv <jan.h.d@swipnet.se>
2450
2451 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
2452 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
2453
2454 2014-05-08 Paul Eggert <eggert@cs.ucla.edu>
2455
2456 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
2457
2458 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
2459
2460 Fix initialization of minibuffer history variable (Bug#17430).
2461 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
2462 Move the initialization up to prevent any "value void" message.
2463
2464 2014-05-08 Samuel Bronson <naesten@gmail.com>
2465
2466 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
2467 are matched (bug#17413).
2468
2469 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
2470
2471 Stop tooltips pulling Emacs window to front (Bug#17408).
2472 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
2473 SetWindowPos invocations.
2474
2475 2014-05-08 Jan Djärv <jan.h.d@swipnet.se>
2476
2477 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
2478 not initialized (Bug#17398).
2479
2480 2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
2481
2482 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
2483
2484 2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
2485
2486 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
2487 [HAVE_NS]: Do not include png.h.
2488 (x_query_frame_background_color): New function.
2489 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
2490 (png_load_body): Coalesce duplicate code.
2491
2492 2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
2493
2494 Consult libpng-config more consistently (Bug#17339).
2495 * Makefile.in (PNG_CFLAGS): New var.
2496 (ALL_CFLAGS): Use it.
2497 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
2498 CFLAGS now handles this.
2499
2500 2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
2501
2502 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
2503 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
2504 because WCONTINUED is always defined now.
2505 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
2506
2507 2014-05-03 Eli Zaretskii <eliz@gnu.org>
2508
2509 * buffer.c (overlay_strings): Fix the wording of the commentary.
2510
2511 2014-05-01 Glenn Morris <rgm@gnu.org>
2512
2513 * floatfns.c (Fisnan):
2514 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
2515
2516 2014-05-01 Eli Zaretskii <eliz@gnu.org>
2517
2518 * term.c (tty_menu_activate): A better initialization for cursor
2519 coordinates.
2520
2521 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
2522
2523 * intervals.c: Tighten assertions.
2524 (create_root_interval): Make sure the interval is not empty.
2525 (intervals_equal): Use booleans.
2526 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
2527 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
2528 (balance_possible_root_interval): Simplify and use booleans.
2529 (split_interval_right, split_interval_left): Check LENGTH, and remove
2530 now redundant assertion.
2531 (adjust_intervals_for_insertion): Remove now redundant assertions.
2532 (delete_node, interval_deletion_adjustment)
2533 (adjust_intervals_for_deletion, merge_interval_right)
2534 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
2535 (reproduce_interval): Make sure the interval is not empty.
2536
2537 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
2538
2539 * term.c (tty_menu_activate): Don't assume row and col are initialized.
2540 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
2541 satisfaction that they would always be initialized.
2542
2543 2014-04-30 Eli Zaretskii <eliz@gnu.org>
2544
2545 * term.c (tty_menu_display): Move the cursor to the active menu item.
2546 (tty_menu_activate): Return the cursor to the active menu item
2547 after displaying the menu and after displaying help-echo.
2548 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
2549 for the details of why this is needed by screen readers and
2550 Braille displays.
2551
2552 2014-04-30 Glenn Morris <rgm@gnu.org>
2553
2554 * process.c (handle_child_signal):
2555 Handle systems without WCONTINUED. (Bug#15110, 17339)
2556
2557 2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
2558
2559 * window.c (struct saved_window): Remove mark.
2560 (Fset_window_configuration, save_window_save)
2561 (compare_window_configurations): Don't touch marks any more.
2562
2563 2014-04-28 Paul Eggert <eggert@cs.ucla.edu>
2564
2565 Use bits_word for gcmarkbits.
2566 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
2567 bits_word is typically a tad more efficient for mark bits than
2568 unsigned is, so use bits_word. All uses changed.
2569 * lisp.h (BITS_PER_INT): Remove; no longer used.
2570
2571 Avoid undefined behavior in signed left shift.
2572 This ports to GCC 4.9.0 with -fsanitize=undefined.
2573 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
2574 * data.c (Fash):
2575 * regex.c (extract_number):
2576 * lisp.h (make_number, XINT):
2577 Do not shift a 1 bit left into a sign bit.
2578 * alloc.c (struct cons_block, struct float_block): Use unsigned,
2579 not int, for gcmarkbits. All uses changed.
2580
2581 2014-04-25 Eli Zaretskii <eliz@gnu.org>
2582
2583 * search.c (Fnewline_cache_check): Don't try to count newlines
2584 outside the buffer's restriction, as find_newline doesn't support that.
2585
2586 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
2587
2588 * window.c (Fset_window_configuration): Deactivate the mark before
2589 unsetting the mark.
2590 (set_window_buffer): Ignore window_initialized.
2591 (window_initialized): Remove.
2592 * keyboard.c (Qdeactivate_mark): Not static any more.
2593 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
2594 Update all callers.
2595
2596 2014-04-23 Paul Eggert <eggert@cs.ucla.edu>
2597
2598 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
2599 and to clang 3.4, which have fixed the bug. This should let us
2600 run a bit faster on these platforms when address sanitization is
2601 in effect.
2602
2603 2014-04-22 Paul Eggert <eggert@cs.ucla.edu>
2604
2605 Port to GCC 4.9.0 with --enable-gcc-warnings.
2606 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
2607 All uses removed.
2608 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
2609 a way that also works with GCC 4.9.0.
2610
2611 * search.c (Fnewline_cache_check): Remove unused locals.
2612
2613 2014-04-22 Eli Zaretskii <eliz@gnu.org>
2614
2615 * search.c (find_newline1): New subroutine.
2616 (Fnewline_cache_check): New function.
2617 (syms_of_search): Defsubr it.
2618
2619 2014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
2620
2621 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
2622 * keyboard.c (unblock_input): Add comment.
2623 * xgselect.c (xg_select): Prevent Glib main loop recursion.
2624
2625 2014-04-22 Daniel Colascione <dancol@dancol.org>
2626
2627 * lread.c (readevalloop_eager_expand_eval): New function
2628 that can recurse into toplevel forms.
2629 (readevalloop): Call it.
2630 * lisp.h: Declare Qprogn.
2631 * callint.c (Qprogn): No longer static.
2632
2633 2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
2634
2635 * intervals.c (rotate_right, rotate_left): Fix up length computation.
2636 Also change identifiers to match the comments, and add more assertions
2637 (bug#16234).
2638
2639 2014-04-18 Paul Eggert <eggert@cs.ucla.edu>
2640
2641 * emacs.c (close_output_streams): Don't clear and restore errno.
2642
2643 2014-04-18 Jan Djärv <jan.h.d@swipnet.se>
2644
2645 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
2646 never becomes visible, i.e. using XMonad (Bug#17237).
2647
2648 2014-04-18 Eli Zaretskii <eliz@gnu.org>
2649
2650 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
2651 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
2652 (Fline_pixel_height): Don't assume that the current buffer and the
2653 selected window's buffer are one and the same. (Bug#17281)
2654
2655 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
2656 paragraph-start cache before the newline cache. (Bug#17269)
2657
2658 2014-04-17 Paul Eggert <eggert@cs.ucla.edu>
2659
2660 * term.c (tty_send_additional_strings): No need to fflush here,
2661 as callers fflush.
2662 (tty_set_terminal_modes): fflush after sending additional strings,
2663 not before.
2664
2665 2014-04-17 Daniel Colascione <dancol@dancol.org>
2666
2667 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
2668 New symbols.
2669 (tty_send_additional_strings): New function.
2670 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
2671 (syms_of_term): Intern tty-mode-set-strings and
2672 tty-mode-reset-strings.
2673
2674 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
2675
2676 * window.c (save_window_save): Lookup window_point_insertion_type in
2677 the right buffer (bug#15457).
2678 (Qwindow_point_insertion_type): New var.
2679 (syms_of_window): Initialize it.
2680
2681 2014-04-16 Eli Zaretskii <eliz@gnu.org>
2682
2683 Fix the MSDOS build.
2684 * unexcoff.c [MSDOS]: Include libc/atexit.h.
2685 (copy_text_and_data): Zero out the atexit chain pointer before
2686 dumping Emacs.
2687
2688 * termhooks.h (encode_terminal_code): Update prototype.
2689
2690 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
2691 visible for all DOS_NT ports, not just WINDOWSNT.
2692 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
2693
2694 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
2695 unless it is defined.
2696 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
2697
2698 * process.c (close_on_exec, accept4, process_socket): Move into
2699 the "ifdef subprocesses" part.
2700 (catch_child_signal): Condition by "ifdef subprocesses".
2701 (syms_of_process) <Qinternal_default_process_sentinel>
2702 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
2703
2704 * msdos.h: Add prototypes for new functions.
2705 (EINPROGRESS): Define.
2706 (O_CLOEXEC): Define to zero.
2707
2708 * msdos.c (check_window_system): Remove unnecessary an
2709 incompatible duplicate function.
2710 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
2711 New functions in support of new functionality.
2712
2713 * menu.c (single_menu_item): Add visual indication of submenu
2714 also for menus on MSDOS frames.
2715 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
2716
2717 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
2718 when async subprocesses aren't supported.
2719
2720 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
2721
2722 * emacs.c (close_output_streams): Zero out errno before calling
2723 close_stream.
2724
2725 * dired.c [MSDOS]: Include msdos.h.
2726
2727 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
2728 (DATA_START) [MSDOS]: Define.
2729 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
2730
2731 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
2732 Ifdef away for MSDOS.
2733 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
2734 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
2735 for MSDOS.
2736 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
2737 Use temporary file template that is compatible with mkostemp.
2738 Move vfork-related portions under #ifndef MSDOS.
2739 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
2740
2741 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
2742
2743 * buffer.c (Foverlays_at): Add argument `sorted'.
2744
2745 2014-04-16 Eli Zaretskii <eliz@gnu.org>
2746
2747 * insdel.c (invalidate_buffer_caches): When deleting or replacing
2748 text, invalidate the bidi_paragraph_cache upto and including the
2749 preceding newline.
2750
2751 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
2752
2753 Port to IRIX 6.5 (Bug#9684).
2754 * conf_post.h (INET6) [IRIX6_5]: Define.
2755 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
2756 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
2757
2758 2014-04-16 Eli Zaretskii <eliz@gnu.org>
2759
2760 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
2761 before passing it to system APIs.
2762
2763 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
2764
2765 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
2766 make sure stack.byte_string_start is not de-adjusted by pushhandler.
2767
2768 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
2769
2770 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
2771
2772 2014-04-15 Paul Eggert <eggert@cs.ucla.edu>
2773
2774 Remove DATA_SEG_BITS.
2775 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
2776 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
2777 cc, but that platform is so old that SGI itself stopped supporting
2778 it in December 2013. If you still need Emacs on IRIX, please
2779 either compile with GCC and port the undumping code, or run
2780 './configure --with-wide-int'.
2781 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
2782 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
2783 DEFINE_GDB_SYMBOL_START way to define it.
2784 (NONPOINTER_BITS): New macro.
2785 (EMACS_INT): Use it.
2786 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
2787 the problem and/or configuring --with-wide-int.
2788 (USE_LSB_TAG): Simplify, based on above changes.
2789 (gdb_DATA_SEG_BITS): Remove. All uses removed.
2790 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
2791
2792 2014-04-12 Eli Zaretskii <eliz@gnu.org>
2793
2794 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
2795 covered by a display string that ends in a newline, and that cases
2796 going back by DVPOS lines to hit the search limit, lift the limit
2797 and go back until DVPOS is reached. (Bug#17244)
2798
2799 * indent.c (Fvertical_motion): Handle correctly the case when the
2800 display string is preceded by an empty line.
2801
2802 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
2803 use S_IWRITE instead.
2804
2805 2014-04-11 Glenn Morris <rgm@gnu.org>
2806
2807 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
2808
2809 2014-04-11 Ken Brown <kbrown@cornell.edu>
2810
2811 * Makefile.in (EMACS_MANIFEST): Revert last change.
2812
2813 2014-04-10 Daniel Colascione <dancol@dancol.org>
2814
2815 * puresize.h (BASE_PURESIZE): Increase.
2816
2817 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
2818
2819 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
2820
2821 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
2822 region handling (and don't call signal_before_change) if
2823 inhibit_modification_hooks is set.
2824 (signal_before_change): Don't check inhibit_modification_hooks any more.
2825
2826 2014-04-08 Daniel Colascione <dancol@dancol.org>
2827
2828 * alloc.c (sweep_symbols, mark_object): Assert that symbol
2829 function cells contain valid lisp objects. (Modified version of
2830 patch from Dmitry).
2831
2832 * alloc.c (detect_suspicious_free): Split actual stack capturing
2833 out into new function for easier breakpoint setting.
2834 (note_suspicious_free): New function.
2835
2836 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
2837
2838 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
2839
2840 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
2841 (symbol_block_pinned): New var.
2842 (Fmake_symbol): Initialize `pinned'.
2843 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
2844 pinned and signal an error for un-purifiable objects.
2845 (pure_cons): Use it.
2846 (Fpurecopy): Use it, except for objects that can't be purified.
2847 (mark_pinned_symbols): New function.
2848 (Fgarbage_collect): Use it.
2849 (gc_sweep): Remove hack made unnecessary.
2850
2851 2014-04-07 Glenn Morris <rgm@gnu.org>
2852
2853 * keyboard.c (Fopen_dribble_file): Doc tweak.
2854
2855 2014-04-07 Ken Brown <kbrown@cornell.edu>
2856
2857 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
2858
2859 2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
2860
2861 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
2862 We have a substitute execinfo.h on hosts that lack it.
2863 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
2864 isn't optimized away.
2865
2866 2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
2867
2868 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
2869 * alloc.c (memory_full):
2870 * charset.c (syms_of_charset):
2871 * doc.c (Fsnarf_documentation):
2872 * emacs.c (main):
2873 * font.c (BUILD_STYLE_TABLE):
2874 * keyboard.c (make_lispy_event):
2875 * profiler.c (setup_cpu_timer):
2876 * xgselect.c (xg_select):
2877 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
2878 Use ARRAYELTS.
2879 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
2880 Replace the only use with ARRAYELTS (font_property_table).
2881 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
2882
2883 2014-04-03 Daniel Colascione <dancol@dancol.org>
2884
2885 * xterm.c (x_term_init):
2886 * xfns.c (best_xim_style):
2887 * xfaces.c (Fdump_colors):
2888 * w32fns.c (w32_default_color_map):
2889 * w32.c (init_environment, N_ENV_VARS):
2890 * unexcw.c (read_exe_header):
2891 * term.c (term_get_fkeys_1):
2892 * sysdep.c (init_baud_rate):
2893 * nsterm.m (ns_convert_key):
2894 * nsfns.m (get_geometry_from_preferences):
2895 * msdos.c (dos_set_window_size, init_environment):
2896 * macfont.m (mac_font_get_glyph_for_cid)
2897 (macfont_store_descriptor_attributes)
2898 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
2899 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
2900 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
2901 (syms_of_keyboard):
2902 * image.c (xpm_str_to_color_key):
2903 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
2904 * frame.c (x_set_frame_parameters):
2905 * fileio.c (Ffile_selinux_context):
2906 * emacs.c (sort_args):
2907 * dosfns.c (msdos_stdcolor_name):
2908 * dired.c (file_attributes):
2909 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
2910 Change expressions of the form sizeof(arr) / sizeof(arr[0])
2911 to ARRAYELTS (arr).
2912
2913 2014-04-02 Daniel Colascione <dancol@dancol.org>
2914
2915 * data.c (Ffset): Abort if we're trying to set a function call to
2916 a dead lisp object.
2917
2918 * lisp.h (ARRAYELTS): New macro.
2919
2920 * alloc.c: Include execinfo.h if available.
2921 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
2922 (suspicious_free_record): New structure.
2923 (suspicious_objects, suspicious_object_index)
2924 (suspicious_free_history, suspicious_free_history_index):
2925 New variables.
2926 (find_suspicious_object_in_range, detect_suspicious_free)
2927 (Fsuspicious_object): New functions.
2928 (cleanup_vector): Call find_suspicious_object_in_range.
2929
2930 2014-04-02 Martin Rudalics <rudalics@gmx.at>
2931
2932 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
2933 width from font width (Bug#17163).
2934
2935 * frame.c (x_set_frame_parameters): Calculate default values of
2936 new frame sizes only after all other frame parameters have been
2937 processed (Bug#17142).
2938
2939 2014-04-02 Ken Brown <kbrown@cornell.edu>
2940
2941 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
2942 (Bug#17112)
2943
2944 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2945
2946 * xterm.c (x_draw_image_glyph_string): Adjust image background
2947 width accordingly when its x position is adjusted. (Bug#17115)
2948
2949 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
2950
2951 * font.c (font_list_entities): Do not add empty vector to font cache.
2952 (font_matching_entity): Likewise. If matching entity is found, insert
2953 1-item vector with this entity instead of entity itself (Bug#17125).
2954
2955 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
2956
2957 2014-04-01 Paul Eggert <eggert@cs.ucla.edu>
2958
2959 * fns.c (validate_subarray): Rename from validate_substring,
2960 since it works for vectors too. New arg ARRAY. Optimize for the
2961 non-nil case. Instead of returning bool, throw an error if out of
2962 range, so that the caller needn't do that. All uses changed.
2963 Report original values if out of range.
2964 (Fsubstring, Fsubstring_no_properties, secure_hash):
2965 Also optimize the case where FROM is 0 or TO is the size.
2966
2967 2014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
2968
2969 * search.c (Freplace_match): Use make_specified_string.
2970 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
2971 to catch bogus override face of glyph strings.
2972 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
2973 Move common substring range checking code to...
2974 (validate_substring): ...this function.
2975
2976 2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
2977
2978 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
2979
2980 2014-03-30 Jan Djärv <jan.h.d@swipnet.se>
2981
2982 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
2983 bar is zero height, just return (Bug#16976).
2984 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
2985
2986 * nsterm.h (EmacsView): Add wait_for_tool_bar.
2987
2988 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
2989 is nil. If waiting for toolbar to complete, force a redraw.
2990
2991 2014-03-28 Glenn Morris <rgm@gnu.org>
2992
2993 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
2994 (emacs_bugreport): New variable.
2995 (usage_message): Use PACKAGE_BUGREPORT.
2996 (syms_of_emacs) <report-emacs-bug-address>: New variable.
2997
2998 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
2999
3000 2014-03-27 Paul Eggert <eggert@cs.ucla.edu>
3001
3002 Port recent signal-related changes to FreeBSD.
3003 Problem reported by Herbert J. Skuhra.
3004 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
3005 Move decls from here ...
3006 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
3007
3008 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3009
3010 * w32term.c (x_draw_image_glyph_string): Fix computation of height
3011 and width of image background when it is displayed with a 'box'
3012 face. (Bug#17115)
3013
3014 2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
3015
3016 More backward-compatible fix to char-equal core dump (Bug#17011).
3017 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
3018 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
3019
3020 2014-03-27 Juanma Barranquero <lekktu@gmail.com>
3021
3022 * image.c (init_svg_functions): When loading SVG-related libraries,
3023 free already loaded libraries if the initialization fails.
3024 (rsvg_handle_set_size_callback): Remove declaration, unused.
3025
3026 2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
3027
3028 Fix core dump in char-equal (Bug#17011).
3029 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
3030 unibyte buffers, as we can't tell whether the characters are
3031 actually unibyte.
3032
3033 * insdel.c (adjust_markers_for_delete): Remove unused local.
3034
3035 2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
3036
3037 Have (MARKER . ADJUSTMENT) undo records always be immediately
3038 after their corresponding (TEXT . POS) record in undo list.
3039 (Bug#16818)
3040 * lisp.h (record-delete): New arg record_markers.
3041 (record_marker_adjustment): No longer needed outside undo.c.
3042 * insdel.c (adjust_markers_for_delete): Move calculation of marker
3043 adjustments to undo.c's record_marker_adjustments. Note that
3044 fileio.c's decide_coding_unwind is another caller to
3045 adjust_markers_for_delete. Because it has undo list bound to t,
3046 it does not rely on adjust_markers_for_delete to record marker
3047 adjustments.
3048 (del_range_2): Swap call to record_delete and
3049 adjust_markers_for_delete so as undo marker adjustments are
3050 recorded before current deletion's adjustments, as before.
3051 (adjust_after_replace):
3052 (replace_range): Pass value for new record_markers arg to
3053 delete_record.
3054 * undo.c (record_marker_adjustment): Rename to
3055 record_marker_adjustments and made static.
3056 (record_delete): Check record_markers arg and call
3057 record_marker_adjustments.
3058 (record_change): Pass value for new record_markers arg to
3059 delete_record.
3060 (record_point): at_boundary calculation no longer needs to account
3061 for marker adjustments.
3062
3063 2014-03-26 Martin Rudalics <rudalics@gmx.at>
3064
3065 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
3066 (Bug#17077).
3067
3068 2014-03-26 Glenn Morris <rgm@gnu.org>
3069
3070 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
3071
3072 2014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
3073
3074 * buffer.c (struct sortvec): Add field `spriority'.
3075 (compare_overlays): Use it.
3076 (sort_overlays): Set it.
3077
3078 2014-03-26 Eli Zaretskii <eliz@gnu.org>
3079
3080 * xdisp.c (redisplay_window): If all previous attempts to find the
3081 cursor row failed, try a few alternatives before falling back to
3082 the top-most row of the window. Use row_containing_pos. (Bug#17047)
3083
3084 2014-03-26 Juanma Barranquero <lekktu@gmail.com>
3085
3086 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
3087 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
3088
3089 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
3090 variables on Windows.
3091
3092 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
3093
3094 * w32.c (unsetenv): Remove unused var `retval'.
3095 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
3096
3097 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
3098 (start_watching): Remove unused var `thr'.
3099
3100 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
3101 (find_child_console): Remove unnecesary var `thread_id'.
3102
3103 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
3104 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
3105
3106 2014-03-26 Glenn Morris <rgm@gnu.org>
3107
3108 * filelock.c (Flock_buffer): Doc tweak.
3109
3110 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
3111 * emacs.c (shut_down_emacs):
3112 * fileio.c (Finsert_file_contents, write_region):
3113 * filelock.c (top-level, syms_of_filelock):
3114 * insdel.c (prepare_to_modify_buffer_1):
3115 CLASH_DETECTION is always defined now.
3116
3117 2014-03-25 Eli Zaretskii <eliz@gnu.org>
3118
3119 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
3120 DLL handle, to speed up thread startup.
3121
3122 2014-03-25 Paul Eggert <eggert@cs.ucla.edu>
3123
3124 Handle sigmask better with nested signal handlers (Bug#15561).
3125 * atimer.c (sigmask_atimers): Remove.
3126 Remaining use rewritten to use body of this function.
3127 * atimer.c (block_atimers, unblock_atimers):
3128 * callproc.c (block_child_signal, unblock_child_signal):
3129 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
3130 New arg OLDSET. All callers changed.
3131 * atimer.c (block_atimers, unblock_atimers):
3132 * callproc.c (block_child_signal, unblock_child_signal):
3133 * keyboard.c (handle_interrupt):
3134 * sound.c (vox_configure, vox_close):
3135 Restore the old signal mask rather than unilaterally clearing bits
3136 from the mask, in case a handler is running within another
3137 handler. All callers changed.
3138 * lisp.h, process.c, process.h, term.c:
3139 Adjust decls and callers to match new API.
3140 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
3141 signal handlers aren't supposed to use floating point anyway.
3142 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
3143
3144 2014-03-23 Daniel Colascione <dancol@dancol.org>
3145
3146 Split gc_sweep into discrete functions for legibility and better
3147 stack traces.
3148
3149 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
3150 (sweep_vectors): Fix typo in comment.
3151 (sweep_conses, sweep_floats, sweep_intervals)
3152 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
3153 (gc_sweep): Call new functions, to which existing functionality is
3154 moved.
3155 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
3156
3157 2014-03-23 Juanma Barranquero <lekktu@gmail.com>
3158
3159 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
3160
3161 2014-03-23 Daniel Colascione <dancol@dancol.org>
3162
3163 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
3164 only if xic_style calls for it. This change allows Emacs to work
3165 with ibus. Also, don't leak resources if create_frame_xic fails,
3166 and stop caching xic_style across different displays.
3167 (supported_xim_styles): Make const.
3168 (best_xim_style): Remove first parameter: it's always just
3169 supported_xim_styles. Change to look at supported_xim_styles
3170 directly.
3171
3172 2014-03-23 Daniel Colascione <dancol@dancol.org>
3173
3174 * term.c (init_tty): Rearrange condition for clarity; print
3175 appropriate diagnostic.
3176
3177 2014-03-23 Daniel Colascione <dancol@dancol.org>
3178
3179 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
3180 array. (ASAN caught.)
3181
3182 2014-03-22 Glenn Morris <rgm@gnu.org>
3183
3184 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
3185
3186 2014-03-22 Daniel Colascione <dancol@dancol.org>
3187
3188 * process.c (conv_sockaddr_to_lisp): When extracting the string
3189 names of AF_LOCAL sockets, stop before reading uninitialized memory.
3190
3191 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3192
3193 Fix regression introduced by patch for Bug#10500.
3194 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
3195 * w32term.c (x_draw_image_relief): Likewise.
3196
3197 2014-03-21 Martin Rudalics <rudalics@gmx.at>
3198
3199 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
3200 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
3201 maximize a frame for odd default fonts.
3202
3203 2014-03-21 Glenn Morris <rgm@gnu.org>
3204
3205 * minibuf.c (history-length): Increase default from 30 to 100.
3206
3207 2014-03-21 Daniel Colascione <dancol@dancol.org>
3208
3209 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
3210 every time we switch to minibuffer.
3211
3212 * alloc.c (lisp_align_malloc, allocate_string_data)
3213 (allocate_vectorlike): Allow mmap allocation of lisp objects.
3214 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
3215
3216 2014-03-21 Eli Zaretskii <eliz@gnu.org>
3217
3218 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
3219 support more "verbs".
3220
3221 2014-03-21 Daniel Colascione <dancol@dancol.org>
3222
3223 Always prohibit dumping a dumped Emacs.
3224
3225 * emacs.c (might_dump): New variable.
3226 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
3227 * lisp.h (might_dump): Declare.
3228 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
3229
3230 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
3231
3232 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
3233
3234 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
3235
3236 * doc.c (store_function_docstring): Warn when we don't know where to
3237 put a docstring.
3238 (Fsubstitute_command_keys): Don't advertise the fact that
3239 text-properties are dropped, since we think it's a bug that we'll fix
3240 in 24.5.
3241
3242 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
3243 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
3244 * frame.c (frame_garbaged): Make "docstring" more precise.
3245
3246 2014-03-20 Glenn Morris <rgm@gnu.org>
3247
3248 * charset.c (init_charset): When we cannot find the charsets directory,
3249 mention if EMACSDATA is set.
3250
3251 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
3252
3253 * fns.c (Frandom): Fix rare bug where the result isn't random.
3254
3255 Fix porting inconsistency about rounding to even.
3256 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
3257 This way, the unusual !HAVE_RINT case acts like the usual
3258 HAVE_RINT case, and we can fix the documentation accordingly.
3259
3260 2014-03-19 Eli Zaretskii <eliz@gnu.org>
3261
3262 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
3263 (w32_wnd_proc): Initialize the dwHoverTime member of
3264 TRACKMOUSEEVENT structure.
3265
3266 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
3267
3268 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
3269
3270 2014-03-16 Eli Zaretskii <eliz@gnu.org>
3271
3272 * search.c (find_newline): Speed up the function when using the
3273 newline cache, by halving the number of calls to
3274 region_cache_forward and region_cache_backward. (Bug#16830)
3275
3276 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
3277
3278 * buffer.c (Fset_buffer): Document return value (bug#17015).
3279
3280 2014-03-14 Martin Rudalics <rudalics@gmx.at>
3281
3282 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
3283 nil, always resize character wise to avoid potential loss of the
3284 mode line (Bug#16923 related).
3285
3286 2014-03-12 Martin Rudalics <rudalics@gmx.at>
3287
3288 * frame.c (x_set_frame_parameters): Always calculate new sizes
3289 pixelwise to avoid potential loss when rounding.
3290
3291 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
3292
3293 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
3294 * xterm.c (x_free_frame_resources): Free all allocated cursors.
3295
3296 2014-03-10 Eli Zaretskii <eliz@gnu.org>
3297
3298 * w32.c (fstatat): Don't add an extra slash if the argument ends
3299 with a slash: this fails the subsequent call to stat_worker on
3300 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
3301
3302 2014-03-09 Martin Rudalics <rudalics@gmx.at>
3303
3304 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
3305
3306 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
3307
3308 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
3309
3310 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
3311 when frame is only on one screen (Bug#14713).
3312
3313 2014-03-08 Eli Zaretskii <eliz@gnu.org>
3314
3315 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
3316 there's a valid wrap point in the display line, the last glyph
3317 cannot "just barely fit" on this row, because display_line doesn't
3318 let it. Instead, proceed as if the last glyph didn't fit, so that
3319 we eventually back up the iterator to the wrap point. This avoids
3320 delusional behavior of move_it_to, whereby it proceeds to the next
3321 display line, but sets current_x to zero for all the glyphs that
3322 without word-wrap would fit on the previous display line.
3323 One result was that visual-order cursor movement behaved erratically
3324 under word-wrap.
3325 (Fmove_point_visually): Add code to find the x coordinate of the
3326 last character before wrap point, under word-wrap on a TTY.
3327
3328 2014-03-07 Eli Zaretskii <eliz@gnu.org>
3329
3330 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
3331 also return value of MOVE_POS_MATCH_OR_ZV from
3332 move_it_in_display_line_to, when moving from beginning of line to
3333 point's position. (Bug#16961)
3334
3335 2014-03-07 Martin Rudalics <rudalics@gmx.at>
3336
3337 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
3338 * window.c (Fselect_window): Explain NORECORD and
3339 `buffer-list-update-hook' in doc-string.
3340
3341 2014-03-06 Martin Rudalics <rudalics@gmx.at>
3342
3343 * window.c (Fother_window_for_scrolling): Check that
3344 Vother_window_scroll_buffer is a buffer.
3345
3346 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
3347
3348 * xterm.c (xim_initialize): Always pass a copy of resource name
3349 to XRegisterIMInstantiateCallback and eassert whether return
3350 value is True. Passing copy is important because Xlib doesn't
3351 make its own copy and resource name argument usually points to
3352 SSDATA (Vx_resource_name), which may be changed from Lisp.
3353 (xim_close_display): For XUnregisterIMInstantiateCallback,
3354 always eassert return value and pass exactly the same values
3355 as were used for XRegisterIMInstantiateCallback.
3356 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
3357 sources to check why if you are interested.
3358
3359 2014-03-05 Martin Rudalics <rudalics@gmx.at>
3360
3361 * dispnew.c (change_frame_size_1): Add new_lines instead of
3362 new_height, the latter may be still zero if passed as such.
3363 * window.c (Fwindow_pixel_height): Mention bottom divider in
3364 doc-string.
3365
3366 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
3367
3368 Fix "resource temporarily unavailable" with xgselect
3369 (Bug#16925).
3370 * xgselect.c: Include <stdbool.h>.
3371 (xg_select) [!USE_GTK]: Don't lose track of errno.
3372
3373 Fix minor --enable-gcc-warnings issues.
3374 * widget.c (update_various_frame_slots, EmacsFrameResize):
3375 Avoid unused locals. Prefer 'if' to '#if' when either will do.
3376
3377 2014-03-04 Ken Brown <kbrown@cornell.edu>
3378
3379 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
3380 represent the actual adjustment needed for alignment.
3381
3382 2014-03-04 Eli Zaretskii <eliz@gnu.org>
3383
3384 * gmalloc.c (aligned_alloc): Don't allocate more memory than
3385 needed, and don't reallocate if the initial allocation already
3386 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
3387
3388 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3389
3390 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
3391 (Bug#16932)
3392
3393 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
3394
3395 * cmds.c (delete-char): Update docstring pointing out that the
3396 function ignores `delete-active-region' and `overwrite-mode'.
3397
3398 2014-03-03 Eli Zaretskii <eliz@gnu.org>
3399
3400 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
3401
3402 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
3403 allocated buffer due to alignment.
3404 (freehook): If the block to be freed was allocated by
3405 'aligned_alloc', find its real pointer before calling 'free'.
3406 (Bug#16901)
3407 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
3408 backtrace.
3409
3410 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
3411
3412 * font.c (toplevel): Adjust comment about font cache layout.
3413 (font_clear_cache): Fix to match real font cache layout.
3414 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
3415 (Fframe_font_cache) [FONT_DEBUG]: New function.
3416 (syms_of_font) [FONT_DEBUG]: Defsubr it.
3417
3418 Avoid crashes when X fonts are erroneously freed on reused X
3419 'Display *' connection data (Bug#16069). Note that X font
3420 resources still may be leaked, but currently there is no way
3421 to completely avoid it.
3422 * xterm.h (struct x_display_info): New member x_id. Add comments.
3423 * xterm.c (x_display_id): New variable.
3424 (x_term_init): Assign identifier to each opened X connection.
3425 * xfont.c (struct xfont): New member x_display_id.
3426 (xfont_open): Initialize it with frame's display id.
3427 (xfont_close): Check whether font's display id matches the one
3428 recorded for the given display. Adjust comment.
3429 * xftfont.c (struct xftfont_info):
3430 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
3431
3432 2014-03-01 Martin Rudalics <rudalics@gmx.at>
3433
3434 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
3435 * window.c (Fother_window_for_scrolling): Don't try to scroll a
3436 killed Vother_window_scroll_buffer.
3437 (Vother_window_scroll_buffer): Fix doc-string accordingly.
3438
3439 2014-03-01 Eli Zaretskii <eliz@gnu.org>
3440
3441 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
3442 that start with more than 2 slashes as UNCs. (Bug#16751)
3443
3444 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
3445
3446 Fix a few crashes and leaks when cloning C strings.
3447 * alloc.c, lisp.h (dupstring): New function.
3448 * gtkutil.c (xg_get_font):
3449 * term.c (tty_default_color_capabilities):
3450 * xsettings.c (store_monospaced_changed)
3451 (store_font_name_changed, parse_settings)
3452 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
3453 This avoids some unlikely crashes due to accessing freed storage,
3454 and avoids some minor memory leaks in the more-typical case.
3455
3456 2014-02-28 Martin Rudalics <rudalics@gmx.at>
3457
3458 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
3459 cursor when modeline can't be dragged (Bug#16647).
3460
3461 2014-02-28 Glenn Morris <rgm@gnu.org>
3462
3463 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
3464 from custom-delayed-init-variables. (Bug#11565)
3465
3466 2014-02-27 Martin Rudalics <rudalics@gmx.at>
3467
3468 More fixes for mouse glyph calculations (Bug#16647).
3469 * window.c (coordinates_in_window): In intersection of
3470 horizontal and vertical window dividers prefer the horizontal
3471 one. Add some extra parens to last fix.
3472 (window_relative_x_coord): Return x-coordinate for header and
3473 mode line too.
3474 * xdisp.c (remember_mouse_glyph): In text area don't extend
3475 glyph into mode line to show the vertical drag cursor there
3476 immediately. Subdivide mouse glyphs in right fringes to show a
3477 horizontal drag cursor as soon as we enter the "grabbable width"
3478 portion. Handle vertical border case separately. Do not
3479 subdivide window divider areas.
3480 (note_mouse_highlight): On bottom divider of bottommost windows
3481 show vertical drag cursor only when the minibuffer window can be
3482 resized.
3483
3484 2014-02-27 Eli Zaretskii <eliz@gnu.org>
3485
3486 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
3487 reset by the face of the object just displayed. See also bug#76.
3488 (get_next_display_element): If the string came from a display
3489 property, examine the box face attribute at it->position, not at
3490 it->current.pos, since the latter was not updated yet. (Bug#16870)
3491 (handle_face_prop): Improve commentary.
3492
3493 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
3494
3495 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
3496 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
3497
3498 2014-02-26 Martin Rudalics <rudalics@gmx.at>
3499
3500 Fixes around Bug#16647.
3501 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
3502 ON_BOTTOM_DIVIDER cases.
3503 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
3504 only if the window has no right divider.
3505 (Fcoordinates_in_window_p): Fix doc-string.
3506
3507 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
3508
3509 * lread.c (Funintern): Fix doc to match advertised calling convention.
3510
3511 2014-02-24 Daniel Colascione <dancol@dancol.org>
3512
3513 * keyboard.c (read_char): Close race that resulted in lost events.
3514
3515 2014-02-22 Glenn Morris <rgm@gnu.org>
3516
3517 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
3518 * window.c (window-resize-pixelwise): Doc fixes.
3519
3520 * process.c (Finternal_default_process_filter)
3521 (Finternal_default_process_sentinel): Doc tweaks.
3522
3523 2014-02-21 Glenn Morris <rgm@gnu.org>
3524
3525 * process.c (Fprocess_buffer, Faccept_process_output)
3526 (Finternal_default_process_filter, Finternal_default_process_sentinel):
3527 Doc fixes.
3528
3529 2014-02-21 Martin Rudalics <rudalics@gmx.at>
3530
3531 * window.c (Fwindow_scroll_bar_width): New function.
3532
3533 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
3534
3535 Pacify GCC when configuring with --enable-gcc-warnings.
3536 * xdisp.c (move_it_in_display_line_to) [lint]:
3537 Initialize recently-added local.
3538
3539 2014-02-21 Daniel Colascione <dancol@dancol.org>
3540
3541 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
3542
3543 2014-02-20 Eli Zaretskii <eliz@gnu.org>
3544
3545 * xdisp.c (init_iterator): Don't dereference a bogus face
3546 pointer. (Bug#16819)
3547 (try_cursor_movement): Don't use cursor position if
3548 set_cursor_from_row failed to compute it. This avoids assertion
3549 violations in MATRIX_ROW.
3550 (move_it_in_display_line_to): Save the iterator state in ppos_it
3551 only once per call. Reimplement the method used to return to the
3552 best candidate position if all the positions found in display line
3553 are beyond TO_CHARPOS. This cuts down the number of calls to
3554 bidi_shelve_cache, which moves a lot of stuff when lines are long
3555 and include bidirectional text. (Bug#15555)
3556
3557 2014-02-20 Glenn Morris <rgm@gnu.org>
3558
3559 * data.c (Fdefalias): Doc fix.
3560
3561 2014-02-19 Eli Zaretskii <eliz@gnu.org>
3562
3563 * xdisp.c (display_line): Fix horizontal scrolling of large images
3564 when fringes are turned off. This comes at a price of not
3565 displaying the truncation/continuation glyphs in this case.
3566 (Bug#16806)
3567
3568 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
3569 CreateDIBSection returns an error indication, zero out *ximg after
3570 destroying the image. This avoids crashes in memory allocations
3571 due to the fact that some of the callers also call
3572 x_destroy_x_image, which will attempt to free an already free'd
3573 block of memory.
3574
3575 2014-02-18 Martin Rudalics <rudalics@gmx.at>
3576
3577 * widget.c (update_various_frame_slots): Don't set
3578 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
3579
3580 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
3581
3582 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
3583
3584 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
3585
3586 temacs --daemon fix (Bug#16599).
3587 * emacs.c (main): Initialize daemon_pipe[1] here ...
3588 (syms_of_emacs): ... instead of here.
3589
3590 2014-02-16 Anders Lindgern <andlind@gmail.com>
3591
3592 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
3593 is set (Bug#16505).
3594
3595 2014-02-16 Daniel Colascione <dancol@dancol.org>
3596
3597 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
3598 (xd_get_connection_address): Use it.
3599 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
3600 xd_get_connection_address because the latter signals if the bus
3601 we're trying to close is already disconnected.
3602
3603 2014-02-13 Eli Zaretskii <eliz@gnu.org>
3604
3605 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
3606 argument to CreateThread. This avoids segfaults on Windows 9X.
3607 Reported by oslsachem <oslsachem@gmail.com>.
3608
3609 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
3610
3611 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
3612 * unexhp9k800.c (unexec_error): New function, to simplify the code.
3613 (check_lseek): New function, to report lseek errors.
3614 (save_data_space, update_file_ptrs, read_header, write_header)
3615 (copy_file, copy_rest, unexec): Use these news functions.
3616 (update_file_ptrs): Don't assume wraparound behavior when
3617 converting a large size_t value to off_t.
3618
3619 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
3620
3621 * composite.c (fill_gstring_header): Pass positions as C integers
3622 and move parameters checking to...
3623 (Fcomposition_get_gstring): ...this function. Handle case when
3624 buffer positions are in reversed order and avoid crash (Bug#16739).
3625 Adjust docstring.
3626 * buffer.c (validate_region): Mention current buffer in error message.
3627
3628 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
3629
3630 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
3631
3632 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
3633
3634 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
3635
3636 2014-02-11 Glenn Morris <rgm@gnu.org>
3637
3638 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
3639 Replace refs to "OpenStep" in messages.
3640
3641 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
3642
3643 Avoid "." at end of error diagnostics.
3644 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
3645 * font.c (Ffont_at):
3646 * nsfns.m (ns_display_info_for_name):
3647 * nsselect.m (Fx_own_selection_internal):
3648 * nsterm.m (performDragOperation:):
3649 Remove "." from end of diagnostic.
3650
3651 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
3652
3653 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
3654 unintuitive (bug#15824).
3655 (Fyes_or_no_p): Doc fix (bug#15456).
3656
3657 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
3658
3659 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
3660 and avoid warning.
3661 * eval.c (call_debugger): When exiting the debugger, do not allow
3662 max_specpdl_size less than actual binding depth (Bug#16603).
3663 (syms_of_eval): Adjust docstring.
3664
3665 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
3666
3667 * cmds.c (Fself_insert_command): Output a clearer error message on
3668 negative repetitions (bug#9476).
3669
3670 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
3671
3672 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
3673
3674 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
3675
3676 * minibuf.c (Fread_string): Doc clarification (bug#15422).
3677
3678 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
3679
3680 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
3681
3682 * keyboard.c (Frecursive_edit): Fix typo in docstring.
3683
3684 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
3685
3686 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
3687
3688 * keyboard.c (Frecursive_edit): Say more precicely how throwing
3689 `exit' works (bug#15865).
3690
3691 2014-02-07 Martin Rudalics <rudalics@gmx.at>
3692
3693 Constrain window box/body sizes and margin widths (Bug#16649).
3694 * xdisp.c (window_box_width): Don't return less than zero.
3695 (window_box_left_offset, window_box_right_offset): Don't return
3696 more than the window's pixel width.
3697 * window.c (window_body_height, window_body_width): Don't return
3698 negative value.
3699 (window_resize_apply): Adjust margin width, if necessary.
3700
3701 2014-02-07 Glenn Morris <rgm@gnu.org>
3702
3703 * nsterm.m (syms_of_nsterm): Doc fix.
3704
3705 2014-02-06 Eli Zaretskii <eliz@gnu.org>
3706
3707 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
3708 New variables: pointers through which to call the respective APIs.
3709 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
3710 (filename_from_ansi, sys_link, check_windows_init_file):
3711 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
3712 This is required on Windows 9X, where we dynamically load
3713 UNICOWS.DLL which has their non-stub implementations.
3714 (maybe_load_unicows_dll): Assign addresses to these 2 function
3715 pointers after loading UNICOWS.DLL.
3716
3717 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
3718 MultiByteToWideChar and WideCharToMultiByte through function
3719 pointers.
3720
3721 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
3722 New declarations.
3723
3724 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
3725
3726 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
3727 for OSX >= 10.9 if separate spaces are used.
3728 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
3729
3730 2014-02-06 Glenn Morris <rgm@gnu.org>
3731
3732 * buffer.c (cache-long-scans): Doc fix.
3733
3734 2014-02-05 Eli Zaretskii <eliz@gnu.org>
3735
3736 * w32fns.c (Fw32_shell_execute): Doc fix.
3737
3738 2014-02-05 Bastien Guerry <bzg@gnu.org>
3739
3740 * syntax.c (Fforward_word): Call Fconstrain_to_field with
3741 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
3742
3743 2014-02-05 Martin Rudalics <rudalics@gmx.at>
3744
3745 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
3746 outside the window (Bug#16649).
3747
3748 * xdisp.c (note_mouse_highlight): When entering a margin area show
3749 a non-text cursor (Bug#16647).
3750
3751 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
3752
3753 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
3754 It prompted a compile-time diagnostic on GNU/Linux.
3755 Simplify to remove the need for the label.
3756
3757 2014-02-04 Eli Zaretskii <eliz@gnu.org>
3758
3759 * w32menu.c (w32_popup_dialog): Don't condition the whole function
3760 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
3761 to show it; otherwise return 'unsupported--w32-dialog' to signal
3762 to the caller that emulation with menus is necessary.
3763 This resurrects code inadvertently deleted by the 2013-10-08 commit.
3764 (Bug#16636)
3765 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
3766
3767 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
3768 by HAVE_DIALOGS.
3769
3770 * menu.c (Fx_popup_dialog): Don't condition the call to
3771 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
3772 special symbol 'unsupported--w32-dialog', emulate the dialog with
3773 a menu by calling x-popup-menu.
3774
3775 * menu.h (Qunsupported__w32_dialog): New extern variable.
3776
3777 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
3778
3779 * keyboard.c (kbd_buffer_get_event): Read file notification events
3780 also in batch mode.
3781
3782 * xgselect.c (xg_select): Read glib events in any case, even if
3783 there are no file descriptors to watch for. (Bug#16519)
3784
3785 2014-02-03 Martin Rudalics <rudalics@gmx.at>
3786
3787 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
3788 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
3789 * w32term.c (w32_draw_window_divider): Handle first and last
3790 pixels specially.
3791 * w32term.h (w32_fill_area_abs): New function.
3792 * xdisp.c (x_draw_right_divider): Don't draw over bottom
3793 divider.
3794 * xfaces.c (realize_basic_faces): Handle new face ids.
3795 * xfns.c (Fx_create_frame): Call x_default_parameter for right
3796 and bottom divider width.
3797 * xterm.c (x_draw_window_divider): Handle first and last pixels
3798 specially.
3799
3800 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
3801
3802 * print.c (Fexternal_debugging_output): Add cast to pacify
3803 --enable-gcc-warnings.
3804 * eval.c (call_debugger): Grow specpdl if the debugger was
3805 entered due to specpdl overflow (Bug#16603) and allow more
3806 specpdl space for the debugger itself.
3807
3808 2014-02-02 Martin Rudalics <rudalics@gmx.at>
3809
3810 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
3811 (Bug#16619)
3812
3813 2014-02-01 Eli Zaretskii <eliz@gnu.org>
3814
3815 * w32fns.c (Ffile_system_info): Use WINAPI in the function
3816 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
3817
3818 * print.c (Fexternal_debugging_output): If the argument character
3819 is non-ASCII, encode it with the current locale's encoding before
3820 writing the result to the terminal. (Bug#16448)
3821
3822 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
3823 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
3824 for it. (Bug#16558)
3825
3826 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
3827
3828 * process.c (create_process): Reset SIGPROF handler in the child.
3829 * callproc.c (call_process): Likewise.
3830
3831 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
3832
3833 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
3834
3835 2014-01-29 Eli Zaretskii <eliz@gnu.org>
3836
3837 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
3838 of zero to print strings, GDB doesn't like it.
3839
3840 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
3841 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
3842 we still use correct addresses. (Bug#16576)
3843
3844 2014-01-27 K. Handa <handa@gnu.org>
3845
3846 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
3847 to preserve the code detection behavior of 24.3.
3848 * coding.h (struct coding_system): New member detected_utf8_bytes.
3849 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
3850 (decode_coding_gap): Use short cut for UTF-8 file reading only
3851 when coding->detected_utf8_bytes equals to coding->src_bytes.
3852 * fileio.c (Finsert_file_contents): Cancel the previous change.
3853
3854 2014-01-29 Martin Rudalics <rudalics@gmx.at>
3855
3856 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
3857 that are not visible.
3858
3859 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
3860
3861 * xmenu.c (create_and_show_popup_menu): Handle case when no key
3862 is grabbed (Bug#16565).
3863
3864 2014-01-28 Martin Rudalics <rudalics@gmx.at>
3865
3866 * xdisp.c (last_max_ascent): Re-remove after erroneously
3867 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
3868 from 2013-03-29.
3869 (move_it_to): Re-remove reference to last_max_ascent.
3870 (Fwindow_text_pixel_size): Add iterator's max_ascent and
3871 max_descent here instead of calling line_bottom_y.
3872 Fix doc-string.
3873
3874 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
3875
3876 * terminal.c (initial_free_frame_resources): New function.
3877 (init_initial_terminal): Install new hook to free face cache
3878 on initial frame and avoid memory leak. For details, see
3879 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
3880 * xfaces.c (free_frame_faces): Adjust comment.
3881
3882 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
3883
3884 * data.c (Fstring_to_number): Document results if unparsable
3885 (Bug#16551).
3886
3887 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
3888
3889 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
3890
3891 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
3892
3893 When decoding, prefer ptrdiff_t to int for buffer positions etc.
3894 * coding.c (detect_coding_utf_8, emacs_mule_char)
3895 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
3896 (check_utf_8, decode_coding):
3897 * coding.h (struct coding_system.errors):
3898 Use ptrdiff_t, not int, for integer values derived from buffer and
3899 string positions.
3900
3901 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
3902 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
3903 before invoking decode_coding_gap, since there's just one block.
3904
3905 2014-01-25 Martin Rudalics <rudalics@gmx.at>
3906
3907 Fix handling of face attributes in Fx_create_frame (Bug#16529).
3908 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
3909 too early. Again run change_frame_size before assigning menu-
3910 and tool-bar-lines.
3911
3912 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
3913
3914 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
3915 arrives, call x_check_fullscreen, in case the new display has a
3916 different resolution. (Bug#16517)
3917
3918 2014-01-25 Eli Zaretskii <eliz@gnu.org>
3919
3920 * term.c (read_menu_input): If the selected frame changes, exit
3921 the menu.
3922 (tty_menu_show): If the selected frame changes while we displayed
3923 a menu, throw to top level. (Bug#16479)
3924
3925 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
3926
3927 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
3928
3929 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
3930
3931 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
3932 * data.c (count_one_bits_word): Fix bug (negated comparison)
3933 when BITS_PER_ULL < BITS_PER_BITS_WORD.
3934
3935 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
3936
3937 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
3938 Avoid undefined behavior by initializing display property bit of a
3939 string processed by the bidirectional iterator. For details, see
3940 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
3941
3942 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
3943
3944 Minor cleanup of previous change.
3945 * image.c (imagemagick_error, Fimagemagick_types):
3946 Omit some recently-introduced and unnecessary casts and assignments.
3947
3948 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
3949
3950 Fix two memory leaks discovered with Valgrind.
3951 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
3952 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
3953
3954 2014-01-22 Martin Rudalics <rudalics@gmx.at>
3955
3956 Fixes in window size functions around Bug#16430 and Bug#16470.
3957 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
3958 (Fwindow_mode_line_height, Fwindow_header_line_height)
3959 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
3960 Minor doc-string adjustments.
3961 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
3962 Rewrite doc-strings.
3963 (window_body_height, window_body_width): Do not count partially
3964 visible lines/columns when PIXELWISE is nil (Bug#16470).
3965 (Qfloor, Qceiling): New symbols.
3966
3967 2014-01-21 Eli Zaretskii <eliz@gnu.org>
3968
3969 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
3970 when the image cache is not yet allocated. (Bug#16509)
3971
3972 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
3973
3974 * buffer.c (Fkill_buffer): When killing an indirect buffer,
3975 re-attach intervals to its base buffer (Bug#16502).
3976 * intervals.c (set_interval_object): Move from here...
3977 * intervals.h (set_interval_object): ... to here. Fix comments.
3978
3979 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
3980
3981 Avoid undefined behavior by initializing buffer redisplay bit.
3982 Problem reported by Dmitry Antipov in
3983 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
3984 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
3985
3986 Revert some of the CANNOT_DUMP fix (Bug#16494).
3987 * lread.c (init_lread): Fix typo: NILP, not !NILP.
3988
3989 2014-01-19 Eli Zaretskii <eliz@gnu.org>
3990
3991 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
3992 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
3993 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
3994 they are replaced by macros that expand into direct calls to the
3995 corresponding functions from GDI32.DLL.
3996 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
3997 variables in the Cygwin build, they are unused.
3998
3999 2014-01-19 K. Handa <handa@gnu.org>
4000
4001 * composite.c (composition_update_it): Fix previous change.
4002
4003 2014-01-18 Eli Zaretskii <eliz@gnu.org>
4004
4005 Fix file name handling on MS-Windows 9X.
4006 * w32.c (maybe_load_unicows_dll): New function.
4007
4008 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
4009 on, to make sure we can convert file names to and from UTF-8 on
4010 Windows 9X. This fixes a failure to start up because Emacs cannot
4011 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
4012
4013 * w32font.c [WINDOWSNT]: Include w32.h.
4014 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
4015 of implementing the same stuff.
4016 Remove now unused g_b_init_is_windows_9x.
4017
4018 * w32.h (maybe_load_unicows_dll): Add prototype.
4019
4020 2014-01-17 Eli Zaretskii <eliz@gnu.org>
4021
4022 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
4023 switch to single keyboard. Prevents daemon crashes when a new
4024 client connects while we show a TTY menu in an existing client.
4025 (Bug#16479)
4026
4027 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
4028
4029 Fix MinGW64 porting problem with _setjmp.
4030 Reported by Eli Zaretskii in:
4031 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
4032 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
4033 the old _setjmp and _longjmp. All uses changed.
4034
4035 2014-01-13 Daniel Colascione <dancol@dancol.org>
4036
4037 * textprop.c (Fremove_list_of_text_properties):
4038 Correctly handle reaching the end of the interval tree. (Bug#15344)
4039
4040 2014-01-13 Martin Rudalics <rudalics@gmx.at>
4041
4042 * xdisp.c (resize_mini_window): Round height to a multiple of
4043 frame's line height. Fix bug in calculation of window start
4044 position (Bug#16424).
4045
4046 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
4047
4048 * macfont.m: Include termchar.h.
4049 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
4050 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
4051 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
4052 *_WITH_GC_* to take face and f as parameters.
4053 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
4054 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
4055
4056 2014-01-13 Daniel Colascione <dancol@dancol.org>
4057
4058 Fix menu item updating in the presence of the Unity global menu
4059 GTK+ module.
4060
4061 * gtkutil.h (xg_have_tear_offs): Add frame parameter
4062 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
4063 tear-off.
4064 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
4065 updating menus; explain why.
4066 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
4067 problem it's supposed to solve and it interferes with detecting
4068 the presence of a global menu.
4069 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
4070 parameter.
4071
4072 2014-01-11 K. Handa <handa@gnu.org>
4073
4074 * composite.c (composition_update_it): Fix indexing of
4075 LGSTRING_CHAR (Bug#15984).
4076
4077 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
4078
4079 * unexw32.c (_start) [__MINGW64__]: Define to __start.
4080
4081 2014-01-11 Eli Zaretskii <eliz@gnu.org>
4082
4083 * xdisp.c (try_window_id): Don't use this function's optimizations
4084 if overlays in the buffer displayed by the window have changed
4085 since last redisplay. (Bug#16347)
4086 (message_dolog): Fix indentation.
4087
4088 2014-01-11 Martin Rudalics <rudalics@gmx.at>
4089
4090 * frame.c (frame_resize_pixelwise): Fix doc-string.
4091
4092 2014-01-10 Martin Rudalics <rudalics@gmx.at>
4093
4094 Fix handling of internal borders (Bug#16348).
4095 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
4096 Remove internal border width from pixel width of windows.
4097 (change_frame_size_1): Don't return early when frame's pixel
4098 size changes - we still have to record the new sizes in the
4099 frame structure.
4100 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
4101 also when toolbar gets larger.
4102 * window.c (check_frame_size): Include internal_border_width in
4103 check.
4104 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
4105 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
4106 In non-toolkit/non-GTK version clear internal border.
4107 * xterm.c (x_clear_under_internal_border): New function for
4108 non-toolkit/non-GTK version.
4109 (x_after_update_window_line): In non-toolkit/non-GTK version
4110 don't do that.
4111 (handle_one_xevent, x_set_window_size):
4112 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
4113 * xterm.h (x_clear_under_internal_border): Extern it.
4114
4115 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
4116
4117 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
4118 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
4119 it again.
4120
4121 2014-01-06 Eli Zaretskii <eliz@gnu.org>
4122
4123 * xdisp.c (redisplay_window): Don't skip window redisplay if the
4124 last value of point is not equal to buffer's point. (Bug#16129)
4125
4126 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
4127
4128 Spelling fixes.
4129 * nsterm.h (updateCollectionBehavior): Rename from
4130 updateCollectionBehaviour. All uses changed.
4131
4132 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
4133 * Makefile.in (SETFATTR): New macro.
4134 (temacs$(EXEEXT)): Use it.
4135
4136 2014-01-04 Martin Rudalics <rudalics@gmx.at>
4137
4138 Fix maximization behavior on Windows (Bug#16300).
4139 * w32fns.c (w32_fullscreen_rect): Don't handle
4140 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
4141 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
4142 of SetWindowPos. Restore last placement also when leaving
4143 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
4144 but the FULLSCREEN_BOTH case.
4145
4146 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
4147
4148 Port to C89.
4149 * data.c (arithcompare_driver):
4150 * fileio.c (Fcar_less_than_car):
4151 * fns.c (internal_equal):
4152 * frame.c (delete_frame):
4153 * lisp.h (enum More_Lisp_Bits):
4154 * lread.c (read1):
4155 Avoid C99 constructs that don't work in C89.
4156 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
4157 to port to C89, which doesn't have 'long long'.
4158 (count_trailing_zero_bits): Use them.
4159
4160 2014-01-03 Chong Yidong <cyd@gnu.org>
4161
4162 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
4163
4164 2014-01-02 Martin Rudalics <rudalics@gmx.at>
4165
4166 Further adjust frame/window scrollbar width calculations.
4167 * window.c (apply_window_adjustment):
4168 Set windows_or_buffers_changed.
4169 (Fwindow_scroll_bars): Return actual scrollbar width.
4170 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
4171 For non-toolkit builds again use 14 as minimum width and set
4172 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
4173 * xterm.c (XTset_vertical_scroll_bar): Take width from
4174 WINDOW_SCROLL_BAR_AREA_WIDTH.
4175 (x_new_font): Rename wid to unit. Base calculation of new
4176 scrollbar width on toolkit used and make it analogous to that of
4177 x_set_scroll_bar_default_width.
4178 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
4179 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
4180 of GetSystemMetrics.
4181 * w32term.c (w32_set_vertical_scroll_bar): Take width from
4182 WINDOW_SCROLL_BAR_AREA_WIDTH.
4183 (x_new_font): Make it correspond to changes in xterm.c.
4184
4185 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
4186
4187 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
4188 This is a cleaner way to fix the MinGW-w64 porting problem.
4189 Check for INTPTR_MAX misconfiguration.
4190
4191 2014-01-01 Eli Zaretskii <eliz@gnu.org>
4192
4193 * search.c (newline_cache_on_off, find_newline): In indirect
4194 buffers, use the newline cache of the base buffer.
4195
4196 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
4197 buffer, invalidate the caches of its base buffer. (Bug#16265)
4198
4199 * indent.c (width_run_cache_on_off, compute_motion): In indirect
4200 buffers, use the width-run cache of the base buffer.
4201
4202 * xdisp.c (redisplay_window): When the window displays an indirect
4203 buffer, and the character widths in the display table have
4204 changed, invalidate the width-run cache of the corresponding base
4205 buffer.
4206
4207 * fileio.c (Finsert_file_contents): When invalidating the newline
4208 cache, consider the case of inserting into indirect buffer.
4209
4210 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
4211 In indirect buffers, use the paragraph cache of the base buffer.
4212
4213 2013-12-31 Martin Rudalics <rudalics@gmx.at>
4214
4215 * window.c (grow_mini_window): Fix last change.
4216
4217 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
4218
4219 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
4220
4221 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
4222
4223 * w32term.c (w32_initialize): Use LCID and LOWORD.
4224
4225 * w32proc.c (create_child): Use pid_t for 5th argument.
4226 (IsValidLocale): Don't provide prototype for MinGW64.
4227 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
4228 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
4229
4230 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
4231 MinGW64 doesn't support.
4232
4233 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
4234
4235 * w32.c (set_named_security_info): New function.
4236 (acl_set_file): Fall back on set_named_security_info if
4237 set_file_security fails.
4238 (g_b_init_set_named_security_info_w)
4239 (g_b_init_set_named_security_info_a): New static variables.
4240 (globals_of_w32): Initialize them to zero.
4241 (set_named_security_info): Set them to non-zero if the
4242 corresponding API is available.
4243 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
4244 New function typedefs.
4245
4246 2013-12-31 Martin Rudalics <rudalics@gmx.at>
4247
4248 Some more fixes following pixelwise resize changes including one
4249 for Bug#16306.
4250 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
4251 of frame_resize_pixelwise.
4252 * widget.c (pixel_to_text_size): New function.
4253 (update_wm_hints): Have size hints respect value of
4254 frame_resize_pixelwise.
4255 (EmacsFrameResize): Alway process resize requests pixelwise.
4256 * window.c (grow_mini_window): Make sure mini window is at least
4257 one line tall.
4258 * xdisp.c (display_menu_bar): Make sure menubar extends till
4259 right end of frame.
4260 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
4261 (x_set_tool_bar_lines): Calculate pixelwise.
4262 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
4263 frame_resize_pixelwise.
4264
4265 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
4266
4267 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
4268 variables not used there.
4269
4270 2013-12-30 Eli Zaretskii <eliz@gnu.org>
4271
4272 * w32.c (sys_umask): New function. (Bug#16299)
4273
4274 2013-12-30 Martin Rudalics <rudalics@gmx.at>
4275
4276 * dispnew.c (change_frame_size_1): Take old width of root window
4277 from that window's pixel width. (Bug#16284)
4278
4279 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
4280
4281 Plain copy-file no longer chmods an existing destination (Bug#16133).
4282 * fileio.c (realmask): Now a static var, not a local.
4283 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
4284 Remove arg STATPTR. All uses changed.
4285 (Fcopy_file): Do not alter permissions of existing destinations,
4286 unless PRESERVE-PERMISSIONS (renamed from
4287 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
4288 Avoid race when testing for existing destinations and for
4289 when input and output files are the same.
4290 If changing the group fails, adjust both default and
4291 preserved permissions so that access is not granted to the
4292 wrong group.
4293 (Fset_default_file_modes, init_fileio): Update realmask.
4294 (Fdefault_file_modes): Use realmask instead of calling umask.
4295
4296 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
4297
4298 Fix pipe bug with OS X emacs --daemon (Bug#16262).
4299 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
4300 flags on the daemon pipe ends before execing.
4301
4302 2013-12-28 Eli Zaretskii <eliz@gnu.org>
4303
4304 * w32fns.c (Fx_create_frame): Error out if called from a TTY
4305 session. (Bug#14739)
4306
4307 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
4308
4309 * callproc.c (Vexec_path): Document that exec-directory is in it.
4310
4311 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
4312
4313 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
4314 default.
4315
4316 2013-12-27 Chong Yidong <cyd@gnu.org>
4317
4318 * data.c (Fsymbol_function): Doc fix.
4319
4320 2013-12-26 Martin Rudalics <rudalics@gmx.at>
4321
4322 Some more tinkering with Bug#16051.
4323 * window.c (resize_frame_windows): Don't let the size of the
4324 root window drop below the frame's default character size.
4325 Never ever delete any subwindows - let the window manager do the
4326 clipping.
4327
4328 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
4329 of toolbar lines needed when they exceed the height of the root
4330 window.
4331 (unwind_create_frame_1): New function.
4332 (Fx_create_frame): Generally inhibit calling the window
4333 configuration change hook here. Remove extra call to
4334 change_frame_size - it's not needed when we don't run the
4335 configuration change hook.
4336
4337 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
4338
4339 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
4340 On my Fedora 19 platform the core dumps were so big that
4341 my desktop became nearly catatonic.
4342 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
4343 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
4344 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
4345 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
4346 a clang-only syntax.
4347 * conf_post.h (__has_feature): New macro, if not already defined.
4348 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
4349 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
4350
4351 2013-12-25 Eli Zaretskii <eliz@gnu.org>
4352
4353 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
4354 is a file name. (Bug#16252)
4355
4356 2013-12-25 Chong Yidong <cyd@gnu.org>
4357
4358 * keyboard.c (Voverriding_terminal_local_map)
4359 (Voverriding_local_map): Doc fix.
4360
4361 * keymap.c (Vemulation_mode_map_alists): Doc fix.
4362
4363 2013-12-24 Eli Zaretskii <eliz@gnu.org>
4364
4365 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
4366 file name when it is submitted to ShellExecute. Simplify code.
4367 Don't test DOCUMENT for being a string, as that is enforced by
4368 CHECK_STRING. Doc fix.
4369
4370 2013-12-23 Eli Zaretskii <eliz@gnu.org>
4371
4372 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
4373 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
4374 redisplay_tool_bar does. Improve and fix commentary.
4375 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
4376 limits of the glyph matrices. (Bug#16051)
4377 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
4378 only when the new size is different from the old one, and the new
4379 size can be achieved given the frame height.
4380
4381 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
4382
4383 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
4384
4385 2013-12-23 Glenn Morris <rgm@gnu.org>
4386
4387 * lread.c (Fload): Mention load-prefer-newer in doc.
4388
4389 2013-12-22 Martin Rudalics <rudalics@gmx.at>
4390
4391 Handle Bug#16207 by being more restrictive when running hooks.
4392 * window.c (unwind_change_frame): New function.
4393 (Fset_window_configuration): Don't run configuration change hook
4394 while the frame configuration is unsafe. Call select_window
4395 twice.
4396
4397 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
4398
4399 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
4400
4401 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
4402
4403 * nsterm.h: Declare EmacsColor category.
4404
4405 * nsterm.m (NSColor): Implement EmacsColor category.
4406 (ns_get_color): Use colorUsingDefaultColorSpace.
4407 (ns_get_color, ns_term_init): Use colorForEmacsRed.
4408
4409 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
4410
4411 2013-12-21 Eli Zaretskii <eliz@gnu.org>
4412
4413 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
4414 having the PNG_NORETURN attribute, to avoid compiler warning in
4415 my_png_error.
4416
4417 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4418
4419 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
4420
4421 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
4422 fringe background extension.
4423 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
4424 because they are now always the same as `left' and `width',
4425 respectively. Remove code for the case that `width' and
4426 `sb_width' are different.
4427
4428 2013-12-20 Martin Rudalics <rudalics@gmx.at>
4429
4430 Remove scroll_bar_actual_width from frames.
4431 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
4432 * frame.c (Fscroll_bar_width): Return scroll bar area width.
4433 (x_figure_window_size):
4434 * nsterm.m (x_set_window_size):
4435 * widget.c (set_frame_size):
4436 * w32term.c (x_set_window_size):
4437 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
4438 scroll_bar_actual_width.
4439
4440 Convert scroll_bar members to integers on Windows.
4441 * w32term.h (struct scroll_bar): Convert top, left, width,
4442 height, start, end and dragging to integers.
4443 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
4444 scroll_bar members.
4445 * w32term.c (w32_set_scroll_bar_thumb)
4446 (w32_scroll_bar_handle_click): Remove XINT conversions for
4447 scroll_bar members. Treat bar->dragging as integer.
4448 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
4449 first element. Remove XINT conversions for scroll_bar members.
4450 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
4451 Remove XINT conversions for scroll_bar members.
4452
4453 Fix assignment for new window total sizes.
4454 * window.c (Fwindow_resize_apply_total): Assign values for
4455 minibuffer window.
4456
4457 2013-12-20 Chong Yidong <cyd@gnu.org>
4458
4459 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
4460 argument to `append'.
4461
4462 2013-12-19 Eli Zaretskii <eliz@gnu.org>
4463
4464 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
4465 current text face, for extending the face of the display margins.
4466 (Bug#16192)
4467
4468 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
4469 Doc fix. (Bug#16190)
4470
4471 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
4472
4473 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
4474 Remove.
4475
4476 * nsterm.m (Qfile, Qurl): New.
4477 (EV_MODIFIERS2): New macro.
4478 (EV_MODIFIERS): Use EV_MODIFIERS2.
4479 (ns_term_init): Remove font and color from DND, does not work on
4480 newer OSX, and other ports don't have them.
4481 (performDragOperation:): Handle modifiers used during drag.
4482 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
4483 Remove global Lisp variables used to communicate with ns-win.el.
4484 Remove font and color handling.
4485 (syms_of_nsterm): Defsym Qfile and Qurl.
4486
4487 2013-12-19 Anders Lindgren <andlind@gmail.com>
4488
4489 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
4490 (ns_constrain_all_frames, x_set_offset): Remove assignment to
4491 dont_constrain.
4492 (updateFrameSize:, windowWillResize:toSize:): Add trace.
4493 (constrainFrameRect): Remove special case nr_screens == 1.
4494 Don't constrain size to size of view.
4495
4496 * nsterm.h (ns_output): Remove dont_constrain.
4497
4498 2013-12-19 Anders Lindgren <andlind@gmail.com>
4499
4500 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
4501
4502 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
4503
4504 Minor fixes for recent openp changes.
4505 * lisp.h (GCPRO7): New macro.
4506 * lread.c (openp): Use bool for boolean; all callers changed.
4507 Protect save_string from GC. Don't assume that file descriptors
4508 are nonzero. Redo save_mtime comparison to avoid bogus GCC
4509 warning about uninitialized variable.
4510
4511 2013-12-18 Eli Zaretskii <eliz@gnu.org>
4512
4513 * w32fns.c (emacs_abort): Use intptr_t as argument of
4514 INT_BUFSIZE_BOUND, to avoid compiler warnings.
4515
4516 2013-12-18 Glenn Morris <rgm@gnu.org>
4517
4518 * lread.c (Fload): Pass load_prefer_newer to openp.
4519 Don't bother checking mtime if openp already did it.
4520 (openp): Add `newer' argument, to check all suffixes
4521 and find the newest file.
4522 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
4523 * callproc.c (call_process):
4524 * charset.c (load_charset_map_from_file):
4525 * emacs.c (init_cmdargs):
4526 * image.c (x_create_bitmap_from_file, x_find_image_file):
4527 * lisp.h (openp):
4528 * lread.c (Flocate_file_internal):
4529 * process.c (Fformat_network_address):
4530 * sound.c (Fplay_sound_internal):
4531 * w32.c (check_windows_init_file):
4532 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
4533
4534 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
4535
4536 2013-12-17 Eli Zaretskii <eliz@gnu.org>
4537
4538 * w32.c (getloadavg): Don't index samples[] array with negative
4539 indices. Recover from wall-clock time being set backwards.
4540
4541 * w32term.c (w32_initialize): Declare the argument of
4542 set_user_model as const.
4543
4544 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
4545 (w32_menu_show): Constify some arguments passed to MessageBox.
4546
4547 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
4548 to initialize Lisp objects.
4549
4550 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
4551 initialize Lisp objects.
4552
4553 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
4554 use variables used only on X under that condition.
4555
4556 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
4557 variables not used there.
4558
4559 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
4560
4561 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
4562 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
4563
4564 2013-12-16 Eli Zaretskii <eliz@gnu.org>
4565
4566 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
4567 code, revealed in presence of R2L characters, character
4568 compositions, and display vectors. A better fix for Bug#16148.
4569 (extend_face_to_end_of_line): Don't reference tool_bar_window in
4570 GTK and NS builds, they don't have this member of struct frame.
4571
4572 * dispextern.h (struct composition_it): Correct a comment for the
4573 'width' member.
4574
4575 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
4576
4577 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
4578 This prevents a compilation error on C compilers that do not
4579 default functions to return 'int' if not declared. Also, add
4580 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
4581 since it now uses inline functions.
4582
4583 2013-12-16 Eli Zaretskii <eliz@gnu.org>
4584
4585 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
4586 display margins on mode line, header line, and in the frame's
4587 tool-bar window. (Bug#16165)
4588
4589 2013-12-16 Andreas Schwab <schwab@suse.de>
4590
4591 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
4592
4593 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
4594
4595 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
4596 `CHECK_LIST_CONS'.
4597
4598 2013-12-16 Martin Rudalics <rudalics@gmx.at>
4599
4600 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
4601
4602 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
4603
4604 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
4605 intended to find bogus pointers in font objects (Bug#16140).
4606 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
4607 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
4608 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
4609 Disable for MS-Windows due to Bug#15876; apparently this
4610 requires more or less substantial changes in fontset code.
4611 * xfont.c (xfont_close):
4612 * xftfont.c (xftfont_close): Call x_display_info_for_display
4613 to check whether 'Display *' is valid (Bug#16093 and probably
4614 Bug#16069).
4615
4616 2013-12-15 Eli Zaretskii <eliz@gnu.org>
4617
4618 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
4619 Reported by Juanma Barranquero <lekktu@gmail.com>.
4620
4621 * process.c (Fprocess_send_eof): Don't crash if someone tries to
4622 open a pty on MS-Windows. (Bug#16152)
4623
4624 * emacs.c (decode_env_path): Fix bogus comparison against
4625 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
4626
4627 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
4628
4629 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
4630 (Fx_file_dialog): Add parentheses around && to silence warning.
4631
4632 * w32term.c (construct_drag_n_drop): Remove unused local variable.
4633
4634 2013-12-15 Eli Zaretskii <eliz@gnu.org>
4635
4636 * xdisp.c (extend_face_to_end_of_line): Extend background of
4637 non-default face in margin areas as well. (Bug#16151)
4638 (display_line): Call extend_face_to_end_of_line for continued
4639 lines as well, if the display margins have non-zero width.
4640 (set_glyph_string_background_width): When needed, set the
4641 extends_to_end_of_line_p flag on glyph strings to be drawn in
4642 margin areas, not only in the text area.
4643
4644 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
4645 startup.
4646
4647 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
4648
4649 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
4650 Don't worry about verify_error being t, since it has to be a list.
4651
4652 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
4653
4654 Use bool for boolean, focusing on headers.
4655 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
4656 No need to include <stdbool.h>, since conf_post.h does it now.
4657 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
4658 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
4659 (SET_PER_BUFFER_VALUE_P):
4660 * ccl.c, ccl.h (setup_ccl_program):
4661 * ccl.h (CHECK_CCL_PROGRAM):
4662 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
4663 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
4664 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
4665 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
4666 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
4667 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
4668 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
4669 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
4670 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
4671 (CHARSET_FAST_MAP_SET):
4672 * coding.c (decode_coding_ccl, encode_coding_ccl):
4673 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
4674 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
4675 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
4676 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
4677 (decode_coding_c_string):
4678 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
4679 * conf_post.h (has_attribute):
4680 * dispextern.h (trace_redisplay_p)
4681 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
4682 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
4683 (SET_GLYPH_FROM_CHAR_GLYPH)
4684 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
4685 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
4686 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
4687 (cursor_in_mouse_face_p):
4688 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
4689 (blank_row, prepare_desired_row)
4690 (build_frame_matrix_from_leaf_window, make_current)
4691 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
4692 (update_window, scrolling_window, update_frame_line):
4693 * disptab.h (GLYPH_FOLLOW_ALIASES):
4694 * editfns.c (Fformat):
4695 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
4696 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
4697 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
4698 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
4699 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
4700 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
4701 (FONT_DEFERRED_LOG):
4702 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
4703 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
4704 (FRAME_MOUSE_UPDATE):
4705 * fringe.c (Fdefine_fringe_bitmap):
4706 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
4707 (x_create_bitmap_from_xpm_data, xpm_load_image):
4708 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
4709 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
4710 (MERGE_INTERVAL_CACHE):
4711 * keymap.h (KEYMAPP):
4712 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
4713 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
4714 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
4715 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
4716 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
4717 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
4718 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
4719 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
4720 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
4721 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
4722 (SETUP_BUFFER_SYNTAX_TABLE):
4723 * systime.h (timespec_valid_p):
4724 * term.c (save_and_enable_current_matrix):
4725 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
4726 * xdisp.c (in_display_vector_p, display_tool_bar_line)
4727 (redisplay_internal, try_window_reusing_current_matrix)
4728 (sync_frame_with_window_matrix_rows, try_window_id)
4729 (display_menu_bar, display_tty_menu_item, display_mode_line)
4730 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
4731 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
4732 * xmenu.c (xmenu_show):
4733 * xterm.c (use_xim, x_term_init):
4734 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
4735 (struct x_bitmap_record):
4736 Use bool for booleans.
4737 * ccl.c (struct buffer_text):
4738 * ccl.h (struct ccl_program):
4739 * charset.h (struct charset):
4740 * cm.h (struct cm):
4741 * coding.h (struct iso_2022_spec, struct coding_system):
4742 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
4743 (struct glyph_string, struct face, struct face_cache)
4744 (struct bidi_string_data, struct bidi_it)
4745 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
4746 (struct image):
4747 * editfns.c (Fformat):
4748 * frame.h (struct frame):
4749 * fringe.c (struct fringe_bitmap):
4750 * intervals.h (struct interval):
4751 * keyboard.h (struct kboard):
4752 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
4753 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
4754 (struct Lisp_Buffer_Local_Value, union specbinding):
4755 * macfont.m (struct macfont_info):
4756 * process.h (struct Lisp_Process):
4757 * termchar.h (struct tty_display_info):
4758 * window.h (struct window):
4759 * xterm.h (struct x_output):
4760 Use bool_bf for boolean bit-fields.
4761 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
4762 All callers changed.
4763 * ccl.h (struct ccl_program): Remove unused members private_state,
4764 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
4765 eight_bit_control.
4766 (struct ccl_spec): Remove unused members cr_carryover,
4767 eight_bit_carryover.
4768 * conf_post.h: Include <stdbool.h>.
4769 (bool_bf): New type.
4770 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
4771 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
4772 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
4773 'do { ... } while (false)' brackets.
4774 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
4775 Args must now be expressions; all callers changed.
4776 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
4777 (PRODUCE_GLYPHS): Simplify use of boolean.
4778 * fileio.c (Fcopy_file):
4779 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
4780 * lisp.h (UNGCPRO): Return void, not int.
4781 (FOR_EACH_TAIL): Use void expression, not int expression.
4782 * region-cache.c: Reindent.
4783 * region-cache.h: Copy comments from region-cache.c, to fix
4784 incorrect remarks about booleans.
4785
4786 2013-12-14 Eli Zaretskii <eliz@gnu.org>
4787
4788 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
4789 when character at point is displayed from a display vector.
4790 (Bug#16148)
4791
4792 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
4793
4794 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
4795 now a list of certificate validation checks that will abort a
4796 connection with an error.
4797 (Fgnutls_boot): Document it and use it.
4798
4799 2013-12-14 Martin Rudalics <rudalics@gmx.at>
4800
4801 * w32term.c (w32_enable_frame_resize_hack): New variable.
4802 (x_set_window_size): Use it to hack frame resizing on Windows
4803 (Bug#16028).
4804
4805 2013-12-14 Eli Zaretskii <eliz@gnu.org>
4806
4807 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
4808 Windows-specific code to w32.c. Change error message text to
4809 match that of Posix platforms.
4810
4811 * w32.c (w32_copy_file): New function, most of the code copied and
4812 reworked from Fcopy_file. Improve error handling. Plug memory
4813 leak when errors are thrown. Support file names outside of the
4814 current codepage. (Bug#7100)
4815
4816 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
4817
4818 * lread.c (load_path_default): Prototype.
4819
4820 2013-12-13 Glenn Morris <rgm@gnu.org>
4821
4822 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
4823 (dump_path): Remove.
4824 (load-path-default): Remove `changed' argument.
4825 Do not set dump_path permanently. Simplify.
4826 (init_lread): Simplify.
4827 (syms_of_lread): Remove dump_path.
4828
4829 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
4830
4831 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
4832 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
4833 2013-12-12 font-related change to avoid Bug#16128, which
4834 is quite hard to fix without even more substantial changes.
4835
4836 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
4837
4838 * font.c (font_close_object): Check for live frame (Bug#16128).
4839
4840 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
4841
4842 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
4843 Return ptrdiff_t, not int, since it's a buffer size.
4844 Reindent/reparen some macros to a more Gnuish style.
4845
4846 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
4847
4848 Avoid undefined behavior with huge regexp interval counts.
4849 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
4850 since it's now specialized to interval counts. All uses changed.
4851 Do not assume wraparound on signed integer overflow.
4852 (regex_compile): Simplify based on the above changes.
4853
4854 2013-12-12 Eli Zaretskii <eliz@gnu.org>
4855
4856 Support file names on MS-Windows that use characters outside of
4857 the current system codepage. (Bug#7100)
4858
4859 * w32.c (get_file_security, set_file_security)
4860 (create_symbolic_link): Separate pointers and boolean flags for
4861 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
4862 non-zero, else the former.
4863 (codepage_for_filenames, filename_to_utf16, )
4864 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
4865 New functions.
4866 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
4867 characters.
4868 (normalize_filename): Lose the DBCS code, now works on UTF-8.
4869 Accept only one argument; all callers changed.
4870 (dostounix_filename): Remove the second argument, now works in
4871 UTF-8. All callers changed.
4872 (parse_root): Lose DBCS code.
4873 (get_long_basename, w32_get_short_filename, init_environment)
4874 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
4875 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
4876 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
4877 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
4878 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
4879 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
4880 otherwise.
4881 (ansi_encode_filename): New function.
4882 (get_emacs_configuration, get_emacs_configuration_options):
4883 Functions deleted.
4884 (add_volume_info, GetCachedVolumeInformation): Run the input file
4885 name through unixtodos_filename, to ensure it is stored and
4886 referenced in canonical form.
4887 (get_volume_info): Lose the DBCS code, now works in UTF-8.
4888 (logon_network_drive, sys_link, utime): Improve error handling.
4889 (sys_access): New function.
4890 (hashval, generate_inode_val): Unused functions deleted.
4891 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
4892 (check_windows_init_file): Convert error message from UTF-8 to
4893 ANSI codepage, for display in the message box.
4894 (globals_of_w32): Set w32_unicode_filenames according to the OS
4895 version.
4896
4897 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
4898 w32_unicode_filenames is non-zero, ANSI mode otherwise.
4899 (syms_of_w32term): Declare w32-unicode-filenames.
4900
4901 * w32proc.c (new_child, delete_child): Remove code that handled
4902 unused pending_deletion and input_file members of the child struct.
4903 (create_child, sys_spawnve): Convert all file names to ANSI
4904 codepage. Use ANSI APIs explicitly; forcibly fail if any file
4905 name cannot be encoded in ANSI codepage. Don't use
4906 unixtodos_filename, mirror slashes by hand.
4907 (record_infile, record_pending_deletion): Functions deleted.
4908 (Fw32_short_file_name): Call w32_get_short_filename instead of
4909 GetShortPathName.
4910
4911 * w32notify.c (add_watch): Work in Unicode mode when
4912 w32_unicode_filenames is non-zero, ANSI mode otherwise.
4913 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
4914 instead, do the same with Lisp primitives.
4915
4916 * w32fns.c (file_dialog_callback, Fx_file_dialog)
4917 (Fsystem_move_file_to_trash, Fw32_shell_execute)
4918 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
4919 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
4920 (Fw32_shell_execute): Improve error reporting.
4921 (Fdefault_printer_name): Ifdef away for Cygwin.
4922
4923 * w32.h (struct _child_process): Remove input_file and
4924 pending_deletion members that are no longer used.
4925 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
4926 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
4927 (ansi_encode_filename): New and updated prototypes.
4928
4929 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
4930 APIs explicitly.
4931 (unexec): Don't use dostounix_filename, it expects a file name in
4932 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
4933 ANSI encoding.
4934
4935 * fileio.c (Ffile_name_directory, file_name_as_directory)
4936 (directory_file_name, Fexpand_file_name)
4937 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
4938 arguments of dostounix_filename.
4939 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
4940 use MAX_UTF8_PATH for size of file-name strings.
4941 (emacs_readlinkat): Build an explicitly unibyte string for file
4942 names.
4943 (syms_of_fileio) <file-name-coding-system>:
4944 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
4945
4946 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
4947 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
4948 directories to UTF-8.
4949 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
4950 environment, and each element of the input PATH, to UTF-8.
4951
4952 * dired.c (file_attributes): Use build_unibyte_string explicitly
4953 to make Lisp strings from user and group names.
4954
4955 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
4956 decode_file.
4957
4958 * coding.c (decode_file_name, encode_file_name): New functions.
4959
4960 * termcap.c (tgetent): Adapt to the change in arguments of
4961 dostounix_filename.
4962
4963 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
4964 names.
4965
4966 * msdos.c (dostounix_filename, init_environment): Adapt to the
4967 change in arguments of dostounix_filename.
4968
4969 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
4970 [WINDOWSNT]: Encode file names passed to the image libraries in
4971 ANSI codepage.
4972
4973 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
4974 [WINDOWSNT]: Convert file names to the current ANSI codepage.
4975
4976 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
4977 arguments of dostounix_filename.
4978
4979 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
4980
4981 * font.h (struct font_entity) [HAVE_NS]: New field to record
4982 font driver which was used to create this entity.
4983 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
4984 frame where the font was opened.
4985 (font_close_object): Add prototype.
4986 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
4987 (font_close_object): Not static any more. Lost frame arg.
4988 Adjust comment and users.
4989 * alloc.c (cleanup_vector): Call font_close_object to adjust
4990 per-frame font counters correctly. If HAVE_NS, also call
4991 driver-specific cleanup for font-entity objects.
4992 * ftfont.c (ftfont_open):
4993 * nsfont.m (nsfont_open):
4994 * w32font.c (w32font_open_internal):
4995 * xfont.c (xfont_open):
4996 * xftfont.c (xftfont_open): Save frame pointer in font object.
4997 * macfont.m (macfont_open): Likewise.
4998 (macfont_descriptor_entity): Save driver pointer to be able
4999 to call its free_entity routine when font-entity is swept.
5000 * ftxfont.c (ftxfont_open): Add eassert because frame
5001 pointer should be saved by ftfont_driver.open.
5002
5003 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
5004
5005 * xterm.c (x_make_frame_visible): Restore hack which is needed when
5006 input polling is used. This is still meaningful for Cygwin, see
5007 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
5008 * keyboard.c (poll_for_input_1, input_polling_used):
5009 Define unconditionally.
5010 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
5011 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
5012 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
5013 (font_for_char): Prefer ptrdiff_t to int for buffer position.
5014 (face_for_char): Likewise. Rearrange eassert and return ASCII
5015 face for CHAR_BYTE8_P.
5016 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
5017
5018 2013-12-11 Ken Brown <kbrown@cornell.edu>
5019
5020 * dispextern.h (erase_phys_cursor):
5021 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
5022
5023 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
5024
5025 * nsterm.m (x_free_frame_resources):
5026 * term.c (tty_free_frame_resources):
5027 * xterm.c (x_free_frame_resources): Do not check for non-NULL
5028 face cache because it's implied by free_frame_faces anyway.
5029 * w32term.c (x_free_frame_resources): Likewise. Do not call
5030 free_frame_faces twice.
5031
5032 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
5033
5034 * editfns.c (Fformat_time_string): Mention %F in the doc.
5035
5036 2013-12-11 Martin Rudalics <rudalics@gmx.at>
5037
5038 * window.c (resize_frame_windows): Don't return immediately when
5039 the root window's size doesn't change - the minibuffer window
5040 may still have to be repositioned/resized.
5041 * xfns.c (Fx_create_frame): Always change the frame size after
5042 initializing the frame's faces.
5043 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
5044 change_frame_size should already have done it.
5045 (x_new_font): Assign new tool- and menu-bar heights.
5046 (x_set_window_size_1): Account for tool- and menu-bar heights
5047 (Bug#16013). Don't set pixel sizes since change_frame_size
5048 should already have done it.
5049
5050 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
5051
5052 Remove the option of using libcrypto.
5053 * Makefile.in (LIB_CRYPTO): Remove.
5054 (LIBES): Don't use it.
5055
5056 2013-12-11 Juri Linkov <juri@jurta.org>
5057
5058 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
5059 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
5060
5061 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
5062
5063 * xdisp.c (display_tool_bar_line): Don't extend on a previously
5064 drawn tool bar items (Bug#16058).
5065 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
5066
5067 2013-12-09 Ken Brown <kbrown@cornell.edu>
5068
5069 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
5070
5071 * lisp.h (get_frame_param): Adjust conditions for prototype
5072 declaration.
5073
5074 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
5075
5076 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
5077 Avoid unused macro warning if configured --without-xft.
5078
5079 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
5080
5081 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
5082
5083 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
5084
5085 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
5086
5087 * emacs.c (main): Call fixup_locale a second time for GNUstep.
5088
5089 2013-12-08 Martin Rudalics <rudalics@gmx.at>
5090
5091 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
5092
5093 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
5094
5095 Use libcrypto's checksum implementations if available, for speed.
5096 * Makefile.in (LIB_CRYPTO): New macro.
5097 (LIBES): Use it.
5098
5099 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
5100 The macro didn't conform to C99 due to type mismatch,
5101 which caused compilation failure with Sun C 5.12,
5102 and it was confusing anyway. Include window.h to declare
5103 redisplay_other_windows.
5104
5105 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
5106
5107 * window.c (set_window_buffer): Update mode line (bug#16084).
5108
5109 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
5110
5111 Fix minor problems found by static checking.
5112 * keyboard.c (poll_for_input_1, input_polling_used):
5113 Define only if HAVE_NTGUI.
5114 * xmenu.c (popup_activate_callback): Omit unnecessary
5115 check against USE_X_TOOLKIT, which must be defined here anyway.
5116 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
5117 Now static.
5118
5119 2013-12-07 Martin Rudalics <rudalics@gmx.at>
5120
5121 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
5122
5123 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
5124
5125 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
5126
5127 * nsterm.m (x_set_window_size): Remove fprintf.
5128 (init): Define always. Set applicationDidFinishLaunchingCalled
5129 for GNUstep.
5130 (applicationDidFinishLaunching:):
5131 Set applicationDidFinishLaunchingCalled.
5132 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
5133 not called.
5134
5135 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
5136
5137 Pixel resize changes for NS (Bug#16049).
5138 * nsterm.m (x_set_window_size): Change parameters rows/cols to
5139 height/width. row/cols are locals.
5140 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
5141 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
5142 (windowWillResize): Remove gsextra. Calculate extra as in
5143 updateFrameSize.
5144 (x_new_font): Don't change frame size if fullscreen.
5145 Change size pixelwise.
5146
5147 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
5148 comment in xfns.c. Change to pixelwise call.
5149
5150 2013-12-06 Eli Zaretskii <eliz@gnu.org>
5151
5152 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
5153 (Bug#16070)
5154
5155 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
5156
5157 * xterm.c (input_signal_count): Remove.
5158 (x_dispatch_event): Define unconditionally.
5159 (x_make_frame_visible): Process X events until the frame
5160 is really visible (Bug#16027).
5161 * xterm.h (x_dispatch_event): Declare unconditionally.
5162
5163 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
5164
5165 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
5166
5167 * nsterm.m (x_set_window_size): Handle pixelwise.
5168
5169 2013-12-05 Martin Rudalics <rudalics@gmx.at>
5170
5171 * w32term.c (x_new_font):
5172 * xterm.c (x_new_font): Calculate new frame size from new font
5173 size (Bug#16028).
5174
5175 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
5176
5177 * lisp.h (FOR_EACH_TAIL): New macro.
5178 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
5179
5180 * window.c (select_window): Call second wset_redisplay before we change
5181 selected_window (bug#16034).
5182
5183 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
5184
5185 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
5186
5187 2013-12-04 Eli Zaretskii <eliz@gnu.org>
5188
5189 * w32xfns.c: Include window.h, to avoid a compiler warning.
5190
5191 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
5192
5193 * window.c (window_scroll): Mark window for redisplay (bug#16034).
5194 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
5195 window_scroll takes care of it.
5196 (Fset_window_point, Fdelete_other_windows_internal)
5197 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
5198 (Fsplit_window_internal, Fdelete_window_internal)
5199 (Fresize_mini_window_internal, Fset_window_configuration)
5200 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
5201 cause redisplay instead of forcing a complete redisplay.
5202 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
5203 we're only affecting the selected_window.
5204
5205 2013-12-04 Eli Zaretskii <eliz@gnu.org>
5206
5207 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
5208 directional control characters. Update type and category
5209 determination according to the UBA from Unicode v6.3.
5210 (bidi_category_t): New category EXPLICIT_FORMATTING.
5211
5212 * dispextern.h (bidi_type_t): Update to include new bidirectional
5213 properties introduced with Unicode v6.3. (Bug#16043)
5214
5215 2013-12-04 Martin Rudalics <rudalics@gmx.at>
5216
5217 * xterm.c (XTflash): Fix coordinate of bottom area to flash
5218 (Bug#16044).
5219
5220 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
5221
5222 * font.c (font_list_entities): Remove dummy assignment.
5223 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
5224 used on graphic displays only. Remove unused 'font_encoder' member.
5225 (struct font_bitmap): Remove unused 'extra' member.
5226 * nsfont.m (nsfont_open):
5227 * w32font.c (w32font_open_internal):
5228 * ftfont.c (ftfont_get_bitmap): Adjust users.
5229
5230 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
5231
5232 Use bool for boolean.
5233 * tparam.c (tparam1):
5234 * undo.c (record_point, record_property_change):
5235 Use bool for boolean, for local vars that are always true or false.
5236
5237 Minor integer overflow fixes (Bug#16033).
5238 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
5239 This improves on the previous fix to this function.
5240 (window_resize_check): When summing up pixel counts, don't rely on
5241 undefined behavior if the sum overflows.
5242
5243 2013-12-03 Martin Rudalics <rudalics@gmx.at>
5244
5245 * window.c (Fset_window_new_pixel): Don't choke at negative
5246 argument value (Bug#16033).
5247
5248 * xfns.c (Fx_create_frame): Add another call to change_frame_size
5249 to avoid crash in window_box_height.
5250
5251 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
5252 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
5253 calculation.
5254 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
5255
5256 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
5257
5258 Minor integer overflow fixes.
5259 * window.c (Fset_window_new_pixel, grow_mini_window):
5260 * xdisp.c (Fwindow_text_pixel_size):
5261 Avoid undefined behavior on signed integer overflow.
5262 * xfns.c (x_set_mouse_color):
5263 Check that drag shape fits in 'unsigned', since that's what X wants.
5264
5265 2013-12-02 Eli Zaretskii <eliz@gnu.org>
5266
5267 Improve reporting of fatal exception on MS-Windows.
5268 * w32fns.c (my_exception_handler): New function.
5269 (globals_of_w32fns): Set it up as the unhandled exception
5270 handler. Initialize exception code and address to zeros.
5271 (emacs_abort): If the exception code and address are available,
5272 print them at the beginning of the backtrace. Fix the format of
5273 printing addresses (was producing 0x0x12345678 on XP).
5274 (Bug#15994)
5275
5276 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
5277
5278 * eval.c (Fbacktrace__locals): New function.
5279 (syms_of_eval): Defsubr it.
5280
5281 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
5282
5283 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
5284 Define here to unify between...
5285 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
5286 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
5287
5288 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5289
5290 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
5291
5292 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
5293 fringe background extension.
5294 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
5295 because they are now always the same as `left' and `width',
5296 respectively. Remove code for the case that `width' and
5297 `sb_width' are different.
5298
5299 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
5300
5301 Fix minor problems found by static checking.
5302 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
5303 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
5304 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
5305
5306 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
5307
5308 * image.c (imagemagick_compute_animated_image): Don't crash if we
5309 have an animation with different-sized images (bug#15313).
5310
5311 2013-11-30 Martin Rudalics <rudalics@gmx.at>
5312
5313 Remove some unused items introduced during pixelwise change.
5314 * window.c (window_resize_total_check): Remove unused function.
5315 * xdisp.c (remember_mouse_glyph): Remove unused label.
5316 (Ftool_bar_height): Move declaration inside #if.
5317 * xterm.c (x_set_window_size): Don't use r and c.
5318
5319 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
5320
5321 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
5322 `value' and `endp'.
5323
5324 * window.c (Fset_window_configuration): Comment out unused variables.
5325
5326 * w32term.c (w32_read_socket): Remove unused variable `buf'.
5327
5328 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
5329
5330 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
5331
5332 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
5333
5334 * gnutls.c (gnutls_audit_log_function): Only declare and define if
5335 HAVE_GNUTLS3 (Bug#16001).
5336
5337 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
5338 if interrupts are deferred (Bug#15801).
5339
5340 2013-11-30 Martin Rudalics <rudalics@gmx.at>
5341
5342 Support resizing frames and windows pixelwise.
5343 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
5344 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
5345 (struct glyph_matrix): Replace window_left_col and
5346 window_top_line by window_pixel_left and window_pixel_top.
5347 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
5348 Minor rewrite.
5349 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
5350 (draw_window_divider, move_it_to, x_draw_right_divider)
5351 (x_draw_bottom_divider, change_frame_size): Add or fix
5352 declarations.
5353 * dispnew.c (change_frame_size_1): Change prototype.
5354 (adjust_glyph_matrix, required_matrix_width)
5355 (adjust_frame_glyphs_for_window_redisplay): Use pixel
5356 values instead of lines and columns.
5357 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
5358 WINDOW_TOTAL_FRINGE_WIDTH.
5359 (handle_window_change_signal, do_pending_window_change)
5360 (init_display): Adjusts calls of change_frame_size.
5361 (change_frame_size, change_frame_size_1): Handle pixelwise
5362 changes.
5363 * frame.c (Qright_divider_width, Qbottom_divider_width):
5364 New Lisp objects.
5365 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
5366 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
5367 (x_set_internal_border_width, x_set_vertical_scroll_bars)
5368 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
5369 values.
5370 (set_frame_param): New function.
5371 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
5372 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
5373 (Ffringe_width, Fborder_width, Fright_divider_width)
5374 (Fbottom_divider_width): New functions, defsubr them.
5375 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
5376 New argument pixelwise.
5377 (struct frame_parm_table): New members Qright_divider_width and
5378 Qbottom_divider_width.
5379 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
5380 (x_report_frame_params): Handle Qright_divider_width and
5381 Qbottom_divider_width.
5382 (x_set_right_divider_width, x_set_bottom_divider_width):
5383 New functions.
5384 (frame_resize_pixelwise): New option.
5385 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
5386 new_pixelwise, right_divider_width and bottom_divider_width;
5387 remove total_lines; rename text_lines, text_cols, new_text_lines
5388 and new_text_cols to text_height, text_width, new_height and
5389 new_width respectively.
5390 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
5391 FRAME_TEXT_WIDTH respectively.
5392 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
5393 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
5394 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
5395 New macros.
5396 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
5397 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
5398 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
5399 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
5400 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
5401 (FRAME_TOTAL_COLS_ARG): Remove macro.
5402 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
5403 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
5404 (x_wm_set_size_hint): Handle frame pixel sizes.
5405 * indent.c (compute_motion, Fcompute_motion):
5406 Call window_body_width instead of window_body_cols.
5407 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
5408 (make_lispy_position): Handle right and bottom dividers.
5409 (Fsuspend_emacs): Pixelize call of change_frame_size.
5410 * keyboard.h: Extern Qright_divider, Qbottom_divider.
5411 * lisp.h: Extern set_frame_param.
5412 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
5413 x_set_window_size.
5414 (Fx_create_frame): Add entry for vertical_drag_cursor.
5415 Pixelize call of change_frame_size.
5416 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
5417 * nsterm.m (ns_update_window_end): Optionally draw right
5418 divider.
5419 (x_set_window_size): Add argument pixelwise.
5420 Call check_frame_size and change_frame_size with pixelwise zero.
5421 (ns_draw_window_divider): New function.
5422 (ns_redisplay_interface): Add ns_draw_window_divider.
5423 (updateFrameSize:): Call change_frame_size with pixelwise zero.
5424 (x_new_font): Call x_set_window_size with pixelwise zero.
5425 * print.c (print_object): For a window print its sequence
5426 number again.
5427 * term.c (Fresume_tty): Pixelize call of change_frame_size.
5428 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
5429 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
5430 (w32_createwindow): Use scroll bar area width.
5431 (w32_wnd_proc): Handle bottom divider width.
5432 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
5433 (Fx_create_frame): Default divider width parameters.
5434 Caclulate sizes pixelwise. Add vertical drag cursor support.
5435 (x_create_tip_frame): Default divider widths to zero.
5436 Pixelize call to change_frame_size.
5437 (Fx_show_tip): Add handling of divider widths. Pixelize window
5438 position and sizes.
5439 (Fw32_frame_rect): New function.
5440 (frame_parm_handler w32_frame_parm_handlers): Add divider
5441 widths.
5442 (Vx_window_vertical_drag_shape): Add variable.
5443 * w32inevt.c (resize_event, maybe_generate_resize_event):
5444 Pixelize change_frame_size calls.
5445 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
5446 call.
5447 * w32term.c (w32_draw_window_divider): New function.
5448 (x_update_window_end): Handle right divider.
5449 (w32_draw_fringe_bitmap, x_scroll_run)
5450 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
5451 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
5452 Calculate new frame sizes pixelwise.
5453 (x_new_font): Pixelize call to x_set_window_size.
5454 (x_check_fullscreen): Pixelize call to change_frame_size.
5455 (x_set_window_size_1, x_set_window_size): New argument
5456 pixelwise. Calculate pixelwise.
5457 (x_wm_set_size_hint): Use scroll bar area width.
5458 (w32_redisplay_interface): Add w32_draw_window_divider.
5459 * w32term.h (struct w32_output): Add vertical drag cursor.
5460 * widget.c (set_frame_size, update_wm_hints)
5461 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
5462 change_frame_size.
5463 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
5464 * window.c (sequence_number): Restore.
5465 (Fwindow_pixel_width, Fwindow_pixel_height)
5466 (Fwindow_mode_line_height, Fwindow_header_line_height)
5467 (window_pixel_to_total, Frun_window_scroll_functions)
5468 (Fset_window_new_pixel, window_resize_apply_total)
5469 (Fwindow_resize_apply_total): New functions.
5470 (window_body_height, window_body_width): Rename from
5471 window_body_lines. New argument PIXELWISE.
5472 Calculate pixelwise.
5473 (Fwindow_body_height, Fwindow_body_width): New argument
5474 PIXELWISE.
5475 (coordinates_in_window, window_relative_x_coord): Use window's
5476 pixel width instead of total width.
5477 (replace_window, recombine_windows): Initialize pixel values.
5478 (resize_root_window, resize_frame_windows, grow_mini_window)
5479 (shrink_mini_window): New argument PIXELWISE.
5480 Calculate pixelwise.
5481 (Fdelete_other_windows_internal, adjust_window_margins)
5482 (window_resize_check, window_resize_apply)
5483 (Fdelete_window_internal, Fresize_mini_window_internal)
5484 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
5485 (check_frame_size): Rename arguments. New argument PIXELWISE.
5486 Calculate pixelwise.
5487 (set_window_buffer): Make samebuf bool. Run configuration change
5488 hook only if buffer changed.
5489 (Fset_window_buffer): Rewrite doc-string.
5490 (make_window): Initialize new_pixel slot.
5491 (Fwindow_resize_apply): Check pixel size of root window.
5492 (Fsplit_window_internal): Call 2nd argument pixel_size.
5493 Calculate pixelwise.
5494 (Fscroll_left, Fscroll_right): Call window_body_width instead of
5495 window_body_cols.
5496 (save_window_data): New slots frame_text_width,
5497 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
5498 (saved_window): New slots pixel_left, pixel_top, pixel_height,
5499 pixel_width.
5500 (Fcurrent_window_configuration, Fset_window_configuration)
5501 (save_window_save, compare_window_configurations): Handle new
5502 slots in save_window_data and saved_window.
5503 (Fset_window_scroll_bars): Fix doc-string.
5504 (window_resize_pixelwise): New variable.
5505 (coordinates_in_window, Fcoordinates_in_window_p):
5506 Handle dividers.
5507 (make_parent_window): Adjust sequence_number.
5508 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
5509 New functions.
5510 * window.h (struct window): New members new_pixel, pixel_left,
5511 pixel_top, pixel_width, pixel_height. Restore sequence_number.
5512 (wset_new_pixel): New function.
5513 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
5514 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
5515 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
5516 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
5517 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
5518 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
5519 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
5520 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
5521 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
5522 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
5523 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
5524 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
5525 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
5526 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
5527 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
5528 Rewrite.
5529 (resize_frame_windows, grow_mini_window, shrink_mini_window)
5530 (window_body_width, check_frame_size): Adapt external declarations.
5531 * xdisp.c (last_max_ascent): New integer.
5532 (window_text_bottom_y): Handle bottom divider.
5533 (window_box_width, window_box_height): Calculate pixelwise.
5534 (get_glyph_string_clip_rects): Handle right divider.
5535 (remember_mouse_glyph): When windows are resized pixelwise
5536 proceed with width and height set to 1.
5537 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
5538 WINDOW_TOTAL_WIDTH.
5539 (move_it_to): Calculate and return maximum x position
5540 encountered.
5541 (Fwindow_text_pixel_size): New function.
5542 (resize_mini_window, update_tool_bar): Calculate pixelwise.
5543 (tool_bar_lines_needed): Rename to tool_bar_height.
5544 Calculate pixelwise.
5545 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
5546 Calculate pixelwise.
5547 (redisplay_tool_bar): Calculate pixelwise.
5548 (redisplay_window): Calculate pixelwise. Handle dividers.
5549 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
5550 (x_draw_vertical_border): Handle dividers.
5551 (define_frame_cursor1): Handle vertical drag cursor.
5552 (x_draw_right_divider, x_draw_bottom_divider): New functions.
5553 (expose_window): Calculate pixelwise. Handle dividers.
5554 (init_xdisp): Initialize pixel values.
5555 * xfaces.c (Qwindow_divider): New face.
5556 (realize_basic_faces): Realize it.
5557 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
5558 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
5559 (x_set_scroll_bar_default_width): Default actual width to 16.
5560 (Fx_create_frame): Set sizes pixelwise.
5561 (x_create_tip_frame): Default divider widths to zero.
5562 Pixelize call of change_frame_size.
5563 (Fx_show_tip): Handle divider widths. Initial pixel position
5564 and sizes.
5565 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
5566 (Vx_window_vertical_drag_shape): New option.
5567 * xmenu.c (free_frame_menubar): Pixelize call of
5568 x_set_window_size.
5569 * xterm.c (x_draw_window_divider): New function.
5570 (x_update_window_end): Optionally draw right divider.
5571 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
5572 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
5573 (handle_one_xevent, x_new_font): Calculate pixelwise.
5574 (x_set_window_size_1, x_set_window_size): New argument
5575 pixelwise. Calculate pixelwise.
5576 (x_wm_set_size_hint): Pixelize call of check_frame_size.
5577 (struct x_redisplay_interface): Add x_draw_window_divider.
5578 * xterm.h (struct x_output): Add vertical_drag_cursor.
5579
5580 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
5581
5582 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
5583 Set invisible frames's `redisplay' when a full redisplay is requested.
5584 (redisplay_window): Set must_be_updated_p instead (bug#15999).
5585 (redisplay_mode_lines): Don't set must_be_updated_p any more.
5586 (display_mode_lines): Set it here instead.
5587
5588 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
5589
5590 * dispextern.h (set_window_update_flags): Remove.
5591
5592 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
5593
5594 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
5595
5596 * xdisp.c (REDISPLAY_SOME_P): New macro.
5597 (redisplay_internal): Use it (bug#15999).
5598 (prepare_menu_bars, redisplay_window): Use it as well.
5599
5600 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
5601
5602 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
5603
5604 * w32font.c (g_b_init_get_char_width_32_w): New static var.
5605 (globals_of_w32font): Zero it out.
5606 (GetCharWidth32W_Proc): New function pointer.
5607 (get_char_width_32_w): New function.
5608 (compute_metrics): If get_glyph_outline_w returns an error, try
5609 get_char_width_32_w before declaring a failure. This avoids
5610 punishing raster (a.k.a. "bitmap") fonts by slowing down
5611 redisplay. (Bug#6364).
5612
5613 2013-11-29 Eli Zaretskii <eliz@gnu.org>
5614
5615 * xdisp.c (clear_mouse_face): Don't invalidate the entire
5616 mouse-highlight info, just signal frame_up_to_date_hook that mouse
5617 highlight needs to be redisplayed. (Bug#15913)
5618
5619 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
5620
5621 Fix minor problems found by static checking.
5622 * buffer.h (struct buffer_text, struct buffer):
5623 * frame.h (struct frame):
5624 * window.h (struct window):
5625 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
5626 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
5627 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
5628 no-longer-valid use of HAVE_MENUS.
5629 * xdisp.c (propagate_buffer_redisplay): Now static.
5630
5631 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
5632
5633 * xmenu.c (Fmenu_or_popup_active_p):
5634 * window.c (Fset_window_configuration):
5635 * menu.c (Fx_popup_menu, Fx_popup_dialog):
5636 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
5637 * fns.c (Fyes_or_no_p):
5638 * editfns.c (Fmessage_box, Fmessage_or_box):
5639 * alloc.c (make_save_ptr_ptr):
5640 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
5641
5642 * window.c (Fset_window_configuration): Move select_window later.
5643
5644 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
5645
5646 Refine redisplay optimizations to only redisplay *some* frames/windows
5647 rather than all of them.
5648 * xdisp.c (REDISPLAY_SOME): New constant.
5649 (redisplay_other_windows, wset_redisplay, fset_redisplay)
5650 (bset_redisplay, bset_update_mode_line): New functions.
5651 (message_dolog): Use bset_redisplay.
5652 (clear_garbaged_frames): Use fset_redisplay.
5653 (echo_area_display): Use wset_redisplay.
5654 (buffer_shared_and_changed): Remove.
5655 (prepare_menu_bars): Call Vpre_redisplay_function before updating
5656 frame titles. Compute the actual set of windows redisplayed.
5657 Don't update frame titles and menu bars for frames that don't need to
5658 be redisplayed.
5659 (propagate_buffer_redisplay): New function.
5660 (AINC): New macro.
5661 (redisplay_internal): Use it. Be more selective in the set of windows
5662 we redisplay. Propagate windows_or_buffers_changed to
5663 update_mode_lines a bit later to simplify the code.
5664 (mark_window_display_accurate_1): Reset window and buffer's
5665 `redisplay' flag.
5666 (redisplay_window): Do nothing if neither the window nor the buffer nor
5667 the frame needs redisplay.
5668 * window.h (struct window): Add `redisplay' field.
5669 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
5670 (redisplay_other_windows, window_list): New declarations.
5671 * window.c (select_window, Fset_window_start): Use wset_redisplay.
5672 (window_list): Not static any more.
5673 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
5674 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
5675 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
5676 * frame.c (Fmake_frame_visible): Don't redisplay everything.
5677 * frame.h (struct frame): Add `redisplay' field.
5678 Move `external_menu_bar' bitfield next to other bit-fields.
5679 (SET_FRAME_GARBAGED): Use fset_redisplay.
5680 (SET_FRAME_VISIBLE): Don't garbage the frame;
5681 Use redisplay_other_windows.
5682 * buffer.h (struct buffer): Add `redisplay' field.
5683 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
5684 (modify_overlay): Use bset_redisplay.
5685 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
5686
5687 2013-11-28 Eli Zaretskii <eliz@gnu.org>
5688
5689 Support w32 file notifications in batch mode.
5690 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
5691 invalid (which happens in batch mode). If non-interactive, call
5692 handle_file_notifications to store file notification events in the
5693 input queue. (Bug#15933)
5694
5695 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
5696
5697 * w32inevt.c (handle_file_notifications): Now external, not static.
5698
5699 * w32term.h (handle_file_notifications): Provide prototype.
5700
5701 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
5702 init_crit, since init_display, which does that otherwise, is not
5703 called.
5704
5705 2013-11-27 Glenn Morris <rgm@gnu.org>
5706
5707 * Makefile.in ($(lispsource)/international/charprop.el): New.
5708 (emacs$(EXEEXT)): Depend on charprop.el.
5709
5710 2013-11-27 Eli Zaretskii <eliz@gnu.org>
5711
5712 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
5713 deleting portions of the buffer under non-nil REPLACE argument.
5714 (Bug#15973)
5715
5716 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
5717 directory, watch it and not its parent.
5718 (add_watch): Allow empty string in FILE.
5719
5720 2013-11-27 Martin Rudalics <rudalics@gmx.at>
5721
5722 * window.c (Fset_window_start, window_resize_apply)
5723 (window_scroll): Reset window_end_valid (Bug#15957).
5724
5725 2013-11-27 Glenn Morris <rgm@gnu.org>
5726
5727 * Makefile.in (leimdir): Now in lisp source directory.
5728 ($(leimdir)/leim-list.el): Just use ../leim .
5729 * epaths.in (PATH_DUMPLOADSEARCH):
5730 * lread.c (load_path_default):
5731 * nsterm.m (ns_load_path): No more leim directory.
5732
5733 2013-11-26 Andreas Schwab <schwab@suse.de>
5734
5735 * .gdbinit (xgettype): Add cast.
5736
5737 2013-11-26 Glenn Morris <rgm@gnu.org>
5738
5739 Preload leim-list.el.
5740 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
5741 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
5742 is a single directory.
5743
5744 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
5745
5746 bool-vector-subsetp is now the normal direction (Bug#15912).
5747 * data.c (Fbool_vector_subsetp): Test whether the first argument
5748 is a subset of the second one, not the reverse. Add doc string.
5749
5750 Fix minor problems found by static checking.
5751 * lread.c (load_path_default): Now static.
5752 * textprop.c (text_property_stickiness): Be consistent about the
5753 test used when deciding whether to consider the previous character.
5754 This simplifies the code a bit.
5755
5756 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
5757
5758 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
5759
5760 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
5761 (syms_of_frame): Don't defsubr them.
5762
5763 2013-11-25 Glenn Morris <rgm@gnu.org>
5764
5765 * lread.c (load_path_default): Change the sense of the argument.
5766 (init_lread): When EMACSLOADPATH is set, do not ignore changes
5767 from dump_path. When it is not, avoid checking dump_path twice.
5768
5769 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
5770 uninstalled dump_path against installed Vload_path. (Bug#15964)
5771
5772 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
5773
5774 Export get_pos_property to Elisp.
5775 * editfns.c (Fget_pos_property): Rename from get_pos_property.
5776 (syms_of_editfns): Export it to Elisp.
5777
5778 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
5779
5780 2013-11-23 Romain Francoise <romain@orebokech.com>
5781
5782 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
5783 initialization here ...
5784 (syms_of_fileio): ... from here.
5785
5786 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
5787
5788 * lread.c (init_lread): Fix int/Lisp_Object mixup.
5789 Please use --enable-check-lisp-object-type.
5790
5791 2013-11-23 Glenn Morris <rgm@gnu.org>
5792
5793 * process.c (get_process): Explicit error for dead buffers.
5794
5795 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
5796
5797 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
5798
5799 2013-11-23 Glenn Morris <rgm@gnu.org>
5800
5801 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
5802 * lread.c (load_path_check): Take path to check as argument.
5803 (load_path_default): New, split from init_lread.
5804 (init_lread): Move calc of default load-path to load_path_default.
5805 Empty elements in EMACSLOADPATH now stand for the default.
5806 (load-path): Doc fix.
5807 * emacs.c (decode_env_path): Add option to treat empty elements
5808 as nil rather than ".".
5809 * callproc.c (init_callproc_1, init_callproc):
5810 * image.c (Vx_bitmap_file_path):
5811 * lisp.h (decode_env_path):
5812 * lread.c (Vsource_directory):
5813 Update for new argument spec of decode_env_path.
5814
5815 2013-11-22 Eli Zaretskii <eliz@gnu.org>
5816
5817 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
5818 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
5819
5820 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
5821
5822 Fix some dependency problems that cause unnecessary recompiles.
5823 Problem reported by RMS in
5824 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
5825 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
5826 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
5827 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
5828 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
5829 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
5830 (boostrap-clean): No need to remove stamp-oldxmenu.
5831
5832 Fix recently introduced bool vector overrun.
5833 This was due to an optimization that went awry.
5834 Reported by Glenn Morris in
5835 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
5836 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
5837 for empty vectors, undoing the 2013-11-18 change.
5838 * data.c (bool_vector_binop_driver): Rely on this.
5839 Fix bug that occasionally overran the destination.
5840 * lisp.h (struct Lisp_Bool_vector): Document this.
5841
5842 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
5843
5844 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
5845 to handle dialogs.
5846
5847 * nsterm.m (init, run, stop:): Comment out for now, does not work
5848 with dialogs.
5849
5850 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
5851
5852 * charset.c (syms_of_charset): Don't read past end of string.
5853
5854 2013-11-19 Glenn Morris <rgm@gnu.org>
5855
5856 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
5857
5858 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
5859
5860 Add hooks to run on gaining/losing focus. (Bug#15029)
5861 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
5862 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
5863 (syms_of_frame): Add focus-in-hook, focus-out-hook.
5864
5865 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
5866
5867 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
5868 The old names predated the API change that put destination at end.
5869
5870 Improve API of recently-added bool vector functions (Bug#15912).
5871 The old API had (bool-vector-count-matches A B)
5872 and (bool-vector-count-matches-at A B I), which gave the
5873 misleading impression that the two functions were variants, one
5874 with a location I. The new API has (bool-vector-count-population A)
5875 and (bool-vector-count-consecutive A B I) to make the distinction
5876 clearer. The first function no longer has a B argument, since the
5877 caller can easily determine the number of nils if the length and
5878 number of ts is known.
5879 * data.c (Fbool_vector_count_population): Rename from
5880 bool_vector_count_matches, and accept just 1 argument.
5881 (Fbool_vector_count_consecutive): Rename from
5882 Fbool_vector_count_matches_at.
5883
5884 Always allocate at least one bits_word per bool vector.
5885 See Daniel Colascione in:
5886 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
5887 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
5888 * data.c (bool_vector_binop_driver): Rely on this. Tune.
5889 * lisp.h (struct Lisp_Bool_vector): Document this.
5890
5891 2013-11-18 Eli Zaretskii <eliz@gnu.org>
5892
5893 * insdel.c (invalidate_buffer_caches): New function, consolidated
5894 from part of prepare_to_modify_buffer.
5895 (insert_from_gap, prepare_to_modify_buffer):
5896 * coding.c (code_convert_region, code_convert_string):
5897 Call invalidate_buffer_caches. (Bug#15841)
5898
5899 * lisp.h (invalidate_buffer_caches): Add prototype.
5900
5901 2013-11-17 Eli Zaretskii <eliz@gnu.org>
5902
5903 * w32term.c (x_update_window_end): Don't invalidate the entire
5904 mouse-highlight info, just signal frame_up_to_date_hook that mouse
5905 highlight needs to be redisplayed. (Bug#15913)
5906
5907 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
5908
5909 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
5910
5911 2013-11-16 Eli Zaretskii <eliz@gnu.org>
5912
5913 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
5914 while we are using Vprin1_to_string_buffer.
5915
5916 * keymap.c (describe_map): Don't crash if PT is 1 both before and
5917 after inserting the description string. (Bug#15907)
5918
5919 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
5920
5921 * data.c: Work around bogus GCC diagnostic about shift count.
5922 Reported by Eli Zaretskii in
5923 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
5924 (pre_value): New function.
5925 (count_trailing_zero_bits): Use it.
5926
5927 2013-11-15 Eli Zaretskii <eliz@gnu.org>
5928
5929 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
5930 assume C macros are not supported even under -g3 in these old GCC
5931 versions.
5932
5933 2013-11-15 Leo Liu <sdl.web@gmail.com>
5934
5935 * minibuf.c (Ftry_completion, Fall_completions)
5936 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
5937
5938 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
5939
5940 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
5941 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
5942 This avoids placing unnecessary constants into the Emacs code.
5943
5944 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
5945
5946 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
5947 for Cygwin w32 build.
5948
5949 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
5950 for Cygwin w32 build. (Bug#15892)
5951
5952 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
5953
5954 Simplify, port and tune bool vector implementation.
5955 * alloc.c (bool_vector_exact_payload_bytes)
5956 (bool_vector_payload_bytes): Remove.
5957 (bool_vector_fill): Return its argument.
5958 * alloc.c (bool_vector_fill):
5959 * lread.c (read1):
5960 * print.c (print_object):
5961 Simplify by using bool_vector_bytes.
5962 * alloc.c (make_uninit_bool_vector):
5963 New function, broken out from Fmake_bool_vector.
5964 (Fmake_bool_vector): Use it. Use tail call.
5965 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
5966 * data.c (BITS_PER_ULL): New constant.
5967 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
5968 if long long versions don't exist.
5969 (shift_right_ull): New function.
5970 (count_one_bits_word): New function, replacing popcount_bits_word
5971 macro. Don't assume that bits_word is no wider than long long.
5972 (count_one_bits_word, count_trailing_zero_bits):
5973 Don't assume that bits_word is no wider than long long.
5974 * data.c (bool_vector_binop_driver, bool_vector_not):
5975 * fns.c (Fcopy_sequence):
5976 * lread.c (read1):
5977 Create an uninitialized destination, to avoid needless work.
5978 (internal_equal): Simplify.
5979 (Ffillarray): Prefer tail call.
5980 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
5981 contain at least one word.
5982 (bits_word_to_host_endian): Prefer if to #if. Don't assume
5983 chars are narrower than ints.
5984 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
5985 * fns.c (Fcopy_sequence):
5986 Simplify and tune.
5987 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
5988 Don't try to port to hosts where bits_word values have holes; the
5989 code wouldn't work there anyway. Verify this assumption, though.
5990 (bool_vector_bytes): New function.
5991 (make_uninit_bool_vector): New decl.
5992 (bool_vector_fill): Now returns Lisp_Object.
5993
5994 * xfns.c (xic_create_fontsetname):
5995 * xrdb.c (gethomedir): Prefer tail calls.
5996
5997 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
5998
5999 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
6000 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
6001
6002 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
6003 that requires a return value.
6004 (Fset_buffer_modified_p): Take advantage of this change to do
6005 a tail call.
6006
6007 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
6008
6009 * buffer.c (Frestore_buffer_modified_p): Sync it with
6010 Fset_buffer_modified_p.
6011 (Fforce_mode_line_update): New function, moved from subr.el.
6012 (Fset_buffer_modified_p): Use them.
6013 (syms_of_buffer): Defsubr Fforce_mode_line_update.
6014
6015 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
6016
6017 * search.c (find_newline): Rewrite to prefer offsets to pointers.
6018 This avoids undefined behavior when subtracting pointers into
6019 different aways. On my platform it also makes the code a tad
6020 smaller and presumably faster.
6021
6022 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
6023
6024 * keyboard.c (command_loop_1): Use region-extract-function.
6025 * insdel.c (Qregion_extract_function): Not static any more (can we
6026 stop pretending that these vars can benefit from being marked static?).
6027
6028 2013-11-09 Eli Zaretskii <eliz@gnu.org>
6029
6030 * search.c (find_newline): If buffer text is relocated during the
6031 "dumb loop", adjust C pointers into buffer text to follow suit.
6032 (Bug#15841)
6033
6034 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
6035
6036 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
6037 for conversion (Bug#15837).
6038
6039 2013-11-09 Eli Zaretskii <eliz@gnu.org>
6040
6041 * fileio.c (Finsert_file_contents): Invalidate the newline cache
6042 for the entire range of inserted characters. (Bug#15841)
6043
6044 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
6045
6046 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
6047 unspecified.
6048 (realize_default_face): Remove assignment to distant-foreground if
6049 unspecified (Bug#15815).
6050
6051 2013-11-08 Eli Zaretskii <eliz@gnu.org>
6052
6053 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
6054 cache-long-scans disabled, since we don't want to call
6055 prepare_to_modify_buffer (in insert_1_both) for each message we
6056 display.
6057
6058 * buffer.h (bset_cache_long_scans): New INLINE function, moved
6059 from buffer.c. Improve commentary to the buffer field setter
6060 functions.
6061
6062 * buffer.c (bset_cache_long_scans): Static function deleted.
6063 Improve commentary to the buffer field setter functions.
6064 (init_buffer_once): Default for cache-long-scans changed to t.
6065 (Bug#15797)
6066
6067 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
6068
6069 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
6070
6071 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
6072 This bug was introduced in my 2013-06-21 change, and caused
6073 struct Lisp_Sub_Char_Table objects to be given too many slots,
6074 which broke 'make -C admin/unidata'.
6075
6076 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
6077
6078 Import changes from mac-port 4.5.
6079 * macfont.m (mac_font_copy_default_descriptors_for_language)
6080 (mac_font_copy_default_name_for_charset_and_languages): Declare.
6081 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
6082 (macfont_language_default_font_names): New.
6083 (macfont_list): Rearrange language/charset code.
6084 (macfont_close): Don't check for macfont_info->cache.
6085 (mac_ctfont_create_preferred_family_for_attributes): New font
6086 selection code, call
6087 mac_font_copy_default_name_for_charset_and_languages.
6088 (mac_font_copy_default_descriptors_for_language)
6089 (mac_font_copy_default_name_for_charset_and_languages): New functions.
6090
6091 * macfont.h (kCTVersionNumber10_9): Define if not defined.
6092
6093 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
6094
6095 Port to C11 aligned_alloc, and fix some integer overflows.
6096 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
6097 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
6098 and use of posix_memalign replaced with aligned_alloc.
6099 (aligned_alloc): New function, defined or declared as needed.
6100 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
6101 Don't undef; configure.ac now does this.
6102 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
6103 (calloc, aligned_alloc): Check for integer overflow.
6104 (aligned_alloc): Rename from memalign. All uses changed.
6105 (memalign): New function, an alias for aligned_alloc.
6106
6107 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
6108
6109 * xdisp.c (redisplay_internal): Fix typo in last change.
6110
6111 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
6112
6113 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
6114
6115 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
6116
6117 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
6118 redisplay--mode-lines-cause.
6119 (redisplay_internal): Keep them uptodate. Remove redundant check of
6120 buffer_shared_and_changed.
6121 * *.[chm]: Number every assignment to update_mode_lines so we
6122 can track why it is set.
6123
6124 2013-11-06 Eli Zaretskii <eliz@gnu.org>
6125
6126 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
6127
6128 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
6129
6130 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
6131 can track why it is set.
6132
6133 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
6134
6135 Integer-related fixes for term.c etc.
6136 * dispextern.h (face_tty_specified_color): New function.
6137 * term.c (turn_on_face): Don't rely on undefined behavior when
6138 assigning an out-of-range value to 'long'.
6139 Simplify test for toggling highlight.
6140 (tty_capable_p): Omit last two (unused) args. All callers changed.
6141 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
6142 (read_menu_input, tty_menu_activate, tty_menu_show):
6143 * xfaces.c (x_supports_face_attributes_p)
6144 (tty_supports_face_attributes_p):
6145 Use bool for boolean. All callers changed.
6146 (tty_supports_face_attributes_p): Omit defaults for color indices;
6147 no longer needed. Simplify tail call.
6148
6149 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
6150
6151 * xdisp.c (prepare_menu_bars): Mark static.
6152 * lisp.h (prepare_menu_bars): Don't declare.
6153 * xselect.c (x_handle_selection_clear):
6154 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
6155
6156 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
6157
6158 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
6159 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
6160
6161 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
6162
6163 * keyboard.c (Fcommand_error_default_function): Rename from
6164 Fdefault_error_output.
6165
6166 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
6167
6168 * keyboard.c (Fdefault_error_output): New function, extracted from
6169 cmd_error_internal.
6170 (syms_of_keyboard): Use it for Vcommand_error_function.
6171
6172 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
6173
6174 * eval.c (handlerlist_sentinel): New variable (bug#15802).
6175 (init_eval): Use it to ensure handlerlist is non-NULL.
6176 (unwind_to_catch): Make sure we never set handlerlist to NULL.
6177 (Fsignal): Adjust NULLness test of handlerlist.
6178 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
6179
6180 2013-11-05 Eli Zaretskii <eliz@gnu.org>
6181
6182 * callproc.c (call_process): Call prepare_to_modify_buffer before
6183 decoding text read from the sub-process, as the decoded stuff will
6184 be inserted into the buffer. This will invalidate the various
6185 caches maintained for the buffer. (Bug#15148)
6186
6187 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
6188
6189 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
6190 string of glyphless-char-display.
6191
6192 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
6193
6194 * nsfns.m (ns_get_name_from_ioreg): New function.
6195 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
6196 OSX >= 10.9. Use ns_get_name_from_ioreg.
6197
6198 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
6199
6200 Simplify and port recent bool vector changes.
6201 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
6202 only in this file. Use a more-efficient implementation if the
6203 second argument is a power of 2.
6204 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
6205 Remove no-longer-necessary compile-time checks.
6206 (bool_vector_exact_payload_bytes): New function.
6207 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
6208 exact payload changed to call the new function. Do not assume
6209 that the arg or result fits in ptrdiff_t.
6210 (bool_vector_fill): New function.
6211 (Fmake_bool_vector): Use it. Don't assume bit counts fit
6212 in ptrdiff_t.
6213 (vroundup_ct): Don't assume arg fits in size_t.
6214 * category.c (SET_CATEGORY_SET): Remove. All callers now just
6215 invoke set_category_set.
6216 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
6217 All callers changed. Use bool_vector_set.
6218 * category.h (XCATEGORY_SET): Remove; no longer needed.
6219 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
6220 bool_vector_bitref.
6221 * data.c (Faref): Use bool_vector_ref.
6222 (Faset): Use bool_vector_set.
6223 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
6224 (Fbool_vector_not, Fbool_vector_count_matches)
6225 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
6226 * fns.c (concat): Use bool_vector_ref.
6227 (Ffillarray): Use bool_vector_fill.
6228 (mapcar1): Use bool_vector_ref.
6229 (sxhash_bool_vector): Hash words, not bytes.
6230 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
6231 a constant, since it's now used in #if.
6232 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
6233 unsigned char on unusual architectures, so that we no longer
6234 assume that the number of bits per bits_word is a power of two or
6235 is a multiple of 8 or of CHAR_BIT.
6236 (Qt): Add forward decl.
6237 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
6238 at least as strictly as bits_word.
6239 (bool_vector_data, bool_vector_uchar_data): New accessors.
6240 All data structure accesses changed to use them.
6241 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
6242 (bool_vector_set): New functions.
6243 (bool_vector_fill): New decl.
6244 (ROUNDUP): Move to alloc.c as described above.
6245
6246 Fix recent gnutls changes.
6247 * gnutls.c (Fgnutls_boot): Don't assume C99.
6248 * process.c (wait_reading_process_output): Fix typo in recent change.
6249
6250 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
6251
6252 * process.c (wait_reading_process_output, read_process_output)
6253 (send_process): Check gnutls_state is not NULL.
6254
6255 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
6256 (Fgnutls_boot): Set process gnutls_p later, after initialization.
6257
6258 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
6259
6260 * nsterm.m (init, run, stop:): New methods in EmacsApp for
6261 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
6262
6263 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
6264 OSX >= 10.9.
6265
6266 * nsfns.m (Fx_create_frame): Fix memory leak.
6267
6268 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
6269 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
6270 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
6271
6272 2013-11-04 Eli Zaretskii <eliz@gnu.org>
6273
6274 * xdisp.c (message3_nolog, message_with_string): Encode the string
6275 before writing it to the terminal in a non-interactive session.
6276
6277 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
6278 sure we concatenate them into a unibyte string.
6279
6280 * fileio.c (make_temp_name): Encode PREFIX, and decode the
6281 resulting temporary name before returning it to the caller.
6282 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
6283 is a unibyte string, convert NAME to a unibyte string to ensure
6284 that the result is also a unibyte string.
6285
6286 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
6287 create unibyte strings from default paths and directory/file
6288 names.
6289
6290 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
6291 string.
6292
6293 * callproc.c (init_callproc): Use build_unibyte_string to make
6294 sure we create unibyte strings from default paths and
6295 directory/file names.
6296
6297 * buffer.c (init_buffer): Don't store default-directory of
6298 *scratch* in multibyte form. The original problem which led to
6299 that is described in
6300 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
6301 but it was solved long ago. (Bug#15260)
6302
6303 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
6304
6305 Port to stricter C99 platforms.
6306 Especially, C99 prohibits nesting a struct X inside struct Y if
6307 struct X has a flexible array member.
6308 * alloc.c (struct sdata): New type.
6309 (sdata): Implement in terms of struct sdata.
6310 Remove u member; all uses replaced by next_vector, set_next_vector.
6311 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
6312 (SDATA_DATA_OFFSET): Now a constant, not a macro.
6313 (struct sblock): Rename first_data member to data, which is now
6314 a flexible array member. All uses changed.
6315 (next_vector, set_next_vector, large_vector_vec): New functions.
6316 (vector_alignment): New constant.
6317 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
6318 (struct large-vector): Now merely a NEXT member, since the old approach
6319 ran afoul of stricter C99. All uses changed to use
6320 large_vector_vec or large_vector_offset.
6321 (large_vector_offset): New constant.
6322 * dispnew.c: Include tparam.h, for tgetent.
6323 Do not include term.h; no longer needed.
6324 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
6325 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
6326 (struct Lisp_Vector): Use a flexible array member for contents,
6327 instead of a union with a member that is an array of size 1.
6328 All uses changed.
6329 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
6330 fact that the struct no longer contains a union.
6331 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
6332 (struct Lisp_Save_Value, struct Lisp_Free):
6333 Use unsigned, not int, for spacers, to avoid c99 warning.
6334 (union specbinding): Use unsigned, not bool, for bitfield, as
6335 bool is not portable to pre-C99 hosts.
6336
6337 2013-11-04 Glenn Morris <rgm@gnu.org>
6338
6339 * emacs.c (usage_message): Mention that `-L :...' appends.
6340
6341 2013-11-02 Glenn Morris <rgm@gnu.org>
6342
6343 * Makefile.in (abs_builddir): Remove.
6344 (bootstrap_exe): Use relative filename.
6345
6346 Use relative filenames in TAGS files.
6347 * Makefile.in (abs_srcdir): Remove it again.
6348 (.PHONY): Remove frc.
6349 (maintainer-clean): No more TAGS-LISP file.
6350 (TAGS): Pass relative file names to etags.
6351 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
6352
6353 * Makefile.in (abs_srcdir): New, set by configure.
6354 (lispdir): Remove.
6355 (maintainer-clean): Remove pointless echo. That should be in the
6356 top-level Makefile, if anywhere. Delete TAGS-LISP.
6357 (extraclean): No s/ and m/ directories for some time.
6358 (TAGS): Also depend on ctagsfiles3.
6359 Remove no-longer-defined S_FILE.
6360 Pass absolute filenames to etags once more.
6361 (TAGS-LISP): Replace lispdir with its expansion.
6362 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
6363 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
6364
6365 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
6366
6367 * xfaces.c (check_lface_attrs, realize_default_face):
6368 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
6369 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
6370
6371 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
6372
6373 * emacs.c (original_pwd): Remove global var by making it local.
6374 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
6375
6376 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
6377
6378 * xfaces.c: Declare color_distance.
6379 (QCdistant_foreground): New variable.
6380 (NEAR_SAME_COLOR_THRESHOLD): New define.
6381 (load_color2): New function.
6382 (load_color): Call load_color2.
6383 (load_face_colors): Call load_color2 and if distant-color is specified
6384 calculate distant and use distant-color if colors are near.
6385 (LFACE_DISTANT_FOREGROUND): New define.
6386 (merge_face_ref, Finternal_set_lisp_face_attribute)
6387 (Finternal_get_lisp_face_attribute)
6388 (x_supports_face_attributes_p): Handle distant-foreground similar to
6389 foreground.
6390 (syms_of_xfaces): DEFSYM QCdistant_foreground.
6391
6392 * dispextern.h (lface_attribute_index):
6393 Add LFACE_DISTANT_FOREGROUND_INDEX.
6394
6395 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
6396
6397 * image.c (pbm_next_char): New function.
6398 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
6399 (pbm_scan_number): Use it.
6400 (Qlibjpeg_version): New variable.
6401 (syms_of_image): DEFSYM and initialize it.
6402
6403 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
6404
6405 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
6406
6407 2013-10-31 Glenn Morris <rgm@gnu.org>
6408
6409 * emacs.c (original_pwd): New char.
6410 (main): If using --chdir, store original_pwd.
6411 (init_cmdargs): When setting Vinvocation_directory based on a
6412 relative argv[0], use original_pwd if set. (Bug#15768)
6413
6414 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
6415
6416 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
6417
6418 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
6419
6420 * insdel.c: Fix minor problems found by static checking.
6421 (Qregion_extract_function): Now static.
6422 (prepare_to_modify_buffer_1): Remove unused locals.
6423
6424 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
6425
6426 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
6427 (syms_of_xdisp): Declare pre-redisplay-function.
6428 (markpos_of_region): Remove function.
6429 (init_iterator, compute_stop_pos, handle_face_prop)
6430 (face_before_or_after_it_pos, reseat_to_string)
6431 (get_next_display_element, window_buffer_changed)
6432 (redisplay_internal, try_cursor_movement, redisplay_window)
6433 (try_window_reusing_current_matrix, try_window_id, display_line)
6434 (note_mode_line_or_margin_highlight, note_mouse_highlight)
6435 (display_string, mouse_face_from_buffer_pos): Remove region handling.
6436 * window.h (struct window): Remove field `region_showing'.
6437 * dispextern.h (struct it): Remove region_beg/end_charpos.
6438 (face_at_buffer_position, face_for_overlay_string)
6439 (face_at_string_position): Update prototypes.
6440 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
6441 (face_at_string_position): Remove `region_beg' and `region_end' args.
6442 * fontset.c (Finternal_char_font):
6443 * font.c (font_at, font_range): Adjust calls accordingly.
6444 * insdel.c (Qregion_extract_function): New var.
6445 (syms_of_insdel): Initialize it.
6446 (prepare_to_modify_buffer_1): Use it.
6447
6448 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
6449
6450 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
6451 * ftxfont.c (ftxfont_get_gcs):
6452 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
6453 * xfaces.c (x_free_colors, x_free_dpy_colors)
6454 (x_create_gc, unload_color):
6455 * xselect.c (x_property_data_to_lisp):
6456 * xsettings.c (parse_settings):
6457 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
6458 (get_bits_and_offset): Adjust definition.
6459 * frame.c (XParseGeometry): Adjust locals.
6460 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
6461 * regex.h (toplevel): Likewise for reg_syntax_t.
6462
6463 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
6464
6465 * eval.c (run_hook_with_args): Use FUNCTIONP.
6466
6467 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
6468
6469 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
6470 fields, drop 'allocated_p' member and use -1 for uninitialized value.
6471 * w32term.h (struct w32_output): Similarly but do not use -1 because...
6472 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
6473 on MS-Windows anyway.
6474 (free_face_colors): Define only if HAVE_X_WINDOWS and...
6475 (free_realized_face): ...adjust user.
6476 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
6477 white relief pixels to -1.
6478 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
6479 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
6480 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
6481
6482 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
6483
6484 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
6485 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
6486 in practice now. All callers changed.
6487
6488 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
6489
6490 * dispextern.h (struct face): Use bitfields for 'underline_type'
6491 and 'box' members. Remove set-but-unused members 'pixmap_w' and
6492 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
6493 'stipple' member. Move 'lface' member up to help...
6494 * xfaces.c (make_realized_face): ...this function to find and
6495 clear just the members that need clearing.
6496 (load_face_colors, realize_x_face):
6497 * xdisp.c (extend_face_to_end_of_line): Adjust user.
6498
6499 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
6500
6501 * xftfont.c (struct xftfont_info): Remove set-but-unused
6502 'screen' member.
6503 (xftfont_open): Adjust user.
6504 (xftfont_get_colors): Remove useless prototype.
6505
6506 2013-10-26 Eli Zaretskii <eliz@gnu.org>
6507
6508 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
6509 before passing them to 'unexec'. (Bug#15260)
6510
6511 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
6512
6513 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
6514
6515 2013-10-25 Eli Zaretskii <eliz@gnu.org>
6516
6517 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
6518 the changed signature of the font driver's 'close' method.
6519
6520 * w32font.h (w32font_close): Adjust the prototype to the change in
6521 function definition.
6522
6523 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
6524
6525 * w32uniscribe.c (uniscribe_close): Adapt the call to
6526 w32font_close to its new prototype.
6527
6528 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
6529
6530 Omit unused frame argument of font API's close function.
6531 * font.h (struct font): Drop frame argument. Adjust comment.
6532 * font.c (font_clear_cache, font_close_object): Adjust users.
6533 * ftfont.c (ftfont_close):
6534 * ftxfont.c (ftxfont_close):
6535 * macfont.m (macfont_close):
6536 * nsfont.m (nsfont_close):
6537 * w32font.c (w32font_close):
6538 * xfont.c (xfont_close):
6539 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
6540 tweak comments and make functions safe if called more than once for
6541 the same font object.
6542
6543 Perform font-specific cleanup when font object is swept by GC. See
6544 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
6545 * alloc.c (cleanup_vector): New function.
6546 (sweep_vector): Call it for each reclaimed vector object.
6547 * font.h (struct font): Adjust comment.
6548
6549 2013-10-24 Glenn Morris <rgm@gnu.org>
6550
6551 * Makefile.in (abs_top_srcdir): New, set by configure.
6552
6553 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
6554
6555 Adjust recent font-related changes to fix bug#15686.
6556 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
6557 is a live window system frame, mark its default font too.
6558
6559 2013-10-23 Glenn Morris <rgm@gnu.org>
6560
6561 * Makefile.in (RUN_TEMACS): Make relative (again).
6562 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
6563 (bootstrap-emacs$(EXEEXT)):
6564 Quote entities that might contain whitespace.
6565
6566 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
6567
6568 Port to Solaris 10 and its bundled GCC.
6569 Problem reported by Timothy C. Burt.
6570 * floatfns.c (isfinite, isnan): Redefine unconditionally.
6571
6572 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
6573
6574 Do not allow font caches to grow too large.
6575 * alloc.c (compact_font_cache_entry, compact_font_caches):
6576 New functions or stub if not HAVE_WINDOW_SYSTEM.
6577 (compact_undo_list): Factor out from Fgarbage_collect.
6578 Add comment.
6579 (mark_face_cache): Mark face font. Move down to avoid
6580 extra prototypes.
6581 (mark_terminals): Do not mark font cache here.
6582 (Fgarbage_collect): Call compaction functions described
6583 above. Adjust comment.
6584
6585 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
6586
6587 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
6588 chdir to HOME (bug#15607).
6589
6590 * nsterm.m (Qcocoa, Qgnustep): New variables.
6591 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
6592 (ns_get_color): Make selection color work for GNUstep also.
6593
6594 2013-10-18 Eli Zaretskii <eliz@gnu.org>
6595
6596 * keyboard.c (make_lispy_event): Remove GPM-specific code that
6597 handles mouse clicks. Instead, let GPM use the same code as all
6598 the other mice use. See the discussion starting at
6599 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
6600 for the details of the problem with the menu bar this fixes.
6601
6602 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
6603
6604 Remove port-specific display name lists to avoid extra
6605 complexity and data duplication with display info lists.
6606 * xterm.h (x_display_name_list): Remove declaration.
6607 * xterm.c (x_display_name_list): Remove.
6608 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
6609 * xfns.c (x_display_info_for_name, Fx_display_list):
6610 Likewise. Use x_display_list where appropriate.
6611 * w32term.h (w32_display_name_list): Remove declaration.
6612 * w32term.c (w32_display_name_list): Remove.
6613 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
6614 Adjust users.
6615 * w32fns.c (x_display_info_for_name, Fx_display_list):
6616 Likewise. Use x_display_list where appropriate.
6617 * nsterm.h (ns_display_name_list): Remove declaration.
6618 * nsterm.m (ns_display_name_list): Remove.
6619 (ns_term_init, syms_of_nsterm): Adjust users.
6620 * nsfns.m (ns_display_info_for_name, Fx_display_list):
6621 Likewise. Use x_display_list where appropriate.
6622 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
6623 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
6624 (mark_terminals): Mark per-terminal font cache.
6625
6626 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
6627
6628 Don't run timers in input-pending-p. Its new check-timers param
6629 provides the prior behavior. (Bug#15045).
6630 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
6631
6632 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
6633
6634 Make some functions static in non-Microsoft builds.
6635 On my platform (Fedora 19 x86-64), this shrinks the
6636 Emacs executable (text+data) by 0.25%.
6637 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
6638 (load_color) [!MSDOS]:
6639 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
6640 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
6641 * lisp.h (check_existing):
6642 * process.h (conv_sockaddr_to_lisp, network_interface_list)
6643 (network_interface_info) [!WINDOWSNT]:
6644 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
6645 Remove extern decls.
6646 * fileio.c (check_existing):
6647 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
6648 * process.c (conv_sockaddr_to_lisp, network_interface_list)
6649 (network_interface_info) [!WINDOWSNT]:
6650 * term.c (encode_terminal_code) [!WINDOWSNT]:
6651 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
6652 * xfaces.c (load_color) [!MSDOS]:
6653 Now static.
6654 * fileio.c (check_existing, check_executable, check_writable):
6655 * process.c (network_interface_list, network_interface_info):
6656 Move earlier, so that we don't need forward decls.
6657 * gnutls.c (fn_gnutls_transport_set_errno)
6658 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
6659 Remove; unused.
6660 * w32.c (init_environment): Use faccessat rather than
6661 check_existing, partly for consistency with the rest of the code
6662 in this file, partly so that check_existing can be static.
6663
6664 Make VALMASK visible to GDB even if clang is used (Bug#15574).
6665 * emacs.c (MAIN_PROGRAM): New macro.
6666 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
6667 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
6668
6669 bool vector int width fixes
6670 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
6671 (Fbool_vector_count_matches_at):
6672 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
6673 can exceed PTRDIFF_MAX, at least in theory.
6674 (Fbool_vector_count_matches_at):
6675 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
6676
6677 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
6678
6679 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
6680 (struct sockaddr): Add forward decl, for platforms that lack it.
6681
6682 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
6683
6684 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
6685 Qnil (Bug#15628).
6686
6687 2013-10-16 Eli Zaretskii <eliz@gnu.org>
6688
6689 * w32.c (network_interface_get_info, network_interface_list)
6690 (network_interface_info): New functions. (Bug#15610)
6691 (GetAdaptersInfo_Proc): New typedef.
6692 (get_adapters_info): New wrapper function.
6693 (globals_of_w32): Initialize g_b_init_get_adapters_info.
6694
6695 * process.h (network_interface_list, network_interface_info):
6696 New prototypes.
6697
6698 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
6699 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
6700 all systems. Return non-nil for systems that HAVE_NET_IF_H and
6701 for WINDOWSNT. Doc fix.
6702 (syms_of_process): Defsubr Snetwork_interface_list and
6703 Snetwork_interface_info unconditionally.
6704
6705 * menu.c (have_boxes): Fix redundant simulation of radio buttons
6706 in NS GUI sessions. (Bug#15629)
6707
6708 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
6709
6710 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
6711
6712 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
6713
6714 * print.c (print_object): Print " ..." when truncating bool vectors.
6715
6716 2013-10-15 Eli Zaretskii <eliz@gnu.org>
6717
6718 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
6719 standard mouse buttons.
6720
6721 * termhooks.h (struct input_event): Remove incorrect commentary.
6722
6723 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
6724
6725 Disallow bool vector operations on mixed-length operands.
6726 The old behavior left garbage in the result vector sometimes,
6727 and didn't seem to be useful.
6728 * data.c (Qwrong_length_argument): New static var.
6729 (wrong_length_argument): New function.
6730 (bool_vector_binop_driver): Check that args agree in length.
6731
6732 * keyboard.c, keyboard.h (all_kboards): Now static.
6733
6734 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
6735
6736 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
6737 note from the lispref.
6738
6739 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
6740
6741 * nsterm.h (struct ns_display_info): Remove set-but-unused
6742 member image_cache (image caches are per-terminal anyway).
6743 (FRAME_X_IMAGE_CACHE): Remove.
6744 * nsterm.m (ns_initialize_display_info): Adjust user.
6745
6746 2013-10-14 Eli Zaretskii <eliz@gnu.org>
6747
6748 * w32proc.c: Include mingw_time.h.
6749
6750 * w32.c: Include mingw_time.h.
6751
6752 Implement scrolling of TTY menus when the screen is too short.
6753
6754 * term.c (tty_menu_display): Accept an additional argument, the
6755 menu item from which to start displaying the menu. Account for
6756 the value of Y when limiting the menu to the number of available
6757 screen lines.
6758 (mi_result): New enumeration.
6759 (read_menu_input): Return enumerated value. When the y coordinate
6760 hits min_y or max_y, return scroll indication instead of wrapping
6761 around the menu.
6762 (tty_menu_activate): Handle the scrolling indications from
6763 read_menu_input. Compute the first menu item to display and pass
6764 it to tty_menu_display.
6765
6766 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
6767
6768 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
6769 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
6770 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
6771 Adjust to match the change described below.
6772 (struct terminal): Move must_write_spaces, line_ins_del_ok,
6773 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
6774 memory_below_frame members to...
6775 * termchar.h (struct tty_display_info): ...here because they're
6776 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
6777 * term.c (init_tty):
6778 * nsterm.m (ns_create_terminal):
6779 * w32term.c (w32_create_terminal):
6780 * xterm.c (x_create_terminal): Adjust users.
6781 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
6782 to filter out non-TTY frames. Adjust comment.
6783 (scrolling): Adjust user. Prefer eassert for debugging check.
6784
6785 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
6786
6787 * xfaces.c (PT_PER_INCH): Remove unused macro.
6788 * termhooks.h (struct terminal): Remove set-but-unused
6789 member fast_clear_end_of_line.
6790 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
6791 * nsterm.m (ns_create_terminal):
6792 * term.c (init_tty):
6793 * w32term.c (w32_create_terminal):
6794 * xterm.c (x_create_terminal): Adjust users.
6795
6796 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
6797
6798 * lisp.h (bool_vector_size): New function.
6799 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
6800 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
6801 (Fbool_vector_not, Fbool_vector_count_matches_at):
6802 Remove uses of 'eassume' that should no longer be needed,
6803 because they are subsumed by the 'eassume' in bool_vector_size.
6804
6805 2013-10-12 Eli Zaretskii <eliz@gnu.org>
6806
6807 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
6808 after inclusion of gif_lib.h, thus fixing compiler warnings caused
6809 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
6810
6811 2013-10-11 Eli Zaretskii <eliz@gnu.org>
6812
6813 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
6814 have different dimensions. (Bug#15575)
6815
6816 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
6817 visibility.
6818
6819 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
6820
6821 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
6822
6823 * term.c (tty_menu_show): Never return with unbalanced
6824 specpdl. Use eassert for debugging check. Adjust style.
6825
6826 2013-10-11 Eli Zaretskii <eliz@gnu.org>
6827
6828 * term.c (read_menu_input): Make selection of menu items
6829 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
6830 (tty_menu_activate): Fix off-by-one error when computing max_y.
6831
6832 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
6833
6834 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
6835 audit logging (only used with GnuTLS 3.x) and enable it.
6836
6837 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
6838
6839 * dispnew.c (redraw_frame): Remove useless #ifdef because
6840 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
6841 Also, move TTY fflush to...
6842 * term.c (tty_update_end): ...this function.
6843
6844 2013-10-11 Eli Zaretskii <eliz@gnu.org>
6845
6846 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
6847 the end of the frame's glyph matrix. (Bug#15575)
6848
6849 * term.c (tty_menu_display): Don't move cursor while overwriting
6850 frame's glyphs with menu items. Limit the number of items
6851 displayed to what can be shown on the available screen lines,
6852 excluding the echo area.
6853 (tty_menu_activate): Limit the Y coordinate allowed by
6854 read_menu_input to the last screen line used for menu display.
6855
6856 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
6857
6858 * lisp.h (eassume): New macro.
6859 Also, include <verify.h>, for 'assume'.
6860 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
6861 (vroundup, vector_nbytes):
6862 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
6863 (Fbool_vector_not, Fbool_vector_count_matches)
6864 (Fbool_vector_count_matches_at):
6865 Use eassume, not eassert.
6866 * casetab.c (set_identity, shuffle):
6867 * composite.c (composition_gstring_put_cache):
6868 * dispnew.c (update_frame_1):
6869 * ftfont.c (ftfont_shape_by_flt):
6870 * image.c (gif_load):
6871 * intervals.c (offset_intervals):
6872 * macfont.m (macfont_shape):
6873 Remove calls to 'assume' that are no longer needed, because
6874 --enable-gcc-warnings no longer generates bogus warnings
6875 when these calls are removed.
6876
6877 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
6878
6879 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
6880
6881 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
6882
6883 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
6884 (Qsubstitute_env_in_file_name): New var.
6885 (syms_of_fileio): Define it.
6886
6887 2013-10-10 Eli Zaretskii <eliz@gnu.org>
6888
6889 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
6890 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
6891 (Bug#15575)
6892
6893 * term.c (save_and_enable_current_matrix): Don't allocate and
6894 don't save margin areas.
6895 (restore_desired_matrix): Don't restore margin areas.
6896 (free_saved_screen): Don't free margin areas.
6897
6898 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
6899
6900 * image.c: Pacify --enable-gcc-warnings.
6901 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
6902 #define only if used.
6903
6904 2013-10-10 Eli Zaretskii <eliz@gnu.org>
6905
6906 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
6907 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
6908 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
6909 (gif_load): For giflib v5.x and later, display the error message
6910 produced by giflib when its functions fail.
6911 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
6912 (Bug#15531)
6913
6914 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
6915
6916 * keyboard.c (last_event_timestamp): Remove. For X selection and
6917 GTK popup menus, it may be obtained from per-frame X display info.
6918 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
6919 (process_special_events): Adjust users.
6920 * keyboard.h (last_event_timestamp): Remove declaration.
6921 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
6922 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
6923 * menu.h (xmenu_show): Adjust prototype.
6924 * menu.c (Fx_popup_menu): Adjust user.
6925 * xselect.c (x_own_selection, x_get_foreign_selection)
6926 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
6927
6928 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
6929
6930 * keyboard.c (init_kboard): Now static. Add arg
6931 to denote window system. Adjust comment.
6932 (init_keyboard): Adjust user.
6933 (allocate_kboard): New function.
6934 (syms_of_keyboard):
6935 * nsterm.m (ns_term_init):
6936 * term.c (init_tty):
6937 * w32term.c (w32_create_terminal):
6938 * xterm.c (x_term_init): Use it.
6939 * keyboard.h (init_kboard): Remove prototype.
6940 (allocate_kboard): Add prototype.
6941
6942 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
6943
6944 * image.c (GIFLIB_MAJOR): Ensure it's defined.
6945 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
6946
6947 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
6948
6949 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
6950
6951 2013-10-09 Eli Zaretskii <eliz@gnu.org>
6952
6953 * term.c (tty_menu_activate): Flush the output stream after
6954 showing the cursor, and don't mark the frame garbaged at exit from
6955 the function. Fixes redisplay glitches when moving from one menu
6956 to another.
6957
6958 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
6959
6960 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
6961 or throw error (Bug#15570).
6962
6963 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
6964
6965 * intervals.c (temp_set_point_both): Move test into 'eassert',
6966 for speed.
6967
6968 * lisp.h (eassert): Don't use 'assume'.
6969 Sometimes 'assume' wins in performance, and sometimes it loses,
6970 so it shouldn't be used all the time. Perhaps we need two
6971 flavors of 'eassert', one for where 'assume' is far more likely
6972 to help or to hurt; but that can be done later.
6973 Problem reported by Dmitry Antipov in
6974 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
6975 Also, don't include <verify.h>; no longer needed.
6976
6977 2013-10-09 Glenn Morris <rgm@gnu.org>
6978
6979 * eval.c (Fcond): Doc tweak.
6980
6981 2013-10-09 Eli Zaretskii <eliz@gnu.org>
6982
6983 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
6984 expressions with side effects to eassert. (Bug#15565)
6985
6986 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
6987
6988 * fns.c (hashfn_user_defined): Allow hash functions to return any
6989 Lisp_Object.
6990
6991 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
6992
6993 Fix minor problems found by static checking.
6994 * dispnew.c (save_current_matrix): Omit unnecessary casts.
6995 * dispnew.c (update_frame_with_menu): Mark debug local as used.
6996 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
6997 * keyboard.c (read_menu_command): Remove unused local.
6998 * lisp.h (read_menu_command): New decl.
6999 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
7000 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
7001 Return ptrdiff_t, not int.
7002 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
7003 not int, for benefit of xpalloc.
7004 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
7005 and xpalloc.
7006 (have_menus_p): Remove; unused.
7007 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
7008 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
7009 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
7010 Now static.
7011 (save_and_enable_current_matrix): Omit unnecessary casts.
7012 (read_menu_input): Omit local extern decl (now in lisp.h).
7013 Don't access uninitialized storage if mouse_get_xy fails.
7014 (tty_menu_activate): Mark local as initialized, for lint.
7015 (tty_menu_activate, tty_meny_show): Remove unused locals.
7016
7017 2013-10-08 Eli Zaretskii <eliz@gnu.org>
7018
7019 Support menus on text-mode terminals.
7020 * xterm.h (xw_popup_dialog): Add prototype.
7021
7022 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
7023 (xmenu_show): Block input here, instead in Fx_popup_menu.
7024 (xw_popup_dialog): New function, with X-specific bits of popup
7025 dialogs.
7026
7027 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
7028 New functions.
7029
7030 * window.c (Fset_window_configuration): Use run-time tests of the
7031 frame type instead of compile-time conditionals, when menu-bar
7032 lines are considered.
7033
7034 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
7035 (w32_popup_dialog): New prototypes.
7036
7037 * w32menu.c (Fx_popup_dialog): Function deleted.
7038 (w32_popup_dialog): New function, with w32 specific bits of popup
7039 dialogs. Block input here.
7040
7041 * w32inevt.c (w32_console_read_socket): Minor change to add
7042 debugging TTY events.
7043
7044 * w32fns.c (show_hourglass): If returning early because the frame
7045 is not a GUI frame, unblock input.
7046
7047 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
7048 (cursorY): New functions.
7049
7050 * termhooks.h (cursorX, cursorY): Prototypes of functions on
7051 WINDOWSNT, macros that call curX and curY elsewhere.
7052
7053 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
7054
7055 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
7056 specific function to hide and show cursor on a text-mode terminal.
7057 (tty_menu_struct, struct tty_menu_state): New structures.
7058 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
7059 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
7060 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
7061 (tty_menu_locate, save_and_enable_current_matrix)
7062 (restore_desired_matrix, screen_update, read_menu_input)
7063 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
7064 (tty_pop_down_menu, tty_menu_last_menubar_item)
7065 (tty_menu_new_item_coords, tty_menu_show): New functions.
7066 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
7067
7068 * nsterm.h (ns_popup_dialog): Adjust prototype.
7069
7070 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
7071 of in x-popup-menu.
7072 (ns_popup_dialog): Adapt order of arguments to the other
7073 *_menu_show implementations.
7074 (Fx_popup_dialog): Function deleted.
7075
7076 * msdos.c (x_set_menu_bar_lines): Delete unused function.
7077
7078 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
7079
7080 * menu.c (have_boxes): New function.
7081 (single_keymap_panes): Use it instead of a compile-time
7082 conditional.
7083 (single_menu_item): Use run-time tests of the frame type instead
7084 of compile-time conditionals.
7085 (encode_menu_string): New function.
7086 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
7087 the macro, since different types of frame need different encoding
7088 of menu items.
7089 (digest_single_submenu): Use run-time tests of frame type instead
7090 of, or in addition to, compile-time conditionals.
7091 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
7092 (Fx_popup_menu): Detect when the function is called from keyboard
7093 on a TTY. Don't barf when invoked on a text-mode frame.
7094 Check frame type at run time, instead of compile-time conditionals for
7095 invoking terminal-specific menu-show functions.
7096 Call tty_menu_show on text-mode frames.
7097 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
7098 run time to determine which alternative to invoke; support dialogs
7099 on TTYs.
7100
7101 * keyboard.h <Qmouse_movement>: Declare.
7102
7103 * keyboard.c <Qmouse_movement>: Now extern.
7104 <Qecho_keystrokes>: New static variable.
7105 (read_key_sequence): Accept an additional argument, a flag to
7106 prevent redisplay during reading of the key sequence. All callers
7107 changed.
7108 (read_menu_command): New function.
7109 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
7110 autosave.
7111 (toolkit_menubar_in_use): New function.
7112 (make_lispy_event): Use it instead of a compile-time test.
7113
7114 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
7115 window-system being available.
7116
7117 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
7118 to x-popup-dialog on the frame type, they all now support popup
7119 dialogs.
7120
7121 * dispnew.c (save_current_matrix): Save the margin areas.
7122 (restore_current_matrix): Restore margin areas.
7123 (update_frame_with_menu): New function.
7124
7125 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
7126 Add prototypes.
7127
7128 * alloc.c (make_save_ptr): Now compiled unconditionally.
7129
7130 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
7131
7132 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
7133 (redraw_frame, update_frame): Adjust users.
7134 * dispextern.h (set_window_update_flags): Adjust prototype.
7135 * xdisp.c (redisplay_internal): When updating all frames with zero
7136 windows_or_buffers_changed, assume that only the windows that shows
7137 current buffer should be really updated.
7138
7139 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
7140
7141 Do not allocate huge temporary memory areas and objects while encoding
7142 for file I/O, thus reducing an enormous memory usage for large buffers.
7143 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
7144 * coding.h (struct coding_system): New member raw_destination.
7145 * coding.c (setup_coding_system): Initialize it to zero.
7146 (encode_coding_object): If raw_destination is set, do not create
7147 dst_object. Add comment.
7148 * fileio.c (toplevel): New constant E_WRITE_MAX.
7149 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
7150 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
7151
7152 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
7153
7154 * nsterm.m (windowDidExitFullScreen:)
7155 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
7156
7157 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
7158
7159 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
7160 * keyboard.c (unblock_input_to): Don't process pending signals
7161 if a fatal error is in progress.
7162
7163 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
7164 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
7165 they're talking about words in Lisp bool vectors.
7166 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
7167 * data.c (popcount_bits_word): Rename from popcount_size_t.
7168 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
7169 All uses changed.
7170
7171 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
7172
7173 Improve support for popcount and counting trailing zeros (Bug#15550).
7174 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
7175 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
7176 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
7177 (popcount_size_t_msc, popcount_size_t_gcc):
7178 Remove; now done by Gnulib.
7179 (popcount_size_t): Now a macro that defers to Gnulib.
7180 (count_trailing_zero_bits): Return int, for consistency with
7181 Gnulib and because Emacs prefers signed to unsigned int.
7182 Don't assume that size_t is either unsigned int or unsigned long
7183 or unsigned long long.
7184 (size_t_to_host_endian): Do not assume that size_t is either
7185 exactly 32 or exactly 64 bits wide.
7186 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
7187 etc., so that it's now an enum constant, not a macro.
7188 No need to assume that it's either 32 or 64.
7189
7190 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
7191
7192 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
7193 on >= 10.7.
7194
7195 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
7196
7197 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
7198 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
7199
7200 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
7201
7202 emacs_read and emacs_write now use void *, not char *.
7203 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
7204 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
7205 Buffer arg is now void *, not char *. This matches plain
7206 'read' and 'write' better, and avoids a constraint violation
7207 on Solaris 9 with Oracle Studio.
7208
7209 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
7210
7211 * alloc.c (Fmake_string): For ASCII char initializer, prefer
7212 memset to explicit loop. Otherwise copy largest possible chunk
7213 from initialized to uninitialized part, thus allowing the longer
7214 memcpy runs and reducing the number of loop iterations.
7215
7216 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
7217
7218 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
7219 hide toolbar (Bug#15388).
7220 (windowDidEnterFullScreen:): If presentation options are zero,
7221 set them here (Bug#15388).
7222 (ns_update_auto_hide_menu_bar): Remove runtime check.
7223 Don't auto hide dock unless menubar is also auto hidden.
7224
7225 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
7226
7227 * editfns.c (message): Mention batch mode in doc string.
7228
7229 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
7230
7231 * nsterm.m (check_native_fs): Remove erroneous comment.
7232
7233 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
7234
7235 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
7236 uses find_newline instead of scan_newline and so doesn't move point.
7237
7238 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
7239
7240 Use hardware support for byteswapping on glibc x86 etc.
7241 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
7242 whereas the old swap64 needed 30.
7243 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
7244 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
7245 Use byteswap.h's macros to swap bytes.
7246 * lisp.h (swap16, swap32, swap64): Remove.
7247 All uses replaced by bswap_16, bswap_32, bswap_64.
7248
7249 * bytecode.c (exec_byte_code): Use some more volatile variables
7250 to work around local variables getting clobbered by longjmp.
7251 Port to pre-C99, which doesn't allow decls after stmts.
7252
7253 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
7254
7255 * lisp.h (eassert): Assume that COND is true when optimizing.
7256 In other words, take on the behavior of eassert_and_assume.
7257 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
7258 (eassert_and_assume): Remove. All uses replaced by eassert.
7259
7260 * xdisp.c (Qglyphless_char): Now static.
7261
7262 Adjust to merge from gnulib.
7263 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
7264 * lisp.h: Include <verify.h>, for 'assume'.
7265
7266 * eval.c (clobbered_eassert): New macro.
7267 (internal_catch, internal_condition_case)
7268 (internal_condition_case_1, internal_condition_case_2)
7269 (internal_condition_case_n): Use it instead of eassert
7270 when the argument contains locals clobbered by longjmp.
7271 Don't use clobbered locals outside of clobbered_eassert.
7272 (internal_lisp_condition_case): Use a volatile variable
7273 to work around a local variable's getting clobbered.
7274
7275 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
7276
7277 * lisp.h (struct handler): Merge struct handler and struct catchtag.
7278 (PUSH_HANDLER): New macro.
7279 (catchlist): Remove.
7280 (handlerlist): Always declare.
7281
7282 * eval.c (catchlist): Remove (merge with handlerlist).
7283 (handlerlist, lisp_eval_depth): Not static any more.
7284 (internal_catch, internal_condition_case, internal_condition_case_1)
7285 (internal_condition_case_2, internal_condition_case_n):
7286 Use PUSH_HANDLER.
7287 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
7288 handlerlist/catchlist.
7289 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
7290 handlerlist which can only handle a single condition-case handler at
7291 a time.
7292 (find_handler_clause): Simplify since we only a single branch here
7293 any more.
7294
7295 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
7296 and Bpophandler.
7297 (bcall0): New function.
7298 (exec_byte_code): Add corresponding cases. Improve error message when
7299 encountering an invalid byte-code. Let Bunwind_protect accept
7300 a function (rather than a list of expressions) as argument.
7301
7302 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
7303 and make them unconditional now that they're heap-allocated.
7304
7305 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
7306
7307 * charset.c (Fdecode_char, Fencode_char): Remove description of
7308 `restriction' arg. now that it's hidden by advertised-calling-convention.
7309
7310 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
7311
7312 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
7313 Remove unused variable (from mac-port).
7314 (macfont_draw): Use s->ybase for correct y position.
7315
7316 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
7317
7318 * frame.h (struct frame): Drop has_minibuffer member because...
7319 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
7320 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
7321
7322 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
7323
7324 * window.h (struct window): Prefer enum text_cursor_kinds to int
7325 for phys_cursor_type member. Move the latter, phys_cursor_width,
7326 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
7327 * window.c (replace_window, make_window): Adjust users.
7328
7329 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
7330
7331 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
7332 this module is never compiled otherwise.
7333
7334 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
7335
7336 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
7337 (Bug#15500).
7338
7339 2013-09-29 Eli Zaretskii <eliz@gnu.org>
7340
7341 * xdisp.c (get_next_display_element): Don't call face_for_font in
7342 a build configured --without-x. (Bug#15484)
7343
7344 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
7345
7346 * window.c (calc_absolute_offset): #elif should be #elif defined.
7347
7348 * frame.c (delete_frame): Block/unblock input to overcome race
7349 condition (Bug#15475).
7350
7351 2013-09-29 Andreas Politz <politza@hochschule-trier.de>
7352
7353 * frame.c (delete_frame): Record selected frame only after
7354 calling Qdelete_frame_functions (Bug#15477).
7355
7356 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
7357
7358 * nsterm.m (ns_selection_color): Remove.
7359 (ns_get_color): Check for ns_selection_(fg|bg)_color using
7360 NSColor selectedText(Background)Color. Only for COCOA.
7361 (ns_term_init): Remove assignment of ns_selection_color, logic
7362 moved to ns_get_color.
7363
7364 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
7365 NS_SELECTION_COLOR_DEFAULT.
7366 (NS_SELECTION_FG_COLOR_DEFAULT): New.
7367
7368 2013-09-28 Eli Zaretskii <eliz@gnu.org>
7369
7370 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
7371 frame' does not have the tool_bar_window member.
7372
7373 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
7374
7375 Signal error when reading an empty byte-code object (Bug#15405)
7376 * lread.c (read1): Signal error.
7377 * alloc.c (make_byte_code): eassert header size.
7378 (sweep_vectors): Change an int to size_t.
7379
7380 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
7381
7382 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
7383 instead of ints, as it's the usual style for offsetof constants. See:
7384 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
7385
7386 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
7387 This is ugly, but it should fix the performance problem for older
7388 GCC versions in the short run. I'll look into integrating the
7389 Gnulib module for popcount, as a better fix.
7390 See the thread starting in:
7391 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
7392 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
7393 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
7394 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
7395 (popcount_size_t): Use it.
7396
7397 2013-09-24 Daniel Colascione <dancol@dancol.org>
7398
7399 * process.c (Fnetwork_interface_info): Fix build break due to
7400 vector changes.
7401
7402 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
7403
7404 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
7405 Prefer signed to unsigned integers where either will do.
7406 No need for 'const' on locals that do not escape.
7407 Omit easserts with unnecessary and unportable assumptions about
7408 alignment. Avoid unnecessary casts to char *.
7409
7410 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
7411
7412 Use union for the payload of struct Lisp_Vector.
7413 This helps to avoid a few glitches dictated by C's aliasing rules.
7414 * lisp.h (struct Lisp_Vector): Use union for next and
7415 contents member. Adjust comment. Change related users.
7416 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
7417 Related users changed.
7418 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
7419 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
7420 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
7421 * xfaces.c, xfont.c, xmenu.c: Related users changed.
7422
7423 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
7424
7425 Optimize glyph row clearing and copying routines.
7426 * dispextern.h (struct glyph_row): Change layout of struct
7427 glyph_row to help copy_row_except_pointers. Adjust comment.
7428 * dispnew.c (null_row): Remove.
7429 (clear_glyph_row): Use offsetof and memset to find and clear
7430 just the members that need clearing. Adjust comment.
7431 (copy_row_except_pointers): Likewise for copying.
7432
7433 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
7434
7435 Some minor cleanups of recently-added bool vector code.
7436 * conf_post.h (assume): Always return void. Use lint version
7437 only if GCC and MSC versions don't apply.
7438 * conf_post.h (assume):
7439 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
7440 Depend on _MSC_VER, not __MSC_VER, for consistency with
7441 the rest of Emacs.
7442 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
7443 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
7444 (bool_vector_binop_driver, count_trailing_zero_bits)
7445 (size_t_to_host_endian): Now static, not static inline;
7446 the latter isn't needed with modern compilers and doesn't
7447 work with older compilers anyway.
7448
7449 * alloc.c (valgrind_p): Use bool for boolean.
7450
7451 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
7452
7453 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
7454 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
7455 (display_last_displayed_message_p, message_buf_print)
7456 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
7457 Use bool for boolean.
7458 * dispextern.h (cancel_line, init_desired_glyphs):
7459 Remove ancient leftover.
7460 (help_echo_showing_p, hourglass_shown_p):
7461 * lisp.h (noninteractive_need_newline): Adjust declaration.
7462
7463 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
7464
7465 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
7466 Move to...
7467 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
7468 ...this file and convert the latter to static. Adjust comment.
7469 (make_initial_frame):
7470 * window.c (init_window_once): Adjust user.
7471 * frame.h (last_nonminibuf_frame): Remove declaration.
7472 * lisp.h (selected_frame): Likewise.
7473 * msdos.c (the_only_display_info): Adjust comment.
7474
7475 2013-09-23 Eli Zaretskii <eliz@gnu.org>
7476
7477 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
7478 computing the end column of mouse-highlight that comes from
7479 display or overlay strings. (Bug#15437)
7480 (note_mouse_highlight): Adapt calculation of last argument to
7481 mouse_face_from_string_pos to the above change.
7482
7483 * conf_post.h (__has_builtin): Define to zero, if undefined, on
7484 all platforms, not just for clang.
7485
7486 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
7487
7488 * filelock.c (lock_file_1): Rearrange to remove compiler warning
7489 about excess arguments to snprintf.
7490
7491 * conf_post.h(assume): Use __builtin_unreachable for clang.
7492
7493 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
7494
7495 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
7496 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
7497
7498 2013-09-23 Daniel Colascione <dancol@dancol.org>
7499
7500 * alloc.c (USE_VALGRIND): New macro; on by default
7501 when ENABLE_CHECKING.
7502 (mark_maybe_object, mark_maybe_pointer)
7503 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
7504 valgrind purposes.
7505 (valgrind_p) [USE_VALGRIND]: New variable.
7506 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
7507
7508 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
7509
7510 * process.c (wait_reading_process_output): Change int pnamelen to
7511 socklen_t.
7512
7513 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
7514 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
7515 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
7516 argument to unsigned long to avoid warning.
7517 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
7518
7519 * conf_post.h (assume): Fix compiler error: x shall be cond.
7520
7521 2013-09-22 Daniel Colascione <dancol@dancol.org>
7522
7523 * xfns.c (x_get_monitor_attributes): Suppress unused variable
7524 warning when compiling without a window system.
7525
7526 2013-09-22 Daniel Colascione <dancol@dancol.org>
7527
7528 * data.c (Qbool_vector_p): New symbol.
7529 (bool_vector_spare_mask, popcount_size_t_generic)
7530 (popcount_size_t_msc, popcount_size_t_gcc)
7531 (popcount_size_t)
7532 (bool_vector_binop_driver)
7533 (count_trailing_zero_bits, size_t_to_host_endian)
7534 (Fbool_vector_exclusive_or)
7535 (Fbool_vector_union)
7536 (Fbool_vector_intersection, Fbool_vector_set_difference)
7537 (Fbool_vector_subsetp, Fbool_vector_not)
7538 (Fbool_vector_count_matches)
7539 (Fbool_vector_count_matches_at): New functions.
7540 (syms_of_data): Intern new symbol, functions.
7541 * alloc.c (bool_vector_payload_bytes): New function.
7542 (Fmake_bool_vector): Instead of calling Fmake_vector,
7543 which performs redundant initialization and argument checking,
7544 just call allocate_vector ourselves. Make sure we clear any
7545 terminating padding to zero.
7546 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
7547 instead of open-coding the size calculation.
7548 (vroundup_ct): New macro.
7549 (vroundup): Assume argument >= 0; invoke vroundup_ct.
7550 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
7551 * composite.c (composition_gstring_put_cache):
7552 Change lint_assume to assume.
7553 * conf_post.h (assume): New macro.
7554 (lint_assume): Remove.
7555 * dispnew.c (update_frame_1): Change lint_assume to assume.
7556 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
7557 to assume.
7558 * image.c (gif_load): Change lint_assume to assume.
7559 * lisp.h (eassert_and_assume): New macro.
7560 (Qbool_vector_p): Declare.
7561 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
7562 (swap16, swap32, swap64): New inline functions.
7563 * macfont.m (macfont_shape): Change lint_assume to assume.
7564 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
7565 * xsettings.c (parse_settings): Use new swap16 and
7566 swap32 from lisp.h instead of file-specific macros.
7567
7568 2013-09-22 Eli Zaretskii <eliz@gnu.org>
7569
7570 * xdisp.c (try_window_id): Don't abort if cursor row could not be
7571 found (which can legitimately happen when the glyph row at the
7572 window start is disabled in the current_matrix. (Bug#15365)
7573
7574 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
7575
7576 Fix syntax.h bug introduced by recent INLINE change.
7577 syntax.h defined an extern inline function SYNTAX_ENTRY that was
7578 conditionally compiled one way in some modules, and a different
7579 way in others. This doesn't work with extern inline functions,
7580 which must have the same definition in all modules, because the
7581 defining code might be shared across modules, depending on the
7582 implementation. Symptoms reported by Martin Rudalics in:
7583 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
7584 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
7585 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
7586 overriding the corresponding functions in syntax.h.
7587 * syntax.h (syntax_property_entry, syntax_property_with_flags)
7588 (syntax_property): New inline functions.
7589 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
7590 Rewrite in terms of these new functions.
7591
7592 2013-09-21 Eli Zaretskii <eliz@gnu.org>
7593
7594 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
7595 not chars_in_text, whose result depends on the multibyteness of
7596 the current buffer. (Bug#15426)
7597
7598 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
7599
7600 Port recent change to hosts where pointers aren't 'long'.
7601 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
7602 Don't assume that pointers are the same width as 'long'.
7603 Add a compile-time check that a pointer fits into two X slots.
7604
7605 A simpler, centralized INLINE.
7606 * conf_post.h (INLINE): Define only if not already defined.
7607 This allows us to use a single INLINE, defined by one file
7608 per executable.
7609 * emacs.c (INLINE): Define it.
7610 Also, include category.h, charset.h, composite.h, dispextern.h,
7611 syntax.h, systime.h, so that their INLINE definitions are expanded
7612 properly for Emacs.
7613 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
7614 * buffer.h, buffer.c (BUFFER_INLINE):
7615 * category.h, category.c (CATEGORY_INLINE):
7616 * character.h, character.c (CHARACTER_INLINE):
7617 * charset.h, charset.c (CHARSET_INLINE):
7618 * composite.h, composite.c (COMPOSITE_INLINE):
7619 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
7620 * frame.h, frame.c (FRAME_INLINE):
7621 * intervals.h, intervals.c (INTERVALS_INLINE):
7622 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
7623 * lisp.h, alloc.c (LISP_INLINE):
7624 * process.h, process.c (PROCESS_INLINE):
7625 * syntax.h, syntax.c (SYNTAX_INLINE):
7626 * systime.h, sysdep.c (SYSTIME_INLINE):
7627 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
7628 * window.h, window.c (WINDOW_INLINE):
7629 Remove. All uses replaced with INLINE.
7630
7631 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
7632
7633 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
7634 to avoid Bug#15398.
7635
7636 2013-09-19 Eli Zaretskii <eliz@gnu.org>
7637
7638 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
7639 'const char *' to avoid compiler warnings due to similar change in
7640 the prototype of x_get_string_resource.
7641
7642 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
7643
7644 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
7645 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
7646 going to replace static variables below. Adjust comments.
7647 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
7648 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
7649 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
7650 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
7651 Related users changed.
7652 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
7653 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
7654 last_mouse_movement_time, going to replace static variables below.
7655 Adjust comments.
7656 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
7657 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
7658 Remove.
7659 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
7660 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
7661 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
7662 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
7663 static variables below.
7664 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
7665 (last_mouse_scroll_bar): Remove.
7666 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
7667 (mouseExited): Related users changed.
7668
7669 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
7670
7671 Do not use external array to process X scroll bar messages.
7672 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
7673 (x_send_scroll_bar_event): Pack window pointer into two slots
7674 of XClientMessageEvent if we're 64-bit. Adjust comment.
7675 (x_scroll_bar_to_input_event): Unpack accordingly.
7676
7677 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
7678
7679 Ifdef away recent changes which aren't relevant to NS port.
7680 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
7681 [!HAVE_NS]: Declare as such.
7682 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
7683 [!HAVE_NS]: Define as such.
7684
7685 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
7686
7687 * frame.c (x_redo_mouse_highlight): New function
7688 to factor out common code used in W32 and X ports.
7689 * dispextern.h (x_redo_mouse_highlight): Add prototype.
7690 * xterm.h (struct x_display_info):
7691 * w32term.h (struct w32_display_info):
7692 * nsterm.h (struct ns_display_info): New members
7693 last_mouse_motion_frame, last_mouse_motion_x and
7694 last_mouse_motion_y, going to replace static variables below.
7695 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
7696 (redo_mouse_highlight): Remove.
7697 (note_mouse_movement, syms_of_xterm): Adjust user.
7698 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
7699 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
7700 (redo_mouse_highlight): Remove.
7701 (note_mouse_movement, syms_of_w32term): Adjust user.
7702 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
7703 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
7704 Remove.
7705 (note_mouse_movement, mouseMoved, syms_of_nsterm):
7706 * nsfns.m (compute_tip_xy): Adjust user.
7707
7708 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
7709
7710 * frame.c (x_mouse_grabbed): New function.
7711 * dispextern.h (x_mouse_grabbed): Add prototype.
7712 (last_mouse_frame): Remove declaration.
7713 * xterm.h (struct x_display_info):
7714 * w32term.h (struct w32_display_info):
7715 * nsterm.h (struct ns_display_info): New member
7716 last_mouse_frame, going to replace...
7717 * xdisp.c (last_mouse_frame): ...global variable.
7718 (note_tool_bar_highlight):
7719 * w32term.c (w32_mouse_position, w32_read_socket):
7720 * xterm.c (XTmouse_position, handle_one_xevent):
7721 Use x_mouse_grabbed.
7722 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
7723
7724 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
7725
7726 * w32term.c (w32_read_socket): Avoid temporary
7727 variables in a call to x_real_positions.
7728 * xterm.c (handle_one_xevent): Likewise.
7729
7730 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
7731
7732 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
7733 (x_icon_type): Remove prototype.
7734 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
7735 * frame.c (x_icon_type): Remove.
7736 * w32term.c (x_make_frame_visible, x_iconify_frame):
7737 * xterm.c (x_make_frame_visible, x_iconify_frame):
7738 Use x_set_bitmap_icon to factor out common code.
7739
7740 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
7741
7742 * dispextern.h (check_x_display_info, x_get_string_resource):
7743 Declare here just once and unify the latter.
7744 * frame.c (check_x_display_info, x_get_string_resource):
7745 * nsterm.h (check_x_display_info):
7746 * xrdb.c (x_get_string_resource):
7747 * xterm.h (check_x_display_info): Remove prototypes.
7748 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
7749 * w32reg.c (x_get_string_resource): Likewise.
7750 (w32_get_rdb_resource): Adjust user.
7751
7752 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
7753
7754 * xterm.h (struct x_display_info): New member
7755 x_pending_autoraise_frame, going to replace...
7756 * xterm.c (pending_autoraise_frame): ...static variable.
7757 (x_new_focus_frame, XTread_socket): Adjust users.
7758 * w32term.h (struct w32_display_info): New member
7759 w32_pending_autoraise_frame, going to replace...
7760 * w32term.c (pending_autoraise_frame): ...global variable.
7761 (x_new_focus_frame, w32_read_socket): Adjust users.
7762
7763 2013-09-17 Glenn Morris <rgm@gnu.org>
7764
7765 * xdisp.c (message_dolog): If we create *Messages*,
7766 switch it to messages-buffer-mode.
7767
7768 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
7769
7770 Don't overuse 'const' in types of locals.
7771 * bidi.c (bidi_count_bytes):
7772 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
7773 (xg_event_is_for_scrollbar):
7774 * xselect.c (x_handle_property_notify)
7775 (x_handle_selection_notify, x_handle_dnd_message):
7776 * xsettings.c, xsettings.h (xft_settings_event):
7777 * xterm.c (x_handle_net_wm_state, handle_one_event)
7778 (x_menubar_window_to_frame, x_detect_focus_change)
7779 (construct_mouse_click, note_mouse_movement)
7780 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
7781 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
7782 (handle_one_xevent, x_handle_net_wm_state):
7783 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
7784 (x_handle_dnd_message):
7785 Avoid unnecessary 'const', typically the second 'const' in
7786 'const foo * const arg', a 'const' that does not affect the API
7787 and doesn't significantly help the human reader.
7788
7789 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
7790
7791 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
7792 only if Glib < 2.36.0.
7793 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
7794 * xsettings.c (init_gconf, init_gsettings): Do not check
7795 for g_type_init.
7796 * xterm.c (handle_one_xevent): Do not call to x_clear_area
7797 if GTK >= 2.7.0.
7798 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
7799
7800 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
7801
7802 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
7803 before calling g_type_init.
7804
7805 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
7806
7807 * nsterm.m (syms_of_nsterm): ... to here.
7808
7809 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
7810
7811 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
7812 (ignore_next_mouse_click_timeout): Use Time as X does.
7813 (handle_one_xevent): Avoid cast and use unsigned comparison.
7814
7815 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
7816
7817 Do not copy X event in handle_one_xevent except KeyPress case.
7818 Wnen XEvent is processed, it is unlikely to be changed except
7819 KeyPress case, so we can avoid copying and use const pointer to
7820 const data to make sure that an event is not changed elsewhere.
7821 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
7822 const' and do not create local copy except for the KeyPress event.
7823 Use casts to avoid a few glitches. Adjust formatting. Add comments.
7824 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
7825 (x_handle_net_wm_state, x_menubar_window_to_frame)
7826 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
7827 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
7828 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
7829 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
7830 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
7831 (x_handle_dnd_message):
7832 * xsettings.c (xft_settings_event):
7833 Use 'const XEvent * const' where appropriate.
7834 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
7835
7836 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
7837
7838 Fix X event waiting to handle multiple frames.
7839 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
7840 * xterm.c (pending_event_wait): Remove. Adjust users.
7841 (x_detect_focus_change): Pass frame arg.
7842 (handle_one_xevent): Find related frame early and clear per-frame
7843 wait_event_type only if this is an event for the relevant frame.
7844 (x_wait_for_event): Use per-frame wait_event_type.
7845
7846 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
7847
7848 * nsfns.m (Fx_create_frame): Fix font driver registration for
7849 GNUstep.
7850
7851 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
7852 for syms_of_macfont.
7853
7854 * nsterm.m: Include macfont.h.
7855 (ns_tmp_flags, ns_tmp_font): Remove.
7856 (ns_compute_glyph_string_overhangs): Check for driver Qns.
7857 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
7858 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
7859 (changeFont:): Fix code style. Check for font driver type when
7860 getiing font.
7861
7862 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
7863 (f)->descent.
7864
7865 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
7866 (nsfont_open): Set font driver type.
7867 Set font->ascent and font->descent. Figure out font instead of
7868 ns_tmp_font, and flags instead of ns_tmp_flags.
7869 Fix indentation. Remove call to ns_draw_text_decoration,
7870 moved to nsterm.
7871
7872 * nsfns.m: Include macfont.h.
7873 (Fx_create_frame): Register macfont driver, make a better default font.
7874 (Fns_popup_font_panel): Get font from macfont driver, if used.
7875
7876 * macfont.m, macfont.h, macuvs.h: New files.
7877
7878 * font.h: Declare syms_of_macfont.
7879
7880 * font.c (syms_of_font): Call syms_of_macfont.
7881
7882 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
7883
7884 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
7885
7886 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
7887 and it is always zero for others, so I assume that this is an ancient
7888 leftover which nobody will want to change any more.
7889 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
7890 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
7891 * frame.c (x_set_scroll_bar_width):
7892 * w32fns.c (w32_createscrollbar):
7893 * w32term.c (w32_set_vertical_scroll_bar):
7894 * xfns.c (x_set_scroll_bar_default_width):
7895 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
7896 (x_scroll_bar_expose): Related users changed.
7897
7898 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
7899
7900 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
7901 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
7902 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
7903 Define as such.
7904 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
7905 Define once here...
7906 * nsterm.h, w32term.h, xterm.h: ...and not here.
7907 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
7908 Remove unused Xisms.
7909 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
7910 these modules are never compiled otherwise.
7911
7912 2013-09-14 Eli Zaretskii <eliz@gnu.org>
7913
7914 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
7915 Doc fix. (Bug#15375)
7916
7917 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
7918
7919 Unify Fx_focus_frame between all ports.
7920 * frame.h (x_focus_frame): New prototype.
7921 * xfns.c (Fx_focus_frame): Remove.
7922 (syms_of_xfns): Do not defsubr it.
7923 (x_focus_frame): X implementation.
7924 * nsfns.m (Fx_focus_frame): Remove.
7925 (syms_of_nsfns): Do not defsubr it.
7926 (x_focus_frame): NS implementation.
7927 * w32term.c (Fx_focus_frame): Remove.
7928 (x_focus_on_frame): Rename to...
7929 (x_focus_frame): W32 implementation.
7930 * w32term.h (x_focus_on_frame): Remove prototype.
7931 * w32fns.c (Fx_focus_frame): Remove.
7932 (syms_of_w32fns): Do not defsubr it.
7933 * frame.c (Fx_focus_frame): Define here.
7934 (syms_of_frame): Defsubr here.
7935 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
7936
7937 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
7938
7939 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
7940 All of them are replaced with FRAME_DISPLAY_INFO, defined in
7941 each port to reference the port-specific window system data.
7942 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
7943 (FRAME_DISPLAY_INFO): Define.
7944 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
7945 (FRAME_DISPLAY_INFO): Define. Adjust users.
7946 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
7947 (FRAME_DISPLAY_INFO): Define. Adjust users.
7948 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
7949 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
7950 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
7951 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
7952 * xselect.c, xterm.c: All related users changed.
7953
7954 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
7955
7956 * xterm.h (x_window_to_frame, x_any_window_to_frame)
7957 (x_menubar_window_to_frame): Remove prototypes.
7958 * xfns.c (x_window_to_frame, x_any_window_to_frame)
7959 (x_menubar_window_to_frame, x_top_window_to_frame):
7960 Move from here...
7961 * xterm.c (x_window_to_frame, x_any_window_to_frame)
7962 (x_menubar_window_to_frame, x_top_window_to_frame):
7963 ...to here and convert all but the last to static.
7964
7965 2013-09-12 Eli Zaretskii <eliz@gnu.org>
7966
7967 * lisp.mk (lisp): Add w32-common-fns.elc.
7968
7969 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
7970
7971 * charset.c (char_charset): Document an exception for char-charset.
7972
7973 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
7974
7975 * xterm.h (x_display_info): New field last_user_time...
7976 * xterm.c (toplevel): ...to replace static last_user_time.
7977 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
7978
7979 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
7980
7981 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
7982 scroll bar values to prevent thumb from disappear and update comment.
7983
7984 2013-09-11 Glenn Morris <rgm@gnu.org>
7985
7986 * emacs.c (usage_message): Possessive apostrophe tweak.
7987
7988 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
7989
7990 * nsterm.m (syms_of_nsterm): Use Qns.
7991 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
7992 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
7993 * xfns.c (x_display_info_for_name, Fx_open_connection):
7994 Remove old '#if 0' code.
7995 (syms_of_xfns): Use Qx.
7996 * termhooks.h (fullscreen_hook): Remove the leftover.
7997 (struct terminal): Fix typo in comment.
7998
7999 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
8000
8001 Cleaning up a few X scroll bar bits.
8002 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
8003 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
8004 New member last_seen_part, going to replace...
8005 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
8006 (xt_action_hook) [USE_LUCID]: Adjust user.
8007 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
8008 Lucid-specific scroll bar support.
8009 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
8010 to int and adjust to use last_seen_part member.
8011 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
8012 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
8013 Initialize last_seen_part.
8014
8015 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
8016
8017 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
8018 insert-buffer-substring an empty string.
8019
8020 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
8021
8022 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
8023 avoiding a GCC warning.
8024
8025 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
8026
8027 Ifdef away frame tool bar code when it is not really used.
8028 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
8029 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
8030 and minimize_tool_bar_window_p under the above.
8031 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
8032 (fset_tool_bar_window): Likewise.
8033 * dispnew.c (clear_current_matrices, clear_desired_matrices)
8034 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
8035 (change_frame_size_1):
8036 * window.c (window_from_coordinates, Frecenter): Adjust users.
8037 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
8038 code is not really used.
8039 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
8040 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
8041 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
8042 [!USE_GTK && !HAVE_NS]: Define as such.
8043 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
8044 (note_mouse_highlight, expose_frame):
8045 * xfns.c (x_set_tool_bar_lines):
8046 * xterm.c (handle_one_xevent): Adjust users.
8047
8048 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
8049
8050 Fix corruption with multiple emacsclient -t instances (Bug#15222).
8051 This bug was introduced by my 2013-08-26 patch, which incorrectly
8052 assumed that the terminfo implementation doesn't use termcap buffers.
8053 * term.c (init_tty) [TERMINFO]: Remove optimization, as
8054 these buffers apparently are used after all.
8055 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
8056 (struct tty_display_info): Define members termcap_term_buffer and
8057 termcap_strings_buffer even if TERMINFO.
8058
8059 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
8060
8061 Fix last change.
8062 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
8063 'usage' docstring entry to pacify make-docfile.
8064
8065 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
8066
8067 Change comparison functions =, <, >, <=, >= to take many arguments.
8068 * data.c: Change comparison functions' interface and implementation.
8069 * lisp.h: Make arithcompare available for efficient two arg
8070 comparisons.
8071 * bytecode.c: Use arithcompare.
8072 * fileio.c: Use new interface.
8073
8074 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
8075
8076 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
8077
8078 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
8079
8080 * eval.c (Feval): Document the new use of `lexical'.
8081
8082 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
8083
8084 Review and drop old frame resize hack.
8085 * frame.h (struct frame): Remove force_flush_display_p.
8086 * dispnew.c (update_frame): Adjust user and don't call
8087 flush_frame here. The comment has said that there was an issues
8088 with redisplaying fringes, but I don't see any differences with
8089 and without this hack. Hopefully we can continue without it.
8090 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
8091 current frame matrices twice if resized_p is set.
8092
8093 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
8094
8095 Do not populate pure Xism x_sync to other ports.
8096 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
8097 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
8098 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
8099 * w32term.h (x_sync): Remove prototype.
8100
8101 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
8102
8103 Cleanup frame flushing.
8104 * dispextern.h (struct redisplay_interface):
8105 Drop flush_display_optional because flush_display is enough
8106 for X and flushing via RIF is just a no-op for others.
8107 * frame.h (flush_frame): New function.
8108 * dispnew.c (update_frame):
8109 * minibuf.c (read_minibuf):
8110 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
8111 Use it.
8112 * keyboard.c (detect_input_pending_run_timers): Do not flush
8113 all frames but selected one in redisplay_preserve_echo_area.
8114 * nsterm.m (ns_flush): Remove no-op.
8115 (ns_redisplay_interface): Adjust user.
8116 * w32term.h (x_flush): Remove no-op.
8117 (w32_redisplay_interface): Adjust user.
8118 * xterm.c (x_flush): Simplify because we do not flush all
8119 frames at once any more. Adjust comment.
8120 (x_redisplay_interface): Adjust user.
8121
8122 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
8123
8124 Port --without-x --enable-gcc-warnings to Fedora 19.
8125 * gfilenotify.c (globals_of_gfilenotify):
8126 Call g_type_init only if using an older glib version that needs it.
8127
8128 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
8129
8130 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
8131 (last_glyphless_glyph_merged_face_id): Remove declarations.
8132 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
8133 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
8134 (last_glyphless_glyph_merged_face_id): Now static.
8135 (merge_escape_glyph_face): New function, refactored from...
8136 (get_next_display_element): ...here.
8137 (merge_glyphless_glyph_face): New function, refactored from...
8138 (produce_glyphless_glyph): ...here...
8139 * term.c (produce_glyphless_glyph): ...and here.
8140
8141 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
8142
8143 * eval.c (eval_sub): Only call Ffunction if necessary.
8144
8145 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
8146
8147 Attempt to make redisplay more selective when changing cursor type.
8148 * frame.h (struct frame): New bitfield cursor_type_changed.
8149 * xdisp.c (cursor_type_changed): Remove.
8150 (try_cursor_movement, redisplay_window, try_window_id)
8151 (set_frame_cursor_types, try_window_reusing_current_matrix):
8152 Adjust to use per-frame bitfield.
8153 (redisplay_internal): Look for cursor type change on each visible
8154 frame and consider all frames if cursor type has been changed on
8155 the frame other than selected. If cursor type has been changed on
8156 selected frame only, do not use fast update.
8157
8158 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
8159
8160 Attempt to make redisplay more selective when changing fonts.
8161 * frame.h (struct frame): New bitfield fonts_changed.
8162 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
8163 (adjust_frame_glyphs): Add prototype.
8164 * dispnew.c (fonts_changed_p): Remove.
8165 (adjust_glyphs): Remove because we do not
8166 adjust matrices on all frames at once any more.
8167 (adjust_frame_glyphs): Block and unblock input here.
8168 (adjust_glyph_matrix): Use fonts_changed.
8169 (change_frame_size_1): Use adjust_frame_glyphs.
8170 * font.c (font_open_entity): Use fonts_changed.
8171 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
8172 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
8173 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
8174 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
8175 (shrink_mini_window, Fresize_mini_window_internal)
8176 (window_scroll_pixel_based, Fset_window_configuration)
8177 (apply_window_adjustment, Fset_window_vscroll):
8178 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
8179 Use adjust_frame_glyphs.
8180 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
8181 (try_window_reusing_current_matrix, try_window_id, display_line)
8182 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
8183 (redisplay_internal): Consider fonts_changed and adjust frame
8184 matrices for each frame only if the frame is visible. If font
8185 has been changed on some frame during full redisplay, retry
8186 only visible frames where the font has been actually changed.
8187
8188 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
8189
8190 Cache current header and mode line height for each window.
8191 * window.h (struct window): New fields mode_line_height
8192 and header_line_height.
8193 * window.c (make_window): Initialize them.
8194 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
8195 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
8196 (current_mode_line_height, current_header_line_height):
8197 Remove declaration.
8198 * xdisp.c (current_mode_line_height, current_header_line_height):
8199 Remove.
8200 (pos_visible_p, init_xdisp): Adjust user.
8201 (redisplay_window): Invalidate mode_line_height and
8202 header_line_height if current and desired matrices do not agree.
8203
8204 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
8205
8206 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
8207 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
8208
8209 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
8210
8211 Make --without-x compatible with --enable-gcc-warnings.
8212 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
8213 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
8214 members under HAVE_WINDOW_SYSTEM.
8215 * keyboard.c (make_lispy_focus_out): Likewise.
8216 (record_menu_key): Move under HAVE_MENUS.
8217 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
8218 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
8219 (syms_of_xdisp): Adjust user.
8220 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
8221 (start_hourglass, cancel_hourglass):
8222 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
8223 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
8224 and CLEAR_FONT_TABLE_NFONTS.
8225 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
8226 Declare only if HAVE_WINDOW_SYSTEM.
8227 (lface_same_font_attributes_p, clear_face_gcs): Define only
8228 if HAVE_WINDOW_SYSTEM.
8229
8230 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
8231
8232 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
8233 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
8234 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
8235
8236 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
8237
8238 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
8239
8240 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
8241
8242 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
8243 This fixes a type error on hosts where ptrdiff_t is wider than int.
8244
8245 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
8246
8247 * keyboard.c (read_key_sequence_vs): New function.
8248 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
8249 common code.
8250
8251 * callint.c (Fcall_interactively): Always return a vector for 'K'.
8252
8253 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
8254
8255 Makefile improvements.
8256 * Makefile.in (config.status): Don't use double-colon rules, as
8257 they are not portable according to POSIX. Fix shell typo with `;
8258 I guess this rule has never been tested?
8259 (VCSWITNESS): New macro, to override any environment var.
8260
8261 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
8262
8263 * xterm.h (struct x_display_info): Do not track X connection
8264 fd separately because it is always available from Display.
8265 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
8266 Adjust users.
8267
8268 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
8269
8270 * buffer.c (drop_overlay):
8271 * fileio.c (restore_point_unwind): Prefer unchain_marker to
8272 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
8273
8274 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
8275
8276 * buffer.c (Fmake_overlay, Fmove_overlay):
8277 * intervals.c (set_point_from_marker):
8278 * print.c (PRINTPREPARE): Prefer signal_error
8279 to plain error and report unsuitable marker too.
8280
8281 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
8282
8283 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
8284 for 'dragging' member.
8285 (struct x_output): Remove set-but-unused leftovers
8286 'left_before_move' and 'top_before_move'.
8287 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
8288 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
8289 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
8290 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
8291 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
8292 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
8293 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
8294 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
8295
8296 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
8297
8298 * nsfont.m (INVALID_GLYPH): New define.
8299 (nsfont_encode_char): Use INVALID_GLYPH.
8300 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
8301
8302 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
8303
8304 * xterm.c (x_last_mouse_movement_time): Revert last change.
8305 This code should use XDisplayMotionBufferSize to check display's
8306 motion history first, and there are few other issues as well.
8307 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
8308 (handle_one_xevent): Adjust user.
8309
8310 2013-09-02 Martin Rudalics <rudalics@gmx.at>
8311
8312 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
8313 * frame.c (Flast_nonminibuf_frame): ... to here.
8314 (check_minibuf_window): Don't abort if no window was found
8315 (Bug#15247).
8316
8317 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
8318
8319 Use XGetMotionEvents to ask the last mouse motion time from X server.
8320 * xterm.c (X_MOTION_HISTORY): Default to 1.
8321 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
8322 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
8323 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
8324 Ifdef away legacy code.
8325 (XTmouse_position, x_scroll_bar_report_motion):
8326 Use x_last_mouse_movement_time.
8327 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
8328 UnmapNotify event.
8329
8330 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
8331
8332 * msdos.c (last_mouse_window): Move to...
8333 (dos_rawgetc): ...this function and adjust comment.
8334 * nsterm.m (last_window): Rename to last_mouse_window, move to...
8335 (mouseMoved): ...this function and adjust comment.
8336 * w32term.c (last_window): Likewise with...
8337 (w32_read_socket): ...this function.
8338 * xterm.c (last_window): Likewise with...
8339 (handle_one_xevent): ...this function.
8340
8341 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
8342
8343 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
8344 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
8345 (handle_one_xevent): ...to here.
8346 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
8347 otherwise.
8348
8349 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
8350
8351 * msdos.c (IT_set_terminal_window): Remove no-op.
8352 (initialize_msdos_display): Adjust terminal setup.
8353 * w32console.c (w32con_set_terminal_window): Remove no-op.
8354 (initialize_w32_display): Adjust terminal setup.
8355 * w32term.c (w32_set_terminal_window): Remove no-op.
8356 (w32_create_terminal): Adjust terminal setup.
8357 * xterm.c (XTset_terminal_window): Remove no-op.
8358 (x_create_terminal): Adjust terminal setup.
8359
8360 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
8361
8362 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
8363 Remove no-ops.
8364 (ns_create_terminal): Adjust terminal setup.
8365 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
8366 Remove no-ops.
8367 (w32_create_terminal): Adjust terminal setup.
8368 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
8369 Remove no-ops.
8370 (x_create_terminal): Adjust terminal setup.
8371
8372 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
8373
8374 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
8375 (CLIP_TEXT_POS_FROM_MARKER): New macro.
8376 * dispnew.c (buffer_posn_from_coords):
8377 * window.c (Fwindow_end, displayed_window_lines):
8378 * xdisp.c (redisplay_mode_lines): Use it.
8379
8380 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
8381
8382 * fontset.c (face_for_char): Check char in the current face font first
8383 if HAVE_NS (Bug#15138).
8384
8385 2013-08-31 Martin Rudalics <rudalics@gmx.at>
8386
8387 * window.c (temp_output_buffer_show): Make sure window returned
8388 by display_buffer is live (Bug#15213).
8389
8390 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
8391
8392 Minor cleanup to avoid forward declarations.
8393 * coding.h (struct ccl_spec): Remove forward declaration.
8394 * composite.h (toplevel): Include font.h.
8395 (struct composition_it, struct face, struct font_metrics):
8396 Remove forward declaration.
8397 * dispextern.h (struct image, struct atimer): Likewise.
8398 * emacsgtkfixed.h (struct frame): Likewise.
8399 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
8400 * font.h (struct font_driver, struct font, struct glyph_string)
8401 (struct face): Remove forward declaration.
8402 * fontset.h (struct face, struct font): Likewise.
8403 * frame.h (toplevel): Style cleanup.
8404 (enum output_method): Move to...
8405 * termhooks.h (enum output_method): ...here.
8406 (struct glyph, struct frame, struct ns_display_info)
8407 (struct x_display_info, struct w32_display_info):
8408 Remove forward declaration.
8409 * xterm.h (toplevel): Include termhooks.h.
8410 (struct font, struct window, struct glyph_matrix, struct frame)
8411 (struct input_event, struct face, struct image): Remove forward
8412 declaration.
8413 * gtkutil.h (struct _widget_value): Likewise.
8414 * keyboard.h (toplevel): Include termhooks.h.
8415 (struct input_event): Remove forward declaration.
8416
8417 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
8418
8419 * intervals.c (set_point_from_marker): New function.
8420 * editfns.c (Fgoto_char):
8421 * process.c (Finternal_default_process_filter):
8422 * window.c (select_window_1): Use it.
8423 * buffer.h (set_point_from_marker): Add prototype.
8424
8425 2013-08-29 Eli Zaretskii <eliz@gnu.org>
8426
8427 * w32.c (term_winsock): Call release_listen_threads before calling
8428 WSACleanup.
8429 (_sys_wait_accept): Wait for accept event in a loop with a finite
8430 timeout, instead of waiting indefinitely. Will hopefully avoid
8431 hanging during exit because WSACleanup deadlocks waiting for the
8432 event object to be released. (Bug#14333)
8433
8434 * w32proc.c (release_listen_threads): New function, signals all
8435 the reader threads that listen for connections to stop waiting.
8436
8437 * w32.h (release_listen_threads): Add prototype.
8438
8439 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
8440
8441 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
8442 field of new marker (for sanity and safety).
8443 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
8444 anyway because XMISCTYPE is a function and can't be an lvalue).
8445
8446 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
8447
8448 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
8449 (x_after_update_window_line, x_scroll_bar_create)
8450 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
8451 (handle_one_xevent, x_clear_frame_area):
8452 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
8453 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
8454 * xterm.h (x_clear_area): Adjust prototype.
8455
8456 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
8457
8458 Hook scanning and indentation functions to find_newline. This helps
8459 to avoid duplicated code and renders more respect to newline cache.
8460 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
8461 * cmds.c (Fforward_line):
8462 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
8463 Use find_newline and avoid unnecessary point movements.
8464 * search.c (scan_newline): Implement on top of find_newline.
8465
8466 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
8467
8468 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
8469 scoped code (bug#11258).
8470
8471 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
8472
8473 * nsterm.m (last_window): New variable.
8474 (EV_TRAILER2): New macro.
8475 (EV_TRAILER): Call EV_TRAILER2.
8476 (mouseMoved:): Add support for mouse-autoselect-window
8477 on nextstep (Bug#6888).
8478
8479 2013-08-28 Andreas Schwab <schwab@suse.de>
8480
8481 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
8482 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
8483 Remove unused macro definitions.
8484 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
8485 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
8486 Only define if emacs.
8487
8488 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
8489
8490 Prefer enum glyph_row_area to int where appropriate.
8491 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
8492 Fix comment.
8493 (window_box, window_box_width, window_box_left, window_box_left_offset)
8494 (window_box_right, window_box_right_offset): Adjust prototypes.
8495 * xdisp.c (window_box, window_box_width, window_box_left)
8496 (window_box_left_offset, window_box_right, window_box_right_offset):
8497 Use enum glyph_row_area. Adjust users and tweak comment where needed.
8498 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
8499 * nsterm.m (ns_clip_to_row):
8500 * w32term.c (w32_clip_to_row):
8501 * xterm.c (x_clip_to_row): Likewise.
8502
8503 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
8504
8505 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
8506 (Fprevious_overlay_change): Fast path for buffer with no overlays.
8507
8508 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
8509
8510 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
8511 for portability to hosts where /bin/sh has problems.
8512
8513 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
8514
8515 Redesign redisplay interface to drop global output_cursor.
8516 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
8517 (toplevel): Remove declaration of output_cursor.
8518 (set_output_cursor, x_cursor_to): Remove prototype.
8519 * window.h (struct window): New member output_cursor.
8520 (output_cursor_to): New function to replace RIF member.
8521 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
8522 (update_text_area, set_window_cursor_after_update): Use it.
8523 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
8524 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
8525 * nsterm.m (ns_update_window_begin, ns_update_window_end):
8526 * w32term.c (x_update_window_begin, x_update_window_end):
8527 * xterm.c (x_update_window_begin, x_update_window_end):
8528 Adjust to use per-window output cursor.
8529
8530 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
8531
8532 Simplify SELECT_TYPE-related code.
8533 Like EMACS_TIME, this portability layer is no longer needed, since
8534 Emacs has been using fd_set as a portability layer for some time.
8535 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
8536 (SELECT_TYPE): Remove. All uses changed to fd_set.
8537 (fd_set) [!FD_SET]: New typedef.
8538
8539 Simplify EMACS_TIME-related code.
8540 This portability layer is no longer needed, since Emacs has been
8541 using struct timespec as a portability layer for some time.
8542 * atimer.h, buffer.h, dispextern.h, xgselect.h:
8543 Include <time.h> rather than "systime.h"; that's all that's needed now.
8544 * dispnew.c: Include <timespec.h> rather than "systime.h";
8545 that's all that's needed now.
8546 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
8547 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
8548 TIMESPEC_RESOLUTION.
8549 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
8550 LOG10_TIMESPEC_RESOLUTION.
8551 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
8552 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
8553 (make_emacs_time): Remove. All used changed to make_timespec.
8554 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
8555 (current_timespec): Rename from current_emacs_time. All uses changed.
8556 (add_emacs_time): Remove. All uses changed to timespec_add.
8557 (sub_emacs_time): Remove. All uses change dot timespec_sub.
8558 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
8559 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
8560 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
8561 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
8562 (current_timespec): Rename from current_emacs_time. All uses changed.
8563 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
8564 changed to timespec_cmp.
8565 * xgselect.c: Include <timespec.h>, since our .h files don't.
8566
8567 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
8568
8569 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
8570 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
8571 Remove the leftovers.
8572 * gtkutil.c (toplevel): Do not declare Qxft but include
8573 font.h to do so.
8574 * image.c (toplevel): Do not declare Vlibrary_cache because
8575 it's already done in lisp.h.
8576
8577 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
8578
8579 * lisp.h (Mouse_HLInfo): Move from here...
8580 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
8581 (reset_mouse_highlight): New function.
8582 * msdos.c (dos_set_window_size, IT_update_begin)
8583 (internal_terminal_init):
8584 * nsterm.m (ns_update_window_end, x_free_frame_resources)
8585 (ns_initialize_display_info):
8586 * w32console.c (initialize_w32_display):
8587 * w32term.c (x_update_window_end, x_free_frame_resources)
8588 (w32_initialize_display_info):
8589 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
8590 * window.c (Fdelete_other_windows_internal):
8591 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
8592 * termchar.h (toplevel):
8593 * xterm.h (toplevel): Include dispextern.h.
8594
8595 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
8596
8597 Fix minor problems found by static checking.
8598 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
8599 (expect): Avoid nested-if warning.
8600 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
8601 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
8602 * nsterm.h, nsterm.m (ns_select):
8603 * xgselect.c, xgselect.h (xg_select):
8604 Adjust signature to better match pselect's.
8605 * nsterm.m (ns_select):
8606 Don't set *TIMEOUT, since pselect doesn't.
8607 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
8608 diagnostic about assigning const char * to it.
8609 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
8610
8611 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
8612
8613 * lread.c (substitute_object_recurse): Handle hash-tables as well
8614 (bug#15190).
8615
8616 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
8617
8618 Fix unlikely core dump in init_tty, and simplify terminfo case.
8619 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
8620 The old version incorrectly dumped core if malloc returned a
8621 buffer containing only non-NUL bytes.
8622 (init_tty): Do not allocate or free termcap buffers; the
8623 struct does that for us now.
8624 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
8625 (struct tty_display_info): Define members termcap_term_buffer and
8626 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
8627 use them. Allocate them directly in struct rather than indirectly
8628 via a pointer, to simplify init_tty.
8629
8630 * frame.c (check_minibuf_window): Initialize 'window' properly,
8631 so that Emacs reliably aborts later if 'window' is not initialized.
8632
8633 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
8634
8635 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
8636 of VoidSymbol (Bug#15154).
8637
8638 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
8639
8640 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
8641 mouse_face_beg_y and mouse_face_end_y.
8642 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
8643 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
8644 Adjust users and update comment where appropriate.
8645
8646 2013-08-26 Martin Rudalics <rudalics@gmx.at>
8647
8648 * frame.c (check_minibuf_window): New function.
8649 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
8650 Call check_minibuf_window (Bug#15183).
8651
8652 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
8653
8654 * window.h (struct window): Replace last_cursor with last_cursor_vpos
8655 because this is the only last cursor data we need to keep and consult.
8656 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
8657 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
8658 Adjust users.
8659
8660 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
8661
8662 Fix recovering from possible decompression error.
8663 Since insert_from_gap doesn't always move point, we can't use PT as
8664 the position where the partially decompressed data ends, and
8665 should count how many bytes was produced so far.
8666 * decompress.c (struct decompress_unwind_data): Add nbytes member.
8667 (unwind_decompress): Really delete partially uncompressed data.
8668 (Fzlib_decompress_region): Take decompressed data size into account.
8669
8670 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
8671
8672 * syntax.c (init_syntax_once): Adjust comment and do an early
8673 initialization of Qchar_table_extra_slots just once...
8674 * casetab.c (init_casetab_once):
8675 * category.c (init_category_once):
8676 * character.c (syms_of_character):
8677 * coding.c (syms_of_coding):
8678 * xdisp.c (syms_of_xdisp): ...and omit it here.
8679
8680 2013-08-24 Eli Zaretskii <eliz@gnu.org>
8681
8682 * xdisp.c (get_next_display_element): Don't apply to characters
8683 from a display vector the logic of setting it->end_of_box_run_p
8684 suitable for characters from a buffer. (Bug#15175)
8685
8686 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
8687 to handle directories, rather than '_utime' which doesn't.
8688 (Bug#15176)
8689
8690 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
8691
8692 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
8693 or fullscreen (Bug#14627).
8694
8695 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
8696
8697 System-dependent integer overflow fixes.
8698 * process.c (Fset_process_window_size): Signal an error if
8699 the window size is outside the range supported by the lower level.
8700 * sysdep.c (set_window_size): Return negative on error,
8701 nonnegative on success, rather than -1, 0, 1 on not in system,
8702 failure, success. This is simpler. Caller changed.
8703 (serial_configure): Remove unnecessary initialization of local.
8704 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
8705 size fits in unsigned long; this isn't true on some 32-bit hosts.
8706 Avoid buffer overrun if some future version of /proc/meminfo has a
8707 variable name longer than 20 bytes.
8708 (system_process_attributes) [__FreeBSD__]:
8709 Don't assume hw.availpages fits in 'int'.
8710
8711 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
8712
8713 Don't let very long directory names overrun the stack.
8714 Fix some related minor problems involving "//", vfork.
8715 * callproc.c (encode_current_directory): New function.
8716 (call_process): Don't append "/"; not needed.
8717 * fileio.c (file_name_as_directory_slop): New constant.
8718 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
8719 this can save the caller having to alloca.
8720 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
8721 Use SAFE_ALLOCA, not alloca.
8722 (directory_file_name, Fexpand_file_name): Leave leading "//"
8723 alone, since it can be special even on POSIX platforms.
8724 * callproc.c (call_process):
8725 * process.c (Fformat_network_address):
8726 * sysdep.c (sys_subshell):
8727 Use encode_current_directory rather than rolling our own.
8728 (create_process): No need to encode directory; caller does that now.
8729 * process.h (encode_current_directory): New decl.
8730 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
8731 Rework to avoid 'goto xyzzy;'.
8732
8733 2013-08-23 Eli Zaretskii <eliz@gnu.org>
8734
8735 * xdisp.c (handle_face_prop): If the default face was remapped use
8736 the remapped face for strings from prefix properties. (Bug#15155)
8737
8738 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
8739
8740 Minor cleanup for redisplay interface and few related functions.
8741 * frame.h (enum text_cursor_kinds): Move from here...
8742 * dispextern.h (enum text_cursor_kinds): ...to here.
8743 (toplevel): Drop unnecessary declarations.
8744 (struct redisplay_interface): Use bool and enum text_cursor_kinds
8745 in update_window_end_hook and draw_window_cursor functions.
8746 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
8747 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
8748 * w32term.c (x_update_window_end, w32_draw_window_cursor):
8749 * xterm.c (x_update_window_end, x_draw_window_cursor):
8750 * xdisp.c (display_and_set_cursor, update_window_cursor)
8751 (update_cursor_in_window_tree, x_update_cursor): Use bool and
8752 enum text_cursor_kinds where appropriate.
8753
8754 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
8755
8756 Redesign redisplay interface to drop updated_row and updated_area.
8757 * dispextern.h (updated_row, updated_area): Remove declaration.
8758 (struct redisplay_interface): Pass glyph row and row area parameters
8759 to write_glyphs, insert_glyphs and clear_end_of_line functions.
8760 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
8761 Adjust prototypes.
8762 * dispnew.c (updated_row, updated_area): Remove.
8763 (redraw_overlapped_rows, update_window_line): Adjust user.
8764 (update_marginal_area, update_text_area): Likewise. Pass updated row
8765 as a parameter. Prefer enum glyph_row_area to int where appropriate.
8766 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
8767 Adjust users.
8768
8769 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
8770
8771 * process.c (flush_pending_output): Remove stub.
8772 All uses removed.
8773
8774 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
8775
8776 * callproc.c: Fix race that killed background processes (Bug#15144).
8777 (call_process): New arg TEMPFILE_INDEX. Callers changed.
8778 Record deleted process-id in critical section, not afterwards.
8779 Don't mistakenly kill process created by a call-process invocation
8780 that discards output and does not wait.
8781
8782 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
8783
8784 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
8785 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
8786 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
8787 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
8788 to shut up compiler in mark_object.
8789 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
8790
8791 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
8792
8793 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
8794 We can't portably rely on PTY_OPEN doing that, even if
8795 it calls posix_openpt with O_CLOEXEC.
8796
8797 2013-08-20 Kenichi Handa <handa@gnu.org>
8798
8799 * character.c (string_char): Improve commentary.
8800
8801 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
8802
8803 * image.c (SIGNATURE_DIGESTSIZE): Remove.
8804 (struct animation_cache): Make signature a flexible array member.
8805 All uses changed. This is a tad slower but may insulate us better
8806 from future changes to ImageMagick.
8807
8808 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
8809
8810 * image.c: Shrink memory needed for animation cache.
8811 (SIGNATURE_DIGESTSIZE): New constant.
8812 (struct animation_cache): Make 'signature' a fixed size array of bytes.
8813 (imagemagick_create_cache): Copy the signature. This saves
8814 several KB of memory that ImageMagick wastes per signature.
8815 Don't bother updating the update_time, as the caller does that now.
8816 (imagemagick_prune_animation_cache): Don't destroy the signature, as
8817 it's a fixed size struct member now.
8818 (imagemagick_get_animation_cache): Always destroy the signature,
8819 as it's now imagemagick_create_cache's responsibility to copy it.
8820 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
8821 and use memcmp rather than strcmp.
8822 eassert that ImageMagick returns a signature of the specified length.
8823
8824 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
8825
8826 * image.c (imagemagick_get_animation_cache): Don't segfault on
8827 each invocation.
8828 (imagemagick_get_animation_cache): Revert to previous definition
8829 so that it actually works. But keep the memory leak fix.
8830 (imagemagick_get_animation_cache): Fix memory leak.
8831
8832 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
8833
8834 * image.c: Fix animation cache signature memory leak.
8835 Fix some other minor performance problems while we're at it.
8836 (imagemagick_create_cache): Clear just the members that
8837 need clearing. Don't set update_time, as caller does that now.
8838 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
8839 Simplify by using pointer-to-pointer instead of a prev pointer.
8840 (imagemagick_prune_animation_cache): Use make_emacs_time rather
8841 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
8842 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
8843 it's already a copy. Free the signature probe unless it's cached.
8844
8845 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
8846 This was introduced by my 2013-08-12 fix for Bug#15035.
8847
8848 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
8849
8850 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
8851 (imagemagick_prune_animation_cache): Now static.
8852
8853 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
8854
8855 * image.c (imagemagick_get_animation_cache): Don't segfault when
8856 pruning all entries.
8857
8858 2013-08-18 Ken Brown <kbrown@cornell.edu>
8859
8860 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
8861 static heap if ENABLE_CHECKING is defined.
8862 (max_bss_sbrk_ptr): New variable.
8863 (bss_sbrk): Use it.
8864 (report_sheap_usage): Report maximum static heap usage instead of
8865 ending static heap usage.
8866
8867 2013-08-17 Eli Zaretskii <eliz@gnu.org>
8868
8869 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
8870 of zlib_initialized according to the results of calling
8871 init_zlib_functions.
8872
8873 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
8874
8875 * image.c: Implement an ImageMagick per-image cache.
8876 (imagemagick_get_animation_cache): Fix a double-free error.
8877 (imagemagick_load_image): Remove the ping_wand code, which only
8878 apparently saved time on invalid animated images, and slowed down
8879 everything else. Optimise for the common case.
8880
8881 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
8882
8883 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
8884
8885 * editfns.c (insert_before_markers): Mention overlay in the doc string.
8886
8887 * marker.c (set_marker): Remove documentation of undefined behavior.
8888
8889 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
8890
8891 * image.c (imagemagick_compute_animated_image): Animate correctly
8892 when sub-images are smaller than the main image.
8893 (imagemagick_compute_animated_image): Setting the iterator row to
8894 zero is apparently not allowed.
8895 (imagemagick_compute_animated_image): Allow images that say they
8896 have sub-images that are bigger than the main image, but just crop
8897 them.
8898
8899 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
8900
8901 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
8902
8903 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
8904
8905 * image.c (imagemagick_compute_animated_image): Respect the GIF
8906 disposal methods.
8907
8908 2013-08-15 Ken Brown <kbrown@cornell.edu>
8909
8910 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
8911 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
8912 needed.
8913
8914 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
8915
8916 Fix minor problems found by static checking.
8917 * frame.c (delete_frame):
8918 * xdisp.c (next_element_from_display_vector):
8919 Avoid uninitialized local.
8920 * image.c (imagemagick_compute_animated_image): Port to C89.
8921 Prefer usual GNU indentation style for loops.
8922 Be more careful about bizarrely large sizes, by using ptrdiff_t
8923 instead of int.
8924
8925 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8926
8927 Fix infinite frame selection loop (Bug#15025).
8928 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
8929
8930 2013-08-15 Eli Zaretskii <eliz@gnu.org>
8931
8932 * xdisp.c (compute_window_start_on_continuation_line):
8933 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
8934 to make sure we end up setting the window start at the leftmost
8935 visible character of the display line. This avoids funky
8936 horizontal shifting because the window start is not kept on the
8937 same position. (Bug#15090)
8938 (next_element_from_display_vector): Support 'box' face attribute
8939 in the face definitions of a display vector. (Bug#15099)
8940
8941 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
8942
8943 * image.c (imagemagick_compute_animated_image): Implement animated
8944 images (bug#14700).
8945 (imagemagick_compute_animated_image): Fix some compilation
8946 warnings. Implement a very simple cache to make the animation
8947 usable at all, but it should be replaced with a per-image cache.
8948
8949 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8950
8951 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
8952 to do `for' loops over alist values.
8953 * buffer.h (FOR_EACH_BUFFER):
8954 * process.c (FOR_EACH_PROCESS): Use it.
8955 (handle_child_signal, status_notify, Fget_buffer_process)
8956 (kill_buffer_processes): Use FOR_EACH_PROCESS.
8957
8958 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8959
8960 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
8961 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
8962 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
8963 to xzalloc and so avoid redundant call to memset.
8964 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
8965 members because it is allocated with xzalloc and so already zeroed.
8966
8967 2013-08-14 Ken Brown <kbrown@cornell.edu>
8968
8969 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
8970 (Bug#15094).
8971
8972 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
8973
8974 Utility function and macro to copy Lisp string to C string.
8975 * lisp.h (xlispstrdupa): New macro.
8976 (xlispstrdup): New prototype.
8977 * alloc.c (xlispstrdup): New function.
8978 * callint.c (Fcall_interactively):
8979 * fileio.c (Ffile_name_directory, Fexpand_file_name)
8980 (Fsubstitute_in_file_name):
8981 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
8982 * image.c (x_create_bitmap_from_file):
8983 * w32term.c (w32_term_init):
8984 * xterm.c (x_term_init): Use xlispstrdup.
8985
8986 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
8987
8988 * image.c (imagemagick_load_image): Make animated pictures work.
8989 There's still some problems with background color settings, though
8990 (bug#14700).
8991
8992 * decompress.c (unwind_decompress): Always restore point.
8993
8994 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
8995
8996 * marker.c (set_marker): Reformat documentation.
8997
8998 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
8999
9000 * xdisp.c (cursor_type_changed): Now static.
9001
9002 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
9003 Use changed. This avoids the need to call xmalloc and for the
9004 caller to call xfree, and avoids memory leaks in some situations.
9005
9006 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
9007
9008 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
9009 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
9010 (redisplay_window): If window_end_valid is cleared due to non-zero
9011 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
9012 so do not call to try_cursor_movement for that window.
9013
9014 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
9015
9016 * window.h (struct window): Convert window_end_pos and
9017 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
9018 (wset_window_end_pos, wset_window_end_vpos): Remove.
9019 * dispnew.c (adjust_glyph_matrix):
9020 * window.c (Fwindow_end, replace_window, set_window_buffer)
9021 (make_window):
9022 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
9023 (set_vertical_scroll_bar, redisplay_window, try_window)
9024 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
9025 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
9026 (note_mouse_highlight): Adjust users.
9027 (try_cursor_movement): Likewise. Convert old precondition to eassert.
9028 Add comment.
9029
9030 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
9031
9032 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
9033 * image.c (imagemagick_filename_hint): Use `const char *' and
9034 prefer SSDATA to SDATA to avoid warnings.
9035
9036 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
9037
9038 Cleanup window fringes, margins and scroll bars adjustments.
9039 * window.c (set_window_fringes, set_window_margins)
9040 (set_window_scroll_bars, apply_window_adjustment): New functions.
9041 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
9042 (Fset_window_scroll_bars): Use them.
9043
9044 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
9045
9046 * window.h (struct window): Convert scroll_bar_width
9047 from Lisp_Object to integer. Adjust comment.
9048 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
9049 Adjust users.
9050 * window.c (wset_scroll_bar_width): Remove.
9051 (make_window): Initialize scroll_bar_width.
9052 (Fsplit_window_internal): Use direct assignment.
9053 (Fset_window_configuration, save_window_save):
9054 Convert Lisp_Object to integer and back where appropriate.
9055 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
9056 bar was actually changed, and mention this in docstring.
9057
9058 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
9059
9060 * decompress.c: Minor simplifications.
9061 (Fzlib_decompress_region): Don't bother verifying
9062 that avail_out <= UINT_MAX, as that was confusing.
9063 Mention the restriction in a comment instead.
9064 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
9065
9066 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
9067
9068 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
9069 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
9070
9071 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
9072
9073 * image.c (imagemagick_filename_hint): Check for errors in the
9074 alist structure.
9075
9076 2013-08-13 Eli Zaretskii <eliz@gnu.org>
9077
9078 * window.c (Fwindow_margins): Return nil when there's no marginal
9079 area, as per the documented API.
9080
9081 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
9082 Fmake_vector, as scroll bar's struct members are not all Lisp
9083 objects now. This avoids crashes in GC.
9084
9085 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
9086 bool, so its address could be taken.
9087
9088 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
9089
9090 * image.c (imagemagick_filename_hint): New function to possibly
9091 apply `image-content-type-suffixes'.
9092 (imagemagick_load_image): Use it.
9093
9094 2013-08-13 Eli Zaretskii <eliz@gnu.org>
9095
9096 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
9097 if loading zlib failed.
9098
9099 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
9100
9101 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
9102 2013-08-13 checkin below. Change bool to BOOL, rule is:
9103 All Obj-C code uses BOOL, except for interfaces callable from C.
9104
9105 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
9106
9107 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
9108
9109 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
9110 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
9111 bool instead of BOOL.
9112 * w32term.h (struct scroll_bar): Convert fringe_extended_p
9113 from Lisp_Object to bitfield. Adjust comment.
9114 * w32term.c (x_scroll_bar_create): Adjust user.
9115 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
9116 * xterm.c (XTset_vertical_scroll_bar): Likewise.
9117 Use bool for boolean.
9118 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
9119 to `unsigned int' when defining a bitfield.
9120
9121 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
9122
9123 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
9124
9125 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
9126
9127 * window.h (struct window): Convert left_margin_cols and
9128 right_margin_cols from Lisp_Objects to integers. Adjust comment.
9129 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
9130 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
9131 Adjust users.
9132 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
9133 Adjust comment.
9134 (showing_window_margins_p, update_window_line, update_frame_1):
9135 * fringe.c (draw_fringe_bitmap_1):
9136 * xdisp.c (window_box_width): Adjust users.
9137 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
9138 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
9139 Use direct assignment.
9140 (Fset_window_configuration, save_window_save, Fwindow_margins):
9141 Convert Lisp_Object to integer and back where appropriate.
9142 (Fset_window_margins): Adjust user. Return t if any margin
9143 was actually changed, and mention this in docstring.
9144
9145 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
9146
9147 * syntax.c (forward_word):
9148 * cmds.c (forward_char, backward_char): Mention the optional argument.
9149
9150 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
9151
9152 * window.h (struct window): Convert left_fringe_width
9153 and right_fringe_width from Lisp_Objects to integers.
9154 Adjust comment.
9155 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
9156 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
9157 * window.c (wset_left_fringe_width, wset_right_fringe_width):
9158 Remove.
9159 (make_window): Initialize new integer fields to -1.
9160 (Fsplit_window_internal): Use direct assignment.
9161 (Fset_window_configuration, save_window_save):
9162 Convert Lisp_Object to integer and back where appropriate.
9163 (Fset_window_fringes): Adjust user. Return t if any fringe
9164 was actually changed, and mention this in docstring.
9165
9166 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
9167
9168 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
9169 * nsfns.m (x_set_cursor_type):
9170 * w32fns.c (x_set_cursor_type):
9171 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
9172 * xdisp.c (set_frame_cursor_types): ...but in common code.
9173
9174 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
9175
9176 * font.c (clear_font_cache): New function, stripped from...
9177 (Fclear_font_cache): ...here, which now uses the function
9178 above. Adjust comment.
9179 * font.h (clear_font_cache): Add prototype.
9180 * xfaces.c (clear_face_cache): Use clear_font_cache.
9181
9182 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
9183
9184 * window.c (Fset_window_start): Compare `w', not `window' because
9185 `w' might not be equal to `window' after call to decode_live_window.
9186
9187 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
9188
9189 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
9190 This fixes a problem introduced by the Bug#15035 patch
9191 when using GPG. Reported by Herbert J. Skuhra.
9192
9193 2013-08-12 Eli Zaretskii <eliz@gnu.org>
9194
9195 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
9196 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
9197 not yet initialized.
9198
9199 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
9200
9201 * decompress.c (Fzlib_decompress_region): Support zlib
9202 decompression, too, and rename.
9203
9204 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
9205
9206 Minor zlib configuration tweaks.
9207 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
9208 Don't assume presence of fn_inflateInit2_ zlib internal function.
9209
9210 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
9211
9212 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
9213 include the zlib prefix.
9214
9215 2013-08-12 Eli Zaretskii <eliz@gnu.org>
9216
9217 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
9218 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
9219 define static variables that are pointers to zlib functions to be
9220 dynamically loaded.
9221 (init_zlib_functions) [WINDOWSNT]: New function.
9222 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
9223 New macros.
9224 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
9225 macros instead of invoking the zlib functions directly.
9226 (syms_of_decompress): DEFSYM Qzlib_dll.
9227 Staticpro Szlib_available_p.
9228
9229 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
9230
9231 Avoid looping over all frame windows to freeze and unfreeze.
9232 * window.h (struct window): Drop frozen_window_start_p.
9233 (freeze_window_starts): Drop prototype.
9234 * frame.h (struct frame): New frozen_window_starts flag.
9235 (FRAME_WINDOWS_FROZEN): New macro.
9236 * window.c (freeze_window_start, freeze_window_starts):
9237 Remove.
9238 (select_window, replace_window): Adjust users.
9239 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
9240 (window_frozen_p): New function.
9241 (redisplay_window): Use it.
9242
9243 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
9244
9245 Fix some fd issues when running subprocesses (Bug#15035).
9246 Fix bugs that can leak files or file descriptors on errors.
9247 Don't unlink open temp files, as that's hard for users to diagnose
9248 when things go awry (e.g., temp disk exhausted).
9249 Don't bother to lock temp files. Check for invalid recursion.
9250 * callproc.c (synch_process_fd): Remove. All uses removed.
9251 (synch_process_tempfile): New var or macro.
9252 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
9253 New constants.
9254 (record_kill_process): New arg, the temp name. All callers changed.
9255 (delete_temp_file): Now just a simple wrapper around unlink.
9256 (call_process_kill): New arg, the call_process_fd array.
9257 Close them all. Clear synch_process_pid. Remove the temp file,
9258 or arrange for it to be removed.
9259 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
9260 that's been moved to synch_process_tempfile. Caller changed.
9261 Do not remove the tempfile; that's now call_process_kill's
9262 responsibility.
9263 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
9264 call_process_kill; the caller now does that.
9265 (call_process_cleanup): Do not close the process fd; that's now
9266 call_process_kill's responsibility.
9267 (Fcall_process): Implement via new function call_process, which
9268 has most of the old body of Fcall_process, but with a different API.
9269 (call_process): New function that does not open or close filefd if
9270 it is nonnegative. Record which fds need to be closed, and let
9271 call_process_kill close (and remove the tempfile, on MSDOS) on error.
9272 Signal an error if invoked recursively (could be done via a hook).
9273 Simplify creation of the tempfile in the MSDOS case.
9274 Don't create the output file until after checking for the executable.
9275 Report any failure to open /dev/null.
9276 Don't open /dev/null for writing twice; once is enough.
9277 Don't create pipe if all output is being discarded or sent to file.
9278 Don't worry about setting up the coding system or reading from the
9279 pipe if all output is being discarded.
9280 Hoist fd_error local into top level, to lessen block nesting.
9281 Don't record deleted pid here; now done by Fcall_process_region.
9282 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
9283 and note its success in synch_process_tempfile.
9284 Do not leak resources when child_setup fails.
9285 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
9286 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
9287 (create_temp_file): Now returns open fd, with an additional
9288 Lisp_Object * argument to return the name. All callers changed.
9289 Do not close the file; rewind it instead, and leave it open for
9290 the caller. Do not lock the temp file. Unwind-protect the file
9291 and the file-descriptor.
9292 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
9293 If an asynchrounous process, record it here, not in call_process.
9294 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
9295 * eval.c (set_unwind_protect): New function.
9296 * fileio.c (write_region): New function, generalized from the
9297 old Fwrite_region. Do not lock temp files.
9298 (Fwrite_region): Use it.
9299 * lisp.h (set_unwind_protect, write_region): New decls.
9300 * process.c: Include <verify.h>.
9301 (make_process): Mark fds as initially closed.
9302 (deleted_pid_list): Now a list of pid-filename pairs.
9303 All uses changed.
9304 (close_process_fd): New function.
9305 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
9306 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
9307 New constants. Verify that their number matches PROCESS_OPEN_FDS.
9308 (create_process, create_pty, Fmake_serial_process)
9309 (server_accept_connection): Record which fds need to be closed,
9310 and let deactivate_process close them.
9311 (Fmake_network_process): Do not discard the unwind-protect
9312 until it's safe to do so.
9313 (deactivate_process): Close the fds opened by create_process etc.
9314 (Fprocess_send_eof): Adjust to new way of recording open fds.
9315 Report an error if /dev/null can't be opened, instead of aborting.
9316 * process.h (PROCESS_OPEN_FDS): New constant.
9317 (struct Lisp_Process): New member open_fds.
9318 (record_kill_process, record_deleted_pid): Adjust signatures.
9319 (record_deleted_pid): Move decl here ...
9320 * syswait.h (record_deleted_pid): ... from here.
9321
9322 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
9323
9324 * decompress.c: Fix bugs with large buffers and weird inputs.
9325 Tune a bit. Reindent as per usual Emacs style.
9326 (BUFFER_SIZE): Remove.
9327 (Fdecompress_gzipped_region): Do not mishandle input buffers with
9328 more than UINT_MAX bytes. Decompress into the gap instead of into
9329 an auto buffer, as this should avoid copying. Return nil if
9330 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
9331 set immediate_quit; we shouldn't trust zlib code that much.
9332
9333 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
9334
9335 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
9336 errors, and really move the gap to where we want it.
9337
9338 * lisp.h: Include decompress.c support.
9339
9340 * emacs.c (main): Include decompress.c support.
9341
9342 * Makefile.in: Include -lz if present.
9343
9344 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
9345
9346 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
9347 (initWithTitle:): Initialize frame to 0.
9348 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
9349 (fillWithWidgetValue:frame:): Rename from
9350 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
9351
9352 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
9353 fillWithWidgetValue:frame:
9354
9355 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
9356 remove memory leak warnings.
9357
9358 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
9359 (ns_check_menu_open): Handle menu == nil. Remove assignment to
9360 menu_pending_title.
9361
9362 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
9363 (x_activate_menubar): Update the whole menu.
9364 (trackingNotification:): Call ns_check_menu_open if tracking ends.
9365 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
9366 current event is not NSSystemDefined (Bug#15001).
9367 Call ns_check_menu_open only if trackingMenu is 2.
9368 (menuDidClose:): New method, decrease trackingMenu.
9369 (fillWithWidgetValue:setDelegate:): New method.
9370 (fillWithWidgetValue:): Call the above.
9371
9372 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
9373
9374 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
9375
9376 Omit some unnecessary casts.
9377 Many of these go back to the old pre-C89 days, when they may have
9378 been needed, but we've been assuming C89 or later for a while now.
9379 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
9380 (live_float_p, live_misc_p, live_vector_p):
9381 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
9382 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
9383 (defvar_per_buffer):
9384 * callint.c (Fcall_interactively):
9385 * doc.c (Fsubstitute_command_keys):
9386 * filelock.c (get_boot_time):
9387 * frame.c (xrdb_get_resource):
9388 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
9389 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
9390 (xg_get_file_name_from_selector, menuitem_destroy_callback)
9391 (menuitem_highlight_callback, menu_destroy_callback)
9392 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
9393 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
9394 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
9395 (xg_tool_bar_help_callback, tb_size_cb):
9396 * image.c (xpm_alloc_color, png_read_from_memory)
9397 (png_read_from_file, png_load_body, our_memory_skip_input_data)
9398 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
9399 (syms_of_image):
9400 * keymap.c (describe_map):
9401 * nsfns.m (Fns_display_monitor_attributes_list):
9402 * nsmenu.m (process_dialog:):
9403 * nsterm.m (hold_event):
9404 * process.c (wait_reading_process_output):
9405 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
9406 * scroll.c (do_direct_scrolling, scrolling_1):
9407 * termcap.c (tgetent):
9408 * window.c (check_window_containing, add_window_to_list)
9409 (freeze_window_starts):
9410 * xdisp.c (compare_overlay_entries, vmessage):
9411 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
9412 (x_get_monitor_attributes_xrandr)
9413 (Fx_display_monitor_attributes_list, x_display_info_for_name)
9414 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
9415 * xfont.c (xfont_match, xfont_open):
9416 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
9417 (menubar_selection_callback, menu_position_func)
9418 (popup_selection_callback, create_and_show_popup_menu)
9419 (dialog_selection_callback, create_and_show_dialog):
9420 * xrdb.c (x_get_string_resource)
9421 (main) [TESTRM]:
9422 * xsmfns.c (x_session_check_input):
9423 * xterm.c (x_draw_glyphless_glyph_string_foreground)
9424 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
9425 (xaw_jump_callback, xaw_scroll_callback):
9426 Omit unnecessary casts.
9427
9428 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
9429
9430 Minor string-length refactoring.
9431 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
9432 * frame.c (make_monitor_attribute_list):
9433 Prefer build_string to strlen + make_string.
9434
9435 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
9436
9437 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
9438 don't check minor_code (Bug#14417).
9439
9440 2013-08-09 Eli Zaretskii <eliz@gnu.org>
9441
9442 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
9443 vertical positions instead. This avoids calling MATRIX_ROW with
9444 row numbers that are possibly beyond valid limits. (Bug#15064)
9445
9446 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
9447
9448 Use xstrdup and build_unibyte_string where applicable.
9449 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
9450 * xfns.c (x_window):
9451 * xrdb.c (x_get_customization_string):
9452 * xterm.c (xim_initialize):
9453 * w32fns.c (w32_window): Use xstrdup.
9454 (w32_display_monitor_attributes_list):
9455 * emacs.c (init_cmdargs):
9456 * keyboard.c (PUSH_C_STR):
9457 * nsfont.m (nsfont_open):
9458 * sysdep.c (system_process_attributes):
9459 * w32.c (system_process_attributes):
9460 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
9461
9462 2013-08-09 Eli Zaretskii <eliz@gnu.org>
9463
9464 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
9465 variables of these types so that GDB would know about them, as aid
9466 for debugging fatal exceptions. (Bug#15024) See also
9467 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
9468 discussions.
9469
9470 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
9471
9472 * nsterm.m (ns_update_begin): Don't change clip path if it would be
9473 larger than the NSWindow (Bug#14934).
9474
9475 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
9476
9477 Redesign redisplay interface to drop global variable updated_window.
9478 Always pass currently updated window as a parameter to update routines.
9479 * dispextern.h (updated_window): Remove declaration.
9480 (struct redisplay_interface): Pass window parameter to
9481 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
9482 and after_update_window_hook.
9483 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
9484 Adjust prototypes.
9485 * dispnew.c (updated_window): Remove.
9486 (redraw_overlapped_rows, update_marginal_area, update_text_area)
9487 (update_window_line): Adjust to match redisplay interface changes.
9488 * nsterm.m (ns_update_window_begin, ns_update_window_end)
9489 (ns_scroll_run, ns_after_update_window_line):
9490 * w32term.c (x_update_window_begin, x_update_window_end)
9491 (x_after_update_window_line, x_scroll_run):
9492 * xterm.c (x_update_window_begin, x_update_window_end)
9493 (x_after_update_window_line, x_scroll_run):
9494 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
9495 Likewise. Adjust comments where appropriate.
9496 (x_cursor_to): Simplify because this is always called during window
9497 update (but install debugging check anyway).
9498 (expose_window): Check must_be_updated_p flag to see whether this
9499 function is called during window update.
9500
9501 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
9502
9503 Do not reset window modification event counters excessively.
9504 These leftovers and poor man's tricky methods to catch extra
9505 redisplay's attention are no longer needed.
9506 * frame.c (set_menu_bar_lines_1):
9507 * minibuf.c (read_minibuf_unwind):
9508 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
9509 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
9510 (window_scroll_line_based, Fset_window_configuration):
9511 * xdisp.c (redisplay_window): Do not reset last_modified and
9512 last_overlay_modified counters.
9513
9514 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
9515
9516 * xselect.c (x_send_client_event): Set send_event and serial, memset
9517 data.l as it might be bigger than data.b. Use 24 bit mask to
9518 XSendEvent (Bug#15034).
9519
9520 2013-08-07 Eli Zaretskii <eliz@gnu.org>
9521
9522 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
9523 for TTY frames that are not the top frame on their console.
9524 (Bug#14616)
9525
9526 2013-08-07 Martin Rudalics <rudalics@gmx.at>
9527
9528 * w32term.c (w32fullscreen_hook): Really maximize frame when
9529 asked for (Bug#14841).
9530
9531 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9532
9533 Prefer selected_window to Fselected_window, likewise for frames.
9534 * buffer.c (Fbuffer_swap_text):
9535 * data.c (Fvariable_binding_locus):
9536 * window.c (run_window_configuration_change_hook): Adjust users.
9537 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
9538 Use decode_live_frame.
9539
9540 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
9541
9542 Be more careful if selected window shows the buffer other than current,
9543 use window_outdated only if this is not so. This change should also
9544 address some weird issues discussed in Bug#13012.
9545 * window.h (window_outdated): New prototype.
9546 * window.c (window_outdated): Now here. Convert from static and
9547 always assume window's buffer.
9548 (Fwindow_end, Fwindow_line_height): Use it.
9549 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
9550 and always assume window's buffer.
9551 (redisplay_window): Adjust user.
9552 (redisplay_internal): Call to reconsider_clip_changes once and
9553 check whether mode line should be updated only if selected window
9554 shows current buffer.
9555 (run_window_scroll_functions): Use eassert for debugging check.
9556 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
9557
9558 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9559
9560 * window.c (window_scroll, window_scroll_pixel_based)
9561 (window_scroll_line_based): Use bool for booleans.
9562
9563 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
9564
9565 * process.c: Fix minor off-by-one issues in descriptor counts.
9566 This shouldn't fix any real bugs, but it cleans up the code a bit.
9567 (max_process_desc, max_input_desc): -1, not 0, means none.
9568 All uses changed.
9569 (delete_input_desc): New function.
9570 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
9571 (deactivate_process): Scan backwards when recomuting max_process_desc;
9572 that should be faster.
9573 (init_process_emacs): Initialize max_input_desc.
9574
9575 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9576
9577 Use region cache to speedup bidi_find_paragraph_start.
9578 * buffer.h (struct buffer): New member bidi_paragraph_cache.
9579 Rename cache_long_line_scans to cache_long_scans.
9580 * buffer.c (bset_cache_long_line_scans): Rename to
9581 bset_cache_long_scans.
9582 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
9583 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
9584 into account.
9585 (syms_of_buffer): Rename cache-long-line-scans to
9586 cache-long-scans. Adjust docstring.
9587 * search.c (newline_cache_on_off):
9588 * indent.c (width_run_cache_on_off): Adjust users.
9589 * bidi.c (bidi_paragraph_cache_on_off): New function.
9590 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
9591 * insdel.c (prepare_to_modify_buffer):
9592 Invalidate bidi_paragraph_cache if enabled.
9593
9594 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
9595
9596 Invalidate region caches only if buffer text is going to be changed.
9597 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
9598 (modify_text): ...new prototype.
9599 (prepare_to_modify_buffer_1): New prototype.
9600 * textprop.c (modify_region): Rename to...
9601 (modify_text_properties): ...new function.
9602 (add_text_properties_1, set_text_properties, Fremove_text_properties)
9603 (Fremove_list_of_text_properties): Adjust users.
9604 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
9605 (modify_text): ...new function.
9606 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
9607 (prepare_to_modify_buffer_1): ...new function.
9608 * casefiddle.c (casify_region):
9609 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
9610 (Ftranspose_regions): Use modify_text.
9611
9612 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
9613
9614 * lisp.mk (lisp): Add nadvice.elc.
9615
9616 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
9617
9618 New macro to iterate over live buffers similar to frames.
9619 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
9620 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
9621 Declare buffer-related variables here to offload lisp.h.
9622 * buffer.c (Vbuffer_alist): Adjust comment.
9623 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
9624 (other_buffer_safely):
9625 * data.c (store_symval_forwarding):
9626 * dispnew.c (Fframe_or_buffer_changed_p):
9627 * fileio.c (Fdo_auto_save):
9628 * filelock.c (unlock_all_files):
9629 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
9630
9631 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
9632
9633 Fix some minor races in hosts lacking mkostemp (Bug#15015).
9634 * callproc.c (create_temp_file):
9635 * filelock.c (create_lock_file):
9636 Assume mkostemp, since it's now provided by Gnulib.
9637
9638 2013-08-04 Eli Zaretskii <eliz@gnu.org>
9639
9640 * w32.c (mkostemp): New function.
9641 (mktemp): Remove, no longer used. Most of the code reused in
9642 mkostemp. (Bug#15015)
9643 (mktemp): Don't undef.
9644
9645 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
9646
9647 * dispnew.c (glyph_matrix_count, glyph_pool_count):
9648 Move under GLYPH_DEBUG and ENABLE_CHECKING.
9649 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
9650 (free_glyph_pool, check_glyph_memory): Likewise for
9651 all users. Adjust comments where appropriate.
9652
9653 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
9654
9655 * composite.h: Minor fixups.
9656 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
9657 to fix a misspelling, and change it to an inline function while
9658 we're at it (it need not be a macro). All uses changed.
9659 (composition_method, composition_valid_p):
9660 Rewrite to avoid assignments in if-conditions.
9661
9662 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
9663
9664 Do not use global Lisp_Object in composition macros.
9665 * composite.h (composition_temp): Remove declaration.
9666 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
9667 (composition_method, composition_valid_p): ...inline functions.
9668 (compose_region): Remove the leftover.
9669 * composite.c (composition_temp): Remove.
9670 (run_composition_function, update_compositions)
9671 (composition_compute_stop_pos, composition_adjust_point)
9672 (Ffind_composition_internal):
9673 * coding.c (handle_composition_annotation):
9674 * xdisp.c (handle_composition_prop, check_point_in_composition):
9675 Related users changed.
9676
9677 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
9678
9679 Drop FRAME_PTR typedef.
9680 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
9681 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
9682 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
9683 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
9684 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
9685 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
9686 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
9687 All related users changed.
9688
9689 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
9690
9691 * eval.c (default_toplevel_binding): New function.
9692 (Fdefvar): Use it.
9693 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
9694 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
9695 (syms_of_eval): Export them.
9696 * data.c (Fdefault_value): Micro cleanup.
9697 * term.c (init_tty): Use "false".
9698
9699 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
9700
9701 Fix X GC leak in GTK and raw (no toolkit) X ports.
9702 * xterm.c (x_free_frame_resources): If white and black relief
9703 GCs are allocated, always free them here.
9704 * xfns.c (x_make_gc): Omit redundant initialization.
9705 * widget.c (create_frame_gcs): Remove the leftover.
9706 (EmacsFrameDestroy): Do nothing because all GCs are now freed
9707 in x_free_frame_resources.
9708
9709 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
9710
9711 * nsterm.m (windowWillResize:toSize:): Only change title if
9712 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
9713 modifying it.
9714 (viewDidEndLiveResize): New method.
9715
9716 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
9717 inside NS_IMPL_COCOA.
9718
9719 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
9720
9721 * insdel.c (adjust_after_replace, replace_range, del_range_2):
9722 Do not check whether undo is enabled because record_insert and
9723 record_delete does that themselves.
9724
9725 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
9726
9727 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
9728 member which is not really used any more.
9729 (FRAME_XIC_BASE_FONTNAME): Remove.
9730 * xfns.c (xic_free_fontset): Adjust user.
9731 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
9732 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
9733 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
9734 (xdialog_show): Use eassert for debugging check.
9735 * w32term.c (x_unfocus_frame): Remove unused dummy function.
9736
9737 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
9738
9739 * fileio.c, fns.c (merge): Move extern decl from here ...
9740 * lisp.h (merge): ... to here.
9741
9742 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9743
9744 Fix last font-related change.
9745 * w32font.h (w32font_list_internal, w32font_match_internal):
9746 Fix prototype.
9747 * w32uniscribe.c (uniscribe_list, uniscribe_match)
9748 (uniscribe_list_family): Adjust to match font API change.
9749 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
9750 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
9751
9752 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9753
9754 * frame.h (FRAME_MOUSE_UPDATE):
9755 * nsterm.m (ns_frame_up_to_date): Omit redundant check
9756 whether hlinfo->mouse_face_mouse_frame is non-NULL.
9757
9758 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9759
9760 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
9761 * font.h (struct font_driver): Change list, match, and list_family
9762 functions to accept struct frame * as first arg.
9763 * font.c (font_score, font_compare, font_sort_entities):
9764 Remove prototypes.
9765 (font_sort_entities, font_list_entities, font_select_entity)
9766 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
9767 match font API change.
9768 * xfont.c (xfont_list, xfont_match, xfont_list_family):
9769 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
9770 * ftxfont.c (ftxfont_list, ftxfont_match):
9771 * xftfont.c (xftfont_list, xftfont_match):
9772 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
9773 * w32font.c (w32font_list, w32font_match, w32font_list)
9774 (w32font_list_internal, w32_font_match_internal): Likewise.
9775 * xfaces.c (Fx_family_fonts): Adjust user.
9776
9777 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9778
9779 Do not use pure Xism x_wm_set_icon_position in non-X ports.
9780 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
9781 only if HAVE_X_WINDOWS is in use.
9782 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
9783 * nsterm.m (x_wm_set_icon_position): Remove no-op.
9784 * w32term.c (x_wm_set_icon_position): Likewise.
9785 * w32fns.c (x_icon): Adjust user.
9786
9787 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9788
9789 * xterm.c (last_mouse_press_frame): Remove the
9790 leftover which is not really used any more.
9791 (handle_one_xevent, syms_of_xterm): Adjust users.
9792 (x_flush): Call XFlush once per each X display, not frame.
9793 This is better because this code always unconditionally skips
9794 non-X frames in Vframe_list and issues the only XFlush if we
9795 have more than one X frame on the same X display.
9796 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
9797 Use bool for booleans.
9798 (x_draw_glyph_string_background, cvt_string_to_pixel)
9799 (cvt_pixel_dtor): Drop unnecessary prototypes.
9800 * xterm.h (x_display_ok): Adjust prototype.
9801
9802 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9803
9804 Drop unnecessary functions that deals with frame pixel size.
9805 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
9806 (x_pixel_height): Drop prototypes.
9807 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
9808 (x_pixel_height): Drop implementations.
9809 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
9810 which should be always valid for window frame.
9811 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
9812 * w32menu.c (Fx_popup_dialog):
9813 * xmenu.c (Fx_popup_dialog): Likewise for both.
9814
9815 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9816
9817 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
9818 frame parameters and call to Fmodify_frame_parameters just once.
9819 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
9820 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
9821 and mention nil frame in docstring.
9822
9823 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9824
9825 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
9826 (x_figure_window_size): Likewise. Adjust to return long.
9827 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
9828 (toplevel): Move Qterminal_live_p to...
9829 * terminal.c (toplevel): ...here, make it static, and...
9830 (syms_of_terminal): ...DEFSYM here.
9831 * frame.h (Qterminal_live_p): Remove declaration.
9832 (make_frame, x_figure_window_size): Adjust prototype.
9833 * nsfns.m (Fx_create_frame): Use long for window flags.
9834
9835 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
9836
9837 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
9838 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
9839 Do not assume that emacs_close (INT_MAX) is a no-op.
9840
9841 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9842
9843 * xfaces.c (make_face_cache): For struct face_cache, prefer
9844 xmalloc to xzalloc and so avoid redundant call to memset.
9845 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
9846
9847 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9848
9849 * fringe.c (draw_window_fringes, update_window_fringes)
9850 (compute_fringe_widths):
9851 * w32term.c (x_draw_glyph_string):
9852 * window.c (candidate_window_p, Frecenter):
9853 * xfaces.c (realize_basic_faces, realize_default_face)
9854 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
9855 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
9856 * xfns.c (x_set_cursor_color, xic_free_xfontset):
9857 * xmenu.c (Fx_menu_bar_open_internal):
9858 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
9859 * xsettings.c (xft_settings_event):
9860 * xterm.c (x_draw_glyph_string, x_had_errors_p):
9861 Use bool for booleans. Adjust style and comments where
9862 appropriate.
9863 * dispextern.h (draw_window_fringes, update_window_fringes)
9864 (compute_fringe_widths):
9865 * xterm.h (x_had_errors_p): Adjust prototype.
9866
9867 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9868
9869 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
9870 CHECK_LIST. Rewrite the loop to avoid useless local variable.
9871
9872 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9873
9874 * fns.c (toplevel): Remove comment before Fsafe_length because
9875 it checks for QUIT.
9876
9877 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
9878
9879 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
9880
9881 2013-07-28 Eli Zaretskii <eliz@gnu.org>
9882
9883 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
9884 frame which got the message is still alive, before dereferencing
9885 its pointer. (Bug#14970)
9886
9887 * frame.c (delete_frame): Test "this" frame's minibuffer window to
9888 be a live window, before using it as such. (Bug#14970)
9889
9890 2013-07-27 Eli Zaretskii <eliz@gnu.org>
9891
9892 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
9893 w32_detect_focus_change instead of doing part of its job by hand.
9894 This fixes the problem whereby FOCUS_OUT events were not sent to
9895 the event queue.
9896
9897 2013-07-26 Eli Zaretskii <eliz@gnu.org>
9898
9899 * process.c (Fprocess_list): Doc fix.
9900
9901 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
9902 being re-exposed only if it didn't ask to become visible.
9903 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
9904 was previously iconified. (Bug#14841)
9905 (x_iconify_frame): Mark the frame iconified.
9906
9907 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
9908
9909 Fix minor problems found by static checking.
9910 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
9911 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
9912
9913 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
9914
9915 * eval.c (set_specpdl_old_value): New function.
9916 (unbind_to): Minor simplification.
9917 (get_backtrace_frame): New function.
9918 (Fbacktrace_frame): Use it. Add `base' argument.
9919 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
9920 (syms_of_eval): Export backtrace-eval.
9921 * xterm.c (x_focus_changed): Simplify.
9922
9923 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
9924
9925 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
9926
9927 2013-07-24 Eli Zaretskii <eliz@gnu.org>
9928
9929 * xdisp.c (redisplay_window): Instead of moving point out of
9930 scroll margin, reject the force_start method, and try scrolling
9931 instead. (Bug#14780)
9932
9933 2013-07-24 Ken Brown <kbrown@cornell.edu>
9934
9935 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
9936 (Bug#14944).
9937
9938 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
9939
9940 * eval.c (Fprogn): Do not check that BODY is a proper list.
9941 This undoes the previous change. The check slows down the
9942 interpreter, and is not needed to prevent a crash. See
9943 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
9944
9945 2013-07-23 Glenn Morris <rgm@gnu.org>
9946
9947 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
9948
9949 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
9950
9951 Port to GNU/Linux systems with tinfo but not ncurses.
9952 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
9953 to decide whether ncurses is being used. Without this change,
9954 GCC complains about tgetent not being declared, on a system
9955 that has tinfo installed but ncurses not installed.
9956
9957 * eval.c (Fprogn): Check that BODY is a proper list.
9958
9959 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
9960 * data.c (Fsetq_default):
9961 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
9962 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
9963 (Fcondition_case):
9964 Tune by taking advantage of the fact that ARGS is always a list
9965 when a function is declared to have UNEVALLED args.
9966
9967 * emacsgtkfixed.c: Port to GCC 4.6.
9968 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
9969
9970 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
9971
9972 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
9973 here to silence compiler warnings.
9974
9975 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
9978 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
9979 from messing up Emacs's 'struct frame' (Bug#14923).
9980
9981 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
9982
9983 * alloc.c (make_save_ptr_ptr): Define this function.
9984 It was inadvertently omitted. It's needed only if
9985 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
9986
9987 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
9988
9989 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
9990 frame have focus (Bug#14895).
9991
9992 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
9993
9994 Avoid vfork-related deadlock more cleanly.
9995 * callproc.c (child_setup): When the child's exec fails, output
9996 the program name, as that's more useful. Use O_NONBLOCK to avoid
9997 deadlock.
9998 * process.c (create_process_1): Remove; no longer needed.
9999 (create_process): Remove timer hack; no longer needed, now that
10000 the child avoids deadlock.
10001
10002 2013-07-20 Glenn Morris <rgm@gnu.org>
10003
10004 * image.c (Fimage_flush): Fix doc typo.
10005
10006 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
10007
10008 Fix array bounds violation when pty allocation fails.
10009 * process.c (PTY_NAME_SIZE): New constant.
10010 (pty_name): Remove static variable; it's now auto.
10011 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
10012 Take pty_name as an arg rather than using a static variable.
10013 All callers changed.
10014 (create_process): Recover pty_flag from process, not from volatile local.
10015 (create_pty): Stay inside array even when pty allocation fails.
10016 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
10017
10018 * lread.c (Fload): Avoid initialization only when lint checking.
10019 Mention that it's needed only for older GCCs.
10020
10021 2013-07-20 Kenichi Handa <handa@gnu.org>
10022
10023 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
10024 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
10025
10026 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
10027
10028 * lread.c (Fload): Avoid uninitialized warning.
10029
10030 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
10031
10032 Fix some minor file descriptor leaks and related glitches.
10033 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
10034 (create_lock_file): Use write, not emacs_write.
10035 * image.c (slurp_file, png_load_body):
10036 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
10037 (server_accept_connection):
10038 Don't leak an fd on memory allocation failure.
10039 * image.c (slurp_file): Add a cheap heuristic for growing files.
10040 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
10041 as that's what the other routines do. Maybe input need not be
10042 blocked at all, but it's better to be consistent.
10043 Avoid undefined behavior when strlen is zero.
10044
10045 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
10046 (NSTATICS): Now a constant; doesn't need to be a macro.
10047
10048 2013-07-19 Richard Stallman <rms@gnu.org>
10049
10050 * coding.c (decode_coding_utf_8): Add simple loop for fast
10051 processing of ASCII characters.
10052
10053 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
10054
10055 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
10056
10057 2013-07-19 Eli Zaretskii <eliz@gnu.org>
10058
10059 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
10060 unportable 'struct x_display_info'.
10061 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
10062 is a portable type.
10063
10064 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
10065
10066 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
10067 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
10068 or fscanf fails.
10069 (system_process_attributes): Prefer plain char to unsigned char
10070 when either will do. Clean up properly if interrupted or if
10071 memory allocations fail. Don't assume sscanf succeeds.
10072 Remove no-longer-needed workaround to stop GCC from whining.
10073 Read command-line once, instead of multiple times. Check read status a
10074 bit more carefully.
10075
10076 Fix obscure porting bug with varargs functions.
10077 The code assumed that int is treated like ptrdiff_t in a vararg
10078 function, which is not a portable assumption. There was a similar
10079 -- though these days less likely -- porting problem with various
10080 assumptions that pointers of different types all smell the same as
10081 far as vararg functions is conserved. To make this problem less
10082 likely in the future, redo the API to use varargs functions.
10083 * alloc.c (make_save_value): Remove this vararg function.
10084 All uses changed to ...
10085 (make_save_int_int_int, make_save_obj_obj_obj_obj)
10086 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
10087 New functions.
10088 (make_save_ptr): Rename from make_save_pointer, for consistency with
10089 the above. Define only on platforms that need it. All uses changed.
10090
10091 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
10092
10093 * keyboard.c: Try to fix typos in previous change.
10094 (DISPLAY_LIST_INFO): New macro.
10095 (kbd_buffer_get_event): Do not access members that are not present
10096 in X11. Revert inadvertent change of "!=" to "=".
10097
10098 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
10099
10100 * keyboard.c (kbd_buffer_get_event):
10101 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
10102 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
10103
10104 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
10105
10106 * filelock.c: Fix unlikely file descriptor leaks.
10107 (get_boot_time_1): Rework to avoid using emacs_open.
10108 This doesn't actually fix a leak, but is better anyway.
10109 (read_lock_data): Use read, not emacs_read.
10110
10111 * doc.c: Fix minor memory and file descriptor leaks.
10112 * doc.c (get_doc_string): Fix memory leak when doc file absent.
10113 (get_doc_string, Fsnarf_documentation):
10114 Fix file descriptor leak on error.
10115
10116 * term.c: Fix minor fdopen-related file descriptor leaks.
10117 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
10118 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
10119
10120 * charset.c: Fix file descriptor leaks and errno issues.
10121 Include <errno.h>.
10122 (load_charset_map_from_file): Don't leak file descriptor on error.
10123 Use plain record_xmalloc since the allocation is larger than
10124 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
10125 of entries.
10126 * eval.c (record_unwind_protect_nothing):
10127 * fileio.c (fclose_unwind):
10128 New functions.
10129 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
10130 The replacement doesn't block input, but that no longer seems
10131 necessary.
10132
10133 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
10134
10135 * lread.c: Fix file descriptor leaks and errno issues.
10136 (Fload): Close some races that leaked fds or streams when 'load'
10137 was interrupted.
10138 (Fload, openp): Report error number of last nontrivial failure to open.
10139 ENOENT counts as trivial.
10140 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
10141 New functions.
10142 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
10143 now that the function is always called with a nonnegative arg.
10144 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
10145 All uses replaced with ...
10146 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
10147
10148 A few more minor file errno-reporting bugs.
10149 * callproc.c (Fcall_process):
10150 * doc.c (Fsnarf_documentation):
10151 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
10152 * process.c (set_socket_option):
10153 Don't let a constructor trash errno.
10154 * doc.c: Include <errno.h>.
10155
10156 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
10157
10158 * w32fns.c (unwind_create_tip_frame): Fix declaration.
10159
10160 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
10161
10162 Fix w32 bug with call-process-region (Bug#14885).
10163 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
10164 to Fcall_process when the input is empty. This simplifies the
10165 code a bit. It makes no difference on POSIXish platforms but
10166 apparently it fixes a bug on w32.
10167
10168 Fix bug where insert-file-contents closes a file twice (Bug#14839).
10169 * fileio.c (close_file_unwind): Don't close if FD is negative;
10170 this can happen when unwinding a zapped file descriptor.
10171 (Finsert_file_contents): Unwind-protect the fd before the point marker,
10172 in case Emacs runs out of memory between the two unwind-protects.
10173 Don't trash errno when closing FD.
10174 Zap the FD in the specpdl when closing it, instead of deferring
10175 the removal of the unwind-protect; this fixes a bug where a child
10176 function unwinds the stack past us.
10177
10178 New unwind-protect flavors to better type-check C callbacks.
10179 This also lessens the need to write wrappers for callbacks,
10180 and the need for make_save_pointer.
10181 * alloc.c (free_save_value):
10182 * atimer.c (run_all_atimers):
10183 Now extern.
10184 * alloc.c (safe_alloca_unwind):
10185 * atimer.c (unwind_stop_other_atimers):
10186 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
10187 * menu.c (cleanup_popup_menu) [HAVE_NS]:
10188 * minibuf.c (choose_minibuf_frame_1):
10189 * process.c (make_serial_process_unwind):
10190 * xdisp.c (pop_message_unwind):
10191 * xselect.c (queue_selection_requests_unwind):
10192 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
10193 * alloc.c (record_xmalloc):
10194 Prefer record_unwind_protect_ptr to record_unwind_protect with
10195 make_save_pointer.
10196 * alloc.c (Fgarbage_collect):
10197 Prefer record_unwind_protect_void to passing a dummy.
10198 * buffer.c (restore_buffer):
10199 * window.c (restore_window_configuration):
10200 * xfns.c, w32fns.c (do_unwind_create_frame)
10201 New wrapper. All record-unwind uses of wrappee changed.
10202 * buffer.c (set_buffer_if_live):
10203 * callproc.c (call_process_cleanup, delete_temp_file):
10204 * coding.c (code_conversion_restore):
10205 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
10206 * editfns.c (save_excursion_restore)
10207 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
10208 (save_restriction_restore):
10209 * eval.c (restore_stack_limits, un_autoload):
10210 * fns.c (require_unwind):
10211 * keyboard.c (recursive_edit_unwind, tracking_off):
10212 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
10213 * macros.c (pop_kbd_macro, restore_menu_items):
10214 * nsfns.m (unwind_create_frame):
10215 * print.c (print_unwind):
10216 * process.c (start_process_unwind):
10217 * search.c (unwind_set_match_data):
10218 * window.c (select_window_norecord, select_frame_norecord):
10219 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
10220 (fast_set_selected_frame):
10221 * xfns.c, w32fns.c (unwind_create_tip_frame):
10222 Return void, not a dummy Lisp_Object. All uses changed.
10223 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
10224 * callproc.c (call_process_kill):
10225 * fileio.c (restore_point_unwind, decide_coding_unwind)
10226 (build_annotations_unwind):
10227 * insdel.c (Fcombine_after_change_execute_1):
10228 * keyboard.c (read_char_help_form_unwind):
10229 * menu.c (unuse_menu_items):
10230 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
10231 * sound.c (sound_cleanup):
10232 * xdisp.c (unwind_redisplay):
10233 * xfns.c (clean_up_dialog):
10234 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
10235 Accept no args and return void, instead of accepting and returning
10236 a dummy Lisp_Object. All uses changed.
10237 * cygw32.c (fchdir_unwind):
10238 * fileio.c (close_file_unwind):
10239 * keyboard.c (restore_kboard_configuration):
10240 * lread.c (readevalllop_1):
10241 * process.c (wait_reading_process_output_unwind):
10242 Accept int and return void, rather than accepting an Emacs integer
10243 and returning a dummy object. In some cases this fixes an
10244 unlikely bug when the corresponding int is outside Emacs integer
10245 range. All uses changed.
10246 * dired.c (directory_files_internal_unwind):
10247 * fileio.c (do_auto_save_unwind):
10248 * gtkutil.c (pop_down_dialog):
10249 * insdel.c (reset_var_on_error):
10250 * lread.c (load_unwind):
10251 * xfns.c (clean_up_file_dialog):
10252 * xmenu.c, nsmenu.m (pop_down_menu):
10253 * xmenu.c (cleanup_widget_value_tree):
10254 * xselect.c (wait_for_property_change_unwind):
10255 Accept pointer and return void, rather than accepting an Emacs
10256 save value encapsulating the pointer and returning a dummy object.
10257 All uses changed.
10258 * editfns.c (Fformat): Update the saved pointer directly via
10259 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
10260 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
10261 (unwind_body): New function.
10262 (record_unwind_protect): First arg is now a function returning void,
10263 not a dummy Lisp_Object.
10264 (record_unwind_protect_ptr, record_unwind_protect_int)
10265 (record_unwind_protect_void): New functions.
10266 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
10267 * fileio.c (struct auto_save_unwind): New type.
10268 (do_auto_save_unwind): Use it.
10269 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
10270 * insdel.c (struct rvoe_arg): New type.
10271 (reset_var_on_error): Use it.
10272 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
10273 New constants.
10274 (specbinding_func): Remove; there are now several such functions.
10275 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
10276 (set_unwind_protect_ptr): New function.
10277 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
10278
10279 Be simpler and more consistent about reporting I/O errors.
10280 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
10281 Say "Read error" and "Write error", rather than "I/O error", or
10282 "IO error reading", or "IO error writing", when a read or write
10283 error occurs.
10284 * process.c (Fmake_network_process, wait_reading_process_output)
10285 (send_process, Fprocess_send_eof, wait_reading_process_output):
10286 Capitalize diagnostics consistently. Put "failed foo" at the
10287 start of the diagnostic, so that we don't capitalize the
10288 function name "foo". Consistently say "failed" for such
10289 diagnostics.
10290 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
10291 All callers changed. This is so it can use report_file_error.
10292 * sysdep.c (serial_open, serial_configure): Capitalize I/O
10293 diagnostics consistently as above.
10294
10295 * fileio.c (report_file_errno): Fix errno reporting bug.
10296 If the file name is neither null nor a pair, package it up as a
10297 singleton list. All callers changed, both to this function and to
10298 report_file_error. This fixes a bug where the memory allocator
10299 invoked by list1 set errno so that the immediately following
10300 report_file_error reported the wrong errno value.
10301
10302 Fix minor problems found by --enable-gcc-warnings.
10303 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
10304 * keyboard.c (kbd_buffer_get_event): Remove unused local.
10305
10306 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
10307
10308 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
10309 Set event->arg to Qt if switch-event shall be generated.
10310 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
10311
10312 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
10313
10314 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
10315 FOCUS_OUT_EVENT.
10316
10317 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
10318 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
10319 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
10320 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
10321 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
10322 and there is a focused frame.
10323 (head_table): Add focus-in and focus-out.
10324 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
10325 bind to handle-focus-in/out.
10326
10327 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
10328 (Fhandle_switch_frame): Call Fhandle_focus_in.
10329 (syms_of_frame): defsubr handle-focus-in/out.
10330
10331 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
10332
10333 Fix porting bug to older POSIXish platforms (Bug#14862).
10334 * sysdep.c (emacs_pipe): New function, that implements
10335 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
10336 This should port better to CentOS 5 and to Mac OS X 10.6.
10337 All calls to pipe2 changed.
10338
10339 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
10340 This makes the code easier to read and the executable a bit smaller.
10341 Do not replace all calls to Fcons that happen to create lists,
10342 just calls that are intended to create lists. For example, when
10343 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
10344 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
10345 Similarly for list2 through list5.
10346 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
10347 * bytecode.c (exec_byte_code):
10348 * callint.c (quotify_arg, Fcall_interactively):
10349 * callproc.c (Fcall_process, create_temp_file):
10350 * charset.c (load_charset_map_from_file)
10351 (Fdefine_charset_internal, init_charset):
10352 * coding.c (get_translation_table, detect_coding_system)
10353 (Fcheck_coding_systems_region)
10354 (Fset_terminal_coding_system_internal)
10355 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
10356 * composite.c (update_compositions, Ffind_composition_internal):
10357 * dired.c (directory_files_internal, file_name_completion)
10358 (Fsystem_users):
10359 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
10360 * doc.c (Fsnarf_documentation):
10361 * editfns.c (Fmessage_box):
10362 * emacs.c (main):
10363 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
10364 (Feval, eval_sub, Ffuncall, apply_lambda):
10365 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
10366 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
10367 (Fset_file_times, Finsert_file_contents)
10368 (Fchoose_write_coding_system, Fwrite_region):
10369 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
10370 * font.c (font_registry_charsets, font_parse_fcname)
10371 (font_prepare_cache, font_update_drivers, Flist_fonts):
10372 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
10373 * frame.c (make_frame, Fmake_terminal_frame)
10374 (x_set_frame_parameters, x_report_frame_params)
10375 (x_default_parameter, Fx_parse_geometry):
10376 * ftfont.c (syms_of_ftfont):
10377 * image.c (gif_load):
10378 * keyboard.c (command_loop_1):
10379 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
10380 (Fcopy_keymap, append_key, Fcurrent_active_maps)
10381 (Fminor_mode_key_binding, accessible_keymaps_1)
10382 (Faccessible_keymaps, Fwhere_is_internal):
10383 * lread.c (read_emacs_mule_char):
10384 * menu.c (find_and_return_menu_selection):
10385 * minibuf.c (get_minibuffer):
10386 * nsfns.m (Fns_perform_service):
10387 * nsfont.m (ns_script_to_charset):
10388 * nsmenu.m (ns_popup_dialog):
10389 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
10390 (Fx_own_selection_internal):
10391 * nsterm.m (append2):
10392 * print.c (Fredirect_debugging_output)
10393 (print_prune_string_charset):
10394 * process.c (Fdelete_process, Fprocess_contact)
10395 (Fformat_network_address, set_socket_option)
10396 (read_and_dispose_of_process_output, write_queue_push)
10397 (send_process, exec_sentinel):
10398 * sound.c (Fplay_sound_internal):
10399 * textprop.c (validate_plist, add_properties)
10400 (Fput_text_property, Fadd_face_text_property)
10401 (copy_text_properties, text_property_list, syms_of_textprop):
10402 * unexaix.c (report_error):
10403 * unexcoff.c (report_error):
10404 * unexsol.c (unexec):
10405 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
10406 (Fformat_mode_line, syms_of_xdisp):
10407 * xfaces.c (set_font_frame_param)
10408 (Finternal_lisp_face_attribute_values)
10409 (Finternal_merge_in_global_face, syms_of_xfaces):
10410 * xfns.c (x_default_scroll_bar_color_parameter)
10411 (x_default_font_parameter, x_create_tip_frame):
10412 * xfont.c (xfont_supported_scripts):
10413 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
10414 (menu_help_callback, xmenu_show):
10415 * xml.c (make_dom):
10416 * xterm.c (set_wm_state):
10417 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
10418 and similarly for list2 through list5.
10419
10420 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
10421
10422 * callproc.c (Fcall_process_region): Fix minor race and tune.
10423 (create_temp_file): New function, with the temp-file-creation part
10424 of the old Fcall_process_region. Use Fcopy_sequence to create the
10425 temp file name, rather than alloca + build_string, for simplicity.
10426 Don't bother to block input around the temp file creation;
10427 shouldn't be needed. Simplify use of mktemp.
10428 Use record_unwind_protect immediately after creating the temp file;
10429 this closes an unlikely race where the temp file was not removed.
10430 Use memcpy rather than an open-coded loop.
10431 (Fcall_process_region): Use the new function. If the input is
10432 empty, redirect from /dev/null rather than from a newly created
10433 empty temp file; this avoids unnecessary file system traffic.
10434
10435 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
10436
10437 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
10438 Simplify by making this case like the other two. This is a bit
10439 slower on obsolete hosts, but the extra complexity isn't worth it.
10440
10441 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
10442 * process.c (create_process) [!DOS_NT]:
10443 Remove now-unnecessary calls to emacs_close.
10444
10445 2013-07-13 Eli Zaretskii <eliz@gnu.org>
10446
10447 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
10448 returning early. (Bug#14850)
10449
10450 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
10451 and inhibit-iso-escape-detection attributes of 'undecided'.
10452 (Bug#14822)
10453
10454 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
10455
10456 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
10457 Reported by Herbert J. Skuhra in
10458 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
10459
10460 Don't lose top specpdl entry when memory is exhausted.
10461 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
10462 specpdl overflow here, to simplify callers; all callers changed.
10463 Always reserve an unused entry at the stack top; this avoids
10464 losing the top entry's information when memory is exhausted.
10465
10466 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
10467
10468 Clean up errno reporting and fix some errno-reporting bugs.
10469 * callproc.c (Fcall_process):
10470 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
10471 * process.c (create_process, Fmake_network_process):
10472 * unexaix.c (report_error):
10473 * unexcoff.c (report_error):
10474 Be more careful about reporting the errno of failed operations.
10475 The code previously reported the wrong errno sometimes.
10476 Also, prefer report_file_errno to setting errno + report_file_error.
10477 (Fcall_process): Look at openp return value rather than at path,
10478 as that's a bit faster and clearer when there's a numeric predicate.
10479 * fileio.c (report_file_errno): New function, with most of the
10480 old contents of report_file_error.
10481 (report_file_error): Use it.
10482 (Ffile_exists_p, Ffile_accessible_directory_p):
10483 Set errno to 0 when it is junk.
10484 * fileio.c (Faccess_file):
10485 * image.c (x_create_bitmap_from_file):
10486 Use faccessat rather than opening the file, to avoid the hassle of
10487 having a file descriptor open.
10488 * lisp.h (report_file_errno): New decl.
10489 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
10490
10491 Minor EBADF fixes.
10492 * process.c (create_process, wait_reading_process_output) [AIX]:
10493 Remove obsolete SIGHUP-related code, as Emacs no longer disables
10494 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
10495 a multithreaded environment anyway).
10496 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
10497
10498 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
10499
10500 * image.c (x_find_image_file): Don't close a remote file handle.
10501
10502 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
10503
10504 Fix races with threads and file descriptors.
10505 * callproc.c (Fcall_process_region):
10506 * dired.c (open_directory):
10507 * emacs.c (main, Fdaemon_initialized):
10508 * image.c (x_find_image_file):
10509 * inotify.c (Finotify_rm_watch):
10510 * lread.c (Flocate_file_internal):
10511 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
10512 * term.c (term_mouse_moveto, init_tty):
10513 * termcap.c (tgetent):
10514 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
10515 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
10516 * unexhp9k800.c, unexmacosx.c (unexec):
10517 * callproc.c (Fcall_process_region):
10518 Use emacs_close, not close.
10519 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
10520 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
10521 and posix_close function on current platforms (which all lack them).
10522 (emacs_close): Use it. This should fix the races on GNU/Linux and
10523 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
10524 and it should avoid closing random victim file descriptors on
10525 other platforms.
10526
10527 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
10528
10529 * inotify.c (uninitialized): Remove. All uses replaced by -1.
10530 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
10531 Touch up doc a bit.
10532
10533 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
10534 This is for .gdbinit xbacktrace.
10535
10536 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
10537 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
10538 (emacs_set_tty): Now static.
10539 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
10540 * term.c (tty_capable_p, tty_default_color_capabilities)
10541 (get_tty_terminal, term_mouse_movement)
10542 (handle_one_term_event, init_tty, maybe_fatal):
10543 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
10544 (tgetent, scan_file, name_match, compare_contin):
10545 * terminal.c (get_terminal):
10546 Use bool for boolean.
10547 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
10548 Prefer char to unsigned char if either will do.
10549 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
10550 (tty_write_glyphs): Prefer int to unsigned.
10551 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
10552 All callers changed.
10553 * termcap.c (tprint, main) [TEST]: Remove non-working test.
10554
10555 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
10556
10557 Port to C89.
10558 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
10559 (B__dummy__): New dummy symbol, to pacify C89.
10560 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
10561 they can't grok varargs macros.
10562 * dispnew.c (add_window_display_history)
10563 (add_frame_display_history):
10564 * print.c (print_object):
10565 * xdisp.c (debug_method_add):
10566 Use %p printf format only for void pointers.
10567 * emacs.c (usage_message): New constant, replacing ...
10568 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
10569 (main): Adjust to usage reorg.
10570 * fns.c (syms_of_fns):
10571 * profiler.c (syms_of_profiler):
10572 Don't use non-constant struct initializers.
10573 * gnutls.h (gnutls_initstage_t):
10574 * lisp.h (enum Lisp_Fwd_Type):
10575 * lread.c (lisp_file_lexically_bound_p):
10576 * xsettings.c (anonymous enum):
10577 Remove trailing comma.
10578 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
10579 * lisp.h (ENUM_BF): Use unsigned if pedantic.
10580 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
10581 (DEFUN): Use it.
10582 * regex.c (const_re_char): New type, to pacify strict C89.
10583 All uses of 'const re_char' replaced to use it.
10584 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
10585 with glibc when strict C89. This change is imported from gnulib.
10586 All uses changed.
10587 (_Restrict_arr_): Rename from __restrict_arr, similarly.
10588 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
10589 Omit GNU_LINUX implementation, since it requires long long.
10590 * xterm.c (x_draw_underwave):
10591 Do not assume the traditional order of struct's members.
10592 (x_term_init): Rewrite to avoid the need for non-constant structure
10593 initializers.
10594
10595 Syntax cleanup, mostly replacing macros with functions.
10596 This removes the need for the syntax_temp hack.
10597 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
10598 * syntax.c (SYNTAX_INLINE): New macro.
10599 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
10600 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
10601 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
10602 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
10603 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
10604 (SYNTAX_COMEND_FIRST): Now functions, not macros.
10605 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
10606 Now constants, not macros.
10607 (syntax_temp) [!__GNUC__]: Remove.
10608 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
10609 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
10610 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
10611 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
10612 Move here from syntax.h; now functions, not macros. Except for the
10613 last function, these are static since only syntax.c uses them.
10614 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
10615 All uses changed. Now a function, not a macro; use this fact
10616 to simplify the code.
10617 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
10618 compiler bugs; no longer relevant.
10619 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
10620 (SYNTAX_INLINE): New macro.
10621 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
10622 for the new functions. Use bool for boolean member.
10623 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
10624 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
10625 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
10626 (SETUP_BUFFER_SYNTAX_TABLE):
10627 Now extern inline functions, not macros.
10628 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
10629 Remove; all uses replaced by implementation.
10630 (syntax_temp) [!__GNUC__]: Remove decl.
10631 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
10632
10633 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
10634
10635 * emacs.c (main): Fix syntax error.
10636
10637 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
10638
10639 Timestamp fixes for undo (Bug#14824).
10640 * atimer.c (schedule_atimer):
10641 * fileio.c (Ffile_newer_than_file_p):
10642 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
10643 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
10644 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
10645 (syms_of_fileio): Remove Sclear_visited_file_name.
10646 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
10647 file doesn't exist; this avoids an ambiguity with negative timestamps.
10648 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
10649 * systime.h (make_emacs_time, invalid_emacs_time):
10650 Don't assume struct timespec layout; POSIX doesn't guarantee it.
10651 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
10652 * undo.c (record_first_change): Push (visited-file-modtime) onto
10653 undo list rather than reimplementing it by hand, incorrectly.
10654
10655 2013-07-09 Ken Brown <kbrown@cornell.edu>
10656
10657 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
10658
10659 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
10660
10661 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
10662
10663 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
10664
10665 Handle errno and exit status a bit more carefully.
10666 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
10667 number into an exit status. Instead, use EXIT_CANCELED.
10668 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
10669 * callproc.c (relocate_fd):
10670 * emacs.c (close_output_streams, main):
10671 * process.c (create_process):
10672 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
10673 Use emacs_perror for simplicity.
10674 * callproc.c (relocate_fd, main):
10675 * sysdep.c (sys_subshell):
10676 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
10677 (shut_down_emacs): Use emacs_write, not write.
10678 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
10679 * fileio.c (Fcopy_file, e_write):
10680 * nsterm.m (ns_select):
10681 * process.c (send_process):
10682 * sound.c (vox_write):
10683 Use emacs_write_sig, not emacs_write.
10684 * lisp.h (emacs_write_sig, emacs_perror): New decls.
10685 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
10686 New constants.
10687 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
10688 of write.
10689 (emacs_full_write): New function.
10690 (emacs_write): Rewrite to use it.
10691 (emacswrite_sig, emacs_perror): New functions.
10692 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
10693
10694 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
10695
10696 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
10697 on NS even if it is present. Pixmap on NS is a void*.
10698
10699 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
10700
10701 Port to Ubuntu 10 (Bug#14803).
10702 Problem reported by T.V. Raman.
10703 * process.c (close_on_exec, accept4, process_socket):
10704 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
10705
10706 2013-07-07 Eli Zaretskii <eliz@gnu.org>
10707
10708 * w32.c (sys_dup): Declare prototype.
10709
10710 * filelock.c:
10711 * emacs.c:
10712 * callproc.c [WINDOWSNT]: Include sys/socket.h.
10713
10714 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
10715
10716 Make file descriptors close-on-exec when possible (Bug#14803).
10717 This simplifies Emacs a bit, since it no longer needs to worry
10718 about closing file descriptors by hand in some cases.
10719 It also fixes some unlikely races. Not all such races, as
10720 libraries often open files internally without setting
10721 close-on-exec, but it's an improvement.
10722 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
10723 * callproc.c (Fcall_process) [!MSDOS]:
10724 * emacs.c (main) [!DOS_NT]:
10725 * nsterm.m (ns_term_init):
10726 * process.c (create_process):
10727 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
10728 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
10729 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
10730 Prefer mkostemp with O_CLOEXEC to mkstemp.
10731 * callproc.c (relocate_fd) [!WINDOWSNT]:
10732 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
10733 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
10734 now using pipe2.
10735 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
10736 Make the resulting file descriptor close-on-exec.
10737 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
10738 * lread.c (load_descriptor_list, load_descriptor_unwind):
10739 Remove; no longer needed. All uses removed.
10740 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
10741 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
10742 New functions.
10743 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
10744 (Fmake_network_process, Fnetwork_interface_list)
10745 (Fnetwork_interface_info, server_accept_connection):
10746 Make newly-created socket close-on-exec.
10747 * sysdep.c (emacs_open, emacs_fopen):
10748 Make new-created descriptor close-on-exec.
10749 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
10750 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
10751
10752 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
10753
10754 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
10755 for NS_IMPL_GNUSTEP.
10756
10757 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
10758
10759 Fix openp errno handling.
10760 * callproc.c (Fcall_process): Preserve openp errno around close.
10761 * lread.c (openp): Set errno when returning -1, as some callers
10762 expect this.
10763
10764 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
10765
10766 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
10767
10768 * nsterm.h (NSSavePanel): Update comment.
10769 (NSAPP_DATA2_RUNFILEDIALOG): Define.
10770 (ns_run_file_dialog): Declare.
10771
10772 * nsfns.m: Remove panelOK.
10773 (ns_fd_data): New.
10774 (ns_run_file_dialog): New function.
10775 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
10776 event loop, so file dialog is popped up by ns_run_file_dialog, called
10777 by sendEvent (Bug#14578).
10778 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
10779
10780 2013-07-06 Eli Zaretskii <eliz@gnu.org>
10781
10782 * xdisp.c (default_line_pixel_height): New function.
10783 (pos_visible_p, move_it_vertically_backward, try_scrolling)
10784 (try_cursor_movement, redisplay_window, try_window)
10785 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
10786
10787 * window.c (window_scroll_pixel_based):
10788 use default_line_pixel_height.
10789
10790 * dispextern.h (default_line_pixel_height): Add prototype.
10791
10792 * frame.c (x_set_line_spacing): Accept a float value for
10793 line-spacing parameter, per the documentation.
10794
10795 * data.c (Fmultibyte_string_p): Doc fix.
10796
10797 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
10798
10799 Use emacs_open more consistently when opening files.
10800 This handles EINTR more consistently now, and makes it easier
10801 to introduce other uniform changes to file descriptor handling.
10802 * sysstdio.h: New file.
10803 * buffer.c (mmap_init):
10804 * cygw32.c (chdir_to_default_directory):
10805 * dispnew.c (Fopen_termscript):
10806 * emacs.c (Fdaemon_initialized):
10807 * fileio.c (Fdo_auto_save):
10808 * image.c (slurp_file, png_load_body, jpeg_load_body):
10809 * keyboard.c (Fopen_dribble_file):
10810 * lread.c (Fload):
10811 * print.c (Fredirect_debugging_output):
10812 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
10813 * termcap.c (tgetent):
10814 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
10815 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
10816 * w32term.c (w32_initialize) [CYGWIN]:
10817 * xfaces.c (Fx_load_color_file):
10818 Use emacs_open instead of plain open, and emacs_fopen instead of
10819 plain fopen.
10820 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
10821 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
10822 * callproc.c (default_output_mode): New constant.
10823 (Fcall_process): Use it to call emacs_open instead of plain creat.
10824 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
10825 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
10826 (emacs_fopen): New function.
10827 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
10828 Include <lisp.h>, for emacs_open.
10829 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
10830
10831 Remove duplicate #include directives.
10832 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
10833 * xfaces.c:
10834 Don't include stdio.h twice.
10835 * buffer.c [USE_MMAP_FOR_BUFFERS]:
10836 Don't include sys/types.h or stdio.h twice.
10837 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
10838 * lread.c: Don't include coding.h twice.
10839 * nsfont.m: Don't include frame.h twice.
10840 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
10841 * ralloc.c: Don't include <unistd.h> twice.
10842 * xdisp.c: Don't include font.h twice.
10843 * xterm.c: Don't include fontset.h twice.
10844 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
10845
10846 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
10847
10848 Scale ImageMagick images more carefully.
10849 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
10850 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
10851 Be more careful about avoiding undefined behavior after
10852 integer overflow and division by zero.
10853
10854 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10855
10856 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
10857 (syms_of_w32fns): DEFSYM them.
10858 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
10859 (CCHDEVICENAME): Define macros if not defined.
10860 (struct MONITOR_INFO_EX): New struct.
10861 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
10862 (enum_display_monitors_fn): New variable.
10863 (globals_of_w32fns): Initialize it.
10864 (Fx_display_pixel_width, Fx_display_pixel_height)
10865 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
10866 multi-monitor setups in docstrings.
10867 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
10868 screen size by primary monitor's millimeter per pixel.
10869 (w32_monitor_enum, w32_display_monitor_attributes_list)
10870 (w32_display_monitor_attributes_list_fallback)
10871 (Fw32_display_monitor_attributes_list): New functions.
10872 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
10873
10874 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
10875 if not defined.
10876 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
10877
10878 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
10879
10880 * fileio.c (Qfile_notify_error): New error symbol.
10881
10882 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
10883 * inotify.c (inotify_callback, symbol_to_inotifymask)
10884 (Finotify_add_watch, Finotify_rm_watch): Use it.
10885 (inotifyevent_to_event): Exchange order of cookie and file name.
10886 (Finotify_add_watch): Adapt docstring.
10887
10888 * lisp.h (Qfile_notify_error): Declare.
10889
10890 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
10891
10892 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
10893 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
10894 Do not clear _malloc_thread_enabled_p, undoing the previous change,
10895 which did not work (see <http://bugs.gnu.org/14569#307>).
10896 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
10897 && (!noninteractive || initialized)). This attempts to thread
10898 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
10899
10900 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
10901
10902 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
10903 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
10904
10905 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
10906
10907 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
10908 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
10909 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
10910 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
10911
10912 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
10913
10914 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
10915 Define to __sys_siglist.
10916
10917 2013-07-02 Eli Zaretskii <eliz@gnu.org>
10918
10919 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
10920 word-wrap, so that overflow-newline-into-fringe would work in
10921 visual-line-mode. (Bug#2749)
10922 (move_it_in_display_line_to): When the last scanned display
10923 element fits exactly on the display line, and
10924 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
10925 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
10926 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
10927 finding buffer position that corresponds to pixel coordinates,
10928 e.g. in buffer_posn_from_coords.
10929
10930 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
10931
10932 * process.c (handle_child_signal): Call catch_child_signal if
10933 NS_IMPL_GNUSTEP.
10934
10935 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
10936
10937 Don't convert function pointers to void * and back.
10938 It isn't portable C, and it's easy enough to avoid.
10939 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
10940 (make_save_value): Add support for SAVE_FUNCPOINTER.
10941 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
10942 * print.c (print_object):
10943 Distinguish function from object pointers.
10944 * lisp.h (SAVE_FUNCPOINTER): New constant.
10945 (SAVE_SLOT_BITS): Adjust to it.
10946 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
10947 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
10948 (voidfuncptr): New typedef.
10949 (struct Lisp_Save_Value): New member data[0].funcpointer.
10950 (XSAVE_FUNCPOINTER): New function.
10951
10952 Simplify buildobj processing.
10953 * Makefile.in (buildobj.h): Make it a sequence of strings each
10954 followed by comma, rather than a single string. Put it into a
10955 .tmp file in case there's an error while generating it.
10956 (gl-stamp): Use .tmp for temp files.
10957 (mostlyclean): Clean .tmp files.
10958 * doc.c (buildobj): Move to just the routine that needs it.
10959 It's now an array of strings, so processing is simpler.
10960
10961 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
10962
10963 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
10964 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
10965 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
10966 Invoke malloc_enable_thread even when not interactive.
10967 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
10968 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
10969 in this case, since the underlying bug has now been fixed.
10970
10971 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
10972
10973 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
10974 unlinking it (bug#14691).
10975
10976 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
10977
10978 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
10979 before checking whether buffer is modified. This lets
10980 `kill-buffer-query-functions' cancel killing of the buffer or save
10981 its content before `kill-buffer' asks user the "Buffer %s
10982 modified; kill anyway?" question.
10983
10984 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
10985
10986 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
10987 Let the super performKeyEquivalent deal with them (Bug#14747).
10988
10989 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
10990
10991 * widget.c (resize_cb): Remove unused local.
10992
10993 Do not use GTK 3 if it exists but cannot be compiled.
10994 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
10995 * xterm.c (x_error_handler) [!USE_GTK]:
10996 Do not use GTK 3.
10997
10998 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
10999
11000 2013-06-30 Eli Zaretskii <eliz@gnu.org>
11001
11002 * intervals.c (get_local_map): Instead of aborting, clip POSITION
11003 to the valid range of values. (Bug#14753)
11004
11005 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
11006 when moving point by using the current glyph matrix. This avoids
11007 the need to force redisplay when this function is called in a
11008 loop.
11009
11010 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
11011
11012 Fix minor problems found by static checking.
11013 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
11014 Redo the latter's body to sidestep GCC parenthesization warnings.
11015 (setup_coding_system, detect_coding, detect_coding_system): Use them.
11016 * coding.c (detect_coding, detect_coding_system):
11017 * coding.h (struct undecided_spec):
11018 Use bool for boolean.
11019 * image.c (QCmax_width, QCmax_height): Now static.
11020 * xdisp.c (Fmove_point_visually): Remove unused local.
11021
11022 2013-06-29 Eli Zaretskii <eliz@gnu.org>
11023
11024 * xdisp.c (Fmove_point_visually): New function.
11025
11026 2013-06-28 Kenichi Handa <handa@gnu.org>
11027
11028 * coding.h (define_coding_undecided_arg_index): New enum.
11029 (coding_attr_index): New members
11030 coding_attr_undecided_inhibit_null_byte_detection,
11031 coding_attr_undecided_inhibit_iso_escape_detection,
11032 coding_attr_undecided_prefer_utf_8.
11033 (undecided_spec): New struct.
11034 (struct coding_system): New member `undecided' of the member
11035 `spec'.
11036
11037 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
11038 (detect_coding): Likewise.
11039 (detect_coding_system): Likewise.
11040 (Fdefine_coding_system_internal): New coding system properties
11041 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
11042 :prefer-utf-8.
11043 (syms_of_coding): Adjust for coding_arg_undecided_max.
11044
11045 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
11046
11047 * image.c (x_from_xcolors): Remove unused local.
11048
11049 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11050
11051 Defer image data transfer between X client and server until actual
11052 display happens.
11053
11054 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
11055 and `mask_img'.
11056
11057 * image.c (Destroy_Image): Remove.
11058 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
11059 `mask_p', and `colors_p'. All uses changed.
11060 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
11061 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
11062 New macros for `flags' arg to x_clear_image_1.
11063 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
11064 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
11065 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
11066 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
11067 (image_get_x_image, image_unget_x_image): New functions or macros.
11068 (image_background, image_background_transparent, x_to_xcolors)
11069 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
11070 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
11071 instead of Destroy_Image.
11072 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
11073 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
11074 (png_load_body, jpeg_load_body, tiff_load, gif_load)
11075 (imagemagick_load_image, svg_load_image): Use them instead of
11076 x_create_x_image_and_pixmap, and x_put_x_image followed by
11077 x_destroy_x_image, respectively.
11078 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
11079 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
11080 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
11081 background_transparent fields.
11082 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
11083 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
11084
11085 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
11086
11087 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
11088 This mostly consists of undoing recent changes.
11089 * callproc.c (Fcall_process):
11090 * process.c (create_process):
11091 Do not worry about catching SIGCHLD here, undoing previous change.
11092 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
11093 * process.c, process.h (catch_child_signal):
11094 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
11095 * process.c (catch_child_handler): Don't worry about being called
11096 lazily and do not assume caller has blocked SIGCHLD, undoing
11097 previous change. Move first-time stuff back to
11098 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
11099 tickle glib, as that causes Cygwin bootstrap to fail. Do not
11100 set lib_child_handler if it's already initialized, which may
11101 help avoid problems on GNUstep.
11102
11103 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
11104
11105 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
11106 * callproc.c (Fcall_process):
11107 * process.c (create_process):
11108 Make sure SIGCHLD is caught before we fork,
11109 since Emacs startup no arranges to catch SIGCHLD.
11110 * process.c (lib_child_handler): Initialize to null, not to
11111 dummy_handler.
11112 (catch_child_signal): Allow self to be called lazily.
11113 Do nothing if it's already been called.
11114 Assume caller has blocked SIGCHLD (all callers do now).
11115 * emacs.c (main): Do not catch SIGCHLD here; defer it until
11116 just before it's really needed.
11117 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
11118 since it hasn't been caught yet.
11119
11120 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
11121
11122 * image.c (compute_image_size): New function to implement
11123 :max-width and :max-height.
11124 (imagemagick_load_image): Use it.
11125
11126 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
11127
11128 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
11129 * callproc.c, process.h (block_child_signal, unblock_child_signal):
11130 Now extern.
11131 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
11132 * process.c (catch_child_signal): Block SIGCHLD while futzing with
11133 the SIGCHLD handler, since the code is not atomic and (due to glib)
11134 signals may be arriving now.
11135 * sysdep.c (init_signals): Do not catch child signals here;
11136 'main' now does that later, at a safer time.
11137
11138 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
11139
11140 Clean up SIGCHLD handling a bit (Bug#14569).
11141 * process.c, process.h (catch_child_signal):
11142 Now always extern, even if !NS_IMPL_GNUSTEP.
11143 * process.c (catch_child_signal): Move glib tickler here from
11144 init_process_emacs, so that it's done earlier in Emacs
11145 initialization. Also move the noninteractive && !initialized
11146 check here from init_process_emacs. This is all a bit cleaner for
11147 GNUish platforms, and I hope it works around the Cygwin bug.
11148 * sysdep.c (init_signals): Invoke catch_child_signal here, so
11149 that glib signal handling is tickled before glib creates threads.
11150
11151 * process.c (wait_reading_process_output): Avoid int overflow
11152 when reading more than 2 GiB total from a process.
11153
11154 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
11155
11156 * process.c (create_process): Handle a couple more cases,
11157 i.e., work even if new_argv and wait_child_setup[i] are cached.
11158 Use Fcall_process's style for volatile vars.
11159
11160 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
11161
11162 * process.c (create_process): Mark PROCESS volatile.
11163
11164 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
11165
11166 Use C99-style flexible array members if available.
11167 This avoids some subtle aliasing issues, which typically
11168 aren't a problem with GCC but may be a problem elsewhere.
11169 * alloc.c (sdata): New typedef, replacing the old struct sdata.
11170 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
11171 In either case, it uses a flexible array member rather than
11172 the old struct hack. All uses changed.
11173 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
11174 Adjust to sdata reorganization.
11175 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
11176 Use offsetof (struct, flex_array_member), not sizeof (struct), as
11177 that ports better to pre-C99 non-GCC.
11178 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
11179 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
11180 as the latter has changed.
11181 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
11182 and port better to pre-C99 GCC.
11183 * image.c (struct xpm_cached_color):
11184 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
11185 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
11186 Use FLEXIBLE_ARRAY_MEMBER.
11187 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
11188 Move decl to top level so it gets checked against implementation.
11189 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
11190 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
11191
11192 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
11193
11194 * syntax.c: Integer cleanups.
11195 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
11196 All uses that need 0-or-2 changed to:
11197 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
11198 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
11199 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
11200 (char_quoted, prev_char_comend_first, back_comment)
11201 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
11202 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
11203 Use bool for boolean.
11204 (update_syntax_table, skip_chars, skip_syntaxes):
11205 Prefer int to unsigned when either will do.
11206 (back_comment): Return boolean success flag, like forw_comment,
11207 instead of positive-or-minus-1 (which might have overflowed int anyway).
11208 Don't stuff ptrdiff_t into int.
11209 (syntax_spec_code, syntax_code_spec): Now const.
11210 (Fmatching_paren, scan_lists, scan_sexps_forward):
11211 Use enum syntaxcode for syntax code.
11212 (Fmatching_paren): Check that arg is a character, not just an integer.
11213 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
11214 (Finternal_describe_syntax_value): Omit no-longer-needed
11215 comparison to 0.
11216 (skip_chars): Use char, not unsigned char, when the distinction
11217 doesn't matter.
11218 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
11219 * bytecode.c (exec_byte_code):
11220 * syntax.c (syntax_spec_code, Fchar_syntax)
11221 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
11222 (init_syntax_once):
11223 * syntax.h (SYNTAX_WITH_FLAGS):
11224 Omit unnecessary casts.
11225
11226 2013-06-20 Eli Zaretskii <eliz@gnu.org>
11227
11228 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
11229 line dimensions here, to avoid race conditions with the main
11230 thread. (Bug#14062, bug#14630, bug#14669)
11231
11232 * w32term.c (w32_draw_window_cursor): Compute the header line and
11233 mode line dimensions here.
11234 <w32_system_caret_window, w32_system_caret_hdr_height>:
11235 <w32_system_caret_mode_height>: New variables.
11236
11237 * w32term.h: Declare them.
11238
11239 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
11240
11241 * alloc.c (die): Move "assertion failed" string here ...
11242 * lisp.h (eassert): ... from here. Also, suppress evaluation of
11243 COND when SUPPRESS_CHECKING. This shrinks the executable text
11244 size by 0.8% to 2.2% when configured with --enable-checking,
11245 depending on optimization flags (GCC 4.8.1 x86-64).
11246
11247 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
11248
11249 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
11250
11251 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
11252 base is 2; this is more accurate.
11253
11254 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
11255
11256 * sound.c (string_default): Move to !WINDOWSNT section.
11257 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
11258
11259 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
11260
11261 * sound.c: Integer cleanups.
11262 Remove unnecessary forward decls.
11263 (struct sound_device): The 'file' member is now a Lisp_Object, not
11264 a char *, so that we needn't invoke alloca on a huge size.
11265 (Fplay_sound_internal): Adjust to this.
11266 (string_default): New function.
11267 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
11268 Use it to adjust to the struct sound_device change.
11269 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
11270 (be2hs) [0]: Remove.
11271
11272 * syntax.c (skip_chars): Don't use uninitialized storage
11273 when searching a multibyte buffer for characters that are not in a
11274 unibyte string that contains non-ASCII characters.
11275
11276 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
11277
11278 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
11279 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
11280
11281 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
11282
11283 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
11284
11285 2013-06-18 Kenichi Handa <handa@gnu.org>
11286
11287 * font.c (Ffont_spec): Signal an error for an invalid font name
11288 (Bug#14648).
11289
11290 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
11291
11292 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
11293 In particular this ports to 32-bit sparc Sun cc.
11294 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
11295 array with a dummy element at specpdl[-1], so that its address can
11296 be taken portably.
11297 (unbind_to): Do not copy the binding; not needed, now that we
11298 copy old_value in the one place where the copy is needed.
11299 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
11300 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
11301 (union specbinding): Rename from struct specbinding. Redo layout
11302 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
11303 which is not portable. With Sun C 5.12 32-bit sparc, the
11304 declaration causes nargs to be an unsigned bitfield, a behavior
11305 that the C standard allows; but Emacs wants nargs to be signed.
11306 The overall type is now a union of structures rather than a
11307 structure of union of structures, and the 'kind' member is now a
11308 bitfield, so that the overall type doesn't grow. All uses changed.
11309 * process.c (Fmake_serial_process): Remove unnecessary initialization.
11310
11311 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
11312
11313 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
11314 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
11315
11316 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
11317
11318 2013-06-17 Eli Zaretskii <eliz@gnu.org>
11319
11320 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
11321 unless we know that the window w's frame is a frame object.
11322 Another attempt at solving bug#14062 and bug#14630.
11323
11324 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
11325
11326 * textprop.c (property_set_type): New enum.
11327 (add_properties): Allow appending/prepending text properties.
11328 (add_text_properties_1): Factored out of Fadd_text_properties.
11329 (Fadd_text_properties): Move all the code into
11330 add_text_properties_1.
11331 (Fadd_face_text_property): New function that calls
11332 add_text_properties_1.
11333
11334 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
11335
11336 Move functions from lisp.h to individual modules when possible.
11337 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
11338 * alloc.c (XFLOAT_INIT, set_symbol_name):
11339 * buffer.c (CHECK_OVERLAY):
11340 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
11341 (set_char_table_parent):
11342 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
11343 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
11344 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
11345 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
11346 (set_blv_valcell):
11347 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
11348 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
11349 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
11350 (backtrace_args, backtrace_debug_on_exit):
11351 * floatfns.c (CHECK_FLOAT):
11352 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
11353 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
11354 (set_hash_hash, set_hash_hash_slot, set_hash_index)
11355 (set_hash_index_slot):
11356 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
11357 * marker.c (CHECK_MARKER):
11358 * textprop.c (CHECK_STRING_OR_BUFFER):
11359 * window.c (CHECK_WINDOW_CONFIGURATION):
11360 Move here from lisp.h, and make these functions static rather than
11361 extern inline.
11362 * buffer.c (Qoverlayp):
11363 * data.c (Qsubrp):
11364 * fns.c (Qhash_table_p):
11365 * window.c (Qwindow_configuration_p):
11366 Now static.
11367 * lisp.h: Remove the abovementioned defns and decls.
11368
11369 Use functions, not macros, for XINT etc (Bug#11935).
11370 In lisp.h, prefer functions to function-like macros, and
11371 constants to object-like macros, when either will do. This:
11372 . simplifies use, as there's no more need to worry about
11373 arguments' side effects being evaluated multiple times.
11374 . makes the code easier to debug on some platforms.
11375 However, when using gcc -O0, keep using function-like macros
11376 for a few critical operations, for performance reasons.
11377 This sort of thing isn't needed with gcc -Og, but -Og
11378 is a GCC 4.8 feature and isn't widely-enough available yet.
11379 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
11380 Remove enum lsb_bits; no longer needed.
11381 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
11382 * buffer.c (Qoverlap):
11383 * data.c (Qsubrp):
11384 * fns.c (Qhash_table_p):
11385 Now extern, so lisp.h can use these symbols.
11386 * dispextern.h: Include character.h, for MAX_CHAR etc.
11387 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
11388 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
11389 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
11390 (GLYPH_CODE_P): Move here from lisp.h.
11391 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
11392 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
11393 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
11394 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
11395 XUNTAG now returns void *.
11396 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
11397 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
11398 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
11399 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
11400 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
11401 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
11402 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
11403 (lisp_h_XPNTR, lisp_h_XSYMBOL):
11404 New macros, renamed from their sans-lisp_h_ counterparts.
11405 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
11406 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
11407 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
11408 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
11409 If compiling via GCC without optimization, define these as macros
11410 in addition to inline functions.
11411 To disable this, compile with -DINLINING=0.
11412 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
11413 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
11414 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
11415 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
11416 (INTMASK, VALMASK): Now macros, since static values cannot be
11417 accessed from extern inline functions.
11418 (VALMASK): Also a constant, for benefit of old GDB.
11419 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
11420 is INTEGERP, which can fold it in.
11421 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
11422 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
11423 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
11424 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
11425 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
11426 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
11427 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
11428 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
11429 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
11430 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
11431 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
11432 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
11433 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
11434 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
11435 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
11436 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
11437 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
11438 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
11439 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
11440 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
11441 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
11442 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
11443 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
11444 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
11445 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
11446 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
11447 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
11448 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
11449 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
11450 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
11451 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
11452 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
11453 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
11454 Now functions.
11455 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
11456 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
11457 (VALMASK): Define in one place rather than in two, merging the
11458 USE_LSB_TAG parts; this is simpler.
11459 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
11460 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
11461 Move up, to avoid use before definition.
11462 Also include "globals.h" earlier, for the same reason.
11463 (make_natnum): New function.
11464 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
11465 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
11466 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
11467 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
11468 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
11469 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
11470 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
11471 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
11472 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
11473 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
11474 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
11475 (Qwindow_configuration_p, Qimage): New forward declarations.
11476 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
11477 (STRING_COPYIN): Remove; unused.
11478 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
11479 (xcar_addr, xcdr_addr): New functions. All uses changed.
11480 (IEEE_FLOATING_POINT): Now a constant, not a macro.
11481 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
11482 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
11483 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
11484 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
11485 (TYPE_RANGED_INTEGERP): Simplify.
11486 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
11487 (setlocale, fixup_locale, synchronize_system_messages_locale)
11488 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
11489 Now empty functions, not macros.
11490 (functionp): Return bool, not int.
11491 * window.c (Qwindow_configuration_p): Now extern,
11492 so window.h can use it.
11493 * window.h (Qwindowp): Move decl back to lisp.h.
11494
11495 2013-06-15 Eli Zaretskii <eliz@gnu.org>
11496
11497 * xdisp.c (Fline_pixel_height): New function, required for solving
11498 bug #14567.
11499
11500 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
11501
11502 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
11503
11504 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
11505
11506 * lread.c (syms_of_lread):
11507 * fns.c (Fprovide): Adjust to new format of after-load-alist.
11508
11509 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
11510
11511 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
11512
11513 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
11514
11515 * fileio.c (expand_file_name): Doc fix.
11516
11517 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
11518
11519 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
11520 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
11521 Wait for self, not for 0. This can't hurt on GNU or similar
11522 system, and may help with Cygwin.
11523
11524 * keyboard.c: Don't use PROP (...) as an lvalue.
11525 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
11526 Use set_prop (A, B), not PROP (A) = B.
11527
11528 2013-06-10 Eli Zaretskii <eliz@gnu.org>
11529
11530 * xdisp.c (get_it_property): Use it->window instead of generating
11531 a Lisp object from it->w.
11532
11533 2013-06-09 Eli Zaretskii <eliz@gnu.org>
11534
11535 * xdisp.c (get_it_property): If it->object is a buffer, pass to
11536 get-char-property the window that is being rendered, instead of
11537 the buffer, to support window-specific overlays. (Bug#14575)
11538 (compute_display_string_pos): When W is NULL, use the current
11539 buffer as the object to pass to get-char-property.
11540 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
11541 pointer member of the bidi iterator, since no window is pertinent
11542 to this function.
11543
11544 2013-06-08 Eli Zaretskii <eliz@gnu.org>
11545
11546 * bidi.c (bidi_fetch_char): Accept additional argument, the window
11547 being displayed, and pass it to compute_display_string_pos.
11548 (bidi_level_of_next_char, bidi_resolve_explicit_1)
11549 (bidi_paragraph_init): All callers changed.
11550
11551 * xdisp.c (init_from_display_pos, init_iterator)
11552 (handle_single_display_spec, next_overlay_string)
11553 (get_overlay_strings_1, reseat_1, reseat_to_string)
11554 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
11555 Set bidi_it.w member from it->w.
11556 (compute_display_string_pos): Accept additional argument, the
11557 window being displayed, and pass it to Fget_char_property.
11558 (Bug#14575)
11559
11560 * dispextern.h (struct bidi_it): New member w, the window being
11561 displayed.
11562 (compute_display_string_pos): Adjust prototype.
11563
11564 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
11565
11566 * xgselect.c: Remove unneeded include xterm.h.
11567
11568 * process.c (wait_reading_process_output): Check for NS before GLIB.
11569 GLIB may be linked in due to rsvg, but ns_select must be called.
11570
11571 * xgselect.c (xg_select): Remove call to window_system_available
11572 and g_main_context_pending at the top, so Gdk events (i.e. file
11573 notify) are processed when Emacs is started with -nw.
11574
11575 2013-06-07 Eli Zaretskii <eliz@gnu.org>
11576
11577 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
11578 (ctagsfiles3): New variable, includes only *.m files.
11579 (TAGS): Use an explicit language name in the regular expressions,
11580 to avoid transformation of '/SOMETHING' by MSYS to
11581 'c:\MSYS\SOMETHING'.
11582
11583 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
11584
11585 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
11586
11587 2013-06-06 Eli Zaretskii <eliz@gnu.org>
11588
11589 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
11590 still need to set the mouse pointer shape and activate help-echo.
11591 (Bug#14558)
11592
11593 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
11594
11595 A few porting etc. fixes for the new file monitor code.
11596 See the thread containing
11597 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
11598 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
11599 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
11600 (dir_monitor_callback, Fgfile_rm_watch):
11601 Use assq_no_quit instead of Fassoc, for speed.
11602 (dir_monitor_callback, Fgfile_rm_watch):
11603 eassert that the monitor is a fixnum.
11604 (dir_monitor_callback): No need for CDR_SAFE.
11605 Simplify building of lisp with alternative tails.
11606 (Fgfile_add_watch, Fgfile_rm_watch):
11607 Do not assume glib functions set errno reliably on failure.
11608 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
11609 and signal an error otherwise.
11610 (Fgfile_rm_watch): Prefer CONSP to !NILP.
11611 Use Fdelq instead of Fdelete, for speed.
11612
11613 2013-06-05 Eli Zaretskii <eliz@gnu.org>
11614
11615 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
11616 don't insist on being invoked on a highlighted tool-bar button.
11617 Avoids losing tool-bar functionality when mouse-highlight is nil.
11618 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
11619 Don't highlight when mouse-highlight is nil.
11620 (note_mouse_highlight): When mouse-highlight is nil, don't return
11621 right away; instead, run tool-bar and mode-line highlight
11622 subroutine, clear any existing highlight, and revert the mouse
11623 pointer to its default shape. (Bug#14558)
11624
11625 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
11626
11627 * lisp.mk (lisp): Add prog-mode.el.
11628
11629 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
11630
11631 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
11632 * process.c (dummy_handler): New function.
11633 (lib_child_handler): New static var.
11634 (handle_child_signal): Invoke it.
11635 (catch_child_signal): If a library has set up a signal handler,
11636 save it into lib_child_handler.
11637 (init_process_emacs): If using glib and not on Windows, tickle glib's
11638 child-handling code so that it initializes its private SIGCHLD handler.
11639 * syssignal.h (SA_SIGINFO): Default to 0.
11640 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
11641 31; it should no longer be needed now.
11642
11643 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
11644
11645 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
11646
11647 * gfilenotify.c (globals_of_gfilenotify): New function.
11648 (syms_of_gfilenotify): Move global initialization there.
11649
11650 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
11651
11652 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
11653
11654 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
11655 * keyboard.c (menu_bar_items, tool_bar_items):
11656 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
11657 not override local keymaps any more.
11658
11659 2013-06-04 Eli Zaretskii <eliz@gnu.org>
11660
11661 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
11662
11663 2013-06-03 Eli Zaretskii <eliz@gnu.org>
11664
11665 * w32console.c (initialize_w32_display): Return the dimensions of
11666 the console window via 2 additional arguments, not via the current
11667 frame. This avoids crashes due to overrunning the bounds of
11668 frame's decode_mode_spec_buffer, which is not resized following
11669 the change of the frame dimensions from the initial 10x10.
11670
11671 * w32term.h (w32_initialize_display_info): Adjust prototype.
11672
11673 * term.c (init_tty): Take dimensions of the frame from the values
11674 returned by initialize_w32_display.
11675
11676 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
11677 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
11678 (LIBES): Add $(GFILENOTIFY_LIBS).
11679
11680 * w32inevt.c (handle_file_notifications): Add dummy implementation
11681 for !HAVE_W32NOTIFY.
11682
11683 * w32term.c: Wrap code with HAVE_W32NOTIFY.
11684
11685 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
11686
11687 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
11688
11689 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
11690
11691 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
11692
11693 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
11694
11695 Fix minor problems found by static checking.
11696 * data.c (pure_write_error):
11697 Use xsignal2, not Fsignal, as Fsignal might return.
11698 * eval.c (set_backtrace_debug_on_exit): Now static.
11699 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
11700 No longer inline. EXTERN_INLINE is needed only for functions
11701 defined in .h files. Reindent function header as per GNU style.
11702 (backtrace_p, backtrace_top, backtrace_next):
11703 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
11704 compiler or linker. Add extern decls to pacify gcc -Wall.
11705 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
11706 Now static.
11707 * frame.c (free_monitors): Define only on platforms that need it.
11708 * nsterm.m (ns_term_init):
11709 * process.c (catch_child_signal):
11710 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
11711 defined on all porting targets these days.
11712 * process.c, process.h (catch_child_signal):
11713 Make it extern only if NS_IMPL_GNUSTEP is defined.
11714
11715 2013-06-03 Eli Zaretskii <eliz@gnu.org>
11716
11717 * w32.c (gettimeofday): Make the signature identical to prototype
11718 in nt/inc/sys/time.h.
11719
11720 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
11721
11722 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
11723 .gdbinit.
11724
11725 * keyboard.c (safe_run_hooks_error): Improve error message.
11726
11727 * data.c (pure_write_error): Add `object' argument.
11728 * puresize.h (CHECK_IMPURE): Use it.
11729
11730 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
11731
11732 * Makefile.in (NOTIFY_OBJ): New variable.
11733 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
11734
11735 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
11736 Call syms_of_gfilenotify.
11737
11738 * gfilenotify.c: New file.
11739
11740 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
11741 and Qfile_w32notify.
11742 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
11743 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
11744
11745 * lisp.h: Declare syms_of_gfilenotify.
11746
11747 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
11748
11749 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
11750
11751 Merge the specpdl and backtrace stacks. Make the structure of the
11752 specpdl entries more obvious via a tagged union of structs.
11753 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
11754 (enum specbind_tag): New enum.
11755 (struct specbinding): Make it a tagged union of structs.
11756 Add a case for backtrace records.
11757 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
11758 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
11759 (backtrace_debug_on_exit): New accessors.
11760 (struct backtrace): Remove.
11761 (struct catchtag): Remove backlist field.
11762 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
11763 Move to eval.c.
11764 (Flocal_variable_p): Speed up the common case where the binding is
11765 already loaded.
11766 * eval.c (backtrace_list): Remove.
11767 (set_specpdl_symbol, set_specpdl_old_value): Remove.
11768 (set_backtrace_args, set_backtrace_nargs)
11769 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
11770 (backtrace_next): New functions.
11771 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
11772 (unwind_to_catch, internal_lisp_condition_case)
11773 (internal_condition_case, internal_condition_case_1)
11774 (internal_condition_case_2, internal_condition_case_n): Don't bother
11775 with backtrace_list any more.
11776 (Fsignal): Adjust to new backtrace format.
11777 (grow_specpdl): Move up.
11778 (record_in_backtrace): New function.
11779 (eval_sub, Ffuncall): Use it.
11780 (apply_lambda): Adjust to new backtrace format.
11781 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
11782 data.c.
11783 (specbind): Adjust to new specpdl format. Simplify.
11784 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
11785 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
11786 backtrace format.
11787 (mark_backtrace): Remove.
11788 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
11789 * xdisp.c (redisplay_internal): Use record_in_backtrace.
11790 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
11791 Use mark_specpdl.
11792 * profiler.c (record_backtrace): Use get_backtrace.
11793 (handle_profiler_signal): Use backtrace_top_function.
11794 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
11795 accessor functions.
11796
11797 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
11798
11799 * process.h (catch_child_signal): Declare.
11800
11801 * process.c (catch_child_signal): New function.
11802 (init_process_emacs): Call it.
11803
11804 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
11805 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
11806 NS_IMPL_COCOA.
11807 (x_set_cursor_type): Remove declaration.
11808 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
11809 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
11810 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
11811 (ns_get_color): Use F suffix on float.
11812 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
11813 (ns_get_rgb_color): Remove.
11814 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
11815 (note_mouse_movement): x and y are CGFloat.
11816 (ns_draw_fringe_bitmap): Remove unused rowY.
11817 Change #if to COCOA && >= 10_6.
11818 (ns_draw_window_cursor): Remove unused overspill.
11819 (ns_draw_underwave): width and x are EamcsCGFloat.
11820 (ns_draw_box): thickness is CGFloat.
11821 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
11822 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
11823 if not in main thread.
11824 (ns_get_pending_menu_title, ns_check_menu_open)
11825 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
11826 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
11827 (sendFromMainThread:): New method.
11828 (changeFont:): size is CGFloat.
11829 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
11830 Disable warning about permanent text.
11831 (characterIndexForPoint:): Adjust return type depending on GNUstep
11832 version.
11833 (mouseDown:): delta is CGFloat.
11834 (updateFrameSize): Remove unised variable f.
11835 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
11836 Cast float to EmacsCGFloat.
11837 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
11838 also to -1 when restoring.
11839 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
11840 inside NS_IMPL_COCOA.
11841 (toggleFullScreen:): Put call to toggleFullScreen inside
11842 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
11843 (setPosition:portion:whole:): por is CGFloat.
11844 (getMouseMotionPart:window:x:y:): Add F suffix to float.
11845 (mouseDown:): Use CGFloat.
11846 (mouseDragged:): Remove unised variable edge.
11847 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
11848
11849 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
11850 of CGFloat differs.
11851 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
11852 when NS_IMPL_GNUSTEP.
11853 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
11854 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
11855 (EmacsToolbar): Add clearAll. Add tag argument to
11856 addDisplayItemWithImage.
11857 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
11858
11859 * nsselect.m (ns_get_local_selection): Remove unused variable type.
11860
11861 * nsmenu.m (ns_update_menubar): Make static.
11862 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
11863 (fillWithWidgetValue:): Add cast to SEL for setAction.
11864 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
11865 (update_frame_tool_bar): Update code for GNUstep.
11866 (clearAll): New method.
11867 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
11868 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
11869 Move identifierToItem setObject and activeIdentifiers addObject before
11870 call to insertItemWithItemIdentifier.
11871 (validateVisibleItems): Fix indentation.
11872 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
11873 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
11874 UtilityWindow to aStyle, remove call to setStyleMask.
11875
11876 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
11877
11878 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
11879 (ns_charset_covers, ns_get_covering_families, nsfont_open):
11880 Use F suffix on floats.
11881 (ns_char_width): Returns CGFloat.
11882 (ns_ascii_average_width): w is CGFloat instead of float.
11883 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
11884 DPSxshow.
11885 (ns_glyph_metrics): CGFloat instead of float.
11886
11887 * nsfns.m (x_set_foreground_color, x_set_background_color):
11888 Use EmacsCGFloat.
11889 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
11890 remove unused variables.
11891 (Fns_read_file_name): Keep track if panel is for save.
11892 Use ns_filename_from_panel/ns_directory_from_panel.
11893 (Fns_list_services): delegate only used for COCOA.
11894 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
11895 Just return the input if GNUstep.
11896 (x_screen_planes): Remove.
11897 (Fxw_color_values): Use EmacsCGFloat
11898 (Fns_display_monitor_attributes_list): Only get screen number for
11899 Cocoa.
11900 (getDirectory, getFilename): Remove from EmacsOpenPanel and
11901 EmacsSavePanel.
11902 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
11903 ns_directory_from_panel.
11904
11905 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
11906
11907 * process.c (handle_child_signal): Also use WCONTINUED.
11908 This is so that list-processes doesn't mistakenly list the process
11909 as stopped, when the process has actually been continued and is
11910 now running.
11911
11912 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
11913
11914 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
11915 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
11916 not already configured.
11917
11918 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
11919
11920 2013-05-29 Eli Zaretskii <eliz@gnu.org>
11921
11922 * Makefile.in (mostlyclean): Remove *.res files.
11923
11924 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
11925
11926 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
11927 a buffer (bug#8447).
11928
11929 2013-05-27 Eli Zaretskii <eliz@gnu.org>
11930
11931 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
11932 display vector, and we backtrack, handle the case that the
11933 previous character position is also displayed from a display
11934 vector or covered by a display string or image. (Bug#14476)
11935
11936 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
11937
11938 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
11939 (struct MonitorInfo, free_monitors): Remove.
11940 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
11941 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
11942 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
11943 Qframes, Qsource.
11944
11945 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
11946 (struct MonitorInfo, free_monitors): Remove.
11947 (ns_screen_name): Make static.
11948 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
11949 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
11950 Qframes, Qsource.
11951
11952 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
11953 (struct MonitorInfo): New struct.
11954 (free_monitors, make_monitor_attribute_list): Declare.
11955
11956 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
11957 New Lisp_Object:s.
11958 (free_monitors, make_monitor_attribute_list): New functions.
11959 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
11960 Qsource.
11961
11962 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
11963
11964 * callproc.c (call_process): Refine the doc string. (Bug#14045)
11965
11966 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
11967
11968 * keyboard.c: Apply keyboard decoding only to events that come directly
11969 from the tty, not from unread-command-events (bug#14368).
11970 (read_event_from_main_queue): New function, extracted from read_char.
11971 (read_decoded_char): Remove.
11972 (read_decoded_event_from_main_queue): New function to replace it.
11973 (read_char): Use it.
11974 (read_key_sequence): Use read_char rather than read_decoded_char.
11975
11976 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
11977
11978 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
11979
11980 * casetab.c (init_casetab_once): Fix last change (bug#14424).
11981
11982 2013-05-22 Kenichi Handa <handa@gnu.org>
11983
11984 The following changes are to fix the setting of
11985 buffer-file-coding-system on, for instance, C-x RET c unix RET
11986 _FILE_OF_DOS_EOL_TYPE_ RET.
11987
11988 * coding.h (struct coding_system): New member detected_utf8_chars.
11989
11990 * coding.c (detect_coding_utf_8): Count characters and check EOL
11991 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
11992 BOM is there.
11993 (setup_coding_system): Do not initialize coding->head_ascii.
11994 (check_ascii): Do not set coding->eol_seen but update it. Do not
11995 call adjust_coding_eol_type here.
11996 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
11997 If the eol-type of CODING is already specified, adjust the eol type
11998 of the found coding-system.
11999 (decode_coding_gap): Cancel previous change. Utilize the
12000 character numbers counted by detect_coding_utf_8. Fix detection
12001 of BOM for utf-8.
12002
12003 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
12004
12005 * search.c (looking_at_1): Only set last_thing_searched if the match
12006 changed the match-data (bug#14281).
12007
12008 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
12009
12010 * xdisp.c (reseat_at_previous_visible_line_start):
12011 Already declared in dispextern.h, so remove it here.
12012 (move_it_vertically_backward): Likewise.
12013
12014 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12015
12016 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
12017 (Fx_display_pixel_width, Fx_display_pixel_height)
12018 (Fx_display_mm_width, Fx_display_mm_height):
12019 Mention `display-monitor-attributes-list' in docstrings.
12020
12021 * nsfns.m (ns_get_screen): Remove function. All uses removed.
12022 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
12023 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
12024 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
12025 (Fx_display_backing_store, Fx_display_visual_class)
12026 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
12027 (Fx_display_grayscale_p, Fx_display_pixel_width)
12028 (Fx_display_pixel_height, Fx_display_planes)
12029 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
12030 (Fx_display_screens): Don't confuse X11 screens with NS screens.
12031 (Fx_display_mm_width, Fx_display_mm_height)
12032 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
12033 height for all physical monitors as in X11.
12034
12035 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
12036 Return pixel width or height for all physical monitors as in X11.
12037
12038 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
12039
12040 Port --enable-gcc-warnings to clang.
12041 * bytecode.c (exec_byte_code):
12042 * regex.c:
12043 Redo diagnostic pragmas to pacify clang, too.
12044 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
12045 * editfns.c (Fencode_time):
12046 * fileio.c (file_accessible_directory_p):
12047 * font.c (font_unparse_xlfd):
12048 Use '&"string"[index]' instead of '"string" + (index)'.
12049 * undo.c (user_error): Remove; unused.
12050
12051 2013-05-16 Eli Zaretskii <eliz@gnu.org>
12052
12053 * insdel.c (insert_1_both): Document the arguments, instead of
12054 referring to insert_1, which no longer exists.
12055
12056 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
12057 some window, increment windows_or_buffers_changed, so that
12058 *Messages* display in that window is updated. (Bug#14408)
12059
12060 * w32.c: Include epaths.h.
12061 (init_environment): Use cmdproxy.exe without leading directories.
12062 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
12063 case.
12064 (gettimeofday): Adjust signature and return value to Posix
12065 expectations.
12066
12067 * unexw32.c (open_output_file): Delete the existing emacs.exe
12068 before creating it, to break the hard link to the versioned
12069 executable.
12070
12071 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
12072 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
12073 (FIRSTFILE_OBJ): New variables.
12074 (W32_RES): Rename to EMACSRES. All users changed.
12075 (base_obj): Use $(CM_OBJ).
12076 (ALLOBJS): Use $(FIRSTFILE_OBJ).
12077 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
12078 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
12079 $(W32_RES_LINK) before $(LIBES).
12080 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
12081
12082 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
12083
12084 * makefile.w32-in (DOC): Use just "DOC".
12085
12086 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
12087
12088 * process.c: Export default filters and sentinels to Elisp.
12089 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
12090 New constants.
12091 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
12092 (Fset_process_sentinel, Fformat_network_address):
12093 Default to them instead of nil.
12094 (server_accept_connection): Sentinels can't be nil any more.
12095 (read_and_dispose_of_process_output): New function, extracted from
12096 read_process_output.
12097 (read_process_output): Use it; filters can't be nil.
12098 (Finternal_default_process_filter): New function, extracted from
12099 read_process_output.
12100 (exec_sentinel_unwind): Remove function.
12101 (exec_sentinel): Don't zilch sentinel while running.
12102 (status_notify): Sentinels can't be nil.
12103 (Finternal_default_process_sentinel): New function extracted from
12104 status_notify.
12105 (setup_process_coding_systems): Default filter is not nil any more.
12106 (syms_of_process): Export new Elisp functions and initialize
12107 new constants.
12108 * lisp.h (make_lisp_proc): New function.
12109
12110 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
12111
12112 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
12113
12114 2013-05-14 Eli Zaretskii <eliz@gnu.org>
12115
12116 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
12117 unless we know that the window w is a leaf window.
12118 Another attempt at solving bug#14062.
12119
12120 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
12121
12122 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
12123 fdesc (Bug#14375).
12124
12125 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
12126
12127 * image.c (gif_load): Check that subimages fit (Bug#14345).
12128
12129 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
12130
12131 * lread.c (skip_dyn_eof): New function.
12132 (read1): Use it to skip the end of a file in response to #@00.
12133
12134 * doc.c (get_doc_string): Slightly relax the sanity checking.
12135
12136 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
12137
12138 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
12139 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
12140 (MonitorInfo): New struct.
12141 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
12142 (Fns_display_monitor_attributes_list): New functions.
12143 (display-usable-bounds): Remove.
12144 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
12145 Qsource.
12146
12147 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
12148
12149 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
12150 (GTK_CHECK_VERSION): New macro, if not already defined.
12151 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
12152 replaced by GTK_CHECK_VERSION.
12153
12154 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
12155
12156 * xterm.h (GTK_PREREQ): New macro.
12157 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
12158 to use this macro instead, for consistency and clarity.
12159
12160 2013-05-08 Eli Zaretskii <eliz@gnu.org>
12161
12162 * xdisp.c (row_for_charpos_p): New function, with code of
12163 cursor_row_p, but accepts an additional argument CHARPOS instead
12164 of using a hardcoded PT.
12165 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
12166 (row_containing_pos): Call row_for_charpos_p instead of partially
12167 doing the same. Fixes cursor positioning under longlines-mode
12168 when longlines-show-effect includes more than one newline, when
12169 moving the cursor vertically up.
12170
12171 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
12172
12173 * makefile.w32-in (ACL_H): New macro.
12174 ($(BLD)/fileio.$(O)): Update dependencies.
12175
12176 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
12177
12178 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
12179 * Makefile.in (LIB_ACL): New macro.
12180 (LIBACL_LIBS): Remove.
12181 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
12182 * fileio.c: Include <acl.h>.
12183 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
12184 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
12185 !acl_errno_valid.
12186 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
12187 it ourselves.
12188
12189 * unexelf.c: Don't assume ElfW (Half) fits in int.
12190 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
12191 when dealing with ElfW (Half) values, since they can exceed 2**31
12192 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
12193 (entry_address): Omit unused NUM arg. All uses changed.
12194
12195 2013-05-07 Juri Linkov <juri@jurta.org>
12196
12197 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
12198 to the string converted from number with `Fnumber_to_string'.
12199 (Bug#14254)
12200
12201 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
12202
12203 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
12204 This fixes a problem introduced by my previous change.
12205
12206 2013-05-07 Glenn Morris <rgm@gnu.org>
12207
12208 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
12209
12210 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
12211
12212 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
12213
12214 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
12215
12216 Static checking by GCC 4.8.0.
12217 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
12218 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
12219 (x_get_monitor_attributes_fallback)
12220 (x_get_monitor_attributes_xinerama)
12221 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
12222 Define only if USE_GTK.
12223 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
12224 (x_get_monitor_attributes_fallback): Omit unused locals.
12225 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
12226 Use double, not float, to avoid mixed-mode floating point arithmetic.
12227
12228 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12229 Jan Djärv <jan.h.d@swipnet.se>
12230
12231 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
12232 (XINERAMA_CFLAGS): New macros.
12233 (ALL_CFLAGS, LIBES): Use them.
12234
12235 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
12236 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
12237 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
12238 (syms_of_xfns): DEFSYM them.
12239 (struct MonitorInfo): New struct.
12240 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
12241 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
12242 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
12243 (x_get_monitor_attributes_xinerama): New functions.
12244 (Fx_display_monitor_attributes_list): New primitive.
12245 (syms_of_xfns): Defsubr it.
12246
12247 * xterm.h (x_display_info): Add Xatom_net_workarea and
12248 Xatom_net_current_desktop.
12249
12250 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
12251 and dpyinfo->Xatom_net_current_desktop.
12252
12253 2013-05-06 Eli Zaretskii <eliz@gnu.org>
12254
12255 * xdisp.c (pos_visible_p): Use the special code for finding the
12256 beginning of a display property or overlay for any "replacing"
12257 display property, not just for display strings. This solves
12258 incorrect reporting of position by posn-at-point. (Bug#14241)
12259
12260 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
12261
12262 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
12263 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
12264 Verify that ElfW (Half) fits in int.
12265 (fatal): Use same signature as lisp.h.
12266 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
12267 configure and build with -DUNEXELF_DEBUG without worrying about
12268 other modules that use DEBUG.
12269 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
12270 possibly-wide integers now uses it instead of plain fprintf.
12271 (entry_address): New function, which avoids problems with 32-bit
12272 overflow on 64-bit hosts.
12273 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
12274 (round_up): Don't assume the remainder fits in int.
12275 (find_section): Use bool for boolean. Simplify debug code.
12276 (unexec): Don't assume file sizes fit in int or size_t.
12277 Omit unnecessary trailing newline in 'fatal' format.
12278 Use strerror rather than outputting decimal error number.
12279 Remove unused code when emacs is not defined;
12280 this file relies on Emacs now.
12281 Don't assume e_phnum and e_shnum are positive.
12282
12283 * regex.c: Fix problems when DEBUG is defined.
12284 (extract_number, extract_number_and_incr): Define regardless of
12285 whether DEBUG is defined; that's simpler and makes the code less
12286 likely to go stale in the normal case when DEBUG is not defined.
12287 Return int rather than taking an int * arg. All callers changed.
12288 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
12289 Remove, replacing with ...
12290 (DEBUG_PRINT): New macro. All callers changed.
12291 (DEBUG_COMPILES_ARGUMENTS): New macro.
12292 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
12293 (print_compiled_pattern, print_double_string) [DEBUG]:
12294 Use prototype rather than old-style definition.
12295 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
12296 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
12297 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
12298 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
12299 Don't assume ptrdiff_t, size_t, and long are the same width as int.
12300 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
12301 This matters only when DEBUG is defined.
12302
12303 2013-05-05 Eli Zaretskii <eliz@gnu.org>
12304
12305 * xdisp.c (set_iterator_to_next): Set the
12306 ignore_overlay_strings_at_pos_p flag only if we are _really_
12307 iterating over an overlay string, as indicated by the
12308 current.overlay_string_index member. (Bug#14306)
12309
12310 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
12311
12312 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
12313 to where it is used, to avoid autorelease issues (Bug#14050).
12314
12315 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
12316
12317 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
12318 * fileio.c (syms_of_fileio): Implement this.
12319 * filelock.c (create_lock_file): If symbolic links don't work, so
12320 we use a regular file as a lock file, do not fsync the lock file;
12321 it's not needed.
12322
12323 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
12324
12325 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
12326 (syms_of_minibuf): Adjust accodingly.
12327 * lread.c (Fread):
12328 * callint.c (Fcall_interactively): Adjust calls accordingly.
12329
12330 2013-05-04 Eli Zaretskii <eliz@gnu.org>
12331
12332 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
12333 w->contents is a buffer before computing everything else.
12334 Use parentheses to disambiguate last part of the condition.
12335
12336 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
12337 assertion violations. (Bug#14062)
12338
12339 2013-05-01 David Reitter <david.reitter@gmail.com>
12340
12341 * nsfns.m (ns_tooltip): Initialize.
12342
12343 2013-04-28 Eli Zaretskii <eliz@gnu.org>
12344
12345 * coding.c (decode_coding_gap): Don't remove the character before
12346 a newline unless it's a CR character. (Bug#14287)
12347
12348 2013-04-28 Dan Nicolaescu <dann@gnu.org>
12349
12350 * dispextern.h (struct face): Move enum face_underline_type
12351 earlier so that bitfields can be in the same word.
12352
12353 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
12354
12355 * nsfns.m (handlePanelKeys): New function.
12356 (EmacsOpenPanel:performKeyEquivalent:)
12357 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
12358 arrows/function/control and copy/paste keys (Bug#14296).
12359
12360 2013-04-27 Juri Linkov <juri@jurta.org>
12361
12362 * callint.c (Fcall_interactively): Call `Qread_number' for
12363 interactive code letter `n' instead of using duplicate code.
12364 (Bug#14254)
12365
12366 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
12367
12368 * systime.h (make_timeval): Declare as 'const'.
12369
12370 2013-04-27 Kenichi Handa <handa@gnu.org>
12371
12372 * font.c (font_open_entity): Always open a font of manageable
12373 size.
12374
12375 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
12376
12377 Port better to AIX (Bug#14258).
12378 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
12379 to pacify AIX xlc.
12380
12381 2013-04-24 Kenichi Handa <handa@gnu.org>
12382
12383 * coding.c (decode_coding_iso_2022): When an invalid escape
12384 sequence is encountered, reset the invocation and designation
12385 status to the safest one.
12386
12387 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
12388
12389 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
12390 Without this fix, "make distclean" leaves stamp-h1 behind.
12391
12392 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
12393
12394 * w32fns.c (w32_fullscreen_rect): New function to compute the
12395 window rectangle for the given fullscreen mode.
12396 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
12397 longer tunes the window size. This keeps the window's edges flush
12398 with the screen and allows the taskbar to hide itself in fullboth.
12399
12400 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
12401 window decorations and uses the entire screen.
12402
12403 * w32term.h (w32_fullscreen_rect) Add prototype.
12404 (struct w32_output): Replace normal_width, normal_height,
12405 normal_top, and normal_left members with a single normal_placement
12406 struct.
12407 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
12408 Remove macros.
12409 (FRAME_NORMAL_PLACEMENT): New macro.
12410
12411 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
12412
12413 * minibuf.c (Ftest_completion): Silence compiler warning.
12414
12415 2013-04-15 Eli Zaretskii <eliz@gnu.org>
12416
12417 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
12418 bug#14062.
12419
12420 * frame.h (WINDOW_FRAME): Protect macro and its argument with
12421 parentheses.
12422
12423 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
12424 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
12425 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
12426 parentheses where appropriate.
12427
12428 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
12429
12430 * keyboard.c (timer_start_idle): Remove no-longer-used local.
12431
12432 2013-04-14 Eli Zaretskii <eliz@gnu.org>
12433
12434 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
12435 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
12436 Mention in the doc string that setting these variables takes
12437 effect only after a call to set-window-buffer. (Bug#14200)
12438
12439 2013-04-13 Eli Zaretskii <eliz@gnu.org>
12440
12441 * indent.c (Fvertical_motion): Don't consider display strings on
12442 overlay strings as display strings on the buffer position we
12443 started from. This prevents vertical cursor motion from jumping
12444 more than one line when there's an overlay string with a display
12445 property at end of line.
12446 Reported by Karl Chen <Karl.Chen@quarl.org> in
12447 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
12448
12449 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
12450
12451 * window.c (select_window): `record_buffer' even if window is
12452 already selected (bug#14191).
12453
12454 2013-04-11 Eli Zaretskii <eliz@gnu.org>
12455
12456 * window.c (Fwindow_end): Test more flags, including the buffer's
12457 last_overlay_modified flag, to determine whether the window's
12458 display is really up-to-date. Prevents the function from
12459 returning a stale value. (Bug#14170)
12460 (Fwindow_line_height): Fix the test for up-to-date-ness of the
12461 current matrix.
12462
12463 2013-04-10 Eli Zaretskii <eliz@gnu.org>
12464
12465 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
12466 garbaged only if it is not already the top frame on its TTY.
12467 This prevents flickering due to constant redrawing of TTY frames when
12468 there are GUI frames open in the same session. (Bug#13864)
12469
12470 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
12471
12472 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
12473 of marking the idle timers directly.
12474
12475 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
12476
12477 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
12478 tables (bug#14054).
12479
12480 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
12481
12482 * window.c (select_window): Don't record_buffer while the invariant is
12483 temporarily broken (bug#14161).
12484
12485 * fns.c (Fdelq): Don't assume !NILP => CONSP.
12486
12487 2013-04-07 Eli Zaretskii <eliz@gnu.org>
12488
12489 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
12490
12491 2013-04-07 Romain Francoise <romain@orebokech.com>
12492
12493 Ignore additional platform-specific ACL errors (Bug#13702).
12494 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
12495 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
12496
12497 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
12498
12499 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
12500 f->output_data.ns.
12501
12502 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
12503
12504 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
12505 This bug was introduced by my 2013-02-25 change that simplified
12506 data_start configuration. Without this change, on GNU/Linux
12507 an Emacs configured with --enable-profiling fails immediately
12508 due to a profiler signal.
12509 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
12510 with these flags. On platforms where special flags are needed
12511 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
12512 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
12513 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
12514
12515 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
12516
12517 Get rid of some platform-specific functions examining window
12518 system and its capabilities. This is a partial rework of the
12519 2013-04-05 change.
12520 * lisp.h (have_menus_p): Remove prototype. This function is
12521 replaced with platform-independent window_system_available.
12522 (check_window_system): Move to...
12523 * frame.h (decode_window_system_frame, window_system_available):
12524 ...here, add new prototypes.
12525 * frame.c (window_system_available, decode_window_system_frame):
12526 New functions.
12527 (check_window_system): Platform-independent now.
12528 * xterm.h (x_in_use): Remove declaration.
12529 (check_x_frame):
12530 * w32term.h (check_x_frame):
12531 * nsterm.h (check_x_frame): Remove prototypes. This function
12532 is replaced with platform-independent decode_window_system_frame.
12533 * msdos.c (have_menus_p): Remove.
12534 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
12535 Remove platform-specific functions. Use check_window_system,
12536 decode_window_system_frame and check_ns_display_info where
12537 appropriate. Minor style and comment tweaks.
12538 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
12539 (check_x_frame): Likewise.
12540 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
12541 Likewise.
12542 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
12543 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
12544 * xmenu.c, xselect.c: All related users changed.
12545
12546 2013-04-03 Kenichi Handa <handa@gnu.org>
12547
12548 The following changes is to optimize the code for reading UTF-8
12549 files.
12550
12551 * coding.c (check_ascii): Rename from detect_ascii. Return value
12552 changed. Check EOL format. Do not call adjust_coding_eol_type
12553 here.
12554 (check_utf_8): New function.
12555 (adjust_coding_eol_type): Do nothing if already adjusted.
12556 (detect_coding): Compare the return value of check_ascii with
12557 coding->src_bytes. Call adjust_coding_eol_type if necessary.
12558 (decode_coding_gap): Optimize for valid UTF-8.
12559
12560 2013-03-21 Kenichi Handa <handa@gnu.org>
12561
12562 * coding.c (syms_of_coding): Cancel previous change.
12563
12564 * insdel.c (insert_from_gap): Fix previous change.
12565
12566 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
12567
12568 Consistently use platform-specific function to detect window system.
12569 * lisp.h (check_window_system): New prototype. This function is
12570 going to replace check_x, check_w32 and check_ns.
12571 (have_menus_p): Mention msdos.c in comment.
12572 * fontset.c (check_window_system_func): Remove. Adjust all users.
12573 * fontset.h (check_window_system_func): Remove prototype.
12574 * nsterm.h (check_ns):
12575 * xterm.h (check_x):
12576 * w32term.h (check_w32): Likewise.
12577 * menu.c (Fx_popup_menu): Use check_window_system.
12578 * msdos.c (check_window_system): Define for MS-DOS.
12579 * nsfns.m (check_window_system): Define for NS. Adjust all users.
12580 * w32fns.c (check_window_system): Likewise for MS-Windows.
12581 * xfns.c (check_window_system): Likewise for X.
12582 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
12583 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
12584
12585 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
12586
12587 Prefer < to > in range checks such as 0 <= i && i < N.
12588 This makes it easier to visualize quantities on a number line.
12589 This patch doesn't apply to all such range checks,
12590 only to the range checks affected by the 2013-03-24 change.
12591 This patch reverts most of the 2013-03-24 change.
12592 * alloc.c (xpalloc, Fgarbage_collect):
12593 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
12594 * character.c (string_escape_byte8):
12595 * charset.c (read_hex):
12596 * data.c (cons_to_unsigned):
12597 * dispnew.c (update_frame_1):
12598 * doc.c (Fsubstitute_command_keys):
12599 * doprnt.c (doprnt):
12600 * editfns.c (hi_time, decode_time_components):
12601 * fileio.c (file_offset):
12602 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
12603 * font.c (font_intern_prop):
12604 * frame.c (x_set_alpha):
12605 * gtkutil.c (get_utf8_string):
12606 * indent.c (check_display_width):
12607 * keymap.c (Fkey_description):
12608 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
12609 * lread.c (read1):
12610 * minibuf.c (read_minibuf_noninteractive):
12611 * process.c (wait_reading_process_output):
12612 * search.c (Freplace_match):
12613 * window.c (get_phys_cursor_glyph):
12614 * xdisp.c (redisplay_internal):
12615 * xsmfns.c (smc_save_yourself_CB):
12616 Prefer < to > for range checks.
12617 * dispnew.c (sit_for): Don't mishandle NaNs.
12618 This fixes a bug introduced in the 2013-03-24 change.
12619 * editfns.c (decode_time_components): Don't hoist comparison.
12620 This fixes another bug introduced in the 2013-03-24 change.
12621
12622 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
12623
12624 * frame.h (struct frame): Drop scroll_bottom_vpos
12625 member becaue all real users are dead long ago.
12626 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
12627 * xdisp.c (redisplay_internal): Adjust user.
12628
12629 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
12630
12631 * nsmenu.m (showAtX:Y:for:): setLevel to
12632 NSPopUpMenuWindowLevel (Bug#13998).
12633
12634 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
12635
12636 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
12637 (ns_check_pending_open_menu): Declare.
12638
12639 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
12640 (x_activate_menubar): Update the menu with title that matches
12641 ns_get_pending_menu_title, and call
12642 ns_check_pending_openmenu (Bug#12698).
12643 (menuWillOpen:): New method.
12644 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
12645
12646 * nsterm.m (menu_will_open_state, menu_mouse_point)
12647 (menu_pending_title): New varaibles.
12648 (ns_get_pending_menu_title, ns_check_menu_open)
12649 (ns_check_pending_open_menu): New functions.
12650
12651 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
12652
12653 * indent.c (current_column_bol_cache): Remove leftover which is not
12654 used in Fmove_to_column any more.
12655 (current_column, scan_for_column): Adjust users.
12656 * keyboard.c (last_point_position_buffer, last_point_position_window):
12657 Remove leftovers which are not used for recording undo any more.
12658 (command_loop_1, syms_of_keyboard): Adjust users.
12659 * xdisp.c (last_max_ascent): Remove leftover which is not used in
12660 redisplay_window any more.
12661 (move_it_to): Adjust user.
12662
12663 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
12664
12665 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
12666 Update dependencies.
12667
12668 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
12669
12670 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
12671 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
12672 forward references.
12673
12674 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
12675
12676 * window.h (struct window): Replace hchild, vchild and buffer slots
12677 with a single slot 'contents'. This is possible because each valid
12678 window may have either the child window (in vertical or horizontal
12679 combination) or buffer to display (for the leaf window). Using that,
12680 a lot of operations to traverse and/or change window hierarchies may
12681 be simplified. New member horizontal is used to distinguish between
12682 horizontal and vertical combinations of internal windows.
12683 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
12684 (WINDOW_VERTICAL_COMBINATION_P): New macros.
12685 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
12686 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
12687 Use contents slot, not buffer, where appropriate.
12688 (wset_combination): New function.
12689 (wset_buffer): Add eassert.
12690 (Fframe_first_window): Simplify the loop reaching first window.
12691 (Fwindow_buffer): Use WINDOW_LEAF_P.
12692 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
12693 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
12694 (unshow_buffer): Convert initial debugging check to eassert.
12695 (replace_window, recombine_windows, Fdelete_other_windows_internal)
12696 (make_parent_window, window_resize_check, window_resize_apply)
12697 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
12698 (Fset_window_configuration, delete_all_child_windows, save_window_save):
12699 Adjust to match struct window changes.
12700 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
12701 (mark_window_cursors_off, count_windows, get_leaf_windows)
12702 (foreach_window_1): Simplify the loop.
12703 * alloc.c (mark_object): Do not check for the leaf window because
12704 internal windows has no glyph matrices anyway.
12705 * dispnew.c (clear_window_matrices, showing_window_margins_p)
12706 (allocate_matrices_for_window_redisplay, fake_current_matrices)
12707 (allocate_matrices_for_frame_redisplay, free_window_matrices)
12708 (build_frame_matrix_from_window_tree, mirror_make_current)
12709 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
12710 (update_window_tree, set_window_update_flags): Simplify the loop.
12711 (sync_window_with_frame_matrix_rows): Enforce live window.
12712 Use contents slot, not buffer, where appropriate.
12713 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
12714 and WINDOW_HORIZONTAL_COMBINATION_P.
12715 (make_frame_visible_1): Simplify the loop.
12716 Use contents slot, not buffer, where appropriate.
12717 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
12718 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
12719 (expose_window_tree): Likewise.
12720 Use contents slot, not buffer, where appropriate.
12721 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
12722 to avoid deleted windows. Use contents slot instead of buffer.
12723 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
12724 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
12725 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
12726 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
12727
12728 2013-03-28 Eli Zaretskii <eliz@gnu.org>
12729
12730 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
12731 identify the reasons for assertion violations in bug#14062 and
12732 similar ones.
12733 (Fx_show_tip): Fix compilation error under
12734 "--enable-check-lisp-object-type". (Bug#14073)
12735
12736 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
12737 Reported by <rzl24ozi@gmail.com>.
12738
12739 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
12740
12741 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
12742 start marker...
12743 (unwind_with_echo_area_buffer): ...to restore it here.
12744 This is needed to ensure that...
12745 (redisplay_window): ...both window markers are valid here,
12746 which is verified by eassert.
12747 * editfns.c (save_excursion_save): Do not assume that
12748 selected_window always displays the buffer.
12749 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
12750 Fix comment.
12751
12752 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
12753
12754 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
12755 the upcase table.
12756
12757 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
12758
12759 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
12760
12761 2013-03-27 Eli Zaretskii <eliz@gnu.org>
12762
12763 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
12764 since MinGW's w32api headers do. This avoids compiler warnings.
12765
12766 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
12767 if already defined.
12768
12769 2013-03-26 Eli Zaretskii <eliz@gnu.org>
12770
12771 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
12772
12773 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
12774
12775 * gtkutil.c (style_changed_cb): Check if frame is live and an
12776 X frame (Bug#14038).
12777
12778 2013-03-26 Eli Zaretskii <eliz@gnu.org>
12779
12780 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
12781 Define only for _WIN32_WINNT less than 0x0500.
12782 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
12783 MinGW64.
12784 Move inclusion of time.h before sys/time.h, so that MinGW64 could
12785 see its own definitions of 'struct timeval' and 'struct timezone'.
12786
12787 Fix incompatibilities between MinGW.org and MinGW64 headers.
12788 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
12789
12790 * w32.c (REPARSE_DATA_BUFFER): Guard with
12791 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
12792
12793 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
12794
12795 * xterm.c: Include X11/XKBlib.h
12796 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
12797
12798 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
12799
12800 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
12801 written backwards.
12802 * blockinput.h (input_blocked_p): Likewise.
12803 * bytecode.c (exec_byte_code): Likewise.
12804 * callproc.c (call_process_kill, call_process_cleanup)
12805 (Fcall_process): Likewise.
12806 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
12807 (Fccl_execute_on_string): Likewise.
12808 * character.c (string_escape_byte8): Likewise.
12809 * charset.c (read_hex): Likewise.
12810 * cm.c (calccost): Likewise.
12811 * data.c (cons_to_unsigned): Likewise.
12812 * dired.c (directory_files_internal, file_name_completion):
12813 Likewise.
12814 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
12815 (sit_for): Likewise.
12816 * doc.c (Fsubstitute_command_keys): Likewise.
12817 * doprnt.c (doprnt): Likewise.
12818 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
12819 * emacsgtkfixed.c: Likewise.
12820 * fileio.c (file_offset, Fwrite_region): Likewise.
12821 * floatfns.c (Fexpt, fmod_float): Likewise.
12822 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
12823 Likewise.
12824 * font.c (font_intern_prop): Likewise.
12825 * frame.c (x_set_alpha): Likewise.
12826 * gtkutil.c (get_utf8_string): Likewise.
12827 * indent.c (check_display_width): Likewise.
12828 * intervals.c (create_root_interval, rotate_right, rotate_left)
12829 (split_interval_right, split_interval_left)
12830 (adjust_intervals_for_insertion, delete_node)
12831 (interval_deletion_adjustment, adjust_intervals_for_deletion)
12832 (merge_interval_right, merge_interval_left, copy_intervals)
12833 (set_intervals_multibyte_1): Likewise.
12834 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
12835 * keymap.c (Fkey_description): Likewise.
12836 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
12837 * lread.c (openp, read_integer, read1, string_to_number):
12838 Likewise.
12839 * menu.c (ensure_menu_items): Likewise.
12840 * minibuf.c (read_minibuf_noninteractive): Likewise.
12841 * print.c (printchar, strout): Likewise.
12842 * process.c (create_process, Faccept_process_output)
12843 (wait_reading_process_output, read_process_output, send_process)
12844 (wait_reading_process_output): Likewise.
12845 * profiler.c (make_log, handle_profiler_signal): Likewise.
12846 * regex.c (re_exec): Likewise.
12847 * regex.h: Likewise.
12848 * search.c (looking_at_1, Freplace_match): Likewise.
12849 * sysdep.c (get_child_status, procfs_ttyname)
12850 (procfs_get_total_memory): Likewise.
12851 * systime.h (EMACS_TIME_VALID_P): Likewise.
12852 * term.c (dissociate_if_controlling_tty): Likewise.
12853 * window.c (get_phys_cursor_glyph): Likewise.
12854 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
12855 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
12856 Likewise.
12857 * xfns.c (Fx_window_property): Likewise.
12858 * xmenu.c (set_frame_menubar): Likewise.
12859 * xselect.c (x_get_window_property, x_handle_dnd_message):
12860 Likewise.
12861 * xsmfns.c (smc_save_yourself_CB): Likewise.
12862 * xterm.c (x_scroll_bar_set_handle): Likewise.
12863
12864 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
12865
12866 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
12867 to be optional or nil. Adjust comment and convert it to docstring.
12868 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
12869 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
12870
12871 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
12872
12873 Static checking by GCC 4.8-20130319.
12874 * image.c (gif_load): Assume pass < 3 to pacify GCC.
12875 * process.c (Fset_process_datagram_address)
12876 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
12877 * xdisp.c (get_char_face_and_encoding)
12878 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
12879 (get_glyph_face_and_encoding): Prepare face before possibly using it.
12880 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
12881
12882 2013-03-24 Ken Brown <kbrown@cornell.edu>
12883
12884 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
12885 fix compilation on 64-bit Cygwin, where underscores are not
12886 automatically prepended.
12887
12888 * w32term.c (w32_initialize): Silence compiler warning.
12889
12890 2013-03-23 Eli Zaretskii <eliz@gnu.org>
12891
12892 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
12893 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
12894 variables, to save and restore frame dimensions.
12895 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
12896 after returning from a 'fullscreen' configuration.
12897 use SendMessage instead of PostMessage to send the SC_RESTORE message,
12898 to avoid races between the main thread and the input thread.
12899
12900 * w32term.h (struct w32_output): New members normal_width,
12901 normal_height, normal_top, normal_left, and prev_fsmode.
12902 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
12903 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
12904 members of a frame.
12905
12906 * w32term.c (w32fullscreen_hook): Record last value of the frame's
12907 'fullscreen' parameter. Always record previous width and height
12908 of the frame, except when switching out of maximized modes, so
12909 that they could be restored correctly, instead of resetting to the
12910 default frame dimensions. Send SC_RESTORE command to the frame,
12911 unless we are going to send SC_MAXIMIZE, to restore the frame
12912 resize hints in the mouse pointer shown by the window manager.
12913 (Bug#14032)
12914
12915 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
12916
12917 * lisp.h (get_frame_param): Adjust conditions for prototype
12918 declaration.
12919
12920 2013-03-22 Ken Brown <kbrown@cornell.edu>
12921
12922 * unexcw.c: Drop unneeded inclusion of w32common.h.
12923 (report_sheap_usage): Declare.
12924 (read_exe_header): Add magic numbers for x86_64.
12925 (fixup_executable): Fix printf format specifier for unsigned long
12926 argument.
12927
12928 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
12929
12930 * frame.h (struct frame): Put menu_bar_window under #ifdef
12931 because this member is not needed when X toolkit is in use.
12932 (fset_menu_bar_window):
12933 * dispnew.c (clear_current_matrices, clear_desired_matrices)
12934 (free_glyphs, update_frame):
12935 * xdisp.c (expose_frame): Likewise.
12936 (display_menu_bar): Likewise. Remove redundant eassert.
12937 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
12938 toolkit is in use.
12939
12940 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
12941
12942 Use functions and constants to manipulate Lisp_Save_Value objects.
12943 This replaces code that used macros and strings and token-pasting.
12944 The change makes the C source a bit easier to follow,
12945 and shrinks the Emacs executable a bit.
12946 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
12947 (make_save_value): Change 1st arg from string to enum. All callers
12948 changed.
12949 (INTX): Remove.
12950 (mark_object): Use if, not #if, for GC_MARK_STACK.
12951 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
12952 (XSAVE_OBJECT): Now functions, not macros.
12953 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
12954 the constant was never used.
12955 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
12956 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
12957 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
12958 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
12959 New constants.
12960 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
12961 type3 with a single member save_type. All uses changed.
12962 (save_type, set_save_pointer, set_save_integer): New functions.
12963 * print.c (PRINTX): Remove.
12964
12965 * alloc.c: Remove redundant static declarations.
12966
12967 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
12968
12969 * window.h (struct window): Convert left_col, top_line, total_lines
12970 and total_cols from Lisp_Objects to integers. Adjust comments.
12971 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
12972 Remove.
12973 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
12974 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
12975 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
12976 Adjust users where appropriate.
12977
12978 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
12979
12980 * frame.h (struct frame): Drop resx and resy because the same data is
12981 available from window system-specific output context. Adjust users.
12982 (default_pixels_per_inch_x, default_pixels_per_inch_y):
12983 New functions to provide defaults when no window system available.
12984 (FRAME_RES_X, FRAME_RES_Y): New macros.
12985 (NUMVAL): Move from xdisp.c.
12986 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
12987 (Ffont_face_attributes, Fopen_font):
12988 * image.c (gs_load):
12989 * w32font.c (fill_in_logfont):
12990 * xdisp.c (calc_pixel_width_or_height):
12991 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
12992 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
12993
12994 2013-03-20 Kenichi Handa <handa@gnu.org>
12995
12996 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
12997 to 1 (temporary workaround until a bug related to ASCII
12998 optimization is fixed).
12999
13000 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
13001
13002 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
13003 Signal error if window is not internal. Adjust docstring.
13004 (delete_all_child_windows): Use combination_limit to save the buffer.
13005 (Fset_window_configuration): Adjust accordingly.
13006 * print.c (syms_of_print): Initialize debugging output not here...
13007 (init_print_once): ...but in a new function here.
13008 * lisp.h (init_print_once): Add prototype.
13009 * emacs.c (main): Add call to init_print_once. Adjust comments.
13010
13011 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
13012
13013 * window.c (window_resize_check, window_resize_apply)
13014 (window_from_coordinates, recombine_windows, set_window_buffer)
13015 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
13016 (Fsplit_window_internal, Fdelete_window_internal)
13017 (freeze_window_starts): Use bool for booleans.
13018 * window.h (window_frame_coordinates, resize_frame_windows)
13019 (freeze_window_starts, set_window_buffer): Adjust prototypes.
13020
13021 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
13022
13023 * dispnew.c (bitch_at_user): Use `user-error'.
13024
13025 2013-03-17 Ken Brown <kbrown@cornell.edu>
13026
13027 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
13028 as return type of image_background. (Bug#13981)
13029 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
13030
13031 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
13032
13033 * nsterm.m (updateFrameSize:): Change resize increments if needed.
13034 (ns_select): Don't return with result uninitialized.
13035
13036 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
13037 and getDirectory.
13038
13039 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
13040 New functions.
13041 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
13042 directories. If filename is nil, get directory name (Bug#13932).
13043 Use getFilename and getDirectory.
13044 (getFilename, getDirectory): New methods for EmacsSavePanel and
13045 EmacsOpenPanel.
13046 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
13047
13048 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
13049
13050 * coding.c (decode_coding_gap): Fix typo caught by static checking.
13051
13052 2013-03-15 Kenichi Handa <handa@gnu.org>
13053
13054 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
13055 (adjust_after_replace): Make it back to static. Delete the third
13056 arg text_at_gap_tail. Cancel the code for handling it.
13057
13058 * coding.h (struct coding_system): New member eol_seen.
13059
13060 * coding.c (detect_ascii): New function.
13061 (detect_coding): Set coding->head_ascii and coding->eol_seen only
13062 when the source bytes are actually scanned. On detecting for
13063 coding_category_utf_8_auto, call detect_ascii instead of scanning
13064 source bytes directly.
13065 (produce_chars): Call insert_from_gap with the new arg 0.
13066 (encode_coding): Likewise.
13067 (decode_coding_gap): Control ASCII optimization by the variable
13068 disable_ascii_optimization instead of #ifndef .. #endif.
13069 Deccode EOL format according to coding->eol_seen.
13070 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
13071 variable.
13072
13073 * lisp.h (adjust_after_replace): Cancel externing it.
13074 (insert_from_gap): Adjust prototype.
13075
13076 2013-03-15 Eli Zaretskii <eliz@gnu.org>
13077
13078 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
13079 FULLSCREEN_MAXIMIZED. (Bug#13935)
13080
13081 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
13082
13083 * region-cache.c (find_cache_boundary, move_cache_gap)
13084 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
13085 Simplify debugging check and convert to eassert. Adjust comment.
13086 (pp_cache): Put under ENABLE_CHECKING.
13087
13088 2013-03-14 Eli Zaretskii <eliz@gnu.org>
13089
13090 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
13091 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
13092 and WM_ACTIVATEAPP.
13093 (w32fullscreen_hook): If the frame is visible, reset
13094 f->want_fullscreen flag after changing the frame size. If the
13095 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
13096 (Bug#13953)
13097
13098 2013-03-13 Daniel Colascione <dancol@dancol.org>
13099
13100 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
13101 too so that these builds can use Cygwin's file conversion
13102 functions. (We've been building and linking cygw32.o all along
13103 and just not using it.)
13104
13105 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
13106
13107 File synchronization fixes (Bug#13944).
13108 * Makefile.in (LIB_FDATASYNC): New macro.
13109 (LIBES): Use it.
13110 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
13111 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
13112 Don't worry about HAVE_FSYNC, since a substitute fsync is
13113 available if the system lacks one.
13114 (Fwrite_regin): Retry fsync if interrupted.
13115
13116 2013-03-13 Eli Zaretskii <eliz@gnu.org>
13117
13118 * w32term.c (w32_read_socket): If the Emacs frame is being
13119 activated, call w32fullscreen_hook, to make sure the new frame
13120 dimensions are in effect. (Bug#13937)
13121
13122 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
13123
13124 * xdisp.c (init_iterator): Simplify because both character and byte
13125 positions are either specified or -1. Add eassert. Adjust comment.
13126 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
13127 character and byte positions can be obtained from marker.
13128
13129 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
13130
13131 Static checking by Sun C 5.12.
13132 * alloc.c (buffer_memory_full) [REL_ALLOC]:
13133 * bytecode.c (exec_byte_code):
13134 * dispnew.c (init_display):
13135 * eval.c (error):
13136 * fileio.c (Fsubstitute_in_file_name):
13137 * keyboard.c (Fevent_convert_list):
13138 * keymap.c (Fsingle_key_description):
13139 * term.c (maybe_fatal, fatal):
13140 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
13141 * xsmfns.c (Fhandle_save_session):
13142 Omit unreachable code.
13143 * keymap.c (map_keymap_char_table_item): Cast void * to
13144 a function pointer type; the C Standard requires this.
13145
13146 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
13147 Include <sys/param.h> unconditionally, as that works elsewhere and
13148 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
13149 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
13150 and FreeBSD now.
13151
13152 See ChangeLog.12 for earlier changes.
13153
13154 ;; Local Variables:
13155 ;; coding: utf-8
13156 ;; End:
13157
13158 Copyright (C) 2011-2014 Free Software Foundation, Inc.
13159
13160 This file is part of GNU Emacs.
13161
13162 GNU Emacs is free software: you can redistribute it and/or modify
13163 it under the terms of the GNU General Public License as published by
13164 the Free Software Foundation, either version 3 of the License, or
13165 (at your option) any later version.
13166
13167 GNU Emacs is distributed in the hope that it will be useful,
13168 but WITHOUT ANY WARRANTY; without even the implied warranty of
13169 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13170 GNU General Public License for more details.
13171
13172 You should have received a copy of the GNU General Public License
13173 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.