aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorTom Tromey2012-12-17 07:56:22 -0700
committerTom Tromey2012-12-17 07:56:22 -0700
commit3d6eced1ae51ffd0a782130e7c334052277e2724 (patch)
tree5d1d2ad7cd3374f922886c4a72062511a035c168 /src/ChangeLog
parentbf69f522a9e135f9aa483cedd53e71e915f2bf75 (diff)
parent7c3d167f48d6262ee4e5512aa50a07ee96bc1509 (diff)
downloademacs-3d6eced1ae51ffd0a782130e7c334052277e2724.tar.gz
emacs-3d6eced1ae51ffd0a782130e7c334052277e2724.zip
merge from trunk
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog4437
1 files changed, 4415 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a8d6a4026a0..3cf105c8003 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,4396 @@
12012-12-16 Romain Francoise <romain@orebokech.com>
2
3 * fileio.c (Ffile_acl, Fset_file_acl): New functions.
4 (Fcopy_file): Change last arg to `preserve_extended_attributes'
5 and copy ACL entries of file in addition to SELinux context if
6 set.
7 (syms_of_fileio): Add `file-acl' and `set-file-acl'.
8
9 * Makefile.in (LIBACL_LIBS): New macro.
10 (LIBES): Use it.
11
122012-12-15 Paul Eggert <eggert@cs.ucla.edu>
13
14 * fileio.c (internal_delete_file): Use bool for boolean.
15
162012-12-15 Eli Zaretskii <eliz@gnu.org>
17
18 Fix bug #13079 on MS-Windows with temp files not being deleted.
19 * w32.h (_child_process): New members input_file and
20 pending_deletion.
21 (register_child): First argument is now pid_t.
22 (record_infile, record_pending_deletion): New prototypes.
23
24 * w32proc.c (new_child): Initialize input_file and
25 pending_deletion members of the child.
26 (delete_child): Delete the child's temporary input file, if any,
27 that is pending deletion.
28 (register_child): First argument is now pid_t.
29 (record_infile, record_pending_deletion): New functions.
30 (reap_subprocess): Fix a typo in DebPrint string.
31 (sys_spawnve, sys_kill): Use pid_t for PID arguments.
32
33 * fileio.c (internal_delete_file): Return an int again: non-zero
34 if delete-file succeeds, zero otherwise.
35
36 * lisp.h (internal_delete_file): Adjust prototype.
37
38 * callproc.c (Fcall_process): Don't overwrite infile with result
39 of DECODE_FILE.
40 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
41 asynchronous subprocess, record the name of the input file name,
42 if any.
43 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
44 delete the file, record it as pending deletion when the subprocess
45 exits.
46
472012-12-14 Eli Zaretskii <eliz@gnu.org>
48
49 * editfns.c [HAVE_PWD_H]: Include grp.h.
50
51 * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
52
532012-12-14 Paul Eggert <eggert@cs.ucla.edu>
54
55 Fix permissions bugs with setgid directories etc. (Bug#13125)
56 * dired.c (Ffile_attributes): Return t as the 9th attribute,
57 to mark it as a placeholder. The old value was often wrong.
58 The only user of this attribute has been changed to use
59 file-ownership-preserved-p instead, with its new group arg.
60 * editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.
61
622012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
63
64 * xdisp.c (select_frame_for_redisplay, display_mode_lines):
65 Keep selected_window and selected_frame in sync.
66
672012-12-14 Eli Zaretskii <eliz@gnu.org>
68
69 * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
70 try to get accurate owner and group information from NT file
71 security APIs. This is to make most callers of 'stat' and
72 'lstat', which don't need that information, much faster.
73
74 * dired.c (Ffile_attributes) [WINDOWSNT]:
75 Set w32_stat_get_owner_group to a non-zero value, to request accurate
76 owner and group information from 'lstat'.
77
782012-12-13 Paul Eggert <eggert@cs.ucla.edu>
79
80 * fileio.c (Finsert_file_contents): Don't put tail into head area,
81 as that confuses set-auto-coding, so insist on the head-read
82 returning the full 1024 bytes. Let lseek compute the tail offset;
83 less work for us. Do not ignore I/O errors when reading the tail.
84
85 * xdisp.c: Minor style fixes.
86 (init_iterator): Hoist assignment out of if-expression.
87 (markpos_of_region): Callers now test for sign, not for -1.
88
892012-12-13 Dmitry Antipov <dmantipov@yandex.ru>
90
91 Minor redisplay optimization when the region length is zero.
92 * xdisp.c (markpos_of_region): New function.
93 (init_iterator): Do not highlight the region of zero length.
94 (redisplay_window): Check whether the region is of non-zero length.
95 (try_cursor_movement): Allow if the region length is zero.
96 (try_window_reusing_current_matrix, try_window_id): Likewise.
97
982012-12-13 Eli Zaretskii <eliz@gnu.org>
99
100 * search.c (search_buffer): Check the inverse translations of each
101 character in pattern when the buffer being searched is unibyte.
102 (Bug#13084)
103
1042012-12-13 Paul Eggert <eggert@cs.ucla.edu>
105
106 * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
107 files, fixing a regression from 24.2.
108 (Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
109
1102012-12-13 Paul Eggert <eggert@cs.ucla.edu>
111
112 * fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
113 fstat shouldn't fail, and if it does fail copy-file should not proceed.
114 Remove unnecessary S_ISLNK test, as (contra the comments) this
115 function can't copy symlinks. Improve quality of error message
116 when attempting to copy files that are neither regular files nor
117 directories.
118
1192012-12-12 Dmitry Antipov <dmantipov@yandex.ru>
120
121 * dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
122 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
123 * window.c (Frecenter):
124 * xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
125 * xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.
126
1272012-12-12 Daniel Colascione <dancol@dancol.org>
128
129 * unexcw.c (fixup_executable): use posix_fallocate to ensure that
130 the dumped Emacs is not a sparse file, greatly improving Cygwin
131 "make bootstrap" performance.
132
1332012-12-11 Michael Albinus <michael.albinus@gmx.de>
134
135 * inotify.c (inotify_callback): Generate an Emacs event for every
136 incoming inotify event.
137
1382012-12-11 Eli Zaretskii <eliz@gnu.org>
139
140 * xdisp.c (handle_face_prop): Fix logic of computing
141 it->start_of_box_run_p.
142 (append_space_for_newline): If the glyph row is R2L, reset the
143 iterator's end_of_box_run_p flag before prepending the space glyph.
144 (extend_face_to_end_of_line): If the glyph row is R2L, reset the
145 iterator's start_of_box_run_p flag before prepending the stretch.
146 (append_glyph, produce_image_glyph, append_composite_glyph)
147 (append_stretch_glyph, append_glyphless_glyph): Reverse the
148 left_box_line_p and right_box_line_p flags of the glyph for R2L
149 glyph rows. (Bug#13011)
150
1512012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
152
153 * buffer.c (Fset_buffer_multibyte): Do not force redisplay
154 if changed buffer is not shown in a window.
155 * insdel.c (prepare_to_modify_buffer): Likewise.
156 * window.c (replace_buffer_in_windows_safely): Do nothing
157 if buffer is not shown in a window.
158 (Fforce_window_update): Likewise if string or buffer argument
159 is passed.
160
1612012-12-11 Eli Zaretskii <eliz@gnu.org>
162
163 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
164 encoded_file_name, which is what it is.
165
1662012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
167
168 Consistently use marker_position and marker_byte_position.
169 * fringe.c (Ffringe_bitmaps_at_pos):
170 * indent.c (Fvertical_motion):
171 * insdel.c (prepare_to_modify_buffer):
172 * keyboard.c (make_lispy_position):
173 * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
174 (window_scroll_pixel_based, displayed_window_lines)
175 (Fset_window_configuration):
176 * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
177 (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
178 Replace direct access to marker fields with calls
179 to marker_position and/or marker_byte_position.
180
1812012-12-11 Juanma Barranquero <lekktu@gmail.com>
182
183 * makefile.w32-in (SIG2STR_H): New macro.
184 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
185 ($(BLD)/w32notify.$(O)): Update dependencies.
186
1872012-12-10 Daniel Colascione <dancol@dancol.org>
188
189 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
190 Windows file notification functionality unless WINDOWSNT.
191
192 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
193 declarations.
194
195 * w32fns.c (cache_system_info): Initialize the global hinst
196 variable here so various initialization calls DTRT.
197
198 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused
199 variables.
200 (hinst): Remove unneeded extern declaration.
201 (_start): Remove initialization of above variables; remove
202 initialization of hinst, as cache_system_info now does that.
203
204 * emacs.c (main): Call cache_system_info early in startup; we
205 previously weren't calling it in Cygwin builds.
206
207 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
208 Teach the autoconf build system how to compile a Windows resource file
209 and link it to Emacs.
210
2112012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
212
213 Per-buffer window counters.
214 * buffer.h (struct buffer): New member window_count.
215 (buffer_window_count): New function.
216 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
217 Initialize window_count.
218 (Fkill_buffer): Verify window_count for the buffer being killed.
219 (modify_overlay): Do not force redisplay if buffer is not shown
220 in any window.
221 (init_buffer_once): Initialize window_count for buffer_defaults
222 and buffer_local_symbols.
223 * window.h (buffer_shared): Remove declaration.
224 (wset_buffer): Convert from inline ...
225 * window.c (wset_buffer): ... to an ordinary function.
226 (adjust_window_count): New function.
227 (make_parent_window): Use it.
228 * xdisp.c (buffer_shared): Remove.
229 (redisplay_internal, redisplay_window): Adjust users.
230 (buffer_shared_and_changed): Use per-buffer window counter.
231
2322012-12-10 Eli Zaretskii <eliz@gnu.org>
233
234 Support for filesystem notifications on MS-Windows.
235 * w32proc.c (sys_select): If drain_message_queue returns non-zero,
236 and this is a TTY frame, signal the caller that keyboard input is
237 available.
238
239 * w32xfns.c (drain_message_queue): Now returns an int: an
240 indication whether any WM_EMACS_FILENOTIFY messages were found in
241 the queue.
242
243 * w32inevt.c (handle_file_notifications): New function.
244 (w32_console_read_socket): Call it to process file notifications.
245
246 * w32console.c (initialize_w32_display): Record the main thread ID
247 in dwMainThreadId.
248
249 * deps.mk (inotify.o): New dependency list.
250
251 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
252
253 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
254 (WM_EMACS_END): Bump value by 1.
255 (notification_buffer_in_use, file_notifications)
256 (notifications_size, notifications_desc): Declare.
257 (w32_get_watch_object, lispy_file_action, globals_of_w32notify):
258 Add prototypes.
259
260 * w32term.c (lispy_file_action, queue_notifications): New functions.
261 (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
262 <Qrenamed_to>: New symbols.
263 (w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.
264
265 * w32notify.c: New file, implements file event notifications for
266 MS-Windows.
267
268 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
269 by posting it to the w32_read_socket queue.
270
271 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support
272 FILE_NOTIFY_EVENT.
273
274 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
275 (GLOBAL_SOURCES): Add w32notify.c
276 ($(BLD)/w32notify.$(O)): New set of dependencies.
277
278 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
279
280 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]: Handle
281 FILE_NOTIFY_EVENT.
282 (syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
283 (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
284 w32notify-handle-event by default.
285
286 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
287 syms_of_w32notify.
288
2892012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
290
291 Support for filesystem notifications on GNU/Linux via inotify.
292 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add
293 FILE_NOTIFY_EVENT.
294
295 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
296
297 * keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
298 (syms_of_keyboard): DEFSYM it.
299 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
300 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
301 Qfile_inotify events.
302 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
303 special-event-map to inotify-handle-event.
304
305 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
306
307 * Makefile.in (base_obj): Add inotify.o.
308
309 * inotify.c: New file.
310
3112012-12-10 Jan Djärv <jan.h.d@swipnet.se>
312
313 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
314
3152012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
316
317 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
318 DWORD_PTR, for compatibility with 64-bit builds.
319
320 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
321 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
322 (system_process_attributes): Use SIZE_T rather than DWORD, for
323 compatibility with 64-bit builds.
324
3252012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
326
327 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
328
3292012-12-10 Eli Zaretskii <eliz@gnu.org>
330
331 * indent.c (Fvertical_motion): If a display string will be
332 displayed on the left or the right margin, don't consider it as a
333 factor in cursor positioning. (Bug#13108)
334
3352012-12-10 Martin Rudalics <rudalics@gmx.at>
336
337 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
338
3392012-12-10 Paul Eggert <eggert@cs.ucla.edu>
340
341 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
342 for string length.
343
3442012-12-08 Eli Zaretskii <eliz@gnu.org>
345
346 * w32.c (unsetenv): Return 0 if the input string is too long.
347
3482012-12-08 Paul Eggert <eggert@cs.ucla.edu>
349
350 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
351 * alloc.c (xputenv): New function.
352 * dbusbind.c (Fdbus_init_bus):
353 * emacs.c (main):
354 * xterm.c (x_term_init):
355 Use xputenv instead of setenv or putenv, to detect memory exhaustion.
356 * editfns.c (initial_tz): Move static var decl up.
357 (tzvalbuf_in_environ): New static var.
358 (init_editfns): Initialize these two static vars.
359 (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
360 Save old TZ value on stack, if it's small.
361 (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
362 instead, use xputenv+unsetenv to set and restore TZ.
363 (environbuf): Remove static var. All uses removed.
364 (Fset_time_zone_rule): Do not save TZ and environ;
365 no longer needed here.
366 (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
367 Move to inside set_time_zone_rule; they don't need file scope any more.
368 (set_time_zone_rule): Maintain the TZ=value string separately.
369 (syms_of_editfns): Don't initialize initial_tz;
370 init_editfns now does it.
371 * emacs.c (dump_tz) [HAVE_TZSET]: Now const.
372 * lisp.h (xputenv): New decl.
373
3742012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
375
376 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
377
3782012-12-08 Eli Zaretskii <eliz@gnu.org>
379
380 * w32.c (unsetenv, sys_putenv): New functions.
381
3822012-12-08 Chong Yidong <cyd@gnu.org>
383
384 * editfns.c (Finsert_char): Make the error message more
385 informative (Bug#12992).
386
3872012-12-08 Paul Eggert <eggert@cs.ucla.edu>
388
389 Simplify get_lim_data.
390 * vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
391 Remove USG and vlimit methods; no longer used these days.
392 Add #error catchall just in case.
393
394 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
395 Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
396 SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
397 * process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
398 (deleted_pid_list, Fdelete_process, create_process)
399 (record_child_status_change, handle_child_signal, deliver_child_signal)
400 (init_process_emacs, syms_of_process):
401 Assume SIGCHLD is defined.
402 (parse_signal): Remove. All uses removed.
403 (abbr_to_signal): New static function.
404 (Fsignal_process): Use it to convert signal names to ints.
405 * sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
406 kill (getpgrp (), ...).
407 (emacs_sigaction_init): Assume SIGCHLD is defined.
408 (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
409 SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more.
410 * syssignal.h (EMACS_KILLPG): Remove.
411 All uses replaced by 'kill' with a negative pid.
412 (SIGCHLD): Remove definition, as we now assume SIGCHLD.
413 * w32proc.c (sys_kill): Support negative pids compatibly with POSIX.
414
4152012-12-07 Paul Eggert <eggert@cs.ucla.edu>
416
417 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
418 This will cause a production Emacs to dump core instead of
419 infinite-looping.
420
4212012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
422
423 * frame.c (make_frame): Do not set window's buffer to t.
424 * window.c (Fsplit_window_internal): Likewise. Previously it was
425 used to indicate that the window is being set up. Now we use
426 set_window_buffer for all new windows, so the condition in ...
427 (Fset_window_buffer): ... is always true and can be removed.
428
4292012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
430
431 Convenient macro to check whether the buffer is hidden.
432 * buffer.h (BUFFER_HIDDEN_P): New macro.
433 * frame.c (make_frame): Use it. Adjust comment.
434 * buffer.c (candidate_buffer): New function.
435 (Fother_buffer, other_buffer_safely): Use it.
436
4372012-12-06 Eli Zaretskii <eliz@gnu.org>
438
439 * w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
440 if the child process is still running. Instead, exit the wait
441 loop and return zero. (Bug#13086)
442
4432012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
444
445 * frame.h (x_char_width, x_char_height): Remove prototypes.
446 * w32term.h (x_char_width, x_char_height): Likewise.
447 * xfns.c (x_char_width, x_char_height): Remove.
448 * w32fns.c (x_char_width, x_char_height): Likewise.
449 * nsfns.c (x_char_width, x_char_height): Likewise.
450 * frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
451 all window frames.
452 (Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
453 * keyboard.c (command_loop_1): Remove prototype.
454 (command_loop_2, top_level_1): Add static to match prototype.
455
4562012-12-06 Paul Eggert <eggert@cs.ucla.edu>
457
458 Fix a recently-introduced delete-process race condition.
459 * callproc.c, process.h (record_kill_process):
460 New function, containing part of the old call_process_kill.
461 (call_process_kill): Use it.
462 This does not change call_process_kill's behavior.
463 * process.c (Fdelete_process): Use record_kill_process to fix a
464 race condition that could cause Emacs to lose track of a child.
465
4662012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
467
468 Avoid code duplication between prev_frame and next_frame.
469 * frame.c (candidate_frame): New function. Add comment.
470 (prev_frame, next_frame): Use it. Adjust comment.
471
4722012-12-06 Eli Zaretskii <eliz@gnu.org>
473
474 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
475 fails, signal an error instead of continuing with an empty
476 string. (Bug#13079)
477 Encode expanded temp file pattern before passing it to mkstemp or
478 mktemp.
479
480 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
481 Encode the file name before passing it to dostounix_filename, in
482 case it will downcase it (under w32-downcase-file-names).
483 (Bug#12933)
484
4852012-12-05 Paul Eggert <eggert@cs.ucla.edu>
486
487 Minor call-process cleanups.
488 * callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
489 at the same time as other platforms, to simplify analysis.
490 No need for fd0_volatile since we have synch_process_fd.
491 Avoid needless emacs_close; arg is always negative.
492
4932012-12-04 Andreas Schwab <schwab@linux-m68k.org>
494
495 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
496 processes.
497
4982012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
499
500 * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
501 member. Adjust users. Convert mouse_face_past_end, mouse_face_defer
502 and mouse_face_hidden members to a bitfields.
503 * frame.h (struct frame): Remove set-but-not-used space_width member.
504 (FRAME_SPACE_WIDTH): Remove.
505 * nsterm.m, w32term.c, xterm.c: Adjust users.
506 * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
507 member. Adjust users. Convert term_initted, delete_in_insert_mode,
508 costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
509 members to a bitfields.
510
5112012-12-03 Paul Eggert <eggert@cs.ucla.edu>
512
513 Don't let call-process be a zombie factory (Bug#12980).
514 Fixing this bug required some cleanup of the signal-handling code.
515 As a side effect, this change also fixes a longstanding rare race
516 condition whereby Emacs could mistakenly kill unrelated processes,
517 and it fixes a bug where a second C-g does not kill a recalcitrant
518 synchronous process in GNU/Linux and similar platforms.
519 The patch should also fix the last vestiges of Bug#9488,
520 a bug which has mostly been fixed on the trunk by other changes.
521 * callproc.c, process.h (synch_process_alive, synch_process_death)
522 (synch_process_termsig, sync_process_retcode):
523 Remove. All uses removed, to simplify analysis and so that
524 less consing is done inside critical sections.
525 * callproc.c (call_process_exited): Remove. All uses replaced
526 with !synch_process_pid.
527 * callproc.c (synch_process_pid, synch_process_fd): New static vars.
528 These take the role of what used to be in unwind-protect arg.
529 All uses changed.
530 (block_child_signal, unblock_child_signal):
531 New functions, to avoid races that could kill innocent-victim processes.
532 (call_process_kill, call_process_cleanup, Fcall_process): Use them.
533 (call_process_kill): Record killed processes as deleted, so that
534 zombies do not clutter up the system. Do this inside a critical
535 section, to avoid a race that would allow the clutter.
536 (call_process_cleanup): Fix code so that the second C-g works again
537 on common platforms such as GNU/Linux.
538 (Fcall_process): Create the child process in a critical section,
539 to fix a race condition. If creating an asynchronous process,
540 record it as deleted so that zombies do not clutter up the system.
541 Do unwind-protect for WINDOWSNT too, as that's simpler in the
542 light of these changes. Omit unnecessary call to emacs_close
543 before failure, as the unwind-protect code does that.
544 * callproc.c (call_process_cleanup):
545 * w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
546 * process.c (record_deleted_pid): New function, containing
547 code refactored out of Fdelete_process.
548 (Fdelete_process): Use it.
549 (process_status_retrieved): Remove. All callers changed to use
550 child_status_change.
551 (record_child_status_change): Remove, folding its contents into ...
552 (handle_child_signal): ... this signal handler. Now, this
553 function is purely a handler for SIGCHLD, and is not called after
554 a synchronous waitpid returns; the synchronous code is moved to
555 wait_for_termination. There is no need to worry about reaping
556 more than one child now.
557 * sysdep.c (get_child_status, child_status_changed): New functions.
558 (wait_for_termination): Now takes int * status and bool
559 interruptible arguments, too. Do not record child status change;
560 that's now the caller's responsibility. All callers changed.
561 Reimplement in terms of get_child_status.
562 (wait_for_termination_1, interruptible_wait_for_termination):
563 Remove. All callers changed to use wait_for_termination.
564 * syswait.h: Include <stdbool.h>, for bool.
565 (record_child_status_change, interruptible_wait_for_termination):
566 Remove decls.
567 (record_deleted_pid, child_status_changed): New decls.
568 (wait_for_termination): Adjust to API changes noted above.
569
570 * bytecode.c, lisp.h (Qbytecode): Remove.
571 No longer needed after 2012-11-20 interactive-p changes.
572
5732012-12-03 Eli Zaretskii <eliz@gnu.org>
574
575 * xdisp.c (redisplay_window): If the cursor is visible, but inside
576 the scroll margin, move point outside the margin. (Bug#13055)
577
5782012-12-03 Jan Djärv <jan.h.d@swipnet.se>
579
580 * gtkutil.c (my_log_handler): New function.
581 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
582
5832012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
584
585 * lisp.h (modify_region): Rename to...
586 (modify_region_1): ...new prototype.
587 * textprop.c (modify_region): Now static. Adjust users.
588 * insdel.c (modify_region): Rename to...
589 (modify_region_1): ...new function to work with current buffer.
590 Adjust comment and users. Use true and false for booleans.
591
5922012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
593
594 * alloc.c (free_save_value): New function.
595 (safe_alloca_unwind): Use it.
596 * lisp.h (free_save_value): New prototype.
597 * editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
598 Add comment.
599 (save_excursion_restore): Adjust to match saved data structure.
600 Use free_save_value to offload some work from GC. Drop obsolete
601 #if 0 code.
602
6032012-12-03 Chong Yidong <cyd@gnu.org>
604
605 * fileio.c (Vauto_save_list_file_name): Doc fix.
606
6072012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
608
609 * w32fns.c: Remove prototype of atof.
610 (syspage_mask): Declared DWORD_PTR, for compatibility with 64-bit
611 builds.
612 (file_dialog_callback): Declared UINT_PTR.
613
614 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
615 with 64-bit builds.
616
617 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
618 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
619 defined.
620
6212012-12-03 Glenn Morris <rgm@gnu.org>
622
623 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
624
6252012-12-02 Paul Eggert <eggert@cs.ucla.edu>
626
627 Fix xpalloc confusion after memory is exhausted.
628 * alloc.c (xpalloc): Comment fix.
629 * charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
630 and signals an error, do not clear charset_table_size, as
631 charset_table is still valid.
632 * doprnt.c (evxprintf): Clear *BUF after freeing it.
633
634 Use execve to avoid need to munge environ (Bug#13054).
635 * callproc.c (Fcall_process):
636 * process.c (create_process):
637 Don't save and restore environ; no longer needed.
638 * callproc.c (child_setup):
639 Use execve, not execvp, to preserve environ.
640
6412012-12-01 Paul Eggert <eggert@cs.ucla.edu>
642
643 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
644
6452012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
646
647 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
648 display for sliced images (Bug#10500).
649
650 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
651
6522012-11-30 Juanma Barranquero <lekktu@gmail.com>
653
654 * doc.c (Fdocumentation): Re-add handling of function-documentation,
655 accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).
656
6572012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
658
659 * xdisp.c (window_outdated): Remove eassert since it hits
660 some suspicious corner cases (see Bug#13007 and Bug#13012).
661 (mode_line_update_needed): New function.
662 (redisplay_internal, redisplay_window): Use it.
663 (ensure_selected_frame): New function.
664 (redisplay_internal, unwind_redisplay): Use it.
665 (redisplay_internal): Move comment about buffer_shared...
666 (buffer_shared_and_changed): ...near to its real use.
667
6682012-11-29 Paul Eggert <eggert@cs.ucla.edu>
669
670 * callproc.c (Fcall_process): Don't misreport vfork failure.
671
6722012-11-28 Paul Eggert <eggert@cs.ucla.edu>
673
674 * callproc.c (Fcall_process): Fix vfork portability problems.
675 Do not assume that fd[0], count, filefd, and save_environ survive
676 vfork. Fix bug whereby wrong errno value could be reported for
677 pipe failure. Some minor cleanups, too, as follows. Move buf and
678 bufsize to the context where they're needed. Change new_argv to
679 be of type char **, as this is more convenient and avoids casts.
680 (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
681 Now local constants, not macros.
682
6832012-11-18 Kenichi Handa <handa@gnu.org>
684
685 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
686 for the variable "f".
687
6882012-11-13 Kenichi Handa <handa@gnu.org>
689
690 * font.c (font_unparse_xlfd): Exclude special characters from the
691 generating XLFD name.
692
6932012-11-27 Paul Eggert <eggert@cs.ucla.edu>
694
695 Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
696 * dired.c (stat_uname, stat_gname):
697 * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
698
699 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
700 * dired.c (directory_files_internal, file_name_completion):
701 Assume EAGAIN and EINTR are defined.
702
703 * fileio.c (Fcopy_file): Assume EISDIR is defined.
704 * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
705 * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
706 * lread.c (readbyte_from_file): Assume EINTR is defined.
707 * process.c (wait_reading_process_output, send_process) [subprocesses]:
708 Assume EIO and EAGAIN are defined.
709 * unexcoff.c (write_segment): Assume EFAULT is defined.
710
7112012-11-27 Eli Zaretskii <eliz@gnu.org>
712
713 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
714 (Bug#11964)
715
716 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
717 highlighting on the frame was cleared. Prevents assertion
718 violations when repeatedly clicking on the "Top" link of the
719 "bread-crumbs" in Info buffers.
720
7212012-11-25 Paul Eggert <eggert@cs.ucla.edu>
722
723 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
724
7252012-11-24 Ken Brown <kbrown@cornell.edu>
726
727 * keyboard.c (HAVE_MOUSE):
728 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
729 were always defined.
730
7312012-11-24 Eli Zaretskii <eliz@gnu.org>
732
733 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
734 between bpos_covered and bpos_max. This fixes cursor display when
735 several display strings follow each other.
736
737 * .gdbinit (pgx): If the glyph's object is a string, display the
738 pointer to string data, rather than the value of the string object
739 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
740
741 * indent.c (Fvertical_motion): If the starting position is covered
742 by a display string, return to one position before that, to avoid
743 overshooting it inside move_it_to. (Bug#12930)
744
7452012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
746
747 * frame.h (struct frame): Remove display_preempted member
748 since all users are dead long ago.
749 * nsterm.h (struct x_output): Use the only dummy member.
750 * w32menu.c (pending_menu_activation): Remove since not
751 really used.
752 (set_frame_menubar): Adjust user.
753 * w32term.h (struct x_output): Drop outdated #if 0 code.
754 (struct w32_output): Use bitfields for explicit_parent,
755 asked_for_visible and menubar_active members.
756 Drop unused pending_menu_activation member.
757 * xterm.h (struct x_output): Drop outdated #if 0 code.
758 Use bitfields for explicit_parent, asked_for_visible,
759 has_been_visible and net_wm_state_hidden_seen members.
760
7612012-11-23 Eli Zaretskii <eliz@gnu.org>
762
763 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
764 of a literal "/". (Bug#12955)
765 (gl-stamp): Invoke fc.exe directly, not through cmd.
766
7672012-11-23 Paul Eggert <eggert@cs.ucla.edu>
768
769 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
770 * dired.c: Assume HAVE_DIRENT_H.
771 (NAMLEN): Remove, replacing with ...
772 (dirent_namelen): New function. All uses changed. Use the GNU macro
773 _D_EXACT_NAMELEN if available, as it's faster than strlen.
774 (DIRENTRY): Remove, replacing all uses with 'struct dirent'.
775 (DIRENTRY_NONEMPTY): Remove. All callers now assume it's nonzero.
776 * makefile.w32-in (DIR_H): Remove. All uses replaced with
777 $(NT_INC)/dirent.h.
778 ($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
779 * ndir.h: Rename to ../nt/inc/dirent.h.
780 * sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
781 Do not include <dirent.h>; no longer needed.
782 * w32.c: Include <dirent.h> rather than "ndir.h".
783
7842012-11-23 Chong Yidong <cyd@gnu.org>
785
786 * xftfont.c (xftfont_open): Remove duplicate assignment.
787
7882012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
789
790 * alloc.c (Fgarbage_collect): Unblock input after clearing
791 gc_in_progress to avoid note_mouse_highlight glitch with GC.
792 * frame.h (FRAME_MOUSE_UPDATE): New macro.
793 * msdos.c (IT_frame_up_to_date): Use it here...
794 * w32term.c (w32_frame_up_to_date): ...here...
795 * xterm.c (XTframe_up_to_date): ...and here...
796 * nsterm.m (ns_frame_up_to_date): ...but not here.
797 * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
798 Adjust users.
799 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
800 Do not check whether GC is in progress.
801
8022012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
803
804 * xdisp.c (window_buffer_changed): New function.
805 (update_menu_bar, update_tool_bar): Use it to
806 simplify large 'if' statements.
807 (redisplay_internal): Generalize commonly used
808 'tail' and 'frame' local variables.
809
8102012-11-22 Eli Zaretskii <eliz@gnu.org>
811
812 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
813 with Windows system header.
814
8152012-11-21 Paul Eggert <eggert@cs.ucla.edu>
816
817 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
818 * alloc.c: Assume unistd.h exists.
819 * fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
820 * sysdep.c (get_current_dir_name): Assume getcwd exists.
821 (getwd) [USG]: Remove; no longer needed.
822 (sys_subshell) [DOS_NT]: Use getcwd, not getwd.
823 * w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
824 * w32.h (getcwd): Remove decl.
825
8262012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
827
828 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
829 Make it set selected_window as well.
830 (update_tool_bar): Use it.
831
8322012-11-21 Ken Brown <kbrown@cornell.edu>
833
834 * emacs.c (main): Set the G_SLICE environment variable for all
835 Cygwin builds, not just GTK builds. See
836 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
837
8382012-11-21 Eli Zaretskii <eliz@gnu.org>
839
840 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
841 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
842 Define for the MSVC compiler.
843
844 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
845
846 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
847 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
848 dostounix_filename. Prevents crashes down the road, because
849 dostounix_filename assumes it gets a unibyte string.
850 Reported by Michel de Ruiter <michel@sentient.nl>, see
851 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
852
8532012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
854
855 Conflate Qnil and Qunbound for `symbol-function'.
856 * alloc.c (Fmake_symbol): Initialize `function' to Qnil.
857 * lread.c (init_obarray): Set `function' fields to Qnil.
858 * eval.c (Fcommandp): Ignore Qunbound.
859 (Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
860 * data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
861 Test NILP rather than Qunbound.
862 (Ffmakunbound): Set to Qnil.
863 (Fsymbol_function): Never signal an error.
864 (Finteractive_form): Ignore Qunbound.
865
8662012-11-20 Paul Eggert <eggert@cs.ucla.edu>
867
868 * eval.c (interactive_p): Remove no-longer-used decl.
869
8702012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
871
872 * xdisp.c (buffer_shared): Adjust comment.
873 (buffer_shared_and_changed): New function.
874 (prepare_menu_bars, redisplay_internal): Use it to
875 decide whether all windows or frames should be updated.
876 (window_outdated): New function.
877 (text_outside_line_unchanged_p, redisplay_window): Use it.
878 (redisplay_internal): Likewise. Fix indentation.
879
8802012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
881
882 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
883 (syms_of_eval): Remove corresponding defsubr.
884 * bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
885
8862012-11-19 Daniel Colascione <dancol@dancol.org>
887
888 * w32fns.c (Fx_file_dialog):
889 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
890 cygwin_convert_file_name*.
891
892 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
893 Rename cygwin_convert_path* to cygwin_convert_file_name*.
894
8952012-11-18 Paul Eggert <eggert@cs.ucla.edu>
896
897 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
898
8992012-11-18 Eli Zaretskii <eliz@gnu.org>
900
901 * w32select.c: Include w32common.h before w32term.h, so that
902 windows.h gets included before w32term.h uses some of its
903 features, see below.
904
905 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
906 New typedefs.
907 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
908 New prototypes.
909 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
910
9112012-11-18 Jan Djärv <jan.h.d@swipnet.se>
912
913 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
914 (ns_select): Return at once if events are held (Bug#12834).
915
9162012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
917
918 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
919 Needed following 2012-10-20 change. (Bug#12902)
920
9212012-11-18 Juanma Barranquero <lekktu@gmail.com>
922
923 * w32proc.c (waitpid): Remove unused label get_result.
924
9252012-11-17 Juanma Barranquero <lekktu@gmail.com>
926
927 * makefile.w32-in (SYSWAIT_H): New macro.
928 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
929 ($(BLD)/sysdep.$(O)): Update dependencies.
930
9312012-11-17 Paul Eggert <eggert@cs.ucla.edu>
932
933 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
934 * callproc.c (relocate_fd): Assume F_DUPFD.
935 * emacs.c, term.c (O_RDWR): Remove.
936 * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
937 O_NDELAY, since O_NONBLOCK is the standard name for this flag.
938 * nsterm.m: Assume <fcntl.h> exists.
939 * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
940 (create_pty, Fmake_network_process, server_accept_connection)
941 (wait_reading_process_output, init_process_emacs):
942 Assume O_NONBLOCK.
943 (wait_reading_process_output): Put in a special case for WINDOWSNT
944 to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
945 It's not clear this is needed, but it's a more-conservative change.
946 (create_process): Assume FD_CLOEXEC.
947 (create_process, create_pty): Assume O_NOCTTY.
948 * sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
949 (reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
950 Omit if not DOS_NT, since F_GETFL is not defined there.
951 (serial_open): Assume O_NONBLOCK and O_NOCTTY.
952 * term.c: Include <fcntl.h>, for flags like O_NOCTTY.
953 (O_NOCTTY): Remove.
954 (init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
955 lack it, since gnulib guarantees this.
956 * w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
957
9582012-11-17 Eli Zaretskii <eliz@gnu.org>
959
960 * w32.c (faccessat): Pretend that directories have the execute bit
961 set. Emacs expects that, e.g., in files.el:cd-absolute.
962
963 * w32proc.c (create_child): Don't clip the PID of the child
964 process to fit into an Emacs integer, as this is no longer a
965 restriction.
966 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
967 reaping only the process specified by PID argument, if that is
968 positive. Use PID instead of dead_child to know which process to
969 reap. Wait for the child to die only if WNOHANG is not in
970 OPTIONS.
971 (sys_select): Don't set dead_child.
972
973 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
974 as it is no longer needed.
975
976 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
977 no longer needed.
978 (record_child_status_change): Remove the setting of
979 record_at_most_one_child for the !WNOHANG case.
980
9812012-11-17 Paul Eggert <eggert@cs.ucla.edu>
982
983 Fix problems in ns port found by static checking.
984 * nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
985 (hold_event, setPosition:portion:whole:): Send SIGIO only to self,
986 not to process group.
987 (ns_select): Use emacs_write, not write, as that's more robust
988 in the presence of signals.
989 (fd_handler:): Check for read errors.
990
9912012-11-16 Glenn Morris <rgm@gnu.org>
992
993 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
994
9952012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
996
997 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
998
9992012-11-16 Eli Zaretskii <eliz@gnu.org>
1000
1001 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
1002 use the same value of thread handle.
1003 (start_timer_thread): If the timer thread exited (due to error),
1004 clean up by closing the two handles it used. Duplicate the caller
1005 thread's handle here, so it gets duplicated only once, when
1006 launching the timer thread. Set priority of the timer thread, not
1007 the caller thread.
1008 (getitimer): Don't duplicate the caller thread's handle here.
1009 (Bug#12832)
1010
10112012-11-16 Jan Djärv <jan.h.d@swipnet.se>
1012
1013 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
1014 called (Bug#12834).
1015
10162012-11-16 Paul Eggert <eggert@cs.ucla.edu>
1017
1018 Remove no-longer-used pty_max_bytes variable.
1019 * process.c (pty_max_bytes): Remove; unused.
1020 (send_process): Do not set it.
1021
10222012-11-15 Juanma Barranquero <lekktu@gmail.com>
1023
1024 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
1025 Update dependencies.
1026
10272012-11-15 Paul Eggert <eggert@cs.ucla.edu>
1028
1029 * eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
1030 This follows up on the 2012-09-29 patch that removed indirection
1031 for the 'function' field. Reported by Sergey Vinokurov in
1032 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
1033
10342012-11-14 Eli Zaretskii <eliz@gnu.org>
1035
1036 * w32.c (faccessat): Rename from sys_faccessat. (No need to use a
1037 different name, as the MS runtime does not have such a function,
1038 and probably never will.) All callers changed. Ignore DIRFD
1039 value if PATH is an absolute file name, to match Posix spec
1040 better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
1041 symlinks.
1042
10432012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
1044
1045 * xdisp.c (echo_area_display, redisplay_internal):
1046 Omit redundant check whether frame_garbaged is set.
1047
10482012-11-14 Paul Eggert <eggert@cs.ucla.edu>
1049
1050 Use faccessat, not access, when checking file permissions (Bug#12632).
1051 This fixes a bug that has been present in Emacs since its creation.
1052 It was reported by Chris Torek in 1983 even before GNU Emacs existed,
1053 which must set some sort of record. (Torek's bug report was against
1054 a predecessor of GNU Emacs, but GNU Emacs happened to have the
1055 same common flaw.) See Torek's Usenet posting
1056 "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
1057 Posted: Fri Apr 8 14:18:56 1983.
1058 * Makefile.in (LIB_EACCESS): New macro.
1059 (LIBES): Use it.
1060 * callproc.c (init_callproc):
1061 * charset.c (init_charset):
1062 * fileio.c (check_existing, check_executable, check_writable)
1063 (Ffile_readable_p):
1064 * lread.c (openp, load_path_check):
1065 * process.c (allocate_pty):
1066 * xrdb.c (file_p):
1067 Use effective UID when checking permissions, not real UID.
1068 * callproc.c (init_callproc):
1069 * charset.c (init_charset):
1070 * lread.c (load_path_check, init_lread):
1071 Test whether directories are accessible, not merely whether they exist.
1072 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
1073 * fileio.c (check_existing, check_executable, check_writable)
1074 (Ffile_readable_p):
1075 Use symbolic names instead of integers for the flags, as they're
1076 portable now.
1077 (check_writable): New arg AMODE. All uses changed.
1078 Set errno on failure.
1079 (Ffile_readable_p): Use faccessat, not stat + open + close.
1080 (Ffile_writable_p): No need to call check_existing + check_writable.
1081 Just call check_writable and then look at errno. This saves a syscall.
1082 dir should never be nil; replace an unnecessary runtime check
1083 with an eassert. When checking the parent directory of a nonexistent
1084 file, check that the directory is searchable as well as writable, as
1085 we can't create files in unsearchable directories.
1086 (file_directory_p): New function, which uses 'stat' on most platforms
1087 but faccessat with D_OK (for efficiency) if WINDOWSNT.
1088 (Ffile_directory_p, Fset_file_times): Use it.
1089 (file_accessible_directory_p): New function, which uses a single
1090 syscall for efficiency.
1091 (Ffile_accessible_directory_p): Use it.
1092 * xrdb.c (file_p): Use file_directory_p.
1093 * lisp.h (file_directory_p, file_accessible_directory_p): New decls.
1094 * lread.c (openp): When opening a file, use fstat rather than
1095 stat, as that avoids a permissions race. When not opening a file,
1096 use file_directory_p rather than stat.
1097 (dir_warning): First arg is now a usage string, not a format.
1098 Use errno. All uses changed.
1099 * nsterm.m (ns_term_init): Remove unnecessary call to file-readable
1100 that merely introduced a race.
1101 * process.c, sysdep.c, term.c: All uses of '#ifdef O_NONBLOCK'
1102 changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
1103 and similarly for the other O_* flags.
1104 * w32.c (sys_faccessat): Rename from sys_access and switch to
1105 faccessat's API. All uses changed.
1106 * xrdb.c: Do not include <sys/stat.h>; no longer needed.
1107 (magic_db): Rename from magic_file_p.
1108 (magic_db, search_magic_path): Return an XrmDatabase rather than a
1109 char *, so that we don't have to test for file existence
1110 separately from opening the file for reading. This removes a race
1111 fixes a permission-checking problem, and simplifies the code.
1112 All uses changed.
1113 (file_p): Remove; no longer needed.
1114
11152012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
1116
1117 Omit glyphs initialization at startup.
1118 * dispnew.c (glyphs_initialized_initially_p): Remove.
1119 (adjust_frame_glyphs_initially): Likewise. Adjust users.
1120 (Fredraw_frame): Move actual code from here...
1121 (redraw_frame): ...to here. Add eassert. Adjust comment.
1122 (Fredraw_display): Use redraw_frame.
1123 * xdisp.c (clear_garbaged_frames): Likewise.
1124
11252012-11-13 Eli Zaretskii <eliz@gnu.org>
1126
1127 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
1128 passed to pint2str and pint2hrstr to be at most the size of the
1129 frame's decode_mode_spec_buffer. This avoids crashes with very
1130 large values of FIELD_WIDTH argument to decode_mode_spec.
1131 (Bug#12867)
1132
11332012-11-13 Paul Eggert <eggert@cs.ucla.edu>
1134
1135 Fix a race with verify-visited-file-modtime (Bug#12863).
1136 Since at least 1991 Emacs has ignored an mtime difference of no
1137 more than one second, but my guess is that this was to work around
1138 file system bugs that were fixed long ago. Since the race is
1139 causing problems now, let's remove that code.
1140 * fileio.c (Fverify_visited_file_modtime): Do not accept a file
1141 whose time stamp is off by no more than a second. Insist that the
1142 file time stamps match exactly.
1143
11442012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
1145
1146 * frame.h (struct frame): Convert external_tool_bar member to
1147 1-bit unsigned bitfield.
1148 * termhooks.h (struct terminal): Remove mouse_moved member since
1149 all users are long dead. Adjust comment on mouse_position_hook.
1150
11512012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
1152
1153 Simplify by using FOR_EACH_FRAME here and there.
1154 * frame.c (next_frame, prev_frame, other_visible_frames)
1155 (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
1156 * w32term.c (x_window_to_scroll_bar): Likewise.
1157 * window.c (window_list): Likewise.
1158 * xdisp.c (x_consider_frame_title): Likewise.
1159 * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
1160 * xfns.c (x_window_to_frame, x_any_window_to_frame)
1161 (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
1162 * xmenu.c (menubar_id_to_frame): Likewise.
1163 * xselect.c (frame_for_x_selection): Likewise.
1164 * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
1165 (x_window_to_menu_bar): Likewise.
1166 * w32fns.c (x_window_to_frame): Likewise. Adjust comment.
1167
11682012-11-12 Paul Eggert <eggert@cs.ucla.edu>
1169
1170 * data.c (Qdefalias_fset_function): Now static.
1171
1172 Another tweak to vectorlike_header change.
1173 * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
1174 Remove, and replace all uses with ...
1175 (next_in_free_list, set_next_in_free_list):
1176 New functions, which respect C's aliasing rules better.
1177
11782012-11-11 Paul Eggert <eggert@cs.ucla.edu>
1179
1180 * window.c (list4i): Rename from 'quad'. All uses changed.
1181 Needed because <sys/types.h> defines 'quad' on Solaris 10.
1182
11832012-11-11 Juanma Barranquero <lekktu@gmail.com>
1184
1185 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
1186 warning about mixing declarations and code in ISO C90.
1187
11882012-11-10 Martin Rudalics <rudalics@gmx.at>
1189
1190 * window.c (Fsplit_window_internal): Set combination limit of
1191 new parent window to t iff Vwindow_combination_limit is t;
1192 fixing a regression introduced with the change from 2012-09-22.
1193 (Fset_window_combination_limit): Fix doc-string.
1194
11952012-11-10 Eli Zaretskii <eliz@gnu.org>
1196
1197 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
1198 amount when the scroll margins are too large. When scrolling
1199 backwards in the buffer, give up if cannot reach point or the
1200 scroll margin within a reasonable number of screen lines.
1201 Fixes point position in window under scroll-up/down-aggressively when
1202 point is positioned many lines beyond the window top/bottom.
1203 (Bug#12811)
1204
1205 * ralloc.c (relinquish): If real_morecore fails to return memory
1206 to the system, don't crash; instead, leave the last heap
1207 unchanged and return. (Bug#12774)
1208
12092012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
1210
1211 * lisp.h (AUTOLOADP): New macro.
1212 * eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
1213 * data.c (Ffset): Remove special ad-advice-info handling.
1214 (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
1215 (Fsubr_arity): CSE.
1216 (Finteractive_form): Simplify.
1217 (Fquo): Don't insist on having at least 2 arguments.
1218 (Qdefalias_fset_function): New var.
1219
12202012-11-09 Jan Djärv <jan.h.d@swipnet.se>
1221
1222 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
1223
1224 * nsfont.m (Qcondensed, Qexpanded): New variables.
1225 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
1226 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
1227
12282012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
1229
1230 Fix recently introduced crash on MS-Windows (Bug#12839).
1231 * w32term.h (struct scroll_bar): Use convenient header.
1232 (SCROLL_BAR_VEC_SIZE): Remove.
1233 * w32term.c (x_scroll_bar_create): Use VECSIZE.
1234
12352012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
1236
1237 Tweak last vectorlike_header change.
1238 * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
1239 vectorlike object on the free list. This is introduced to avoid
1240 some (but not all) pointer casting and aliasing problems, see
1241 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
1242 * .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
1243 objects.
1244 (xvectype, xvecsize): Use them to examine Lisp_Object values.
1245
12462012-11-09 Jan Djärv <jan.h.d@swipnet.se>
1247
1248 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
1249 been removed, so remove them here also.
1250
12512012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
1252
1253 * doc.c (Fdocumentation): Handle new property
1254 dynamic-docstring-function to replace the old ad-advice-info.
1255
12562012-11-09 Paul Eggert <eggert@cs.ucla.edu>
1257
1258 * fns.c (Qeql, hashtest_eq): Now static.
1259
12602012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1261
1262 * lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
1263 * fns.c (hashfn_eq, hashfn_eql, sxhash):
1264 * profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
1265 * buffer.c (compare_overlays): Use XLI rather than XHASH.
1266
12672012-11-08 Paul Eggert <eggert@cs.ucla.edu>
1268
1269 Use same hash function for hashfn_profiler as for hash_string etc.
1270 * fns.c (SXHASH_COMBINE): Remove. All uses replaced by sxhash_combine.
1271 * lisp.h (sxhash_combine): New inline function, with the contents
1272 of the old SXHASH_COMBINE.
1273 * profiler.c (hashfn_profiler): Use it, instead of having a
1274 special hash function containing a comparison that always yields 1.
1275
12762012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1277
1278 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
1279 (Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
1280 (Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
1281 Remove unused vars.
1282
12832012-11-08 Jan Djärv <jan.h.d@swipnet.se>
1284
1285 * image.c (xpm_make_color_table_h): Fix compiler error because
1286 make_hash_table changed.
1287
12882012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
1289
1290 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
1291
12922012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
1293
1294 Use ad-hoc comparison function for the profiler's hash-tables.
1295 * profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
1296 (make_log): Use them.
1297 (handle_profiler_signal): Don't inhibit quit any longer since we don't
1298 call Fequal any more.
1299 (Ffunction_equal): New function.
1300 (cmpfn_profiler, hashfn_profiler): New functions.
1301 (syms_of_profiler): Initialize them.
1302 * lisp.h (struct hash_table_test): New struct.
1303 (struct Lisp_Hash_Table): Use it.
1304 * alloc.c (mark_object): Mark hash_table_test fields of hash tables.
1305 * fns.c (make_hash_table): Take a struct to describe the test.
1306 (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
1307 (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
1308 (hash_lookup, hash_remove_from_table): Move assertion checking of
1309 hashfn result here. Check hash-equality before calling cmpfn.
1310 (Fmake_hash_table): Adjust call to make_hash_table.
1311 (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
1312 (syms_of_fns): Initialize them.
1313 * emacs.c (main): Move syms_of_fns earlier.
1314 * xterm.c (syms_of_xterm):
1315 * category.c (hash_get_category_set): Adjust call to make_hash_table.
1316 * print.c (print_object): Adjust to new hash-table struct.
1317 * composite.c (composition_gstring_put_cache): Adjust to new hashfn.
1318
13192012-11-08 Eli Zaretskii <eliz@gnu.org>
1320
1321 * w32fns.c (modifier_set): Fix handling of Scroll Lock when the
1322 value of w32-scroll-lock-modifier is neither nil nor one of the
1323 known key modifiers. (Bug#12806)
1324
13252012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
1326
1327 Shrink struct vectorlike_header to the only size field.
1328 * lisp.h (enum pvec_type): Avoid explicit enum member values.
1329 Adjust comment.
1330 (enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
1331 PVEC_TYPE_MASK to arrange new bitfield in the vector header.
1332 (PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
1333 (PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
1334 information from the vector header. Adjust comment.
1335 (XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
1336 (PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
1337 layout.
1338 (XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
1339 (struct vectorlike_header): Remove next member. Adjust comment.
1340 (struct Lisp_Subr): Add convenient header. Adjust comment.
1341 (allocate_pseudovector): Adjust prototype.
1342 * alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
1343 (sweep_string, lisp_malloc): Remove useless prototypes.
1344 (enum mem_type): Adjust comment.
1345 (NEXT_IN_FREE_LIST): New macro.
1346 (SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
1347 (Fmake_bool_vector): Likewise.
1348 (struct large_vector): New type to represent allocation unit for
1349 the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
1350 (large_vectors): Change type to struct large_vector.
1351 (allocate_vector_from_block): Simplify.
1352 (PSEUDOVECTOR_NBYTES): Replace with...
1353 (vector_nbytes): ...new function. Adjust users.
1354 (sweep_vectors): Adjust processing of large vectors.
1355 (allocate_vectorlike): Likewise.
1356 (allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
1357 Add easserts. Adjust XSETPVECTYPESIZE usage.
1358 (allocate_buffer): Use BUFFER_PVEC_INIT.
1359 (live_vector_p): Adjust to match large vector.
1360 * buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
1361 * buffer.h (struct buffer): Add next member.
1362 (BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
1363 New macros.
1364 (FOR_EACH_BUFFER): Adjust to match struct buffer change.
1365 * fns.c (internal_equal): Adjust to match enum pvec_type change.
1366 (copy_hash_table): Adjust to match vector header change.
1367 * lread.c (defsubr): Use XSETPVECTYPE.
1368 * .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
1369 (xvectype): Likewise. Print PVEC_NORMAL_VECTOR for regular vectors.
1370 (xvecsize): New command.
1371
13722012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
1373
1374 * keyboard.c (event_to_kboard): Do not dereference
1375 frame_or_window field of SELECTION_REQUEST_EVENT
1376 and SELECTION_CLEAR_EVENT events (Bug#12814).
1377 * xterm.h (struct selection_input_event): Adjust comment.
1378
13792012-11-07 Eli Zaretskii <eliz@gnu.org>
1380
1381 * w32fns.c (modifier_set): Don't report modifiers from toggle key,
1382 such as Scroll Lock, if the respective keys are treated as
1383 function keys, not as modifiers. This avoids destroying non-ASCII
1384 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
1385
13862012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
1387
1388 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
1389
13902012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1391
1392 Restore some duplicate definitions (Bug#12814).
1393 This undoes part of the 2012-11-03 changes. Some people build
1394 with plain -g rather than with -g3, and they need the duplicate
1395 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
1396 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
1397 Define as macros, as well as as enums or as constants.
1398
13992012-11-06 Jan Djärv <jan.h.d@swipnet.se>
1400
1401 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
1402 to keypad keys (Bug#12816).
1403
14042012-11-06 Paul Eggert <eggert@cs.ucla.edu>
1405
1406 Minor adjustments of recently-changed frame functions.
1407 * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
1408 known to be a frame (we're in the FRAMEP branch).
1409 * lisp.h (Qframep): Remove decl. frame.h declares this.
1410 * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
1411 since they're meant for Lisp fixnum values.
1412
14132012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1414
1415 * window.c (Fwindow_combination_limit): Revert to the only
1416 required argument and adjust docstring as suggested in
1417 http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
1418 by Martin Rudalics <rudalics@gmx.at>.
1419
14202012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1421
1422 Widely used frame validity and checking functions.
1423 * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
1424 * frame.c (decode_live_frame, decode_any_frame): New functions.
1425 (delete_frame, Fredirect_frame_focus, Fframe_parameters)
1426 (Fframe_parameter, Fframe_char_height, Fframe_char_width)
1427 (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
1428 (Fframe_pointer_visible_p): Use decode_any_frame.
1429 (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
1430 (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
1431 (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
1432 (Fframe_focus): Likewise. Allow zero number of arguments.
1433 Adjust docstring.
1434 (frame_buffer_list, frame_buffer_predicate): Remove.
1435 * lisp.h (frame_buffer_predicate): Remove prototype.
1436 * buffer.c (Fother_buffer): Use decode_any_frame.
1437 * xdisp.c (Ftool_bar_lines_needed): Likewise.
1438 * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
1439 * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
1440 (Fclose_font, Ffont_info): Use decode_live_frame.
1441 * fontset.c (check_fontset_name): Likewise.
1442 * terminal.c (Fframe_terminal): Likewise.
1443 * w32fns.c (check_x_frame): Likewise.
1444 * window.c (Fminibuffer_window, Fwindow_at)
1445 (Fcurrent_window_configuration): Likewise.
1446 (Frun_window_configuration_change_hook, Fwindow_resize_apply):
1447 Likewise. Allow zero number of arguments. Adjust docstring.
1448 * dispnew.c (Fredraw_frame): Likewise.
1449 * xfaces.c (frame_or_selected_frame): Remove.
1450 (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
1451 (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
1452 (Fframe_face_alist): Use decode_live_frame.
1453 * xfns.c (check_x_frame): Likewise.
1454
14552012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
1456
1457 * window.c (quad): New function.
1458 (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
1459 (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
1460 (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
1461 (Fwindow_line_height): Use it.
1462 (Fwindow_fringes): Use list3.
1463 (Fwindow_scroll_bars): Use list4.
1464 (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
1465 (Fwindow_combination_limit): Allow zero number of arguments.
1466
14672012-11-05 Eli Zaretskii <eliz@gnu.org>
1468
1469 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
1470
1471 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
1472 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
1473 file descriptor 2 for standard error. (Bug#12805)
1474
14752012-11-05 Chong Yidong <cyd@gnu.org>
1476
1477 * process.c (wait_reading_process_output): Revert previous change.
1478
14792012-11-05 Paul Eggert <eggert@cs.ucla.edu>
1480
1481 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
1482 This removes code that has been obsolete since around 1990.
1483 * callproc.c (Fcall_process):
1484 * emacs.c (main):
1485 * process.c (create_process):
1486 * term.c (dissociate_if_controlling_tty):
1487 Assume setsid exists.
1488 * callproc.c (child_setup): Assume setpgid exists and behaves as
1489 per POSIX.1-1988 or later.
1490 * conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
1491 * emacs.c (shut_down_emacs):
1492 * sysdep.c (sys_suspend, init_foreground_group):
1493 Assume getpgrp behaves as per POSIX.1-1998 or later.
1494 * msdos.c (setpgrp): Remove.
1495 (tcgetpgrp, setpgid, setsid): New functions.
1496 * systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp.
1497 * term.c (no_controlling_tty): Remove; unused.
1498 * w32proc.c (setpgrp): Remove.
1499 (setsid, tcgetpgrp): New functions.
1500
1501 Simplify by assuming __fpending.
1502 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
1503 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
1504 Do not assume that __fpending's result fits in int.
1505
15062012-11-04 Paul Eggert <eggert@cs.ucla.edu>
1507
1508 Remove EMACS_OUTQSIZE+sleep hack.
1509 * dispnew.c (update_frame_1): Remove hack for terminals slower
1510 than 2400 bps, which throttled Emacs by having it sleep.
1511 This code hasn't worked since at least 2007, when the multi-tty stuff
1512 was added, and anyway those old terminals are long dead.
1513 * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
1514 without the dispnew.c change, as dispnew.c doesn't include systty.h.
1515
1516 Fix data-loss with --version (Bug#9574).
1517 * emacs.c (close_output_streams): Use strerror, not emacs_strerror,
1518 as we can't assume that emacs_strerror is initialized, and strerror
1519 is good enough here.
1520 (main): Invoke atexit earlier, to catch earlier instances of
1521 sending data to stdout and exiting, e.g., "emacs --version >/dev/full".
1522
15232012-11-04 Michael Marchionna <tralfaz@pacbell.net>
1524
1525 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
1526 (keyDown): Remap keypad keys to X11 virtual key codes.
1527
15282012-11-03 Paul Eggert <eggert@cs.ucla.edu>
1529
1530 Fix data-loss with --batch (Bug#9574).
1531 * emacs.c: Include <close-stream.h>.
1532 (close_output_streams): New function.
1533 (main): Pass it to atexit, so that Emacs closes stdout and stderr
1534 and handles errors appropriately.
1535 (Fkill_emacs): Don't worry about flushing, as close_output_stream
1536 does that now.
1537
1538 Fix a race condition that causes Emacs to mess up glib (Bug#8855).
1539 The symptom is a diagnostic "GLib-WARNING **: In call to
1540 g_spawn_sync(), exit status of a child process was requested but
1541 SIGCHLD action was set to SIG_IGN and ECHILD was received by
1542 waitpid(), so exit status can't be returned." The diagnostic
1543 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
1544 The real bug is a race condition between Emacs and glib: Emacs
1545 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
1546 so that glib can't find it. Work around the bug by invoking
1547 waitpid only on subprocesses that Emacs itself creates.
1548 * process.c (create_process, record_child_status_change):
1549 Don't use special value -1 in pid field, as the caller now must
1550 know the pid rather than having the callee infer it.
1551 The inference was sometimes incorrect anyway, due to another race.
1552 (create_process): Set new 'alive' member if child is created.
1553 (process_status_retrieved): New function.
1554 (record_child_status_change): Use it.
1555 Accept negative 1st argument, which means to wait for the
1556 processes that Emacs already knows about. Move special-case code
1557 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
1558 processes that have already been waited for, by testing and
1559 clearing new 'alive' member.
1560 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
1561 now does this internally.
1562 (handle_child_signal): Let record_child_status_change do all
1563 the work, since we do not want to reap all exited child processes,
1564 only the child processes that Emacs itself created.
1565 * process.h (Lisp_Process): New boolean member 'alive'.
1566
1567 Omit duplicate definitions no longer needed with gcc -g3.
1568 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
1569 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
1570 Define only as macros. There's no longer any need to also define
1571 these symbols as enums or as constants, since we now assume
1572 gcc -g3 when debugging.
1573
15742012-11-03 Eli Zaretskii <eliz@gnu.org>
1575
1576 * lisp.mk: Adjust comments to the fact that term/internal is now
1577 loaded from loadup.el.
1578
1579 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
1580 (msdos_fatal_signal): New function.
1581 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
1582 its argument list.
1583
1584 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
1585 for GCC versions before 4.
1586 (emacs_raise): Define to call msdos_fatal_signal.
1587
1588 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
1589 iterator when starting in the middle of a display or overlay
1590 string. (Bug#12745)
1591
15922012-11-03 Chong Yidong <cyd@gnu.org>
1593
1594 * process.c (wait_reading_process_output): Clean up the last
1595 change.
1596
15972012-11-03 Jim Paris <jim@jtan.com> (tiny change)
1598
1599 * process.c (wait_reading_process_output): Avoid a race condition
1600 with SIGIO delivery (Bug#11536).
1601
16022012-11-03 Chong Yidong <cyd@gnu.org>
1603
1604 * buffer.c (cursor_type): Untabify docstring.
1605
16062012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1607
1608 * frame.h (struct frame): Drop can_have_scroll_bars member
1609 which is meaningless for a long time. Adjust comments.
1610 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
1611 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
1612
16132012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
1614
1615 * window.c (decode_next_window_args): Update window arg after
1616 calling decode_live_window and so fix crash reported at
1617 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
1618 by Juanma Barranquero <lekktu@gmail.com>.
1619 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
1620 * font.c (Ffont_at): Likewise.
1621
16222012-11-01 Jan Djärv <jan.h.d@swipnet.se>
1623
1624 * widget.c (resize_cb): New function.
1625 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
1626 (EmacsFrameResize): Check if all is up to date before changing frame
1627 size.
1628
16292012-11-02 Eli Zaretskii <eliz@gnu.org>
1630
1631 Implement backtrace output for fatal errors on MS-Windows.
1632 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
1633 (BACKTRACE_LIMIT_MAX): New macro.
1634 (w32_backtrace): New function.
1635 (emacs_abort): Use w32_backtrace when the user chooses not to
1636 attach a debugger. Update the text of the abort dialog.
1637
16382012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1639
1640 Window-related stuff cleanup here and there.
1641 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
1642 Use decode_any_window.
1643 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
1644 * xdisp.c (Fformat_mode_line): Likewise.
1645 * font.c (Ffont_at): Use decode_live_window.
1646 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
1647 * window.c (decode_next_window_args): Likewise.
1648 (decode_any_window): Remove static.
1649 * window.h (decode_any_window): Add prototype.
1650 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
1651 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
1652 respectively.
1653
16542012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
1655
1656 Remove pad from struct input_event.
1657 * termhooks.h (struct input_event): Remove padding field.
1658 Adjust comment.
1659 * keyboard.c (event_to_kboard): Simplify because frame_or_window
1660 member is never cons for a long time. Adjust comment.
1661 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
1662 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
1663 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
1664 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
1665
16662012-11-01 Eli Zaretskii <eliz@gnu.org>
1667
1668 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
1669
16702012-10-31 Paul Eggert <eggert@cs.ucla.edu>
1671
1672 Fix crash when using Emacs as commit editor for git (Bug#12697).
1673 * callproc.c (setpgrp): Remove macro, as we now use setpgid
1674 and it is configured in conf_post.h.
1675 (Fcall_process): Don't invoke both setsid and setpgid; the former
1676 is enough, if it exists.
1677 * callproc.c (Fcall_process, child_setup):
1678 * process.c (create_process): Use setpgid.
1679 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
1680 for the real thing.
1681 * dispnew.c (init_display): Initialize the foreground group
1682 if we are running a tty display.
1683 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
1684 * lisp.h (init_foreground_group): New decl.
1685 * sysdep.c (inherited_pgroup): New static var.
1686 (init_foreground_group, tcsetpgrp_without_stopping)
1687 (narrow_foreground_group, widen_foreground_group): New functions.
1688 (init_sys_modes): Narrow foreground group.
1689 (reset_sys_modes): Widen foreground group.
1690
16912012-10-31 Michael Albinus <michael.albinus@gmx.de>
1692
1693 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
1694
16952012-10-31 Martin Rudalics <rudalics@gmx.at>
1696
1697 * minibuf.c (read_minibuf): Restore current buffer since
1698 choose_minibuf_frame calling Fset_frame_selected_window may
1699 change it (Bug#12766).
1700
17012012-10-30 Jan Djärv <jan.h.d@swipnet.se>
1702
1703 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
1704
17052012-10-30 Kenichi Handa <handa@gnu.org>
1706
1707 * font.c (Ffont_at): If WINDOW is specified and it is not
1708 displaying the current buffer, signal an error.
1709
17102012-10-29 Daniel Colascione <dancol@dancol.org>
1711
1712 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
1713 In preparation for fixing bug#12739, move these functions from
1714 here...
1715
1716 * coding.h, coding.c: ... to here, and compile them only when
1717 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
1718 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
1719
17202012-10-28 Eli Zaretskii <eliz@gnu.org>
1721
1722 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
1723 (timer_loop, getitimer, setitimer): Use it instead of
1724 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
1725 'clock'.
1726 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
1727 literal 10000.
1728
17292012-10-28 Jan Djärv <jan.h.d@swipnet.se>
1730
1731 * nsterm.m (NO_APPDEFINED_DATA): New define.
1732 (last_appdefined_event_data): New variable
1733 (last_appdefined_event): Remove.
1734 (ns_select): Initialize t from last_appdefined_event_data instead
1735 of [last_appdefined_event data1].
1736 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
1737 remove last_appdefined_event (Bug#12698).
1738
17392012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
1740
1741 * frame.c (x_set_font): Catch internal error.
1742
17432012-10-27 Eli Zaretskii <eliz@gnu.org>
1744
1745 Avoid overflow in w32 implementation of interval timers.
1746 When possible, for ITIMER_PROF count only times the main thread
1747 actually executes.
1748 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
1749 'volatile ULONGLONG' types. All the other data which was
1750 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
1751 (GetThreadTimes_Proc): New typedef.
1752 (w32_get_timer_time): New function, returns a suitable time value
1753 for the timer.
1754 (timer_loop): Enter critical section when accessing ULONGLONG
1755 values of the itimer_data struct, as these accesses are no longer
1756 atomic. Call 'w32_get_timer_time' instead of 'clock'.
1757 Remove unused variable.
1758 (init_timers): Initialize s_pfn_Get_Thread_Times.
1759 (start_timer_thread): Don't assign itimer->caller_thread here.
1760 (getitimer): Assign itimer->caller_thread here.
1761 (setitimer): Always call getitimer to get the value of ticks_now.
1762 (sys_spawnve): Avoid compiler warning about format mismatch.
1763
17642012-10-26 Eli Zaretskii <eliz@gnu.org>
1765
1766 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
1767 mouse movement events if the menu bar is active. This avoids
1768 producing a busy "hour-glass" cursor by Windows if the mouse
1769 pointer is positioned over a tooltip shown for some menu item.
1770
17712012-10-25 Paul Eggert <eggert@cs.ucla.edu>
1772
1773 Don't assume process IDs fit in int.
1774 * emacs.c (shut_down_emacs) [!DOS_NT]:
1775 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
1776 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
1777 Use pid_t, not int, to store process IDs, as 'int'
1778 is not wide enough on a few platforms (e.g., AIX and IRIX).
1779
17802012-10-23 Kenichi Handa <handa@gnu.org>
1781
1782 The following change is to make face-font-rescale-alist work
1783 correctly for non-ASCII fonts.
1784
1785 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
1786 (font_open_for_lface): Handle Vface_font_rescale_alist.
1787
17882012-10-23 Chong Yidong <cyd@gnu.org>
1789
1790 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
1791
17922012-10-21 Jan Djärv <jan.h.d@swipnet.se>
1793
1794 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
1795 for screen font.
1796 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
1797
1798 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
1799 event (Bug#12681).
1800
18012012-10-21 Glenn Morris <rgm@gnu.org>
1802
1803 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
1804
18052012-10-20 Paul Eggert <eggert@cs.ucla.edu>
1806
1807 Port to OpenBSD 5.1.
1808 * frame.c (Fmouse_position, Fmouse_pixel_position):
1809 * xdisp.c (produce_stretch_glyph):
1810 Declare local vars only when they're needed.
1811 This is clearer and avoids a warning on OpenBSD about unused vars.
1812 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
1813 This is safer, and avoids OpenBSD warnings about unused vars.
1814 * keyboard.c (record_menu_key): Remove unnecessary decl.
1815 (poll_timer): Define only if POLL_FOR_INPUT is defined.
1816 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
1817 as our definition clashes with OpenBSD's.
1818 * xfaces.c (load_face_colors, check_lface_attrs)
1819 (get_lface_attributes_no_remap, get_lface_attributes)
1820 (lface_fully_specified_p, x_supports_face_attributes_p)
1821 (tty_supports_face_attributes_p, face_fontset, realize_face)
1822 (realize_x_face, realize_tty_face):
1823 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
1824 merely Lisp_Object *. This is more informative and avoids
1825 a warning on OpenBSD about accessing beyond an object's size.
1826
18272012-10-20 Chong Yidong <cyd@gnu.org>
1828
1829 * lread.c (Fload): Doc fix (Bug#12592).
1830
18312012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
1832
1833 * font.c (Ffont_at): Fix previous change.
1834
18352012-10-19 Eli Zaretskii <eliz@gnu.org>
1836
1837 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
1838 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
1839 for the reasons.
1840
1841 * alloc.c (NSTATICS): Decrease to 0x800.
1842
18432012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
1844
1845 * fns.c (Fnreverse): Include the problem element when signaling an
1846 error (bug#12677).
1847
18482012-10-18 Jan Djärv <jan.h.d@swipnet.se>
1849
1850 * nsterm.m (ns_select): Check writefds before call to
1851 FD_ISSET (Bug#12668).
1852
18532012-10-18 Daniel Colascione <dancol@dancol.org>
1854
1855 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
1856 (staticpro): If we run out of staticpro slots, die with an
1857 informative error instead of just calling emacs_abort.
1858
18592012-10-18 Martin Rudalics <rudalics@gmx.at>
1860
1861 Fix two flaws reported by Dmitry Antipov.
1862 * window.c (Ftemp_output_buffer_show): Remove.
1863 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
1864 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
1865
18662012-10-17 Eli Zaretskii <eliz@gnu.org>
1867
1868 * makefile.w32-in ($(BLD)/w32.$(O)):
1869 ($(BLD)/vm-limit.$(O)):
1870 ($(BLD)/term.$(O)):
1871 ($(BLD)/unexw32.$(O)):
1872 ($(BLD)/fileio.$(O)):
1873 ($(BLD)/dispnew.$(O)): Update dependencies.
1874
1875 * w32term.h (w32_initialize_display_info, initialize_w32_display):
1876 Add prototypes.
1877
1878 * w32proc.c: Include ctype.h.
1879
1880 * w32.h (init_environment, check_windows_init_file)
1881 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
1882 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
1883 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
1884 (sys_link): Add prototypes.
1885
1886 * w32.c: Include w32select.h.
1887 (sys_access, e_malloc, sys_select): Add prototypes.
1888 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
1889
1890 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
1891
1892 * unexw32.c: Include lisp.h and w32.h.
1893
1894 * term.c [WINDOWSNT]: Include w32term.h.
1895
1896 * process.c [WINDOWSNT]: Add prototype of sys_select.
1897
1898 * fileio.c [WINDOWSNT]: Include w32.h.
1899
1900 * dispnew.c [WINDOWSNT]: Include w32.h.
1901
1902 * cygw32.c (Fcygwin_convert_path_to_windows)
1903 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
1904 Lisp_Object values. (Bug#12661)
1905
1906 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
1907 to Lisp_Object. (Bug#12661)
1908
19092012-10-17 Kenichi Handa <handa@gnu.org>
1910
1911 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
1912 invalidate.
1913
19142012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
1915
1916 * buffer.c (Fkill_buffer): When unchaining the marker,
1917 reset its buffer pointer to NULL (Bug#12652).
1918
19192012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
1920
1921 Do not verify indirection counters of killed buffers (Bug#12579).
1922 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
1923 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
1924
19252012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
1926
1927 * alloc.c (Fmake_byte_code): Fix typo in comment.
1928 * print.c (print_interval): Define as static to match prototype.
1929 * indent.c (disptab_matches_widthtab, recompute_width_table):
1930 Convert to eassert.
1931
19322012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
1933
1934 * editfns.c (get_system_name): Remove.
1935 * lisp.h (get_system_name): Remove prototype.
1936 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
1937 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
1938
19392012-10-15 Daniel Colascione <dancol@dancol.org>
1940
1941 * dbusbind.c: Add comment explaining reason for previous change.
1942
19432012-10-15 Martin Rudalics <rudalics@gmx.at>
1944
1945 * window.c (Fwindow_end): Rewrite check whether cached position
1946 can be used (Bug#12600).
1947 (resize_frame_windows, grow_mini_window, shrink_mini_window):
1948 Set windows_or_buffers_changed.
1949
19502012-10-15 Daniel Colascione <dancol@dancol.org>
1951
1952 * dbusbind.c: Fix cygw32 build break when compiling with dbus
1953 enabled by undefining the symbol "interface", which the platform
1954 headers define to something incompatible.
1955
19562012-10-14 Daniel Colascione <dancol@dancol.org>
1957
1958 * image.c (init_tiff_functions, init_imagemagick_functions)
1959 (init_svg_functions): Fix cygw32 build break by using these
1960 functions only when WINDOWSNT _and_ HAVE_NTGUI.
1961
19622012-10-14 Jan Djärv <jan.h.d@swipnet.se>
1963
1964 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
1965
19662012-10-13 Jan Djärv <jan.h.d@swipnet.se>
1967
1968 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
1969
19702012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
1971
1972 * coding.c (detect_coding): Set coding->id before calling
1973 this->detector.
1974
19752012-10-13 Andreas Schwab <schwab@linux-m68k.org>
1976
1977 * fileio.c: Formatting fixes.
1978
19792012-10-13 Paul Eggert <eggert@cs.ucla.edu>
1980
1981 Fix some stat-related races.
1982 * fileio.c (Fwrite_region): Avoid race condition if a file is
1983 removed or renamed by some other process immediately after Emacs
1984 writes it but before Emacs stats it. Do not assume that stat (or
1985 fstat) succeeds.
1986 * image.c (slurp_file): Resolve the file name with fopen + fstat
1987 rather than stat + fopen.
1988 (pbm_read_file) [0]: Remove unused code with stat race.
1989 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
1990 Remove ineffective code with stat race.
1991
19922012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
1993
1994 * doc.c (get_doc_string): Don't signal an error if the file is missing.
1995
19962012-10-12 Jan Djärv <jan.h.d@swipnet.se>
1997
1998 * nsterm.m (hold_event_q): New static variable.
1999 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
2000 ! q_event_ptr.
2001 (hold_event): New function.
2002 (ns_read_socket): If hold_event_q have events, store them and
2003 return (Bug#12384).
2004 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
2005 is zero (Bug#12384).
2006
20072012-10-12 Juanma Barranquero <lekktu@gmail.com>
2008
2009 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
2010
20112012-10-12 Eli Zaretskii <eliz@gnu.org>
2012
2013 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
2014
2015 * fileio.c (check_existing): New function.
2016 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
2017 instead of calling 'stat', when what's needed is to check whether
2018 a file exists. This avoids expensive system calls on MS-Windows.
2019 (Bug#12587)
2020
2021 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
2022
2023 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
2024 determine whether a file exists and is not a directory.
2025
2026 * lisp.h (check_existing): Add prototype.
2027
20282012-10-12 Jan Djärv <jan.h.d@swipnet.se>
2029
2030 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
2031
20322012-10-12 Glenn Morris <rgm@gnu.org>
2033
2034 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
2035
20362012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
2037
2038 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
2039
2040 * eval.c (Fautoload): Remember previous autoload status in load-history.
2041
20422012-10-11 Paul Eggert <eggert@cs.ucla.edu>
2043
2044 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
2045 * lread.c (load_each_byte, new_backquote_flag, readchar)
2046 (read_filtered_event, lisp_file_lexically_bound_p)
2047 (safe_to_load_version, Fload, complete_filename_p, openp)
2048 (build_load_history, readevalloop, read_escape, read1)
2049 (string_to_number, read_vector, read_list):
2050 * macros.c (Fstart_kbd_macro):
2051 * marker.c (CONSIDER):
2052 * menu.c (parse_single_submenu, digest_single_submenu)
2053 (find_and_return_menu_selection, Fx_popup_menu):
2054 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
2055 (Ftry_completion):
2056 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
2057 (ns_menu_show):
2058 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
2059 (xmenu_show, xdialog_show):
2060 Use bool for booleans.
2061 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
2062 as it's not a predicate. All uses changed. Omit unnecessary
2063 buffer termination.
2064
20652012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
2066
2067 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
2068 (save_excursion_restore): Do not restore mark if it was not saved.
2069
20702012-10-11 Paul Eggert <eggert@cs.ucla.edu>
2071
2072 * marker.c (cached_modiff): EMACS_INT, not int.
2073
2074 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
2075 instead of having a wrong decl.
2076 * nsmenu.m (waiting_for_input): Remove wrong decl.
2077
20782012-10-10 Paul Eggert <eggert@cs.ucla.edu>
2079
2080 keyboard.c, keymap.c: Use bool for booleans.
2081 * dispnew.c (sit_for): Distinguish between 3-way display_option
2082 and boolean do_display.
2083 * keyboard.c (single_kboard, this_command_key_count_reset)
2084 (waiting_for_input, echoing, immediate_quit, input_pending)
2085 (interrupt_input, interrupts_deferred, pop_kboard)
2086 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
2087 (command_loop_1, adjust_point_for_property)
2088 (safe_run_hooks_error, input_polling_used, read_char):
2089 (help_char_p, readable_events, kbd_buffer_events_waiting)
2090 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
2091 (lucid_event_type_list_p, get_input_pending):
2092 (gobble_input, menu_separator_name_p, menu_bar_item)
2093 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
2094 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
2095 (keyremap_step, test_undefined, read_key_sequence)
2096 (detect_input_pending, detect_input_pending_ignore_squeezables)
2097 (detect_input_pending_run_timers, requeued_events_pending_p)
2098 (quit_throw_to_read_char, Fset_input_interrupt_mode):
2099 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
2100 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
2101 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
2102 (accessible_keymaps_1, Fkey_description, push_key_description):
2103 (shadow_lookup, struct where_is_internal_data)
2104 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
2105 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
2106 (describe_map, describe_vector):
2107 * menu.c (single_menu_item):
2108 * nsmenu.m (ns_update_menubar):
2109 * process.c (wait_reading_process_output):
2110 * search.c (scan_buffer, scan_newline):
2111 Use bool for boolean.
2112 * keyboard.c (timers_run, swallow_events)
2113 (detect_input_pending_run_timers):
2114 * process.c (wait_reading_process_output):
2115 Use unsigned for counter where wraparound-on-overflow is desired,
2116 since unsigned is guaranteed to have that behavior and signed is not.
2117 (read_char): Use ptrdiff_t for string length.
2118 (get_input_pending): Remove first argument, since it was always
2119 the same pointer-to-int (now pointer-to-boolean) &input_pending,
2120 and behave as if it had that value. Return new value of
2121 input_pending. All callers changed.
2122 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
2123 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
2124 a string length.
2125 * keymap.c (push_key_description): Omit last arg, which was always 1.
2126 All callers changed.
2127
2128 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
2129
21302012-10-10 Juanma Barranquero <lekktu@gmail.com>
2131
2132 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
2133 ($(BLD)/term.$(O)): Update dependencies.
2134
21352012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
2136
2137 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
2138 * lisp.h (enum pvec_type): Adjust comments and omit explicit
2139 initializer for PVEC_NORMAL_VECTOR.
2140
21412012-10-10 Paul Eggert <eggert@cs.ucla.edu>
2142
2143 Clean out old termopts cruft.
2144 * termopts.h (flow_control, meta_key): Remove unused decls.
2145 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
2146 Don't include termopts.h.
2147
21482012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
2149
2150 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
2151
21522012-10-10 Paul Eggert <eggert@cs.ucla.edu>
2153
2154 * commands.h (immediate_quit): Remove duplicate decl.
2155
21562012-10-09 Jan Djärv <jan.h.d@swipnet.se>
2157
2158 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
2159 caching.
2160 (nsfont_open): Remove setting of Vfonts_in_cache.
2161 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
2162
21632012-10-09 Eli Zaretskii <eliz@gnu.org>
2164
2165 * w32fns.c (w32_last_error): Change the return value to DWORD, to
2166 match what GetLastError returns. Explain why the function is
2167 needed.
2168
2169 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
2170 'is_tooltip_frame', to avoid confusion with its global namesake.
2171
21722012-10-08 Daniel Colascione <dancol@dancol.org>
2173
2174 * xdisp.c (start_hourglass): Call w32_note_current_window when
2175 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
2176 build that caused Emacs to display the hourglass cursor forever.
2177
2178 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
2179 which is broken under remote desktop, calculate the number of
2180 colors available for a display based on the display's number of
2181 planes and number of bits per pixel per plane. (bug#10397).
2182
21832012-10-08 Jan Djärv <jan.h.d@swipnet.se>
2184
2185 * nsfont.m (Vfonts_in_cache): New variable.
2186 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
2187 are used. Add cached fonts to Vfonts_in_cache.
2188 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
2189
21902012-10-08 Juanma Barranquero <lekktu@gmail.com>
2191
2192 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
2193 in nt/config.nt.
2194 (FONT_H): Define after FRAME_H.
2195 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
2196 Update dependencies.
2197
2198 * w32term.c: Remove leftover declaration of keyboard_codepage.
2199
22002012-10-08 Eli Zaretskii <eliz@gnu.org>
2201
2202 * makefile.w32-in (FONT_H): Add $(FRAME_H).
2203 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
2204 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
2205 (GLOBAL_SOURCES): Add cygw32.c.
2206 ($(BLD)/unexw32.$(O)):
2207 ($(BLD)/w32.$(O)):
2208 ($(BLD)/w32console.$(O)):
2209 ($(BLD)/w32fns.$(O)):
2210 ($(BLD)/w32heap.$(O)):
2211 ($(BLD)/w32menu.$(O)):
2212 ($(BLD)/w32proc.$(O)): Add w32common.h.
2213
2214 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
2215 'const char *'.
2216 (x_to_w32_color): Don't modify the argument, modify a copy instead.
2217
22182012-10-08 Daniel Colascione <dancol@dancol.org>
2219
2220 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
2221 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
2222 accidental message numbering hole. Change other messages to
2223 match.
2224
2225 * w32select.h (HAVE_W32SELECT): Remove.
2226
2227 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
2228 w32common.h instead of w32heap.h.
2229
2230 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
2231 (get_allocation_unit, get_processor_type, get_w32_major_version)
2232 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
2233 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
2234 (OS_NT, os_subtype, cache_system_info): Move declarations to
2235 w32common.
2236
2237 * w32heap.c: Include w32common.h.
2238 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
2239 (w32_minor_version, w32_build_number, w32_subtype):
2240 Remove duplicate definitions.
2241
2242 * w32fns.c: Include w32common.h; include w32heap.h only in
2243 WINDOWSNT.
2244
2245 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
2246 Use `report_file_error' instead of `error' in order to better
2247 inform users of what went wrong. Increase NTGUI_UNICODE file
2248 dialog box file name length to 32k, the maximum allowed by the NT
2249 kernel.
2250
2251 * w32common.h: New file.
2252 (ROUND_UP, ROUND_DOWN, get_page_size)
2253 (get_allocation_unit, get_processor_type, get_w32_major_version)
2254 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
2255 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
2256 (OS_NT, os_subtype, cache_system_info): Move here.
2257
2258 * unexw32.c, unexcw.c: Include w32common.h.
2259
2260 * emacs.c (main): Use (defined (WINDOWSNT) || defined
2261 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
2262 to call syms_of_w32select.
2263
2264 * cygw32.h: Remove obsolete EXFUN declarations.
2265
2266 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
2267
2268 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
2269 of w32inevt.o from SOME_MACHINE_OBJECTS.
2270
22712012-10-08 Daniel Colascione <dancol@dancol.org>
2272
2273 * image.c: Permanent fix for JPEG compilation issue --- limit
2274 jpeglib `boolean' redefinition to Cygwin builds.
2275
22762012-10-08 Eli Zaretskii <eliz@gnu.org>
2277
2278 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
2279
2280 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
2281 Cygwin.
2282
22832012-10-08 Daniel Colascione <dancol@dancol.org>
2284
2285 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
2286 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
2287 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
2288 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
2289 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
2290 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
2291 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
2292 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
2293 now a supported configuration.
2294
2295 * Makefile.in: consolidate image variables into LIBIMAGE; add
2296 W32_OBJ and W32_LIBS. Compile new files.
2297
2298 * conf_post.h:
2299 (_DebPrint) declare tracing facility for W32 debugging. We need
2300 to unify tracing later.
2301
2302 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
2303 unconditional use of W32 Unicode functions. Cygwin runs only on
2304 100% Unicode operating systems.
2305
2306 * cygw32.c: New file. Define Cygwin-specific facilities.
2307 (Fcygwin_convert_path_to_windows)
2308 (Fcygwin_convert_path_from_windows): New user functions for
2309 accessing Cygwin path-munging routines.
2310
2311 * cygw32.h: New file.
2312 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
2313 UTF-16LE strings temporarily inside non-Lisp-visible string
2314 objects.
2315
2316 (w32_strerror): Just what it says on the tin.
2317
2318 * emacs.c: Make the NS fork-then-exec code for daemon-launching
2319 also run for Cygwin; both systems have the same problem with using
2320 GUI facilities in a forked child. Also call syms_of_cygw32,
2321 syms_of_w32select in correct places.
2322
2323 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
2324 needs fork-then-exec for daemon launching.
2325
2326 * font.h: Include frame.h.
2327
2328 * image.c: Use the image library cache machinery only when we're
2329 compiling for native WINDOWSNT; Cygwin can use shared libraries
2330 like any other Unixlike system.
2331
2332 * keyboard.c: Clarify a comment regarding the input loop.
2333
2334 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
2335 functions directly instead of trying to detect at runtime that our
2336 host operating system supports them. We make this change for two
2337 reasons: Cygwin lacks support for the multibyte character
2338 conversion functions used by the legacy menu code, and Cygwin
2339 never needs to rely on non-Unicode APIs.
2340
2341 * unexw32.c (hinst): Declare extern.
2342
2343 * w32.c: Change header order;
2344 (w32_strerror): Move to w32fns.c because we need it for
2345 non-WINDOWSNT builds.
2346
2347 * w32.h: Add #error macro to make sure we don't include w32.h for
2348 Cygwin builds. Remove w32select declarations.
2349
2350 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
2351 w32fns.c. w32console.c is WINDOWSNT-only.
2352
2353 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
2354 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
2355 POSIXy alternative.
2356 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
2357 (w32_major_version, w32_minor_version, w32_build_number)
2358 (os_subtype, sound_type): Define here
2359 (w32_defined_color): Make color parameter const for consistency
2360 with other _defined_color functions.
2361 (w32_createwindow): Unconditionally call w32_init_class instead of
2362 doing so only when hprevinst is non-NULL. Plumbing hprevinst
2363 through the code is complex and unnecessary because class
2364 registration is practically free.
2365 (w32_name_of_message): New EMACSDEBUG-only function.
2366 (Fset_message_beep): Move here
2367 (Fx_open_connection): Require that the display name for Windows be
2368 "w32" for consistency, emacsclient disambiguation, and maybe, one
2369 day, multi-window-system support.
2370 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
2371 Cygwin files for W32 GUI facilities, since these clearly don't
2372 expect Cygwin names.
2373 (_DebPrint): Define.
2374 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
2375 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
2376 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
2377 (w32_last_error): Remove.
2378
2379 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
2380
2381 * w32heap.c (syspage_mask): Declare here.
2382 (cache_system_info): Remove.
2383
2384 * w32inevt.c (faked_key): Define globally, not statically.
2385 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
2386 (w32_console_toggle_lock_key): Move to w32fns.c.
2387
2388 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
2389
2390 * w32proc.c (_DebPrint): Move to w32fns.c.
2391 * w32select.c: Include string.h, stdio.h for Cygwin.
2392 * w32select.h: New File.
2393
2394 * w32term.c: Include io.h for non-CYGWIN builds; needed for
2395 get_osfhandle.
2396 (w32_message_fd): New variable. Under Cygwin, holds the file
2397 descriptor the system used to tell us about pending thread
2398 messages.
2399
2400 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
2401 that prevented compilation under non-WINDOWSNT systems.
2402
2403 (w32_initialize): Open /dev/windows and assign it to
2404 w32_message_fd. Provide w32 feature.
2405
2406 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
2407 (WM_EMACS_INPUT_READY): add.
2408 (prepend_msg, w32_message_fd): Declare globally.
2409
2410 * w32xfns.c:
2411 (keyboard_handle): Use only when WINDOWSNT.
2412 (notify_msg_ready): New function. Posts a message to the main
2413 thread's message queue under CYGWIN, which wakes up the main
2414 thread from select(2) by making the /dev/windows file descriptor
2415 ready. Under WINDOWSNT, it sets an event the same way the old
2416 code did.
2417
2418 (post, prepend_msg): Actually call notify_msg_ready instead of
2419 setting the input event directly.
2420
24212012-10-07 Eli Zaretskii <eliz@gnu.org>
2422
2423 * ralloc.c (relinquish): If a heap is ready to be relinquished,
2424 but it still has blocs in it, don't return it to the system,
2425 instead of aborting. (Bug#12402)
2426
24272012-10-07 Jan Djärv <jan.h.d@swipnet.se>
2428
2429 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
2430
2431 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
2432 MAC_OS_X_VERSION_10_6.
2433 (syms_of_nsterm): Remove comment about Panther and above for
2434 ns-antialias-text.
2435 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
2436 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
2437 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
2438
2439 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
2440 MAC_OS_X_VERSION_10_4.
2441
2442 * nsmenu.m (fillWithWidgetValue:): Remove code for <
2443 MAC_OS_X_VERSION_10_2.
2444
2445 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
2446
2447 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
2448 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
2449
2450 * nsterm.m (ns_in_resize): Remove (Bug#12479).
2451 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
2452 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
2453 Remove ns_in_resize check.
2454 (ns_clear_frame_area): Remove resize handle code.
2455
2456 * nsfns.m (ns_in_resize): Remove.
2457 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
2458 Remove ns_in_resize check.
2459
24602012-10-07 Paul Eggert <eggert@cs.ucla.edu>
2461
2462 Improve sys_siglist detection.
2463 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
2464 defined as a macro, as is done in Solaris.
2465 (sys_siglist_entries): New macro.
2466 (save_strsignal): Use it.
2467 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
2468 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
2469
24702012-10-06 Jan Djärv <jan.h.d@swipnet.se>
2471
2472 * nsfns.m (Fx_create_frame): Call x_default_parameter with
2473 fullscreen/Fullscreen.
2474
2475 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
2476 tobar_height is new.
2477
2478 * nsterm.m (x_make_frame_visible): Check for fullscreen.
2479 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
2480 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
2481 (windowDidResize:): Check for correct window if old style fullscreen.
2482 Capitalize word in comment. Remove incorrect comment.
2483 (initFrameFromEmacs:): tbar_height renamed tibar_height.
2484 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
2485 error in drawing background.
2486 (toggleFullScreen:): Remove comment. Rearrange calls.
2487 Set toolbar values to zero, save old height in tobar_height.
2488 Restore tool bar height when leaving fullscreen.
2489 (canBecomeMainWindow): New function.
2490
24912012-10-06 Paul Eggert <eggert@cs.ucla.edu>
2492
2493 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
2494
24952012-10-05 Eli Zaretskii <eliz@gnu.org>
2496
2497 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
2498
2499 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
2500 that time stamps of directories could also be changed.
2501 Don't request the too broad GENERIC_WRITE, only the more restrictive
2502 FILE_WRITE_ATTRIBUTES access rights.
2503
2504 * fileio.c (Fset_file_times): Special-case ignoring errors for
2505 directories only on MSDOS, not on MS-Windows.
2506
25072012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
2508
2509 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
2510
25112012-10-04 Eli Zaretskii <eliz@gnu.org>
2512
2513 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
2514 see whether CreateFile failed.
2515
25162012-10-04 Paul Eggert <eggert@cs.ucla.edu>
2517
2518 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
2519 to avoid similar races.
2520 * keyboard.c (pending_signals): Now bool, not int.
2521
2522 Port timers to OpenBSD, plus check for timer failures.
2523 OpenBSD problem reported by Han Boetes.
2524 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
2525 and/or setitimer.
2526 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
2527 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
2528 like OpenBSD, which has timer_settime but does not declare it.
2529 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
2530 whether to use itimerspec-related primitives. All uses of
2531 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
2532
25332012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2534
2535 * profiler.c (handle_profiler_signal): Fix a malloc race
2536 that caused Emacs to hang on Fedora 17 when profiling Lisp.
2537
25382012-10-02 Jan Djärv <jan.h.d@swipnet.se>
2539
2540 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
2541
25422012-10-02 Eli Zaretskii <eliz@gnu.org>
2543
2544 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
2545 consistent with the change in return value of 'safe_strsignal'.
2546
25472012-10-02 Paul Eggert <eggert@cs.ucla.edu>
2548
2549 Prefer plain 'static' to 'static inline' (Bug#12541).
2550 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
2551 (bidi_set_sor_type, bidi_push_embedding_level)
2552 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
2553 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
2554 (bidi_cache_search, bidi_cache_ensure_space)
2555 (bidi_cache_iterator_state, bidi_cache_find)
2556 (bidi_peek_at_next_level, bidi_set_paragraph_end)
2557 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
2558 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
2559 Now 'static', not 'static inline'.
2560
2561 Count overruns when profiling; change units to ns.
2562 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
2563 Give extra weight to samples after overruns, to attempt to count
2564 the time more accurately.
2565 (setup_cpu_timer): Change sampling interval units from ms to ns, since
2566 the underlying primitives nominally do ns.
2567 (Fprofiler_cpu_start): Document the change. Mention that
2568 the sampling intervals are only approximate.
2569
25702012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2571
2572 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
2573
2574 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
2575 case for the special 0 coding-system.
2576
2577 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
2578 (Fmake_overlay): Remove redundant tests.
2579 (fix_start_end_in_overlays): Remove redundant recentering.
2580
25812012-10-02 Juanma Barranquero <lekktu@gmail.com>
2582
2583 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
2584 Update dependencies.
2585
25862012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2587
2588 Fix a malloc race condition involving strsignal.
2589 A signal can arrive in the middle of a malloc, and Emacs's signal
2590 handler can invoke strsignal, which can invoke malloc, which is
2591 not portable. This race condition bug makes Emacs hang on GNU/Linux.
2592 Fix it by altering the signal handler so that it does not invoke
2593 strsignal.
2594 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
2595 * process.c (status_message): Use const pointer, in case strsignal
2596 is #defined to safe_strsignal.
2597 * sysdep.c (sys_siglist, init_signals): Always define and
2598 initialize a substitute sys_siglist if the system does not define
2599 one, even if HAVE_STRSIGNAL.
2600 (safe_strsignal): Rename from strsignal. Always define,
2601 using sys_siglist. Return a const pointer.
2602 * syssignal.h (safe_strsignal): New decl.
2603 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
2604
26052012-10-01 Eli Zaretskii <eliz@gnu.org>
2606
2607 * w32proc.c (timer_loop): Fix code that waits for timer
2608 expiration, to avoid high CPU usage.
2609
26102012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2611
2612 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
2613 (sweep_weak_table): Remove redundant prototypes.
2614
26152012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
2616
2617 * emacs.c: Move the inclusion of TERM_HEADER after including
2618 windows.h on WINDOWSNT. This avoids compilation problems with
2619 MSVC.
2620
26212012-10-01 Eli Zaretskii <eliz@gnu.org>
2622
2623 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
2624 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
2625 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
2626 as the previous version used 'void *'.
2627
2628 * ralloc.c (ROUNDUP): Fix last change.
2629 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
2630 'size_t'.
2631
2632 * w32proc.c <disable_itimers>: New static flag.
2633 (init_timers): Initialize it to zero, after creating the critical
2634 sections used by the timer threads.
2635 (term_timers): Set to 1 before deleting the critical sections.
2636 (getitimer, setitimer): If disable_itimers is non-zero, return an
2637 error indication without doing anything. Reported by Fabrice
2638 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
2639 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
2640 return results.
2641 [!HAVE_SETITIMER]: Behave as the previous version that didn't
2642 support timers.
2643
2644 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
2645 term_ntproc after all the other bookkeeping, to get timers working
2646 as long as possible.
2647
26482012-10-01 Paul Eggert <eggert@cs.ucla.edu>
2649
2650 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
2651 Suggested by Juri Linkov in
2652 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
2653
2654 Prefer plain 'static' to 'static inline' (Bug#12541).
2655 With static functions, modern compilers inline pretty well by
2656 themselves; advice from programmers often hurts as much as it helps.
2657 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
2658 this change shrinks the text size of the Emacs executable by 1.1%
2659 without affecting CPU significantly in my benchmark.
2660 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
2661 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
2662 (mark_maybe_object, mark_maybe_pointer, bounded_number):
2663 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
2664 (bset_auto_fill_function, bset_auto_save_file_format)
2665 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
2666 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
2667 (bset_cache_long_line_scans, bset_case_fold_search)
2668 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
2669 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
2670 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
2671 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
2672 (bset_header_line_format, bset_indicate_buffer_boundaries)
2673 (bset_indicate_empty_lines, bset_invisibility_spec)
2674 (bset_left_fringe_width, bset_major_mode, bset_mark)
2675 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
2676 (bset_name, bset_overwrite_mode, bset_pt_marker)
2677 (bset_right_fringe_width, bset_save_length)
2678 (bset_scroll_bar_width, bset_scroll_down_aggressively)
2679 (bset_scroll_up_aggressively, bset_selective_display)
2680 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
2681 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
2682 (set_buffer_overlays_after):
2683 * category.c (bset_category_table):
2684 * charset.c (read_hex):
2685 * coding.c (produce_composition, produce_charset)
2686 (handle_composition_annotation, handle_charset_annotation)
2687 (char_encodable_p):
2688 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
2689 (assign_row, set_frame_matrix_frame, make_current)
2690 (add_row_entry):
2691 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
2692 * fns.c (maybe_resize_hash_table):
2693 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
2694 * gmalloc.c (register_heapinfo):
2695 * image.c (lookup_image_type):
2696 * intervals.c (set_interval_object, set_interval_left)
2697 (set_interval_right, copy_interval_parent, rotate_right)
2698 (rotate_left, balance_possible_root_interval):
2699 * keyboard.c (kset_echo_string, kset_kbd_queue)
2700 (kset_keyboard_translate_table, kset_last_prefix_arg)
2701 (kset_last_repeatable_command, kset_local_function_key_map)
2702 (kset_overriding_terminal_local_map, kset_real_last_command)
2703 (kset_system_key_syms, clear_event, set_prop):
2704 * lread.c (digit_to_number):
2705 * marker.c (attach_marker, live_buffer, set_marker_internal):
2706 * nsterm.m (ns_compute_glyph_string_overhangs):
2707 * process.c (pset_buffer, pset_command)
2708 (pset_decode_coding_system, pset_decoding_buf)
2709 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
2710 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
2711 (pset_status, pset_tty_name, pset_type, pset_write_queue):
2712 * syntax.c (bset_syntax_table, dec_bytepos):
2713 * terminal.c (tset_param_alist):
2714 * textprop.c (interval_has_some_properties)
2715 (interval_has_some_properties_list):
2716 * window.c (wset_combination_limit, wset_dedicated)
2717 (wset_display_table, wset_hchild, wset_left_fringe_width)
2718 (wset_left_margin_cols, wset_new_normal, wset_new_total)
2719 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
2720 (wset_right_fringe_width, wset_right_margin_cols)
2721 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
2722 (wset_vertical_scroll_bar_type, wset_window_parameters):
2723 * xdisp.c (wset_base_line_number, wset_base_line_pos)
2724 (wset_column_number_displayed, wset_region_showing)
2725 (window_box_edges, run_window_scroll_functions)
2726 (append_glyph_string_lists, prepend_glyph_string_lists)
2727 (append_glyph_string, set_glyph_string_background_width)
2728 (append_glyph, append_composite_glyph)
2729 (take_vertical_position_into_account):
2730 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
2731 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
2732 (lface_hash, lface_same_font_attributes_p, lookup_face):
2733 * xml.c (libxml2_loaded_p):
2734 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
2735 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
2736 Now 'static', not 'static inline'.
2737
2738 * bidi.c: Tune.
2739 (bidi_copy_it): Do the whole copy with a single memcpy.
2740 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
2741
2742 Revert the FOLLOW-SYMLINKS change for file-attributes.
2743 Doing it right would require several changes to Tramp, and there's
2744 not enough time to get that tested before the freeze today.
2745 * dired.c (directory_files_internal, Ffile_attributes):
2746 Undo last change.
2747
2748 * frame.c (x_report_frame_params): Port better to wider ints.
2749 Do not assume that EMACS_UINT is the same width as uprintmax_t,
2750 or that pointers can be printed in 15 decimal digits.
2751 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
2752
27532012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
2754
2755 Support x64 build on MS-Windows.
2756 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
2757 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
2758 compatibility with x64.
2759 (x_get_focus_frame): Add prototype.
2760
2761 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
2762 defining an XRectangle structure.
2763
2764 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
2765 arithmetics for compatibility with x64.
2766
2767 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
2768 compatibility with x64.
2769
2770 * w32heap.h: Adjust prototypes and declarations.
2771
2772 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
2773 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
2774 DWORD, long, and unsigned long, for compatibility with x64.
2775 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
2776 (sbrk): Argument is now of type ptrdiff_t.
2777
2778 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
2779 less than 0x0500.
2780 (w32_msg_pump): Use WPARAM type for 'result'.
2781
2782 * w32.c (init_environment, get_emacs_configuration): Support AMD64
2783 architecture.
2784 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
2785 compatibility with x64.
2786
2787 * vm-limit.c (lim_data): Now size_t.
2788 (check_memory_limits): Adjust prototypes of real_morecore and
2789 __morecore to receive argument of type ptrdiff_t. Use size_t for
2790 five_percent and data_size.
2791
2792 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
2793 variables, for compatibility with x64.
2794 (rva_to_section, offset_to_section, relocate_offset)
2795 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
2796 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
2797 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
2798 for compatibility with x64.
2799
2800 * sysdep.c (STDERR_FILENO): Define if not already defined.
2801
2802 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
2803 (__morecore): Argument type is now ptrdiff_t.
2804 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
2805 (relinquish): Use ptrdiff_t type for 'excess'.
2806 (r_alloc_sbrk): Argument type is now ptrdiff_t.
2807
2808 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
2809 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
2810 instead of a literal number.
2811
2812 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
2813 (min): Define only if not already defined.
2814
2815 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
2816 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
2817 hosts.
2818
2819 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
2820 'bitmaps' is a pointer.
2821
2822 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
2823
2824 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
2825
28262012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2827
2828 file-attributes has a new optional arg FOLLOW-SYMLINKS.
2829 * dired.c (directory_files_internal, Ffile_attributes):
2830 New arg follow_symlinks. All uses changed.
2831
28322012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
2833
2834 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
2835
28362012-09-30 Eli Zaretskii <eliz@gnu.org>
2837
2838 Support atimers and CPU profiler via profile.c on MS-Windows.
2839 * w32proc.c (sig_mask, crit_sig): New static variables.
2840 (sys_signal): Support SIGALRM and SIGPROF.
2841 (sigemptyset, sigaddset, sigfillset, sigprocmask)
2842 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
2843 sigfillset, and sigprocmask are no longer no-ops.
2844 (sigismember): New function.
2845 (struct itimer_data): New definition.
2846 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
2847 (crit_prof): New static variables.
2848 (MAX_SINGLE_SLEEP): New definition.
2849 (timer_loop, stop_timer_thread, term_timers, init_timers)
2850 (start_timer_thread, getitimer, setitimer): New functions.
2851 (alarm): No longer a no-op, calls setitimer.
2852
2853 * w32.c (term_ntproc): Call term_timers.
2854 (init_ntproc): Make sure all signals are unblocked at startup, to
2855 erase any traces of dumping. Call init_timers.
2856
2857 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
2858 Windows-specific code to display the hourglass mouse pointer is no
2859 longer used.
2860 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
2861 to hourglass timer expiration.
2862 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
2863 Remove, no longer used.
2864 (w32_note_current_window, show_hourglass, hide_hourglass):
2865 New functions, in support of hourglass cursor display similar to other
2866 window systems.
2867 (syms_of_w32fns): Don't initialize hourglass_timer.
2868
2869 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
2870 WINDOWSNT as well.
2871 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
2872
2873 * w32.h (init_timers, term_timers): Add prototypes.
2874
28752012-09-30 Kenichi Handa <handa@gnu.org>
2876
2877 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
2878 to the buffer relocation which may be caused by ccl_driver.
2879
28802012-09-30 Jan Djärv <jan.h.d@swipnet.se>
2881
2882 * xfns.c (Fx_file_dialog): Update comment.
2883
2884 * w32fns.c (Fx_file_dialog): Update comment.
2885
2886 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
2887 Initialize panel name field if OSX >= 10.6.
2888
2889 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
2890
2891 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
2892
2893 * nsterm.m (NEW_STYLE_FS): New define.
2894 (ns_fullscreen_hook, windowWillEnterFullScreen)
2895 (windowDidEnterFullScreen, windowWillExitFullScreen)
2896 (windowDidExitFullScreen, toggleFullScreen, handleFS)
2897 (setFSValue): New functions.
2898 (EmacsFSWindow): New implementation.
2899 (canBecomeKeyWindow): New function for EmacsFSWindow.
2900 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
2901 (dealloc): Release nonfs_window if in fullscreen.
2902 (updateFrameSize:): Call windowDidMove to update top/left.
2903 (windowWillResize:toSize:): Check if frame is still maximized.
2904 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
2905 next_maximized, maximized_width, maximized_height and nonfs_window.
2906 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
2907 tbar_height.
2908 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
2909 fullscreen. Set maximized_width/height. Act on next_maximized.
2910
2911 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
2912 (EmacsView): Add variables for fullscreen.
2913 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
2914 (EmacsFSWindow): New interface for fullscreen.
2915
29162012-09-30 Juanma Barranquero <lekktu@gmail.com>
2917
2918 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2919
29202012-09-30 Chong Yidong <cyd@gnu.org>
2921
2922 * fns.c (Frandom): Doc fix.
2923
29242012-09-30 Martin Rudalics <rudalics@gmx.at>
2925
2926 * window.c (Vwindow_combination_limit): New default value.
2927 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
2928
29292012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2930
2931 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
2932 Suggested by Eli Zaretskii in
2933 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
2934
29352012-09-30 Eli Zaretskii <eliz@gnu.org>
2936
2937 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
2938 HAVE_TIMER_SETTIME is defined.
2939
29402012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2941
2942 Profiler improvements: more-accurate timers, overflow checks.
2943 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
2944 signal.h, setjmp.h. Include systime.h instead.
2945 (saturated_add): New function.
2946 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
2947 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
2948 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
2949 New static vars.
2950 (enum profiler_cpu_running): New enum.
2951 (profiler_cpu_running): Now of that enum type, not bool.
2952 All uses changed to store the new value.
2953 (handle_profiler_signal): Rename from sigprof_handler_1,
2954 for consistency with other handlers. Do not check whether
2955 cpu_log is a hash-table if garbage collecting, since it
2956 doesn't matter in that case.
2957 (deliver_profiler_signal): Rename from sigprof_handler,
2958 for consistency with other handlers.
2959 (setup_cpu_timer): New function, with much of what used to be in
2960 Fprofiler_cpu_start. Check for out-of-range argument.
2961 Prefer timer_settime if available, and prefer
2962 thread cputime clocks, then process cputime clocks, then
2963 monotonic clocks, to the old realtime clock. Use make_timeval
2964 to round more-correctly when falling back to setitimer.
2965 (Fprofiler_cpu_start): Use it.
2966 (Fprofiler_cpu_stop): Prefer timer_settime if available.
2967 Don't assume that passing NULL as the 2nd argument of setitimer
2968 is the same as passing a pointer to all-zero storage.
2969 Ignore SIGPROF afterwards.
2970 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
2971 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
2972 non-fatal signal handlers. Ignore SIGPROF on startup.
2973 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
2974 in profiler.c, since sysdep.c now uses it.
2975
2976 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
2977 Suggested by Eli Zaretskii in
2978 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
2979
29802012-09-29 Juanma Barranquero <lekktu@gmail.com>
2981
2982 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
2983
29842012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
2985
2986 * lisp.h (struct backtrace): Remove indirection for `function' field.
2987 * xdisp.c (redisplay_internal):
2988 * profiler.c (record_backtrace, sigprof_handler_1):
2989 * alloc.c (Fgarbage_collect):
2990 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
2991 (Fbacktrace_frame): Adjust accordingly.
2992
29932012-09-28 Glenn Morris <rgm@gnu.org>
2994
2995 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
2996 (Frun_hook_with_args_until_failure): Doc fixes.
2997
29982012-09-28 Eli Zaretskii <eliz@gnu.org>
2999
3000 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
3001 Qautomatic_redisplay and change the symbol name. All users changed.
3002
30032012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
3004
3005 * profiler.c (sigprof_handler): Fix race condition.
3006
30072012-09-28 Glenn Morris <rgm@gnu.org>
3008
3009 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
3010
30112012-09-27 Paul Eggert <eggert@cs.ucla.edu>
3012
3013 Check more robustly for timer_settime.
3014 * Makefile.in (LIB_TIMER_TIME): New macro.
3015 (LIBES): Add it.
3016 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
3017 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
3018 call timer_settime.
3019
30202012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
3021
3022 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
3023
30242012-09-26 Juanma Barranquero <lekktu@gmail.com>
3025
3026 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
3027
30282012-09-26 Paul Eggert <eggert@cs.ucla.edu>
3029
3030 * character.h (MAYBE_UNIFY_CHAR): Remove.
3031 * charset.c, charset.h (maybe_unify_char): Now static.
3032 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
3033 Since this stuff is now private to charset.c, there's no need for
3034 a public macro and no need to inline by hand.
3035
30362012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
3037 Stefan Monnier <monnier@iro.umontreal.ca>
3038 Juanma Barranquero <lekktu@gmail.com>
3039
3040 * profiler.c: New file.
3041 * Makefile.in (base_obj): Add profiler.o.
3042 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
3043 ($(BLD)/profiler.$(O)): New target.
3044 * emacs.c (main): Call syms_of_profiler.
3045 * alloc.c (Qautomatic_gc): New constant.
3046 (MALLOC_PROBE): New macro.
3047 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
3048 (total_bytes_of_live_objects): New function.
3049 (Fgarbage_collect): Use it. Record itself in backtrace_list.
3050 Call malloc_probe for the memory profiler.
3051 (syms_of_alloc): Define Qautomatic_gc.
3052 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
3053 race condition.
3054 (struct backtrace): Move definition...
3055 * lisp.h (struct backtrace): ..here.
3056 (Qautomatic_gc, profiler_memory_running): Declare vars.
3057 (malloc_probe, syms_of_profiler): Declare functions.
3058 * xdisp.c (Qautomatic_redisplay): New constant.
3059 (redisplay_internal): Record itself in backtrace_list.
3060 (syms_of_xdisp): Define Qautomatic_redisplay.
3061
30622012-09-25 Eli Zaretskii <eliz@gnu.org>
30632012-09-25 Juanma Barranquero <lekktu@gmail.com>
3064
3065 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
3066
30672012-09-25 Paul Eggert <eggert@cs.ucla.edu>
3068
3069 Prefer POSIX timers if available.
3070 They avoid a race if the timer is too close to the current time.
3071 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
3072 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
3073 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
3074
30752012-09-25 Eli Zaretskii <eliz@gnu.org>
3076
3077 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
3078 CHAR_STRING_ADVANCE.
3079 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
3080 STRING_CHAR_ADVANCE.
3081
30822012-09-25 Juanma Barranquero <lekktu@gmail.com>
3083
3084 Move Vlibrary_cache to emacs.c and reset before dumping.
3085
3086 * lisp.h (reset_image_types): Declare.
3087 [WINDOWSNT] (Vlibrary_cache): Declare.
3088
3089 * image.c (reset_image_types): New function.
3090
3091 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
3092 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
3093 (Fdump_emacs): Reset Vlibrary_cache and image_types.
3094
3095 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
3096 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
3097
3098 * w32.h (Vlibrary_cache): Do not declare.
3099
31002012-09-25 Eli Zaretskii <eliz@gnu.org>
3101
3102 * w32proc.c (sys_signal): Handle all signals defined by the
3103 MS-Windows runtime, not just SIGCHLD. Actually install the signal
3104 handlers for signals supported by Windows. Don't override
3105 term_ntproc as the handler for SIGABRT.
3106 (sigaction): Rewrite to call sys_signal instead of duplicating its
3107 code.
3108 (sys_kill): Improve commentary.
3109
3110 * w32.c (term_ntproc): Accept (and ignore) one argument, for
3111 consistency with a signature of a signal handler. All callers
3112 changed.
3113 (init_ntproc): Accept an argument DUMPING. If dumping, don't
3114 install term_ntproc as a signal handler for SIGABRT, as that
3115 should be done by the dumped Emacs.
3116
3117 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
3118
3119 * w32select.c (term_w32select): Protect against repeated
3120 invocation by setting clipboard_owner to NULL after calling
3121 DestroyWindow.
3122
3123 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
3124 and term_ntproc to their modified signatures.
3125
3126 * character.c (char_string, string_char): Remove calls to
3127 MAYBE_UNIFY_CHAR. See the discussion starting at
3128 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
3129 for the details.
3130
31312012-09-25 Chong Yidong <cyd@gnu.org>
3132
3133 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
3134
31352012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
3136
3137 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
3138 when encountering an unknown bytecode.
3139
31402012-09-24 Paul Eggert <eggert@cs.ucla.edu>
3141
3142 image.c, indent.c: Use bool for booleans.
3143 * dispextern.h (struct image_type): Members valid_p, load, init
3144 now return bool, not int. All uses changed.
3145 * image.c: Omit unnecessary static decls.
3146 (x_create_bitmap_mask, x_build_heuristic_mask):
3147 Return void, not int, since callers don't care about the return value.
3148 (x_create_bitmap_mask, define_image_type, valid_image_p)
3149 (struct image_keyword, parse_image_spec, image_spec_value)
3150 (check_image_size, image_background)
3151 (image_background_transparent, x_clear_image_1)
3152 (postprocess_image, lookup_image, x_check_image_size)
3153 (x_create_x_image_and_pixmap, xbm_image_p)
3154 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
3155 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
3156 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
3157 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
3158 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
3159 (png_image_p, init_png_functions, png_load_body, png_load)
3160 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
3161 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
3162 (init_gif_functions, gif_load, imagemagick_image_p)
3163 (imagemagick_load_image, imagemagick_load, svg_image_p)
3164 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
3165 (gs_load):
3166 * nsimage.m (ns_load_image):
3167 * nsterm.m (ns_defined_color):
3168 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
3169 * xfns.c (x_defined_color):
3170 * xterm.c (x_alloc_lighter_color_for_widget)
3171 (x_alloc_nearest_color_1, x_alloc_nearest_color)
3172 (x_alloc_lighter_color):
3173 * indent.c (disptab_matches_widthtab, current_column)
3174 (scan_for_column, string_display_width, indented_beyond_p)
3175 (compute_motion, vmotion, Fvertical_motion):
3176 Use bool for booleans.
3177
31782012-09-24 Chong Yidong <cyd@gnu.org>
3179
3180 * chartab.c (Fset_char_table_default): Obsolete function removed.
3181
31822012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3183
3184 Move pid_t related decls out of lisp.h.
3185 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
3186 (interruptible_wait_for_termination):
3187 Move these decls from lisp.h to syswait.h, since they use pid_t.
3188 Needed on FreeBSD; see Herbert J. Skuhra in
3189 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
3190 * callproc.c: Include syswait.h.
3191
3192 gnutls.c, gtkutil.c: Use bool for boolean.
3193 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
3194 (emacs_gnutls_handle_error):
3195 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
3196 (xg_hide_tooltip, xg_create_frame_widgets)
3197 (create_dialog, xg_uses_old_file_dialog)
3198 (xg_get_file_with_chooser, xg_get_file_with_selection)
3199 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
3200 (xg_item_label_same_p, xg_update_menubar)
3201 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
3202 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
3203 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
3204 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
3205 (update_frame_tool_bar, free_frame_tool_bar):
3206 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
3207 * nsmenu.m (ns_update_menubar):
3208 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
3209 * xfns.c (Fx_show_tip) [USE_GTK]:
3210 Use bool for boolean.
3211 * gtkutil.c (xg_update_frame_menubar):
3212 * xmenu.c (update_frame_menubar):
3213 Return void, not int, since caller ignores return value.
3214 * gtkutil.c (xg_change_toolbar_position):
3215 Return void, not 1.
3216
32172012-09-23 Juanma Barranquero <lekktu@gmail.com>
3218
3219 * makefile.w32-in (BLOCKINPUT_H): Remove.
3220 (SYSSIGNAL_H): New macro.
3221 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
3222 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
3223 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
3224 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
3225 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
3226 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
3227 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
3228 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
3229 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
3230 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
3231 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
3232 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
3233 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
3234 ($(BLD)/w32xfns.$(O)): Update dependencies.
3235
32362012-09-23 Eli Zaretskii <eliz@gnu.org>
3237
3238 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
3239 fatal_error_backtrace.
3240
3241 * w32proc.c (sys_kill): Undo last change: don't do anything when
3242 invoked to deliver SIGABRT to our own process. This is now
3243 handled by emacs_raise.
3244
32452012-09-23 Juanma Barranquero <lekktu@gmail.com>
3246
3247 * w32term.c (w32_read_socket): Remove leftover reference to
3248 interrupt_input_pending.
3249
32502012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3251
3252 Do not use SA_NODEFER.
3253 Problem reported by Dani Moncayo in
3254 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
3255 * alloc.c (die):
3256 * sysdep.c (emacs_abort): Do not reset signal handler.
3257 * emacs.c (terminate_due_to_signal): Reset signal handler here.
3258 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
3259 wanted even on POSIXish hosts, and it doesn't work on Windows.
3260
32612012-09-23 Jan Djärv <jan.h.d@swipnet.se>
3262
3263 * xterm.c (x_term_init): Call fixup_locale before and after calling
3264 gtk_init (Bug#12392).
3265
32662012-09-23 Chong Yidong <cyd@gnu.org>
3267
3268 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
3269 Vdynamic_library_alist.
3270
3271 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
3272 (Fgnutls_available_p): Caller changed.
3273
3274 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
3275 (Flibxml_parse_xml_region): Likewise.
3276
3277 * dispextern.h (struct image_type): Remove arg from init function.
3278
3279 * image.c (Finit_image_library, lookup_image_type)
3280 (define_image_type): Remove now-unneeded second arg.
3281 (init_xpm_functions, init_png_functions, init_jpeg_functions)
3282 (init_tiff_functions, init_gif_functions, init_svg_functions):
3283 Arglist and w32_delayed_load calling convention changed.
3284 (gs_type): Remove init_gs_functions; there is no such function.
3285 (valid_image_p, make_image): Fix caller to lookup_image_type.
3286
32872012-09-23 Paul Eggert <eggert@cs.ucla.edu>
3288
3289 Simplify and avoid signal-handling races (Bug#12471).
3290 * alloc.c (die):
3291 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
3292 Avoid recursive loop if there's a fatal error in the function itself.
3293 * atimer.c (pending_atimers):
3294 * blockinput.h: Don't include "atimer.h"; no longer needed.
3295 (interrupt_input_pending): Remove. All uses removed.
3296 pending_signals now counts both atimers and ordinary interrupts.
3297 This is less racy than having three separate pending-signal flags.
3298 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
3299 (input_blocked_p):
3300 Rename from their upper-case counterparts BLOCK_INPUT,
3301 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
3302 INPUT_BLOCKED_P, and turn into functions. All uses changed.
3303 This makes it easier to access volatile variables more accurately.
3304 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
3305 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
3306 that's more reliable if the code is buggy and sets
3307 interrupt_input_blocked to a negative value. All uses changed.
3308 * atimer.c (deliver_alarm_signal):
3309 Remove. No need to deliver this to the parent; any thread can
3310 handle this signal now. All uses replaced by underlying handler.
3311 * atimer.c (turn_on_atimers):
3312 * dispnew.c (handle_window_change_signal):
3313 * emacs.c (handle_danger_signal):
3314 * keyboard.c (kbd_buffer_get_event):
3315 Don't reestablish signal handler; not needed with sigaction.
3316 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
3317 (UNBLOCK_INPUT_TO):
3318 Rework to avoid unnecessary accesses to volatile variables.
3319 (UNBLOCK_INPUT_TO): Now a function.
3320 (totally_unblock_input, unblock_input): New decls.
3321 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
3322 (init_data): Remove. Necessary stuff now done in init_signal.
3323 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
3324 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
3325 (fatal_error_code): Remove; no longer needed.
3326 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
3327 it doesn't always backtrace. All uses changed. No need to reset
3328 signal to default, since sigaction and/or die does that for us now.
3329 Use emacs_raise (FOO), not kill (getpid (), FOO).
3330 (main): Check more-accurately whether we're dumping.
3331 Move fatal-error setup to sysdep.c
3332 * floatfns.c: Do not include "syssignal.h"; no longer needed.
3333 * gtkutil.c (xg_get_file_name, xg_get_font):
3334 Remove no-longer-needed signal-mask manipulation.
3335 * keyboard.c, process.c (POLL_FOR_INPUT):
3336 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
3337 * keyboard.c (read_avail_input): Remove.
3338 All uses replaced by gobble_input.
3339 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
3340 (kbd_buffer_store_event_hold, gobble_input):
3341 (record_asynch_buffer_change) [USABLE_SIGIO]:
3342 (store_user_signal_events):
3343 No need to mess with signal mask.
3344 (gobble_input): If blocking input and there are terminals, simply
3345 set pending_signals to 1 and return. All hooks changed to not
3346 worry about whether input is blocked.
3347 (process_pending_signals): Clear pending_signals before processing
3348 them, in case a signal comes in while we're processing.
3349 By convention callers now test pending_signals before calling us.
3350 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
3351 New functions, to support changes to blockinput.h.
3352 (handle_input_available_signal): Now extern.
3353 (reinvoke_input_signal): Remove. All uses replaced by
3354 handle_async_input.
3355 (quit_count): Now volatile, since a signal handler uses it.
3356 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
3357 All callers changed. Block SIGINT only if not already blocked.
3358 Clear sigmask reliably, even if Fsignal returns, which it can.
3359 Omit unnecessary accesses to volatile var.
3360 (quit_throw_to_read_char): No need to restore sigmask.
3361 * keyboard.c (gobble_input, handle_user_signal):
3362 * process.c (wait_reading_process_output):
3363 Call signal-handling code rather than killing ourselves.
3364 * lisp.h: Include <float.h>, for...
3365 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
3366 (pending_signals): Now volatile.
3367 (syms_of_data): Now const if IEEE floating point.
3368 (handle_input_available_signal) [USABLE_SIGIO]:
3369 (terminate_due_to_signal, record_child_status_change): New decls.
3370 * process.c (create_process): Avoid disaster if memory is exhausted
3371 while we're processing a vfork, by tightening the critical section
3372 around the vfork.
3373 (send_process_frame, process_sent_to, handle_pipe_signal)
3374 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
3375 ignores SIGPIPE.
3376 (send_process): No need for setjmp/longjmp any more, since the
3377 SIGPIPE stuff is now gone. Instead, report an error if errno
3378 is EPIPE.
3379 (record_child_status_change): Now extern. PID and W are now args.
3380 Return void, not bool. All callers changed.
3381 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
3382 Remove. All uses removed. This bug should be fixed now in a
3383 different way.
3384 (wait_for_termination_1): Use waitpid rather than sigsuspend,
3385 and record the child status change directly. This avoids the
3386 need to futz with the signal mask.
3387 (process_fatal_action): Move here from emacs.c.
3388 (emacs_sigaction_flags): New function, containing
3389 much of what used to be in emacs_sigaction_init.
3390 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
3391 caught by emacs, to make races less likely.
3392 (deliver_process_signal): Rename from handle_on_main_thread.
3393 All uses changed.
3394 (BACKTRACE_LIMIT_MAX): Now at top level.
3395 (thread_backtrace_buffer, threadback_backtrace_pointers):
3396 New static vars.
3397 (deliver_thread_signal, deliver_fatal_thread_signal):
3398 New functions, for more-accurate delivery of thread-specific signals.
3399 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
3400 (deliver_arith_signal): Handle in this thread, not
3401 in the main thread, since it's triggered by this thread.
3402 (maybe_fatal_sig): New function.
3403 (init_signals): New arg DUMPING so that we can be more accurate
3404 about whether we're dumping. Caller changed.
3405 Treat thread-specific signals differently from process-general signals.
3406 Block all signals while handling fatal error; that's safer.
3407 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
3408 on IEEE hosts.
3409 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
3410 Ignore SIGPIPE unless batch.
3411 (emacs_backtrace): Output backtrace for the appropriate thread,
3412 which is not necessarily the main thread.
3413 * syssignal.h: Include <stdbool.h>.
3414 (emacs_raise): New macro.
3415 * xterm.c (x_connection_signal): Remove; no longer needed
3416 now that we use sigaction.
3417 (x_connection_closed): No need to mess with sigmask now.
3418 (x_initialize): No need to reset SIGPIPE handler here, since
3419 init_signals does this for us now.
3420
34212012-09-23 Jan Djärv <jan.h.d@swipnet.se>
3422
3423 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
3424 background rect may be larger (Bug#12245).
3425
34262012-09-23 Chong Yidong <cyd@gnu.org>
3427
3428 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
3429
34302012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3431
3432 * .gdbinit: Just stop at fatal_error_backtrace.
3433 See Stefan Monnier's request in
3434 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
3435 Remove no-longer-used query of system type.
3436
34372012-09-22 Chong Yidong <cyd@gnu.org>
3438
3439 * search.c (Freplace_match): Doc fix (Bug#12325).
3440
3441 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
3442
3443 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
3444 (Fline_end_position): Doc fix.
3445
3446 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
3447
34482012-09-22 Chong Yidong <cyd@gnu.org>
3449
3450 * dispextern.h (struct image_type): Add new slot, storing a type
3451 initialization function.
3452
3453 * image.c (define_image_type): Call the image initializer function
3454 if it is defined. Arguments and return value changed.
3455 (valid_image_p, make_image): Callers changed.
3456 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
3457 (gif_type, imagemagick_type, svg_type, gs_type):
3458 Add initialization functions.
3459 (Finit_image_library): Call lookup_image_type.
3460 (CHECK_LIB_AVAILABLE): Macro deleted.
3461 (lookup_image_type): Call define_image_type here, rather than via
3462 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
3463 (syms_of_image): Move define_image_type calls for xbm_type and
3464 pbm_type to lookup_image_type.
3465
34662012-09-22 Eli Zaretskii <eliz@gnu.org>
3467
3468 * keyboard.c (timer_check_2): Move calculation of 'timers' and
3469 'idle_timers' from here ...
3470 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
3471 lists, to avoid infloops when the timer does something stupid,
3472 like reinvoke itself with the same or smaller time-out.
3473 (Bug#12447)
3474
34752012-09-22 Martin Rudalics <rudalics@gmx.at>
3476
3477 * window.c (Fsplit_window_internal): Handle only Qt value of
3478 Vwindow_combination_limit separately.
3479 (Qtemp_buffer_resize): New symbol.
3480 (Vwindow_combination_limit): New default value.
3481 Rewrite doc-string.
3482
34832012-09-22 Eli Zaretskii <eliz@gnu.org>
3484
3485 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
3486 the new overlay string. (Bug#10159)
3487
34882012-09-22 Paul Eggert <eggert@cs.ucla.edu>
3489
3490 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
3491 or that fprintf is async-signal-safe. POSIX doesn't require
3492 either assumption.
3493
34942012-09-22 Chong Yidong <cyd@gnu.org>
3495
3496 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
3497 (Bug#8207).
3498
34992012-09-22 Kenichi Handa <handa@gnu.org>
3500
3501 * composite.c (composition_reseat_it): Handle the case that a
3502 grapheme cluster is not covered by a single font (Bug#12352).
3503
35042012-09-21 Chong Yidong <cyd@gnu.org>
3505
3506 * image.c (define_image_type): Avoid adding duplicate types to
3507 image_types (Bug#12463). Suggested by Jörg Walter.
3508
35092012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3510
3511 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
3512 (print_load_command_name): Add case LC_DATA_IN_CODE.
3513 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
3514
35152012-09-21 Glenn Morris <rgm@gnu.org>
3516
3517 * eval.c (Frun_hook_with_args_until_success)
3518 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
3519
35202012-09-21 Andreas Schwab <schwab@linux-m68k.org>
3521
3522 * fileio.c (Ffile_selinux_context): Only call freecon when
3523 lgetfilecon succeeded.
3524 (Fset_file_selinux_context): Likewise. (Bug#12444)
3525
35262012-09-21 Eli Zaretskii <eliz@gnu.org>
3527
3528 * xdisp.c (try_window_reusing_current_matrix): Under bidi
3529 reordering, locate the cursor by calling set_cursor_from_row; if
3530 that fails, clear the desired glyph matrix before returning a
3531 failure indication to the caller. Fixes leaving garbled display
3532 when fast scrolling with a down-key. (Bug#12403)
3533 (compute_stop_pos_backwards): Fix a typo that caused crashes while
3534 scrolling through multibyte text.
3535
35362012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
3537
3538 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
3539 calling mark_vectorlike since that's the one that marks the window.
3540 (mark_discard_killed_buffers): Mark the final cdr.
3541 * window.h (struct window): Move prev/next_buffers to the
3542 non-standard fields.
3543 * window.c (make_window): Initialize prev/next_buffers manually.
3544
35452012-09-20 Paul Eggert <eggert@cs.ucla.edu>
3546
3547 Omit unused arg EXPECTED from socket hooks.
3548 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
3549 * nsterm.m (ns_term_init):
3550 * termhooks.h (struct terminal.read_socket_hook):
3551 * w32inevt.c (w32_console_read_socket):
3552 * w32term.c (w32_read_socket):
3553 * xterm.c (XTread_socket):
3554 Omit unused arg EXPECTED. All callers changed.
3555 (store_user_signal_events): Return void, not int, since callers no
3556 longer care about the return value. All uses changed.
3557
35582012-09-20 Juanma Barranquero <lekktu@gmail.com>
3559
3560 * w32gui.h (XParseGeometry): Do not declare.
3561
35622012-09-19 Paul Eggert <eggert@cs.ucla.edu>
3563
3564 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
3565 Ignore 'expected'. See Eli Zaretskii in
3566 <http://bugs.gnu.org/12471#8> (last line).
3567
3568 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
3569 (XParseGeometry): Now static. Substitute extremal values for
3570 values that are out of range.
3571
35722012-09-19 Jan Djärv <jan.h.d@swipnet.se>
3573
3574 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
3575
3576 * nsfns.m (XParseGeometry): Remove.
3577 (Fx_create_frame): Call x_set_offset to correctly interpret
3578 top_pos in geometry.
3579
3580 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
3581 (Fx_parse_geometry): If there is a space in string, call
3582 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
3583
35842012-09-17 Eli Zaretskii <eliz@gnu.org>
3585
3586 * search.c (scan_buffer): Use character positions in calls to
3587 region_cache_forward and region_cache_backward, not byte
3588 positions. (Bug#12196)
3589
3590 * w32term.c (w32_read_socket): Set pending_signals to 1, like
3591 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
3592
3593 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
3594 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
3595 emacs_blocked_malloc, now deleted.
3596
35972012-09-17 Paul Eggert <eggert@cs.ucla.edu>
3598
3599 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
3600 The workaround was for improving performance on Solaris 2.4, but
3601 is getting in the way now. Emacs will still work if someone is
3602 still running Solaris 2.4 in a museum somewhere; Sun dropped
3603 support for Solaris 2.4 in 2003.
3604 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
3605 * process.c (create_process) [HAVE_WORKING_VFORK]:
3606 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
3607 since Emacs no longer uses vfork on that platform.
3608
36092012-09-17 Glenn Morris <rgm@gnu.org>
3610
3611 * emacs.c: Use COPYRIGHT.
3612
36132012-09-16 Paul Eggert <eggert@cs.ucla.edu>
3614
3615 Remove configure's --without-sync-input option (Bug#12450).
3616 When auditing signal-handling in preparation for cleaning it up,
3617 I found that SYNC_INPUT has race conditions and would be a real
3618 pain to fix. Since it's an undocumented and deprecated
3619 configure-time option, now seems like a good time to remove it.
3620 Also see <http://bugs.gnu.org/11080#16>.
3621 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
3622 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
3623 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3624 (malloc_hysteresis):
3625 (check_depth) [XMALLOC_OVERRUN_CHECK]:
3626 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
3627 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
3628 (dont_register_blocks, bytes_used_when_reconsidered)
3629 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
3630 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
3631 [!SYSTEM_MALLOC && !SYNC_INPUT]:
3632 Remove. All uses removed.
3633 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
3634 implementation, one that depends on whether the new macro
3635 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
3636 is defined.
3637 * atimer.c (run_timers, handle_alarm_signal):
3638 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
3639 (handle_async_input, process_pending_signals)
3640 (handle_input_available_signal, init_keyboard):
3641 * nsterm.m (ns_read_socket):
3642 * process.c (wait_reading_process_output):
3643 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
3644 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
3645 (emacs_write):
3646 * xterm.c (XTread_socket):
3647 Assume SYNC_INPUT.
3648 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
3649 * eval.c (handling_signal): Remove. All uses removed.
3650 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
3651 All uses replaced with the SYNC_INPUT version.
3652 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
3653 Remove decls.
3654 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
3655 Now static.
3656
3657 * font.c (Ffont_shape_gstring): Remove unused local.
3658
36592012-09-16 Glenn Morris <rgm@gnu.org>
3660
3661 * Makefile.in (clean): No longer run nextstep's clean.
3662
3663 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
3664 (ns_frag): Remove.
3665 (ns-app): Move here from ns.mk, and simplify.
3666 (clean): Simplify nextstep entry.
3667 * ns.mk: Remove file.
3668
36692012-09-17 Kenichi Handa <handa@gnu.org>
3670
3671 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
3672 not covert the last few charactes.
3673
36742012-09-16 Kenichi Handa <handa@gnu.org>
3675
3676 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
3677 here, but just check the validity of glyphs in the glyph-string.
3678
36792012-09-16 Martin Rudalics <rudalics@gmx.at>
3680
3681 * window.c (Fwindow_parameter, Fset_window_parameter):
3682 Accept any window as argument (Bug#12452).
3683
36842012-09-16 Jan Djärv <jan.h.d@swipnet.se>
3685
3686 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
3687 to ns_term_init to avoid memory leak.
3688
3689 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
3690 explicit retain/release.
3691 (ns_term_init): Only allow one display. Initialize outerpool and
3692 ns_*_types.
3693
36942012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3695
3696 Port _setjmp fix to POSIXish hosts as well as Microsoft.
3697 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
3698 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
3699 the Microsoft problem in a different way, by altering ../nt/config.nt.
3700
37012012-09-15 Eli Zaretskii <eliz@gnu.org>
3702
3703 * w32xfns.c:
3704 * w32uniscribe.c:
3705 * w32term.c:
3706 * w32select.c:
3707 * w32reg.c:
3708 * w32proc.c:
3709 * w32menu.c:
3710 * w32inevt.c:
3711 * w32heap.c:
3712 * w32font.c:
3713 * w32fns.c:
3714 * w32console.c:
3715 * w32.c:
3716 * w16select.c: Remove inclusion of setjmp.h, as it is now included
3717 by lisp.h. This completes removal of setjmp.h inclusion
3718 erroneously announced in the previous commit. (Bug#12446)
3719
3720 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
3721 more accurate.
3722
3723 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
3724 not defined as a macro. The latter happens on MS-Windows.
3725 (Bug#12446)
3726
37272012-09-15 Paul Eggert <eggert@cs.ucla.edu>
3728
3729 Port better to POSIX hosts lacking _setjmp (Bug#12446).
3730 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
3731 Some instances of '#include <setjmp.h>' removed, if the
3732 only reason for the instance was because "lisp.h" was included.
3733 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
3734 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
3735 and _longjmp with the new symbols. Emacs already uses _setjmp if
3736 available, so this change affects only POSIXish hosts that have
3737 sigsetjmp but not _setjmp, such as some versions of Solaris and
3738 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
3739 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
3740 (png_load_body) [HAVE_PNG]:
3741 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
3742 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
3743 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
3744 since PNG requires jmp_buf. This is the only exception to the
3745 general rule that we now use sys_setjmp and sys_longjmp.
3746 This exception is OK since this code does not change the signal
3747 mask or longjmp out of a signal handler.
3748
37492012-09-14 Paul Eggert <eggert@cs.ucla.edu>
3750
3751 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
3752 Include "syssignal.h", for 'main_thread'.
3753
37542012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
3755
3756 Avoid out-of-range marker position (Bug#12426).
3757 * insdel.c (replace_range, replace_range_2):
3758 Adjust markers before overlays, as suggested by comments.
3759 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
3760 Remove redundant check before calling offset_intervals.
3761
37622012-09-14 Martin Rudalics <rudalics@gmx.at>
3763
3764 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
3765 current buffer (Bug#12387).
3766
37672012-09-14 Juanma Barranquero <lekktu@gmail.com>
3768
3769 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
3770
37712012-09-13 Paul Eggert <eggert@cs.ucla.edu>
3772
3773 Use a more backwards-compatible timer format (Bug#12430).
3774 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
3775 vector element, not from the 4th, since PSECS is now at the end.
3776 (Fcurrent_idle_time): Doc fix.
3777
37782012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
3779
3780 Function to mark objects and remove killed buffers at once.
3781 * alloc.c (discard_killed_buffers): Rename to ...
3782 (mark_discard_killed buffers) ... new name. Add marking
3783 of remaining objects. Fix comment. Adjust users.
3784 (mark_object): Do not touch frame buffer lists here.
3785 * frame.c (delete_frame): Reset frame buffer lists here.
3786
37872012-09-13 Paul Eggert <eggert@cs.ucla.edu>
3788
3789 Better workaround for GNOME bug when --enable-gcc-warnings.
3790 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
3791 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
3792 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
3793
3794 Simplify SIGIO usage (Bug#12408).
3795 The code that dealt with SIGIO was crufty and confusing, e.g., it
3796 played tricks like "#undef SIGIO" but these tricks were not used
3797 consistently. Simplify mostly by not #undeffing standard symbols,
3798 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
3799 or not as we please) rather than "defined SIGIO" (standard symbol
3800 that we probably shouldn't #undef).
3801 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
3802 Modules that need it can include it.
3803 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
3804 * dispextern.h (ignore_sigio): New decl.
3805 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
3806 unconditionally, since it's now a no-op if !USABLE_SIGIO.
3807 * emacs.c (shut_down_emacs):
3808 * keyboard.c (kbd_buffer_store_event_hold):
3809 Use ignore_sigio rather than invoking 'signal' directly.
3810 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
3811 for FIONREAD.
3812 (FIONREAD, SIGIO): Do not #undef.
3813 (tty_read_avail_input): Use #error rather than a syntax error.
3814 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
3815 for I_PIPE, used by SETUP_SLAVE_PTY.
3816 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
3817 * sysdep.c (croak): Remove; no longer needed. This bit of
3818 temporary code, with Fred N. Fish's comment that it's temporary,
3819 has been in Emacs since at least 1992!
3820 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
3821 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
3822 * syssignal.h (croak): Remove decl.
3823 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
3824 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
3825 now that we're termios-only.
3826 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
3827 * term.c (dissociate_if_controlling_tty): Use #error rather than
3828 a run-time error.
3829
3830 Work around GCC and GNOME bugs when --enable-gcc-warnings.
3831 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
3832 to work around GNOME bug 683906.
3833 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
3834 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
3835 This works around GCC bug 54561.
3836
38372012-09-12 Paul Eggert <eggert@cs.ucla.edu>
3838
3839 More fixes for 'volatile' and setjmp/longjmp.
3840 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
3841 * image.c (struct png_load_context) [HAVE_PNG]: New type.
3842 (png_load_body) [HAVE_PNG]:
3843 (jpeg_load_body) [HAVE_JPEG]:
3844 New function, with most of the old parent function's body.
3845 (png_load) [HAVE_PNG]:
3846 (jpeg_load) [HAVE_JPEG]:
3847 Invoke the new function, to avoid longjmp munging our locals.
3848 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
3849 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
3850 longjmp is passed 2, as the C standard doesn't guarantee this.
3851 Instead, store the failure code into mgr->failure_code.
3852
38532012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
3854
3855 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
3856 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
3857 (syms_of_keyboard): Remove support for unread-command-char.
3858
38592012-09-12 Eli Zaretskii <eliz@gnu.org>
3860
3861 * w32proc.c (sys_kill): If PID is our process ID and the signal is
3862 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
3863 violation. (Bug#12426)
3864
38652012-09-12 Paul Eggert <eggert@cs.ucla.edu>
3866
3867 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
3868
38692012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
3870
3871 * eval.c: Add `inhibit-debugger'.
3872 (Qinhibit_debugger): New symbol.
3873 (call_debugger): Bind it instead of Qdebug_on_error.
3874 (maybe_call_debugger): Test Vinhibit_debugger.
3875 (syms_of_eval): Define inhibit-debugger.
3876 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
3877 (syms_of_xdisp): Remove inhibit-debug-on-message.
3878
38792012-09-11 Paul Eggert <eggert@cs.ucla.edu>
3880
3881 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
3882 If a nonvolatile local variable is written before a _longjmp to
3883 the frame containing the variable, and is read after the _longjmp,
3884 the value read is indeterminate. Some local variables of type
3885 'struct handler' and 'struct catchtag' are used in this way, so
3886 mark each of their slots as volatile if the slot can be set before
3887 _longjmp and read afterwards.
3888 * lisp.h (struct handler): var and chosen_clause are now volatile.
3889 (struct catchtag): val, next, and pdlcount are now volatile.
3890
3891 * bidi.c (bidi_push_it, bidi_pop_it):
3892 * fns.c (copy_hash_table):
3893 * image.c (define_image_type):
3894 * keyboard.c (kbd_buffer_store_event_hold):
3895 * process.c (Fprocess_send_eof):
3896 * xfaces.c (x_create_gc) [HAVE_NS]:
3897 * xgselect.c (xg_select):
3898 Prefer assignment to memcpy when either will do.
3899
3900 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
3901 Use pointer-to-a-pointer to simplify and avoid a NILP check each
3902 time an item is removed. No need to mark this function 'inline';
3903 the compiler knows better than we do.
3904
39052012-09-11 Jan Djärv <jan.h.d@swipnet.se>
3906
3907 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
3908 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
3909 to change_frame_size (Bug#12388).
3910 (windowDidResize:): Pass YES to updateFrameSize.
3911
3912 * nsterm.h: Add delay parameter to updateFrameSize.
3913
39142012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3915
3916 Discard killed buffers from deleted window and frame objects.
3917 This reduces an amount of references to killed buffers and
3918 helps GC to reclaim them faster.
3919 * alloc.c (discard_killed_buffers): New function.
3920 (mark_object): Use it for deleted windows and frames.
3921 (mark_object): If symbol's value is set up for a killed buffer
3922 or deleted frame, restore its global binding.
3923 * data.c (swap_in_global_binding): Add GC notice.
3924 (swap_in_symval_forwarding): Use convenient set_blv_where.
3925 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
3926 * window.h: ... to here.
3927
39282012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3929
3930 Convenient macro to check whether the buffer is live.
3931 * buffer.h (BUFFER_LIVE_P): New macro.
3932 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
3933 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
3934
39352012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3936
3937 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
3938 composition cases (Bug#12364).
3939
3940 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
3941 overhang of succeeding glyphs overlapping box cursor.
3942
3943 * w32term.c (x_draw_glyph_string): Likewise.
3944
39452012-09-11 Paul Eggert <eggert@cs.ucla.edu>
3946
3947 Simplify, document, and port floating-point (Bug#12381).
3948 The porting part of this patch fixes bugs on non-IEEE platforms
3949 with frexp, ldexp, logb.
3950 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
3951 Now static.
3952 * floatfns.c: Simplify discussion of functions that Emacs doesn't
3953 support, by removing commented-out code and briefly listing the
3954 C89 functions excluded. The commented-out stuff was confusing
3955 maintenance, e.g., we thought we needed cbrt but it was commented out.
3956 (logb): Remove decl; no longer needed.
3957 (isfinite): New macro, if not already supplied.
3958 (isnan): Don't replace any existing macro.
3959 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
3960 are present on all C89 platforms.
3961 (Ffrexp): Do not special-case zero, as frexp does the right thing
3962 for that case.
3963 (Flogb): Do not use logb, as it doesn't have the desired meaning
3964 on hosts that use non-base-2 floating point. Instead, stick with
3965 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
3966 frexp, to avoid getting an unspecified result.
3967
3968 * xdisp.c (Qinhibit_debug_on_message): Now static.
3969
39702012-09-10 Jan Djärv <jan.h.d@swipnet.se>
3971
3972 * nsterm.m (ns_update_begin): Set clip path to whole view by using
3973 NSBezierPath (Bug#12131).
3974
39752012-09-10 Chong Yidong <cyd@gnu.org>
3976
3977 * fns.c (Fdelq, Fdelete): Doc fix.
3978
39792012-09-10 Paul Eggert <eggert@cs.ucla.edu>
3980
3981 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
3982 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
3983
39842012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
3985
3986 * lisp.h (make_lisp_ptr): New macro to replace XSET.
3987 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
3988 Use it.
3989
39902012-09-09 Eli Zaretskii <eliz@gnu.org>
3991
3992 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
3993 left fringe if the window has a left margin. This avoids leaving
3994 traces of the cursor because its leftmost pixel is not drawn over.
3995
3996 * dispnew.c (update_window_line): When the left margin area of a
3997 screen line is updated, set the redraw_fringe_bitmaps_p flag of
3998 that screen line. (Bug#12277)
3999
40002012-09-09 Paul Eggert <eggert@cs.ucla.edu>
4001
4002 Assume C89 or later for math functions (Bug#12381).
4003 This simplifies the code, and makes it a bit smaller and faster,
4004 and (most important) makes it easier to clean up signal handling
4005 since we can stop worring about floating-point exceptions in
4006 library code. That was a problem before C89, but the problem
4007 went away many years ago on all practical Emacs targets.
4008 * data.c, image.c, lread.c, print.c:
4009 Don't include <math.h>; no longer needed.
4010 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
4011 might be autoconfigured, as that never happens.
4012 * data.c (fmod):
4013 * doprnt.c (DBL_MAX_10_EXP):
4014 * print.c (DBL_DIG):
4015 Remove. C89 or later always defines these.
4016 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
4017 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
4018 (arith_error, domain_error, domain_error2):
4019 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
4020 no longer needed -- we simply return what C returns. All uses removed.
4021 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
4022 the wrapped code.
4023 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
4024 Remove. All uses expanded, as these macros are no longer used
4025 more than once and are now more trouble than they're worth.
4026 (Ftan): Use tan, not sin / cos.
4027 (Flogb): Assume C89 frexp.
4028 (fmod_float): Assume C89 fmod.
4029 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
4030 (init_floatfns): Remove. All uses removed.
4031
40322012-09-08 Jan Djärv <jan.h.d@swipnet.se>
4033
4034 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
4035 compositeToPoint for OSX < 10.6 (Bug#12390).
4036
40372012-09-08 Paul Eggert <eggert@cs.ucla.edu>
4038
4039 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
4040 This produces more-accurate results.
4041
40422012-09-08 Jan Djärv <jan.h.d@swipnet.se>
4043
4044 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
4045 changes (Bug#12088).
4046
40472012-09-08 Chong Yidong <cyd@gnu.org>
4048
4049 * syntax.c (Fstring_to_syntax): Doc fix.
4050
40512012-09-08 Jan Djärv <jan.h.d@swipnet.se>
4052
4053 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
4054 in the internal border.
4055 (x_set_window_size): Remove static variables and their usage.
4056 (ns_redraw_scroll_bars): Fix NSTRACE arg.
4057 (ns_after_update_window_line, ns_draw_fringe_bitmap):
4058 Remove fringe/internal border adjustment (Bug#11052).
4059 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
4060 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
4061 (ns_fix_rect_ibw): Remove.
4062 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
4063 (ns_dumpglyphs_box_or_relief): Ditto.
4064 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
4065 adjustment.
4066 (ns_dumpglyphs_image): Ditto.
4067 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
4068 border adjustment.
4069 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
4070 their usage. Add fringe_extended_p and its use as in other terms.
4071 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
4072 scroll bar was removed.
4073 (updateFrameSize): New function.
4074 (windowDidResize): Move code to updateFrameSize and call it.
4075
4076 * nsterm.h (EmacsView): Add updateFrameSize.
4077
40782012-09-07 Chong Yidong <cyd@gnu.org>
4079
4080 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
4081
4082 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
4083
40842012-09-07 Paul Eggert <eggert@cs.ucla.edu>
4085
4086 More signal-handler cleanup (Bug#12327).
4087 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
4088 Problem introduced when merging patches. Noted by Eli Zaretskii in
4089 <http://bugs.gnu.org/12327#67>.
4090 * floatfns.c: Comment fix.
4091 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
4092 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
4093 and anyway the declaration is harmless even if SIGDANGER is not defined.
4094 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
4095 defined BROKEN_FIONREAD). systty.h formerly did this, but other
4096 source files not surprisingly expected syssignal.h to define, or
4097 not define, SIGIO, and it's cleaner to do it that way, for consistency.
4098 Include <sys/ioctl.h>, for FIONREAD.
4099 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
4100 This eliminates a problem whereby other files mysteriously had
4101 to include "syssignal.h" before including "systty.h" if they
4102 wanted to use "#ifdef SIGIO".
4103
41042012-09-07 Eli Zaretskii <eliz@gnu.org>
4105
4106 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
4107
4108 * w32.c (sigemptyset): Empty the set.
4109 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
4110
4111 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
4112
41132012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
4114
4115 * alloc.c (mark_buffer): Revert unsafe marking optimization.
4116 (mark_object): Likewise for frame objects.
4117
41182012-09-07 Paul Eggert <eggert@cs.ucla.edu>
4119
4120 * syssignal.h (handle_on_main_thread): Always declare,
4121 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
4122 This ports to platforms without HAVE_PTHREAD.
4123
41242012-09-06 Paul Eggert <eggert@cs.ucla.edu>
4125
4126 Signal-handler cleanup (Bug#12327).
4127 Emacs's signal handlers were written in the old 4.2BSD style with
4128 sigblock and sigmask and so forth, and this led to some
4129 inefficiencies and confusion. Rewrite these to use
4130 pthread_sigmask etc. without copying signal sets around. Also,
4131 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
4132 'signal', and instead use functions that do not attempt to take
4133 over the system name space. This patch causes Emacs's text
4134 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
4135 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
4136 Do not include <signal.h> or "syssignal.h", as these
4137 modules do not use signals.
4138 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
4139 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
4140 Do not include <signal.h>, as "syssignal.h" does that for us now.
4141 * atimer.c (sigmask_atimers): New function.
4142 (block_atimers, unblock_atimers): New functions,
4143 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
4144 All uses replaced.
4145 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
4146 no longer needed here.
4147 * emacs.c (main): Inspect existing signal handler with sigaction,
4148 so that there's no need to block and unblock SIGHUP.
4149 * sysdep.c (struct save_signal): New member 'action', replacing
4150 old member 'handler'.
4151 (save_signal_handlers, restore_signal_handlers):
4152 Use sigaction instead of 'signal' to save and restore.
4153 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
4154 New function. All users of 'signal' modified to use set_sighandler
4155 if they're writeonly, and to use sys_signal if they're read+write.
4156 (emacs_sigaction_init, forwarded_signal): New functions.
4157 (sys_signal): Remove. All uses replaced by calls to sigaction
4158 and emacs_sigaction_init, or by direct calls to 'signal'.
4159 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
4160 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
4161 all uses replaced by pthread_sigmask etc. calls.
4162 * syssignal.h: Include <signal.h>.
4163 (emacs_sigaction_init, forwarded_signal): New decls.
4164 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
4165 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
4166 (sigmask, sys_sigmask): Remove; no longer needed.
4167 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
4168 (sigblock, sigunblock, sigfree):
4169 (sigsetmask) [!defined sigsetmask]:
4170 Remove. All uses replaced by pthread_sigmask.
4171 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
4172 no longer need to be replaced, and its typical old uses
4173 are now done via emacs_sigaction_init and sigaction.
4174 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
4175 (sys_sigdel): Remove; unused.
4176 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
4177
41782012-09-06 Eli Zaretskii <eliz@gnu.org>
4179
4180 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
4181 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
4182
41832012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4184
4185 Explicitly mark buffer_defaults and buffer_local_symbols.
4186 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
4187 mark_local_symbols here.
4188 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
4189 since special buffers aren't marked here any more.
4190 (allocate_buffer): Chain new buffer with all_buffers here...
4191 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
4192 not here.
4193 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
4194 (syms_of_buffer): Remove staticpro of the above.
4195 (init_buffer_once): Set names for buffer_defaults and
4196 buffer_local_symbols.
4197
41982012-09-06 Paul Eggert <eggert@cs.ucla.edu>
4199
4200 Use bool for booleans in font-related modules.
4201 * font.c (font_intern_prop, font_style_to_value)
4202 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
4203 (generate_otf_features, font_check_otf_features, font_check_otf)
4204 (font_match_p, font_list_entities, font_at):
4205 * fontset.c (fontset_id_valid_p, reorder_font_vector
4206 (fontset_find_font, Fset_fontset_font)
4207 (face_suitable_for_char_p) [0]:
4208 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
4209 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
4210 (m17n_flt_initialized, ftfont_shape_by_flt):
4211 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
4212 * nsfont.m (nsfont_draw):
4213 * w32font.c (w32font_draw):
4214 * w32term.c (x_draw_glyphless_glyph_string_foreground):
4215 Use bool for booleans.
4216 * font.h: Adjust to above API changes.
4217 (struct font, struct font_driver, struct font_driver_list):
4218 Use bool for booleans.
4219 (struct font): Remove useless member encoding_type.
4220 All users removed.
4221 * fontset.c, xftfont.c: Omit unnecessary static decls.
4222
42232012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
4224
4225 * alloc.c (mark_object): Revert window marking code
4226 since it's unsafe for the Fset_window_configuration.
4227
42282012-09-05 Paul Eggert <eggert@cs.ucla.edu>
4229
4230 Fix race conditions with signal handlers and errno (Bug#12327).
4231 Be more systematic about preserving errno whenever a signal
4232 handler returns, even if it's not in the main thread. Do this by
4233 renaming signal handlers to distinguish between signal delivery
4234 and signal handling. All uses changed.
4235 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
4236 * data.c (deliver_arith_signal): Rename from arith_error.
4237 * dispnew.c (deliver_window_change_signal): Rename from
4238 window_change_signal.
4239 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
4240 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
4241 * keyboard.c (deliver_input_available_signal): Rename from
4242 input_available_signal.
4243 (deliver_user_signal): Rename from handle_user_signal.
4244 (deliver_interrupt_signal): Rename from interrupt_signal.
4245 * process.c (deliver_pipe_signal): Rename from send_process_trap.
4246 (deliver_child_signal): Rename from sigchld_handler.
4247 * atimer.c (handle_alarm_signal):
4248 * data.c (handle_arith_signal):
4249 * dispnew.c (handle_window_change_signal):
4250 * emacs.c (handle_fatal_signal, handle_danger_signal):
4251 * keyboard.c (handle_input_available_signal):
4252 * keyboard.c (handle_user_signal, handle_interrupt_signal):
4253 * process.c (handle_pipe_signal, handle_child_signal):
4254 New functions, with the actual signal-handling code taken from the
4255 original respective signal handlers, sans the sporadic attempts to
4256 preserve errno, since that's now done by handle_on_main_thread.
4257 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
4258 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
4259 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4260 Move to sysdep.c.
4261 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4262 Move initialization of main_thread to sysdep.c's init_signals.
4263 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
4264 our usage, and simplifies the mainline code.
4265 (record_child_status_change): New static function, as a helper
4266 for handle_child_signal, and with most of the old child handler's
4267 contents.
4268 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
4269 (handle_child_signal): Use the above.
4270 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
4271 Moved here from emacs.c.
4272 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
4273 code moved here from emacs.c's main function.
4274 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
4275 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
4276 This lets callers save and restore errno properly.
4277
42782012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4279
4280 Remove redundant or unused things here and there.
4281 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
4282 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
4283 * editfns.c (Fcompare_buffer_substrings): Likewise.
4284 * frame.h (struct terminal, struct font_driver_list):
4285 Remove redundant declarations.
4286 * window.h (Qleft, Qright): Likewise.
4287
42882012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4289
4290 Do not mark objects from deleted buffers, windows and frames.
4291 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
4292 (mark_object): Likewise for windows and frames.
4293
42942012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
4295
4296 * alloc.c (valid_lisp_object_p): Treat killed buffers,
4297 buffer_defaults and buffer_local_symbols as valid objects.
4298 Return special value to denote them.
4299
43002012-09-05 Paul Eggert <eggert@cs.ucla.edu>
4301
4302 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
4303 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
4304 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
4305 (file_name_absolute_p, Fsubstitute_in_file_name):
4306 (check_executable, check_writable, Ffile_accessible_directory_p)
4307 (Fset_file_selinux_context, Fdefault_file_modes)
4308 (Finsert_file_contents, choose_write_coding_system)
4309 (Fwrite_region, build_annotations, a_write, e_write)
4310 (Fdo_auto_save):
4311 * filelock.c (boot_time_initialized, get_boot_time)
4312 (get_boot_time_1, lock_file_1, within_one_second):
4313 * floatfns.c (in_float):
4314 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
4315 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
4316 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
4317 * lisp.h (struct Lisp_Hash_Table.cmpfn):
4318 * window.c (compare_window_configurations):
4319 Use bool for booleans.
4320 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
4321 (Fdefault_file_modes): Now mode_t, not int, for modes.
4322 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
4323 (internal_delete_file): Now returns void, not a (boolean) int,
4324 since nobody was looking at the return value.
4325 * lisp.h, window.h: Adjust to above API changes.
4326
4327 * xdisp.c (set_message): Simplify and reindent last change.
4328
43292012-09-05 Juanma Barranquero <lekktu@gmail.com>
4330
4331 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
4332
43332012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
4334
4335 * eval.c (call_debugger): Make the function non-static so that we
4336 can call it from set_message.
4337
4338 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
4339 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
4340
43412012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4342
4343 Give more-useful info on a fatal error (Bug#12328).
4344 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
4345 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
4346 of doing the work ourselves.
4347 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
4348 do most of the work.
4349 (fatal_error_backtrace): New function, taken from the guts
4350 of the old fatal_error_signal, but with a new option to output
4351 a backtrace.
4352 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
4353 info about the signal than just its number.
4354 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
4355 * sysdep.c: Include <execinfo.h>
4356 (emacs_backtrace): New function, taken partly from the previous
4357 code of the 'die' function.
4358 (emacs_abort): Call fatal_error_backtrace rather than abort.
4359
43602012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
4361
4362 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
4363 eager (load-time) macro-expansion.
4364 * lisp.mk (lisp): Add macroexp.
4365
43662012-09-04 Paul Eggert <eggert@cs.ucla.edu>
4367
4368 Simplify redefinition of 'abort' (Bug#12316).
4369 Do not try to redefine the 'abort' function. Instead, redo
4370 the code so that it calls 'emacs_abort' rather than 'abort'.
4371 This removes the need for the NO_ABORT configure-time macro
4372 and makes it easier to change the abort code to do a backtrace.
4373 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
4374 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
4375 Remove; sysdep.c's emacs_abort now takes its place.
4376 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
4377 'abort' changed to use 'emacs_abort'.
4378 * msdos.c (dos_abort) [defined abort]: Remove; not used.
4379 (abort) [!defined abort]: Rename to ...
4380 (emacs_abort): ... new name.
4381 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
4382 the place of the old 'abort' in emacs.c.
4383 * w32.c, w32fns.c (abort): Do not #undef.
4384 * w32.c (emacs_abort): Rename from w32_abort.
4385
43862012-09-04 Eli Zaretskii <eliz@gnu.org>
4387
4388 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
4389 offsets[j].dv, since the y axis of the screen coordinates points
4390 down, while the y axis of the font definition coordinates points
4391 up. This fixes display of Arabic diacritics such as KASRA and
4392 KASRATAN. (Bug#11860)
4393
12012-09-04 Paul Eggert <eggert@cs.ucla.edu> 43942012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2 4395
3 Be more systematic about _setjmp vs setjmp. 4396 Be more systematic about _setjmp vs setjmp.
@@ -189,8 +4582,8 @@
189 * process.c: Include TERM_HEADER instead of listing all possible 4582 * process.c: Include TERM_HEADER instead of listing all possible
190 window-system headers. 4583 window-system headers.
191 4584
192 * nsterm.h: Remove declarations now in frame.h. Define 4585 * nsterm.h: Remove declarations now in frame.h.
193 FRAME_X_SCREEN, FRAME_X_VISUAL. 4586 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
194 4587
195 * menu.c: Include TERM_HEADER instead of listing all possible 4588 * menu.c: Include TERM_HEADER instead of listing all possible
196 window-system headers. 4589 window-system headers.
@@ -279,18 +4672,18 @@
2792012-08-28 Jan Djärv <jan.h.d@swipnet.se> 46722012-08-28 Jan Djärv <jan.h.d@swipnet.se>
280 4673
281 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize 4674 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
282 button_values to NULL. Call setStykeMask so dialogs get a close button. 4675 button_values to NULL. Call setStykeMask so dialogs get a close button.
283 (windowShouldClose:): Set window_closed. 4676 (windowShouldClose:): Set window_closed.
284 (dealloc): New member, free button_values. 4677 (dealloc): New member, free button_values.
285 (process_dialog:): Make member function. Remove window argument, 4678 (process_dialog:): Make member function. Remove window argument,
286 replace window with self. Count buttons and allocate and store values 4679 replace window with self. Count buttons and allocate and store values
287 in button_values. 4680 in button_values.
288 (addButton:value:row:): value is int with the name tag. Call setTag 4681 (addButton:value:row:): value is int with the name tag. Call setTag
289 with tag. Remove return self, declare return value as void. 4682 with tag. Remove return self, declare return value as void.
290 (addString:row:): Remove return self, declare return value as void. 4683 (addString:row:): Remove return self, declare return value as void.
291 (addSplit): Remove return self, declare return value as void. 4684 (addSplit): Remove return self, declare return value as void.
292 (clicked:): Remove return self, declare return value as void. 4685 (clicked:): Remove return self, declare return value as void.
293 Set dialog_return to button_values[seltag]. Code formatting change. 4686 Set dialog_return to button_values[seltag]. Code formatting change.
294 (initFromContents:isQuestion:): Adjust call to process_dialog. 4687 (initFromContents:isQuestion:): Adjust call to process_dialog.
295 Code formatting change. 4688 Code formatting change.
296 (timeout_handler:): Set timer_fired to YES. 4689 (timeout_handler:): Set timer_fired to YES.
@@ -386,8 +4779,8 @@
386 4779
387 * nsterm.h (NSPanel): New class variable dialog_return. 4780 * nsterm.h (NSPanel): New class variable dialog_return.
388 4781
389 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize 4782 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
390 dialog_return. 4783 Initialize dialog_return.
391 (windowShouldClose:): Use stop instead of stopModalWithCode. 4784 (windowShouldClose:): Use stop instead of stopModalWithCode.
392 (clicked:): Ditto, and also set dialog_return (Bug#12258). 4785 (clicked:): Ditto, and also set dialog_return (Bug#12258).
393 (timeout_handler:): Use stop instead of abortModal. Send a dummy 4786 (timeout_handler:): Use stop instead of abortModal. Send a dummy
@@ -625,7 +5018,7 @@
625 5018
626 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object. 5019 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
627 Otherwise, the compiler complains about (A?B:C) where B is void 5020 Otherwise, the compiler complains about (A?B:C) where B is void
628 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. 5021 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
629 (fontset_add): Return void, for FONTSET_ADD. 5022 (fontset_add): Return void, for FONTSET_ADD.
630 5023
6312012-08-21 Paul Eggert <eggert@cs.ucla.edu> 50242012-08-21 Paul Eggert <eggert@cs.ucla.edu>
@@ -1141,7 +5534,7 @@
1141 Start main loop and wait for application defined event. 5534 Start main loop and wait for application defined event.
1142 Inform select thread to stop selecting after main loop is exited. 5535 Inform select thread to stop selecting after main loop is exited.
1143 (ns_term_init): Create selfds pipe and set non-blocking. 5536 (ns_term_init): Create selfds pipe and set non-blocking.
1144 Initialize select_mutex. Start the select thread (fd_handler). 5537 Initialize select_mutex. Start the select thread (fd_handler).
1145 (fd_handler:): Loop forever, wait for info from the main thread 5538 (fd_handler:): Loop forever, wait for info from the main thread
1146 to either start or stop selecting. When select returns, send 5539 to either start or stop selecting. When select returns, send
1147 and appdefined event. 5540 and appdefined event.
@@ -1273,7 +5666,7 @@
1273 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info 5666 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
1274 if not present. 5667 if not present.
1275 (update_frame_tool_bar): Return early if data in xg_frame_tb_info 5668 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
1276 is up to date. Otherwise store new data. 5669 is up to date. Otherwise store new data.
1277 (free_frame_tool_bar): Free xg_frame_tb_info if present. 5670 (free_frame_tool_bar): Free xg_frame_tb_info if present.
1278 5671
12792012-08-13 Dmitry Antipov <dmantipov@yandex.ru> 56722012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
@@ -1300,7 +5693,7 @@
13002012-08-11 Jan Djärv <jan.h.d@swipnet.se> 56932012-08-11 Jan Djärv <jan.h.d@swipnet.se>
1301 5694
1302 * nsterm.m (not_in_argv): New function. 5695 * nsterm.m (not_in_argv): New function.
1303 (application:openFile, application:openTempFile:): 5696 (application:openFile, application:openTempFile:):
1304 (application:openFileWithoutUI:, application:openFiles:): Open file 5697 (application:openFileWithoutUI:, application:openFiles:): Open file
1305 if not_in_argv returns non-zero (bug#12171). 5698 if not_in_argv returns non-zero (bug#12171).
1306 5699
@@ -1833,7 +6226,7 @@
1833 6226
1834 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar) 6227 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
1835 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:) 6228 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1836 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114) 6229 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
1837 * nsfns.m (ns_set_name_as_filename): Likewise. 6230 * nsfns.m (ns_set_name_as_filename): Likewise.
1838 * nsmenu.m (ns_update_menubar): Likewise. 6231 * nsmenu.m (ns_update_menubar): Likewise.
1839 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR. 6232 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
@@ -2487,7 +6880,7 @@
2487 6880
24882012-07-21 Jan Djärv <jan.h.d@swipnet.se> 68812012-07-21 Jan Djärv <jan.h.d@swipnet.se>
2489 6882
2490 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134). 6883 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
2491 (conversationIdentifier): Return value is NSInteger. 6884 (conversationIdentifier): Return value is NSInteger.
2492 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA. 6885 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
2493 6886
@@ -3383,7 +7776,7 @@
3383 * lisp.h (make_formatted_string): New prototype. 7776 * lisp.h (make_formatted_string): New prototype.
3384 * alloc.c (make_formatted_string): New function. 7777 * alloc.c (make_formatted_string): New function.
3385 * buffer.c (Fgenerate_new_buffer_name): Use it. 7778 * buffer.c (Fgenerate_new_buffer_name): Use it.
3386 * dbus.c (syms_of_dbusbind): Likewise. 7779 * dbusbind.c (syms_of_dbusbind): Likewise.
3387 * editfns.c (Fcurrent_time_zone): Likewise. 7780 * editfns.c (Fcurrent_time_zone): Likewise.
3388 * filelock.c (get_boot_time): Likewise. 7781 * filelock.c (get_boot_time): Likewise.
3389 * frame.c (make_terminal_frame, set_term_frame_name) 7782 * frame.c (make_terminal_frame, set_term_frame_name)
@@ -3929,7 +8322,7 @@
3929 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE 8322 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
3930 values which aren't power of 2. 8323 values which aren't power of 2.
3931 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro. 8324 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
3932 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users 8325 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
3933 accordingly. 8326 accordingly.
3934 8327
39352012-07-03 Stefan Monnier <monnier@iro.umontreal.ca> 83282012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -4997,7 +9390,7 @@
4997 * lisp.h (struct vectorlike_header): New field `nbytes', 9390 * lisp.h (struct vectorlike_header): New field `nbytes',
4998 adjust comment accordingly. 9391 adjust comment accordingly.
4999 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK' 9392 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
5000 to denote vector blocks. Adjust users (live_vector_p, 9393 to denote vector blocks. Adjust users (live_vector_p,
5001 mark_maybe_pointer, valid_lisp_object_p) accordingly. 9394 mark_maybe_pointer, valid_lisp_object_p) accordingly.
5002 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG. 9395 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
5003 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES), 9396 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
@@ -5011,7 +9404,7 @@
5011 (allocate_vector_from_block, init_vectors, allocate_vector_from_block) 9404 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
5012 (sweep_vectors): New functions. 9405 (sweep_vectors): New functions.
5013 (allocate_vectorlike): Return `zero_vector' as the only vector of 9406 (allocate_vectorlike): Return `zero_vector' as the only vector of
5014 0 items. Allocate new vector from block if vector size is less than 9407 0 items. Allocate new vector from block if vector size is less than
5015 or equal to VBLOCK_BYTES_MAX. 9408 or equal to VBLOCK_BYTES_MAX.
5016 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors. 9409 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
5017 (init_alloc_once): Add call to init_vectors. 9410 (init_alloc_once): Add call to init_vectors.
@@ -5098,10 +9491,10 @@
5098 bitfields where appropriate, remove unused fields. 9491 bitfields where appropriate, remove unused fields.
5099 * window.h (struct window): Remove unused 'last_mark_x' and 9492 * window.h (struct window): Remove unused 'last_mark_x' and
5100 'last_mark_y' fields. Rename 'mini_p' field to 'mini', 9493 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
5101 change it's type from Lisp_Object to bitfield. 9494 change its type from Lisp_Object to bitfield.
5102 Change type of 'force_start', 'optional_new_start', 9495 Change type of 'force_start', 'optional_new_start',
5103 'last_had_star', 'update_mode_line' and 'start_at_line_beg' 9496 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
5104 fields from Lisp_Object to bitfield. Adjust users accordingly. 9497 fields from Lisp_Object to bitfield. Adjust users accordingly.
5105 9498
51062012-05-31 Paul Eggert <eggert@cs.ucla.edu> 94992012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5107 9500
@@ -6340,7 +10733,7 @@
63402012-05-09 Michael Albinus <michael.albinus@gmx.de> 107332012-05-09 Michael Albinus <michael.albinus@gmx.de>
6341 10734
6342 * dbusbind.c (xd_registered_buses): New internal Lisp object. 10735 * dbusbind.c (xd_registered_buses): New internal Lisp object.
6343 Rename all occurences of Vdbus_registered_buses to xd_registered_buses. 10736 Rename all occurrences of Vdbus_registered_buses to xd_registered_buses.
6344 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses. 10737 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
6345 Initialize xd_registered_buses. 10738 Initialize xd_registered_buses.
6346 10739