* ibuf-ext.el (ibuffer-filter-by-filename): Make it work with dired buffers too.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
959067a1
DA
12013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
4 (x_figure_window_size): Likewise. Adjust to return long.
5 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
6 (toplevel): Move Qterminal_live_p to...
7 * terminal.c (toplevel): ...here, make it static, and...
8 (syms_of_terminal): ...DEFSYM here.
9 * frame.h (Qterminal_live_p): Remove declaration.
10 (make_frame, x_figure_window_size): Adjust prototype.
11 * nsfns.m (Fx_create_frame): Use long for window flags.
12
f4b169ce
PE
132013-07-30 Paul Eggert <eggert@cs.ucla.edu>
14
15 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
16 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
17 Do not assume that emacs_close (INT_MAX) is a no-op.
18
bee6a2c7
DA
192013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
20
21 * xfaces.c (make_face_cache): For struct face_cache, prefer
22 xmalloc to xzalloc and so avoid redundant call to memset.
23 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
24
d7e6881a
DA
252013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
26
27 * fringe.c (draw_window_fringes, update_window_fringes)
28 (compute_fringe_widths):
29 * w32term.c (x_draw_glyph_string):
30 * window.c (candidate_window_p, Frecenter):
31 * xfaces.c (realize_basic_faces, realize_default_face)
32 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
33 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
34 * xfns.c (x_set_cursor_color, xic_free_xfontset):
35 * xmenu.c (Fx_menu_bar_open_internal):
36 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
37 * xsettings.c (xft_settings_event):
38 * xterm.c (x_draw_glyph_string, x_had_errors_p):
39 Use bool for booleans. Adjust style and comments where
40 appropriate.
41 * dispextern.h (draw_window_fringes, update_window_fringes)
42 (compute_fringe_widths):
43 * xterm.h (x_had_errors_p): Adjust prototype.
44
ec3058af
DA
452013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
46
47 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
48 CHECK_LIST. Rewrite the loop to avoid useless local variable.
49
218e0637
DA
502013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
51
52 * fns.c (toplevel): Remove comment before Fsafe_length because
53 it checks for QUIT.
54
e560aba9
PE
552013-07-28 Paul Eggert <eggert@cs.ucla.edu>
56
57 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
58
2e5ce5de
EZ
592013-07-28 Eli Zaretskii <eliz@gnu.org>
60
61 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
62 frame which got the message is still alive, before dereferencing
63 its pointer. (Bug#14970)
64
65 * frame.c (delete_frame): Test "this" frame's minibuffer window to
66 be a live window, before using it as such. (Bug#14970)
67
e95da6d3
EZ
682013-07-27 Eli Zaretskii <eliz@gnu.org>
69
70 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
71 w32_detect_focus_change instead of doing part of its job by hand.
72 This fixes the problem whereby FOCUS_OUT events were not sent to
73 the event queue.
74
a8f93651
EZ
752013-07-26 Eli Zaretskii <eliz@gnu.org>
76
fec92060
EZ
77 * process.c (Fprocess_list): Doc fix.
78
a8f93651
EZ
79 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
80 being re-exposed only if it didn't ask to become visible.
81 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
82 was previously iconified. (Bug#14841)
83 (x_iconify_frame): Mark the frame iconified.
84
d5a7a9d9
PE
852013-07-26 Paul Eggert <eggert@cs.ucla.edu>
86
87 Fix minor problems found by static checking.
88 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
89 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
90
56ea7291
SM
912013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
92
93 * eval.c (set_specpdl_old_value): New function.
94 (unbind_to): Minor simplification.
95 (get_backtrace_frame): New function.
96 (Fbacktrace_frame): Use it. Add `base' argument.
97 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
98 (syms_of_eval): Export backtrace-eval.
99 * xterm.c (x_focus_changed): Simplify.
100
9d611ffe
PE
1012013-07-25 Paul Eggert <eggert@cs.ucla.edu>
102
103 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
104
999c74e3
EZ
1052013-07-24 Eli Zaretskii <eliz@gnu.org>
106
107 * xdisp.c (redisplay_window): Instead of moving point out of
108 scroll margin, reject the force_start method, and try scrolling
109 instead. (Bug#14780)
110
198fa217
KB
1112013-07-24 Ken Brown <kbrown@cornell.edu>
112
113 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
114 (Bug#14944).
115
53840e55
PE
1162013-07-24 Paul Eggert <eggert@cs.ucla.edu>
117
118 * eval.c (Fprogn): Do not check that BODY is a proper list.
119 This undoes the previous change. The check slows down the
120 interpreter, and is not needed to prevent a crash. See
121 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
122
60967f56
GM
1232013-07-23 Glenn Morris <rgm@gnu.org>
124
125 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
126
9ca960e2
PE
1272013-07-23 Paul Eggert <eggert@cs.ucla.edu>
128
a29c3e6d
PE
129 Port to GNU/Linux systems with tinfo but not ncurses.
130 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
131 to decide whether ncurses is being used. Without this change,
132 GCC complains about tgetent not being declared, on a system
133 that has tinfo installed but ncurses not installed.
134
f274311c
PE
135 * eval.c (Fprogn): Check that BODY is a proper list.
136
16b0520a
PE
137 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
138 * data.c (Fsetq_default):
139 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
140 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
141 (Fcondition_case):
142 Tune by taking advantage of the fact that ARGS is always a list
143 when a function is declared to have UNEVALLED args.
144
9ca960e2
PE
145 * emacsgtkfixed.c: Port to GCC 4.6.
146 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
147
afacaa1b
JB
1482013-07-23 Juanma Barranquero <lekktu@gmail.com>
149
150 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
151 here to silence compiler warnings.
152
368a85a4
PE
1532013-07-22 Paul Eggert <eggert@cs.ucla.edu>
154
155 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
156 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
157 from messing up Emacs's 'struct frame' (Bug#14923).
158
f4e891b5
PE
1592013-07-21 Paul Eggert <eggert@cs.ucla.edu>
160
161 * alloc.c (make_save_ptr_ptr): Define this function.
162 It was inadvertently omitted. It's needed only if
163 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
164
96c8b65e
JD
1652013-07-21 Jan Djärv <jan.h.d@swipnet.se>
166
167 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
168 frame have focus (Bug#14895).
169
ee010797
PE
1702013-07-21 Paul Eggert <eggert@cs.ucla.edu>
171
172 Avoid vfork-related deadlock more cleanly.
173 * callproc.c (child_setup): When the child's exec fails, output
174 the program name, as that's more useful. Use O_NONBLOCK to avoid
175 deadlock.
176 * process.c (create_process_1): Remove; no longer needed.
177 (create_process): Remove timer hack; no longer needed, now that
178 the child avoids deadlock.
179
f0398ec1 1802013-07-20 Glenn Morris <rgm@gnu.org>
8bfcc21a
GM
181
182 * image.c (Fimage_flush): Fix doc typo.
183
b2a069c2
PE
1842013-07-20 Paul Eggert <eggert@cs.ucla.edu>
185
6496aec9
PE
186 Fix array bounds violation when pty allocation fails.
187 * process.c (PTY_NAME_SIZE): New constant.
188 (pty_name): Remove static variable; it's now auto.
189 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
190 Take pty_name as an arg rather than using a static variable.
191 All callers changed.
192 (create_process): Recover pty_flag from process, not from volatile local.
193 (create_pty): Stay inside array even when pty allocation fails.
194 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
195
b2a069c2
PE
196 * lread.c (Fload): Avoid initialization only when lint checking.
197 Mention that it's needed only for older GCCs.
198
99107004
KH
1992013-07-20 Kenichi Handa <handa@gnu.org>
200
201 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
202 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
203
6b1b199d
AS
2042013-07-20 Andreas Schwab <schwab@linux-m68k.org>
205
206 * lread.c (Fload): Avoid uninitialized warning.
207
4195afc3
PE
2082013-07-19 Paul Eggert <eggert@cs.ucla.edu>
209
3f5bef16
PE
210 Fix some minor file descriptor leaks and related glitches.
211 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
212 (create_lock_file): Use write, not emacs_write.
213 * image.c (slurp_file, png_load_body):
214 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
215 (server_accept_connection):
216 Don't leak an fd on memory allocation failure.
217 * image.c (slurp_file): Add a cheap heuristic for growing files.
218 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
219 as that's what the other routines do. Maybe input need not be
220 blocked at all, but it's better to be consistent.
221 Avoid undefined behavior when strlen is zero.
222
4195afc3
PE
223 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
224 (NSTATICS): Now a constant; doesn't need to be a macro.
225
a1aeeffe
RS
2262013-07-19 Richard Stallman <rms@gnu.org>
227
228 * coding.c (decode_coding_utf_8): Add simple loop for fast
229 processing of ASCII characters.
230
63b34baa
PE
2312013-07-19 Paul Eggert <eggert@cs.ucla.edu>
232
233 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
234
621dd9ac
EZ
2352013-07-19 Eli Zaretskii <eliz@gnu.org>
236
237 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
238 unportable 'struct x_display_info'.
239 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
240 is a portable type.
241
1396ac86
PE
2422013-07-19 Paul Eggert <eggert@cs.ucla.edu>
243
ab9980cd
PE
244 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
245 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
246 or fscanf fails.
247 (system_process_attributes): Prefer plain char to unsigned char
248 when either will do. Clean up properly if interrupted or if
249 memory allocations fail. Don't assume sscanf succeeds. Remove
250 no-longer-needed workaround to stop GCC from whining. Read
251 command-line once, instead of multiple times. Check read status a
252 bit more carefully.
253
1396ac86
PE
254 Fix obscure porting bug with varargs functions.
255 The code assumed that int is treated like ptrdiff_t in a vararg
256 function, which is not a portable assumption. There was a similar
257 -- though these days less likely -- porting problem with various
258 assumptions that pointers of different types all smell the same as
259 far as vararg functions is conserved. To make this problem less
260 likely in the future, redo the API to use varargs functions.
261 * alloc.c (make_save_value): Remove this vararg function.
262 All uses changed to ...
263 (make_save_int_int_int, make_save_obj_obj_obj_obj)
264 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
265 New functions.
266 (make_save_ptr): Rename from make_save_pointer, for consistency with
267 the above. Define only on platforms that need it. All uses changed.
268
4d19d194
PE
2692013-07-18 Paul Eggert <eggert@cs.ucla.edu>
270
271 * keyboard.c: Try to fix typos in previous change.
272 (DISPLAY_LIST_INFO): New macro.
273 (kbd_buffer_get_event): Do not access members that are not present
c7064f05 274 in X11. Revert inadvertent change of "!=" to "=".
4d19d194 275
945c5bb1
JB
2762013-07-18 Juanma Barranquero <lekktu@gmail.com>
277
278 * keyboard.c (kbd_buffer_get_event):
279 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
280 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
281
f4b1eb36
PE
2822013-07-18 Paul Eggert <eggert@cs.ucla.edu>
283
5e679a2c
PE
284 * filelock.c: Fix unlikely file descriptor leaks.
285 (get_boot_time_1): Rework to avoid using emacs_open.
286 This doesn't actually fix a leak, but is better anyway.
287 (read_lock_data): Use read, not emacs_read.
288
a8cd4836
PE
289 * doc.c: Fix minor memory and file descriptor leaks.
290 * doc.c (get_doc_string): Fix memory leak when doc file absent.
291 (get_doc_string, Fsnarf_documentation):
292 Fix file descriptor leak on error.
293
ef30e638
PE
294 * term.c: Fix minor fdopen-related file descriptor leaks.
295 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
296 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
297
f4b1eb36
PE
298 * charset.c: Fix file descriptor leaks and errno issues.
299 Include <errno.h>.
300 (load_charset_map_from_file): Don't leak file descriptor on error.
301 Use plain record_xmalloc since the allocation is larger than
302 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
303 of entries.
304 * eval.c (record_unwind_protect_nothing):
305 * fileio.c (fclose_unwind):
306 New functions.
307 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
308 The replacement doesn't block input, but that no longer seems
309 necessary.
310
b648c163
PE
3112013-07-17 Paul Eggert <eggert@cs.ucla.edu>
312
a0931322
PE
313 * lread.c: Fix file descriptor leaks and errno issues.
314 (Fload): Close some races that leaked fds or streams when 'load'
315 was interrupted.
316 (Fload, openp): Report error number of last nontrivial failure to open.
317 ENOENT counts as trivial.
318 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
319 New functions.
320 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
321 now that the function is always called with a nonnegative arg.
322 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
323 All uses replaced with ...
324 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
325
b648c163
PE
326 A few more minor file errno-reporting bugs.
327 * callproc.c (Fcall_process):
328 * doc.c (Fsnarf_documentation):
329 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
330 * process.c (set_socket_option):
331 Don't let a constructor trash errno.
332 * doc.c: Include <errno.h>.
333
b1dc4084
JB
3342013-07-16 Juanma Barranquero <lekktu@gmail.com>
335
336 * w32fns.c (unwind_create_tip_frame): Fix declaration.
337
c43843aa
PE
3382013-07-16 Paul Eggert <eggert@cs.ucla.edu>
339
50a30cce
PE
340 Fix w32 bug with call-process-region (Bug#14885).
341 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
342 to Fcall_process when the input is empty. This simplifies the
343 code a bit. It makes no difference on POSIXish platforms but
344 apparently it fixes a bug on w32.
345
346 Fix bug where insert-file-contents closes a file twice. (Bug#14839).
41d48a42
PE
347 * fileio.c (close_file_unwind): Don't close if FD is negative;
348 this can happen when unwinding a zapped file descriptor.
349 (Finsert_file_contents): Unwind-protect the fd before the point marker,
350 in case Emacs runs out of memory between the two unwind-protects.
351 Don't trash errno when closing FD.
352 Zap the FD in the specpdl when closing it, instead of deferring
353 the removal of the unwind-protect; this fixes a bug where a child
354 function unwinds the stack past us.
355
27e498e6
PE
356 New unwind-protect flavors to better type-check C callbacks.
357 This also lessens the need to write wrappers for callbacks,
358 and the need for make_save_pointer.
359 * alloca.c (free_save_value):
360 * atimer.c (run_all_atimers):
361 Now extern.
362 * alloc.c (safe_alloca_unwind):
363 * atimer.c (unwind_stop_other_atimers):
364 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
365 * menu.c (cleanup_popup_menu) [HAVE_NS]:
366 * minibuf.c (choose_minibuf_frame_1):
367 * process.c (make_serial_process_unwind):
368 * xdisp.h (pop_message_unwind):
369 * xselect.c (queue_selection_requests_unwind):
370 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
371 * alloca.c (record_xmalloc):
372 Prefer record_unwind_protect_ptr to record_unwind_protect with
373 make_save_pointer.
374 * alloca.c (Fgarbage_collect):
375 Prefer record_unwind_protect_void to passing a dummy.
376 * buffer.c (restore_buffer):
377 * window.c (restore_window_configuration):
378 * xfns.c, w32fns.c (do_unwind_create_frame)
379 New wrapper. All record-unwind uses of wrappee changed.
380 * buffer.c (set_buffer_if_live):
381 * callproc.c (call_process_cleanup, delete_temp_file):
382 * coding.c (code_conversion_restore):
383 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
384 * editfns.c (save_excursion_restore)
385 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
386 (save_restriction_restore):
387 * eval.c (restore_stack_limits, un_autoload):
388 * fns.c (require_unwind):
389 * keyboard.c (recursive_edit_unwind, tracking_off):
390 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
391 * macros.c (pop_kbd_macro, restore_menu_items):
392 * nsfns.m (unwind_create_frame):
393 * print.c (print_unwind):
394 * process.c (start_process_unwind):
395 * search.c (unwind_set_match_data):
396 * window.c (select_window_norecord, select_frame_norecord):
397 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
398 (fast_set_selected_frame):
399 * xfns.c, w32fns.c (unwind_create_tip_frame):
400 Return void, not a dummy Lisp_Object. All uses changed.
401 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
402 * callproc.c (call_process_kill):
403 * fileio.c (restore_point_unwind, decide_coding_unwind)
404 (build_annotations_unwind):
405 * insdel.c (Fcombine_after_change_execute_1):
406 * keyboard.c (read_char_help_form_unwind):
407 * menu.c (unuse_menu_items):
408 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
409 * sound.c (sound_cleanup):
410 * xdisp.c (unwind_redisplay):
411 * xfns.c (clean_up_dialog):
412 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
413 Accept no args and return void, instead of accepting and returning
414 a dummy Lisp_Object. All uses changed.
415 * cygw32.c (fchdir_unwind):
416 * fileio.c (close_file_unwind):
417 * keyboard.c (restore_kboard_configuration):
418 * lread.c (readevalllop_1):
419 * process.c (wait_reading_process_output_unwind):
420 Accept int and return void, rather than accepting an Emacs integer
421 and returning a dummy object. In some cases this fixes an
422 unlikely bug when the corresponding int is outside Emacs integer
423 range. All uses changed.
424 * dired.c (directory_files_internal_unwind):
425 * fileio.c (do_auto_save_unwind):
426 * gtkutil.c (pop_down_dialog):
427 * insdel.c (reset_var_on_error):
428 * lread.c (load_unwind):
429 * xfns.c (clean_up_file_dialog):
430 * xmenu.c, nsmenu.m (pop_down_menu):
431 * xmenu.c (cleanup_widget_value_tree):
432 * xselect.c (wait_for_property_change_unwind):
433 Accept pointer and return void, rather than accepting an Emacs
434 save value encapsulating the pointer and returning a dummy object.
435 All uses changed.
436 * editfns.c (Fformat): Update the saved pointer directly via
437 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
438 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
439 (unwind_body): New function.
440 (record_unwind_protect): First arg is now a function returning void,
441 not a dummy Lisp_Object.
442 (record_unwind_protect_ptr, record_unwind_protect_int)
443 (record_unwind_protect_void): New functions.
444 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
445 * fileio.c (struct auto_save_unwind): New type.
446 (do_auto_save_unwind): Use it.
447 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
448 * insdel.c (struct rvoe_arg): New type.
449 (reset_var_on_error): Use it.
450 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
451 New constants.
452 (specbinding_func): Remove; there are now several such functions.
453 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
454 (set_unwind_protect_ptr): New function.
455 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
456
4e604a5d
PE
457 Be simpler and more consistent about reporting I/O errors.
458 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
459 Say "Read error" and "Write error", rather than "I/O error", or
460 "IO error reading", or "IO error writing", when a read or write
461 error occurs.
462 * process.c (Fmake_network_process, wait_reading_process_output)
463 (send_process, Fprocess_send_eof, wait_reading_process_output):
464 Capitalize diagnostics consistently. Put "failed foo" at the
465 start of the diagnostic, so that we don't capitalize the
466 function name "foo". Consistently say "failed" for such
467 diagnostics.
468 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
469 All callers changed. This is so it can use report_file_error.
470 * sysdep.c (serial_open, serial_configure): Capitalize I/O
471 diagnostics consistently as above.
472
a9757f6a
PE
473 * fileio.c (report_file_errno): Fix errno reporting bug.
474 If the file name is neither null nor a pair, package it up as a
475 singleton list. All callers changed, both to this function and to
476 report_file_error. This fixes a bug where the memory allocator
477 invoked by list1 set errno so that the immediately following
478 report_file_error reported the wrong errno value.
479
c43843aa
PE
480 Fix minor problems found by --enable-gcc-warnings.
481 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
482 * keyboard.c (kbd_buffer_get_event): Remove unused local.
483
18c26d81
JD
4842013-07-16 Jan Djärv <jan.h.d@swipnet.se>
485
486 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
487 Set event->arg to Qt if switch-event shall be generated.
488 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
489
490 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
491
492 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
493 FOCUS_OUT_EVENT.
494
495 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
496 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
497 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
498 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
499 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
500 and there is a focused frame.
501 (head_table): Add focus-in and focus-out.
502 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
503 bind to handle-focus-in/out.
504
505 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
506 (Fhandle_switch_frame): Call Fhandle_focus_in.
507 (syms_of_frame): defsubr handle-focus-in/out.
508
6c6f1994
PE
5092013-07-16 Paul Eggert <eggert@cs.ucla.edu>
510
c7ddc792
PE
511 Fix porting bug to older POSIXish platforms (Bug#14862).
512 * sysdep.c (emacs_pipe): New function, that implements
513 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
514 This should port better to CentOS 5 and to Mac OS X 10.6.
515 All calls to pipe2 changed.
516
6c6f1994
PE
517 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
518 This makes the code easier to read and the executable a bit smaller.
519 Do not replace all calls to Fcons that happen to create lists,
520 just calls that are intended to create lists. For example, when
521 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
522 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
523 Similarly for list2 through list5.
524 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
525 * bytecode.c (exec_byte_code):
526 * callint.c (quotify_arg, Fcall_interactively):
527 * callproc.c (Fcall_process, create_temp_file):
528 * charset.c (load_charset_map_from_file)
529 (Fdefine_charset_internal, init_charset):
530 * coding.c (get_translation_table, detect_coding_system)
531 (Fcheck_coding_systems_region)
532 (Fset_terminal_coding_system_internal)
533 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
534 * composite.c (update_compositions, Ffind_composition_internal):
535 * dired.c (directory_files_internal, file_name_completion)
536 (Fsystem_users):
537 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
538 * doc.c (Fsnarf_documentation):
539 * editfns.c (Fmessage_box):
540 * emacs.c (main):
541 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
542 (Feval, eval_sub, Ffuncall, apply_lambda):
543 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
544 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
545 (Fset_file_times, Finsert_file_contents)
546 (Fchoose_write_coding_system, Fwrite_region):
547 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
548 * font.c (font_registry_charsets, font_parse_fcname)
549 (font_prepare_cache, font_update_drivers, Flist_fonts):
550 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
551 * frame.c (make_frame, Fmake_terminal_frame)
552 (x_set_frame_parameters, x_report_frame_params)
553 (x_default_parameter, Fx_parse_geometry):
554 * ftfont.c (syms_of_ftfont):
555 * image.c (gif_load):
556 * keyboard.c (command_loop_1):
557 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
558 (Fcopy_keymap, append_key, Fcurrent_active_maps)
559 (Fminor_mode_key_binding, accessible_keymaps_1)
560 (Faccessible_keymaps, Fwhere_is_internal):
561 * lread.c (read_emacs_mule_char):
562 * menu.c (find_and_return_menu_selection):
563 * minibuf.c (get_minibuffer):
564 * nsfns.m (Fns_perform_service):
565 * nsfont.m (ns_script_to_charset):
566 * nsmenu.m (ns_popup_dialog):
567 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
568 (Fx_own_selection_internal):
569 * nsterm.m (append2):
570 * print.c (Fredirect_debugging_output)
571 (print_prune_string_charset):
572 * process.c (Fdelete_process, Fprocess_contact)
573 (Fformat_network_address, set_socket_option)
574 (read_and_dispose_of_process_output, write_queue_push)
575 (send_process, exec_sentinel):
576 * sound.c (Fplay_sound_internal):
577 * textprop.c (validate_plist, add_properties)
578 (Fput_text_property, Fadd_face_text_property)
579 (copy_text_properties, text_property_list, syms_of_textprop):
580 * unexaix.c (report_error):
581 * unexcoff.c (report_error):
582 * unexsol.c (unexec):
583 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
584 (Fformat_mode_line, syms_of_xdisp):
585 * xfaces.c (set_font_frame_param)
586 (Finternal_lisp_face_attribute_values)
587 (Finternal_merge_in_global_face, syms_of_xfaces):
588 * xfns.c (x_default_scroll_bar_color_parameter)
589 (x_default_font_parameter, x_create_tip_frame):
590 * xfont.c (xfont_supported_scripts):
591 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
592 (menu_help_callback, xmenu_show):
593 * xml.c (make_dom):
594 * xterm.c (set_wm_state):
595 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
596 and similarly for list2 through list5.
597
bafe80ce
PE
5982013-07-15 Paul Eggert <eggert@cs.ucla.edu>
599
600 * callproc.c (Fcall_process_region): Fix minor race and tune.
601 (create_temp_file): New function, with the temp-file-creation part
602 of the old Fcall_process_region. Use Fcopy_sequence to create the
603 temp file name, rather than alloca + build_string, for simplicity.
604 Don't bother to block input around the temp file creation;
605 shouldn't be needed. Simplify use of mktemp. Use
606 record_unwind_protect immediately after creating the temp file;
607 this closes an unlikely race where the temp file was not removed.
608 Use memcpy rather than an open-coded loop.
609 (Fcall_process_region): Use the new function. If the input is
610 empty, redirect from /dev/null rather than from a newly created
611 empty temp file; this avoids unnecessary file system traffic.
612
4700b5a5
PE
6132013-07-14 Paul Eggert <eggert@cs.ucla.edu>
614
5c97beae
PE
615 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
616 Simplify by making this case like the other two. This is a bit
617 slower on obsolete hosts, but the extra complexity isn't worth it.
618
4700b5a5
PE
619 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
620 * process.c (create_process) [!DOS_NT]:
621 Remove now-unnecessary calls to emacs_close.
622
f9a74c4c
EZ
6232013-07-13 Eli Zaretskii <eliz@gnu.org>
624
922ae7ee
EZ
625 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
626 returning early. (Bug#14850)
627
f9a74c4c
EZ
628 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
629 and inhibit-iso-escape-detection attributes of 'undecided'.
630 (Bug#14822)
631
5e301d76
PE
6322013-07-13 Paul Eggert <eggert@cs.ucla.edu>
633
69e0e5ee
PE
634 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
635 Reported by Herbert J. Skuhra in
636 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
637
5e301d76
PE
638 Don't lose top specpdl entry when memory is exhausted.
639 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
640 specpdl overflow here, to simplify callers; all callers changed.
641 Always reserve an unused entry at the stack top; this avoids
642 losing the top entry's information when memory is exhausted.
643
7e649856
PE
6442013-07-12 Paul Eggert <eggert@cs.ucla.edu>
645
a773ed9a
PE
646 Clean up errno reporting and fix some errno-reporting bugs.
647 * callproc.c (Fcall_process):
648 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
649 * process.c (create_process, Fmake_network_process):
650 * unexaix.c (report_error):
651 * unexcoff.c (report_error):
652 Be more careful about reporting the errno of failed operations.
653 The code previously reported the wrong errno sometimes.
654 Also, prefer report_file_errno to setting errno + report_file_error.
655 (Fcall_process): Look at openp return value rather than at path,
656 as that's a bit faster and clearer when there's a numeric predicate.
657 * fileio.c (report_file_errno): New function, with most of the
658 old contents of report_file_error.
659 (report_file_error): Use it.
660 (Ffile_exists_p, Ffile_accessible_directory_p):
661 Set errno to 0 when it is junk.
662 * fileio.c (Faccess_file):
663 * image.c (x_create_bitmap_from_file):
664 Use faccessat rather than opening the file, to avoid the hassle of
665 having a file descriptor open.
666 * lisp.h (report_file_errno): New decl.
667 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
668
7e649856
PE
669 Minor EBADF fixes.
670 * process.c (create_process, wait_reading_process_output) [AIX]:
671 Remove obsolete SIGHUP-related code, as Emacs no longer disables
672 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
673 a multithreaded environment anyway).
674 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
675
f6774c1a
AS
6762013-07-12 Andreas Schwab <schwab@linux-m68k.org>
677
678 * image.c (x_find_image_file): Don't close a remote file handle.
679
bacba3c2
PE
6802013-07-12 Paul Eggert <eggert@cs.ucla.edu>
681
682 Fix races with threads and file descriptors.
683 * callproc.c (Fcall_process_region):
684 * dired.c (open_directory):
685 * emacs.c (main, Fdaemon_initialized):
686 * image.c (x_find_image_file):
687 * inotify.c (Finotify_rm_watch):
688 * lread.c (Flocate_file_internal):
689 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
690 * term.c (term_mouse_moveto, init_tty):
691 * termcap.c (tgetent):
692 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
693 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
694 * unexhp9k800.c, unexmacosx.c (unexec):
695 * callproc.c (Fcall_process_region):
696 Use emacs_close, not close.
697 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
698 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
699 and posix_close function on current platforms (which all lack them).
700 (emacs_close): Use it. This should fix the races on GNU/Linux and
701 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
702 and it should avoid closing random victim file descriptors on
703 other platforms.
704
653d4f43
PE
7052013-07-11 Paul Eggert <eggert@cs.ucla.edu>
706
c8536ec4
PE
707 * inotify.c (uninitialized): Remove. All uses replaced by -1.
708 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
709 Touch up doc a bit.
710
9c203066
PE
711 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
712 This is for .gdbinit xbacktrace.
713
653d4f43
PE
714 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
715 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
716 (emacs_set_tty): Now static.
717 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
718 * term.c (tty_capable_p, tty_default_color_capabilities)
719 (get_tty_terminal, term_mouse_movement)
720 (handle_one_term_event, init_tty, maybe_fatal):
721 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
722 (tgetent, scan_file, name_match, compare_contin):
723 * terminal.c (get_terminal):
724 Use bool for boolean.
725 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
726 Prefer char to unsigned char if either will do.
727 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
728 (tty_write_glyphs): Prefer int to unsigned.
729 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
730 All callers changed.
731 * termcap.c (tprint, main) [TEST]: Remove non-working test.
732
45b683a1
PE
7332013-07-10 Paul Eggert <eggert@cs.ucla.edu>
734
29abe551
PE
735 Port to C89.
736 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
737 (B__dummy__): New dummy symbol, to pacify C89.
738 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
739 they can't grok varargs macros.
740 * dispnew.c (add_window_display_history)
741 (add_frame_display_history):
742 * print.c (print_object):
743 * xdisp.c (debug_method_add):
744 Use %p printf format only for void pointers.
745 * emacs.c (usage_message): New constant, replacing ...
746 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
747 (main): Adjust to usage reorg.
748 * fns.c (syms_of_fns):
749 * profiler.c (syms_of_profiler):
750 Don't use non-constant struct initializers.
751 * gnutls.h (gnutls_initstage_t):
752 * lisp.h (enum Lisp_Fwd_Type):
753 * lread.c (lisp_file_lexically_bound_p):
754 * xsettings.c (anonymous enum):
755 Remove trailing comma.
756 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
757 * lisp.h (ENUM_BF): Use unsigned if pedantic.
758 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
759 (DEFUN): Use it.
760 * regex.c (const_re_char): New type, to pacify strict C89.
761 All uses of 'const re_char' replaced to use it.
762 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
763 with glibc when strict C89. This change is imported from gnulib.
764 All uses changed.
765 (_Restrict_arr_): Rename from __restrict_arr, similarly.
766 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
767 Omit GNU_LINUX implementation, since it requires long long.
768 * xterm.c (x_draw_underwave):
769 Do not assume the traditional order of struct's members.
770 (x_term_init): Rewrite to avoid the need for non-constant structure
771 initializers.
772
45b683a1 773 Syntax cleanup, mostly replacing macros with functions.
763a086d 774 This removes the need for the syntax_temp hack.
45b683a1
PE
775 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
776 * syntax.c (SYNTAX_INLINE): New macro.
777 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
778 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
779 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
780 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
781 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
782 (SYNTAX_COMEND_FIRST): Now functions, not macros.
783 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
784 Now constants, not macros.
785 (syntax_temp) [!__GNUC__]: Remove.
786 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
787 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
788 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
789 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
790 Move here from syntax.h; now functions, not macros. Except for the
791 last function, these are static since only syntax.c uses them.
792 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
793 All uses changed. Now a function, not a macro; use this fact
794 to simplify the code.
795 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
796 compiler bugs; no longer relevant.
797 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
798 (SYNTAX_INLINE): New macro.
799 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
800 for the new functions. Use bool for boolean member.
801 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
802 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
803 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
804 (SETUP_BUFFER_SYNTAX_TABLE):
805 Now extern inline functions, not macros.
806 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
807 Remove; all uses replaced by implementation.
808 (syntax_temp) [!__GNUC__]: Remove decl.
809 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
810
29be4a50
JD
8112013-07-10 Jan Djärv <jan.h.d@swipnet.se>
812
813 * emacs.c (main): Fix syntax error.
814
954b166e
PE
8152013-07-10 Paul Eggert <eggert@cs.ucla.edu>
816
817 Timestamp fixes for undo (Bug#14824).
818 * atimer.c (schedule_atimer):
819 * fileio.c (Ffile_newer_than_file_p):
820 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
821 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
822 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
823 (syms_of_fileio): Remove Sclear_visited_file_name.
824 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
825 file doesn't exist; this avoids an ambiguity with negative timestamps.
826 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
827 * systime.h (make_emacs_time, invalid_emacs_time):
828 Don't assume struct timespec layout; POSIX doesn't guarantee it.
829 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
830 * undo.c (record_first_change): Push (visited-file-modtime) onto
831 undo list rather than reimplementing it by hand, incorrectly.
832
d74647c3
KB
8332013-07-09 Ken Brown <kbrown@cornell.edu>
834
835 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
836
3c51b96b
JB
8372013-07-09 Juanma Barranquero <lekktu@gmail.com>
838
839 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
840
4ebbdd67
PE
8412013-07-09 Paul Eggert <eggert@cs.ucla.edu>
842
843 Handle errno and exit status a bit more carefully.
844 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
845 number into an exit status. Instead, use EXIT_CANCELED.
846 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
847 * callproc.c (relocate_fd):
848 * emacs.c (close_output_streams, main):
849 * process.c (create_process):
850 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
851 Use emacs_perror for simplicity.
852 * callproc.c (relocate_fd, main):
853 * sysdep.c (sys_subshell):
854 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
855 (shut_down_emacs): Use emacs_write, not write.
856 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
857 * fileio.c (Fcopy_file, e_write):
858 * nsterm.m (ns_select):
859 * process.c (send_process):
860 * sound.c (vox_write):
861 Use emacs_write_sig, not emacs_write.
862 * lisp.h (emacs_write_sig, emacs_perror): New decls.
863 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
864 New constants.
865 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
866 of write.
867 (emacs_full_write): New function.
868 (emacs_write): Rewrite to use it.
869 (emacswrite_sig, emacs_perror): New functions.
870 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
871
763a086d 8722013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change).
e4b1e5af
JD
873
874 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
875 on NS even if it is present. Pixmap on NS is a void*.
876
9caab067
PE
8772013-07-07 Paul Eggert <eggert@cs.ucla.edu>
878
879 Port to Ubuntu 10 (Bug#14803).
880 Problem reported by T.V. Raman.
881 * process.c (close_on_exec, accept4, process_socket):
882 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
883
1d442672
EZ
8842013-07-07 Eli Zaretskii <eliz@gnu.org>
885
886 * w32.c (sys_dup): Declare prototype.
887
888 * filelock.c:
889 * emacs.c:
890 * callproc.c [WINDOWSNT]: Include sys/socket.h.
891
067428c1
PE
8922013-07-07 Paul Eggert <eggert@cs.ucla.edu>
893
894 Make file descriptors close-on-exec when possible (Bug#14803).
895 This simplifies Emacs a bit, since it no longer needs to worry
896 about closing file descriptors by hand in some cases.
897 It also fixes some unlikely races. Not all such races, as
898 libraries often open files internally without setting
899 close-on-exec, but it's an improvement.
900 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
901 * callproc.c (Fcall_process) [!MSDOS]:
902 * emacs.c (main) [!DOS_NT]:
903 * nsterm.m (ns_term_init):
904 * process.c (create_process):
905 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
906 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
907 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
908 Prefer mkostemp with O_CLOEXEC to mkstemp.
909 * callproc.c (relocate_fd) [!WINDOWSNT]:
910 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
911 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
912 now using pipe2.
913 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
914 Make the resulting file descriptor close-on-exec.
915 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
916 * lread.c (load_descriptor_list, load_descriptor_unwind):
917 Remove; no longer needed. All uses removed.
918 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
919 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
920 New functions.
921 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
922 (Fmake_network_process, Fnetwork_interface_list):
923 (Fnetwork_interface_info, server_accept_connection):
924 Make newly-created socket close-on-exec.
925 * sysdep.c (emacs_open, emacs_fopen):
926 Make new-created descriptor close-on-exec.
927 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
928 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
929
0da857dd
JD
9302013-07-07 Jan Djärv <jan.h.d@swipnet.se>
931
932 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
933 for NS_IMPL_GNUSTEP.
934
5f86adcd
PE
9352013-07-07 Paul Eggert <eggert@cs.ucla.edu>
936
937 Fix openp errno handling.
938 * callproc.c (Fcall_process): Preserve openp errno around close.
939 * lread.c (openp): Set errno when returning -1, as some callers
940 expect this.
941
1afb1d07
JD
9422013-07-06 Jan Djärv <jan.h.d@swipnet.se>
943
944 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
945
946 * nsterm.h (NSSavePanel): Update comment.
947 (NSAPP_DATA2_RUNFILEDIALOG): Define.
948 (ns_run_file_dialog): Declare.
949
950 * nsfns.m: Remove panelOK.
951 (ns_fd_data): New.
952 (ns_run_file_dialog): New function.
953 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
954 event loop, so file dialog is popped up by ns_run_file_dialog, called
955 by sendEvent (Bug#14578).
956 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
957
3323c263
EZ
9582013-07-06 Eli Zaretskii <eliz@gnu.org>
959
fdda0220
EZ
960 * xdisp.c (default_line_pixel_height): New function.
961 (pos_visible_p, move_it_vertically_backward, try_scrolling)
962 (try_cursor_movement, redisplay_window, try_window)
963 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
964
965 * window.c (window_scroll_pixel_based): use
966 default_line_pixel_height.
967
968 * dispextern.h (default_line_pixel_height): Add prototype.
969
970 * frame.c (x_set_line_spacing): Accept a float value for
971 line-spacing parameter, per the documentation.
972
3323c263
EZ
973 * data.c (Fmultibyte_string_p): Doc fix.
974
47ba6d43
PE
9752013-07-05 Paul Eggert <eggert@cs.ucla.edu>
976
406af475
PE
977 Use emacs_open more consistently when opening files.
978 This handles EINTR more consistently now, and makes it easier
979 to introduce other uniform changes to file descriptor handling.
980 * src/systdio.h: New file.
981 * src/buffer.c (mmap_init):
982 * cygw32.c (chdir_to_default_directory):
983 * dispnew.c (Fopen_termscript):
984 * emacs.c (Fdaemon_initialized):
985 * fileio.c (Fdo_auto_save):
986 * image.c (slurp_file, png_load_body, jpeg_load_body):
987 * keyboard.c (Fopen_dribble_file):
988 * lread.c (Fload):
989 * print.c (Fredirect_debugging_output):
990 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
991 * termcap.c (tgetent):
992 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
993 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
994 * w32term.c (w32_initialize) [CYGWIN]:
995 * xfaces.c (Fx_load_color_file):
996 Use emacs_open instead of plain open, and emacs_fopen instead of
997 plain fopen.
998 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
999 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
1000 * callproc.c (default_output_mode): New constant.
1001 (Fcall_process): Use it to call emacs_open instead of plain creat.
1002 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
1003 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
1004 (emacs_fopen): New function.
1005 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
1006 Include <lisp.h>, for emacs_open.
1007 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
1008
47ba6d43
PE
1009 Remove duplicate #include directives.
1010 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
1011 * xfaces.c:
1012 Don't include stdio.h twice.
1013 * buffer.c [USE_MMAP_FOR_BUFFERS]:
1014 Don't include sys/types.h or stdio.h twice.
1015 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
1016 * lread.c: Don't include coding.h twice.
1017 * nsfont.m: Don't include frame.h twice.
1018 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
1019 * ralloc.c: Don't include <unistd.h> twice.
1020 * xdisp.c: Don't include font.h twice.
1021 * xterm.c: Don't include fontset.h twice.
1022 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
1023
b9ed53d5
PE
10242013-07-04 Paul Eggert <eggert@cs.ucla.edu>
1025
1026 Scale ImageMagick images more carefully.
1027 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
1028 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
1029 Be more careful about avoiding undefined behavior after
1030 integer overflow and division by zero.
1031
cf13177e
YM
10322013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1033
1034 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
1035 (syms_of_w32fns): DEFSYM them.
1036 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
1037 (CCHDEVICENAME): Define macros if not defined.
1038 (struct MONITOR_INFO_EX): New struct.
1039 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
1040 (enum_display_monitors_fn): New variable.
1041 (globals_of_w32fns): Initialize it.
1042 (Fx_display_pixel_width, Fx_display_pixel_height)
1043 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
1044 multi-monitor setups in docstrings.
1045 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
1046 screen size by primary monitor's millimeter per pixel.
1047 (w32_monitor_enum, w32_display_monitor_attributes_list)
1048 (w32_display_monitor_attributes_list_fallback)
1049 (Fw32_display_monitor_attributes_list): New functions.
1050 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
1051
1052 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
1053 if not defined.
1054 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
1055
86dfb7a8
MA
10562013-07-04 Michael Albinus <michael.albinus@gmx.de>
1057
1058 * fileio.c (Qfile_notify_error): New error symbol.
1059
1060 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
1061 * inotify.c (inotify_callback, symbol_to_inotifymask)
1062 (Finotify_add_watch, Finotify_rm_watch): Use it.
1063 (inotifyevent_to_event): Exchange order of cookie and file name.
1064 (Finotify_add_watch): Adapt docstring.
1065
1066 * lisp.h (Qfile_notify_error): Declare.
1067
2c1c974b
PE
10682013-07-04 Paul Eggert <eggert@cs.ucla.edu>
1069
1070 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
1071 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
1072 Do not clear _malloc_thread_enabled_p, undoing the previous change,
1073 which did not work (see <http://bugs.gnu.org/14569#307>).
1074 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
1075 && (!noninteractive || initialized)). This attempts to thread
1076 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
1077
7a35b20f
JB
10782013-07-04 Juanma Barranquero <lekktu@gmail.com>
1079
1080 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
1081 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
1082
1ce5cd04
PE
10832013-07-04 Paul Eggert <eggert@cs.ucla.edu>
1084
1085 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
1086 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
1087 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
1088 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
1089
57f8c490
PE
10902013-07-02 Paul Eggert <eggert@cs.ucla.edu>
1091
1092 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
1093 Define to __sys_siglist.
1094
bcffb5ca
EZ
10952013-07-02 Eli Zaretskii <eliz@gnu.org>
1096
1097 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
1098 word-wrap, so that overflow-newline-into-fringe would work in
1099 visual-line-mode. (Bug#2749)
1100 (move_it_in_display_line_to): When the last scanned display
1101 element fits exactly on the display line, and
1102 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
1103 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
1104 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
1105 finding buffer position that corresponds to pixel coordinates,
1106 e.g. in buffer_posn_from_coords.
1107
2c41e781
JD
11082013-07-02 Jan Djärv <jan.h.d@swipnet.se>
1109
1110 * process.c (handle_child_signal): Call catch_child_signal if
1111 NS_IMPL_GNUSTEP.
1112
c2418359
PE
11132013-07-02 Paul Eggert <eggert@cs.ucla.edu>
1114
52a9bcae
PE
1115 Don't convert function pointers to void * and back.
1116 It isn't portable C, and it's easy enough to avoid.
1117 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
1118 (make_save_value): Add support for SAVE_FUNCPOINTER.
1119 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
1120 * print.c (print_object):
1121 Distinguish function from object pointers.
1122 * lisp.h (SAVE_FUNCPOINTER): New constant.
1123 (SAVE_SLOT_BITS): Adjust to it.
1124 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
1125 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
1126 (voidfuncptr): New typedef.
1127 (struct Lisp_Save_Value): New member data[0].funcpointer.
1128 (XSAVE_FUNCPOINTER): New function.
1129
c2418359
PE
1130 Simplify buildobj processing.
1131 * Makefile.in (buildobj.h): Make it a sequence of strings each
1132 followed by comma, rather than a single string. Put it into a
1133 .tmp file in case there's an error while generating it.
1134 (gl-stamp): Use .tmp for temp files.
1135 (mostlyclean): Clean .tmp files.
1136 * doc.c (buildobj): Move to just the routine that needs it.
1137 It's now an array of strings, so processing is simpler.
1138
8f43ce49
PE
11392013-07-01 Paul Eggert <eggert@cs.ucla.edu>
1140
1141 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
1142 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
1143 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
1144 Invoke malloc_enable_thread even when not interactive.
1145 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
1146 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
1147 in this case, since the underlying bug has now been fixed.
1148
24827db9
JB
11492013-07-01 Juanma Barranquero <lekktu@gmail.com>
1150
1151 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
1152 unlinking it (bug#14691).
1153
ef099a94
MN
11542013-06-30 Michal Nazarewicz <mina86@mina86.com>
1155
1156 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
1157 before checking whether buffer is modified. This lets
1158 `kill-buffer-query-functions' cancel killing of the buffer or save
1159 its content before `kill-buffer' asks user the "Buffer %s
1160 modified; kill anyway?" question.
1161
9d3f2fc2
JD
11622013-06-30 Jan Djärv <jan.h.d@swipnet.se>
1163
1164 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
1165 Let the super performKeyEquivalent deal with them (Bug#14747).
1166
e6c6c8c7
PE
11672013-06-30 Paul Eggert <eggert@cs.ucla.edu>
1168
1d71c1d9
PE
1169 * widget.c (resize_cb): Remove unused local.
1170
8f5f35cc
PE
1171 Do not use GTK 3 if it exists but cannot be compiled.
1172 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
1173 * xterm.c (x_error_handler) [!USE_GTK]:
1174 Do not use GTK 3.
1175
e6c6c8c7
PE
1176 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
1177
0ba54312
EZ
11782013-06-30 Eli Zaretskii <eliz@gnu.org>
1179
5d1c3286
EZ
1180 * intervals.c (get_local_map): Instead of aborting, clip POSITION
1181 to the valid range of values. (Bug#14753)
1182
0ba54312
EZ
1183 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
1184 when moving point by using the current glyph matrix. This avoids
1185 the need to force redisplay when this function is called in a
1186 loop.
1187
9c90cc06
PE
11882013-06-29 Paul Eggert <eggert@cs.ucla.edu>
1189
1190 Fix minor problems found by static checking.
1191 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
1192 Redo the latter's body to sidestep GCC parenthesization warnings.
1193 (setup_coding_system, detect_coding, detect_coding_system): Use them.
1194 * coding.c (detect_coding, detect_coding_system):
1195 * coding.h (struct undecided_spec):
1196 Use bool for boolean.
1197 * image.c (QCmax_width, QCmax_height): Now static.
1198 * xdisp.c (Fmove_point_visually): Remove unused local.
1199
4c672a0f
EZ
12002013-06-29 Eli Zaretskii <eliz@gnu.org>
1201
1202 * xdisp.c (Fmove_point_visually): New function.
1203
c1ea3abf
JB
12042013-06-28 Kenichi Handa <handa@gnu.org>
1205
1206 * coding.h (define_coding_undecided_arg_index): New enum.
1207 (coding_attr_index): New members
1208 coding_attr_undecided_inhibit_null_byte_detection,
1209 coding_attr_undecided_inhibit_iso_escape_detection,
1210 coding_attr_undecided_prefer_utf_8.
1211 (undecided_spec): New struct.
1212 (struct coding_system): New member `undecided' of the member
1213 `spec'.
1214
1215 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
1216 (detect_coding): Likewise.
1217 (detect_coding_system): Likewise.
1218 (Fdefine_coding_system_internal): New coding system properties
1219 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
1220 :prefer-utf-8.
1221 (syms_of_coding): Adjust for coding_arg_undecided_max.
1222
ba3de9e6
PE
12232013-06-28 Paul Eggert <eggert@cs.ucla.edu>
1224
1225 * image.c (x_from_xcolors): Remove unused local.
1226
547c9269
YM
12272013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1228
1229 Defer image data transfer between X client and server until actual
1230 display happens.
1231
1232 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
1233 and `mask_img'.
1234
1235 * image.c (Destroy_Image): Remove.
1236 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
1237 `mask_p', and `colors_p'. All uses changed.
1238 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
ef099a94
MN
1239 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
1240 New macros for `flags' arg to x_clear_image_1.
547c9269
YM
1241 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
1242 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
04b66ce7 1243 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
547c9269
YM
1244 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
1245 (image_get_x_image, image_unget_x_image): New functions or macros.
1246 (image_background, image_background_transparent, x_to_xcolors)
1247 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
1248 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
1249 instead of Destroy_Image.
1250 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
1251 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
1252 (png_load_body, jpeg_load_body, tiff_load, gif_load)
1253 (imagemagick_load_image, svg_load_image): Use them instead of
1254 x_create_x_image_and_pixmap, and x_put_x_image followed by
1255 x_destroy_x_image, respectively.
1256 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
1257 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
1258 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
1259 background_transparent fields.
1260 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
1261 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
1262
dae2f5ef
PE
12632013-06-27 Paul Eggert <eggert@cs.ucla.edu>
1264
1265 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
1266 This mostly consists of undoing recent changes.
1267 * callproc.c (Fcall_process):
1268 * process.c (create_process):
1269 Do not worry about catching SIGCHLD here, undoing previous change.
1270 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
1271 * process.c, process.h (catch_child_signal):
1272 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
1273 * process.c (catch_child_handler): Don't worry about being called
1274 lazily and do not assume caller has blocked SIGCHLD, undoing
1275 previous change. Move first-time stuff back to
1276 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
1277 tickle glib, as that causes Cygwin bootstrap to fail. Do not
1278 set lib_child_handler if it's already initialized, which may
1279 help avoid problems on GNUStep.
1280
fa55d2aa
PE
12812013-06-23 Paul Eggert <eggert@cs.ucla.edu>
1282
1283 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
1284 * callproc.c (Fcall_process):
1285 * process.c (create_process):
1286 Make sure SIGCHLD is caught before we fork,
1287 since Emacs startup no arranges to catch SIGCHLD.
1288 * process.c (lib_child_handler): Initialize to null, not to
1289 dummy_handler.
1290 (catch_child_signal): Allow self to be called lazily.
1291 Do nothing if it's already been called.
1292 Assume caller has blocked SIGCHLD (all callers do now).
1293 * emacs.c (main): Do not catch SIGCHLD here; defer it until
1294 just before it's really needed.
1295 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
1296 since it hasn't been caught yet.
1297
f3f9606c
LMI
12982013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
1299
1300 * image.c (compute_image_size): New function to implement
1301 :max-width and :max-height.
1302 (imagemagick_load_image): Use it.
1303
c7041908
PE
13042013-06-23 Paul Eggert <eggert@cs.ucla.edu>
1305
1306 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
1307 * callproc.c, process.h (block_child_signal, unblock_child_signal):
1308 Now extern.
1309 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
1310 * process.c (catch_child_signal): Block SIGCHLD while futzing with
1311 the SIGCHLD handler, since the code is not atomic and (due to glib)
1312 signals may be arriving now.
1313 * sysdep.c (init_signals): Do not catch child signals here;
1314 'main' now does that later, at a safer time.
1315
f86852b4
PE
13162013-06-22 Paul Eggert <eggert@cs.ucla.edu>
1317
0dfeed58
PE
1318 Clean up SIGCHLD handling a bit (Bug#14569).
1319 * process.c, process.h (catch_child_signal):
1320 Now always extern, even if !NS_IMPL_GNUSTEP.
1321 * process.c (catch_child_signal): Move glib tickler here from
1322 init_process_emacs, so that it's done earlier in Emacs
1323 initialization. Also move the noninteractive && !initialized
1324 check here from init_process_emacs. This is all a bit cleaner for
1325 GNUish platforms, and I hope it works around the Cygwin bug.
1326 * sysdep.c (init_signals): Invoke catch_child_signal here, so
1327 that glib signal handling is tickled before glib creates threads.
1328
f86852b4
PE
1329 * process.c (wait_reading_process_output): Avoid int overflow
1330 when reading more than 2 GiB total from a process.
1331
cbd6509c
PE
13322013-06-21 Paul Eggert <eggert@cs.ucla.edu>
1333
1334 * process.c (create_process): Handle a couple more cases,
1335 i.e., work even if new_argv and wait_child_setup[i] are cached.
1336 Use Fcall_process's style for volatile vars.
1337
9de1114a
AS
13382013-06-21 Andreas Schwab <schwab@linux-m68k.org>
1339
1340 * process.c (create_process): Mark PROCESS volatile.
1341
fbe9e0b9
PE
13422013-06-21 Paul Eggert <eggert@cs.ucla.edu>
1343
1344 Use C99-style flexible array members if available.
1345 This avoids some subtle aliasing issues, which typically
1346 aren't a problem with GCC but may be a problem elsewhere.
1347 * alloc.c (sdata): New typedef, replacing the old struct sdata.
1348 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
1349 In either case, it uses a flexible array member rather than
1350 the old struct hack. All uses changed.
1351 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
1352 Adjust to sdata reorganization.
1353 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
1354 Use offsetof (struct, flex_array_member), not sizeof (struct), as
1355 that ports better to pre-C99 non-GCC.
1356 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
1357 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
1358 as the latter has changed.
1359 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
1360 and port better to pre-C99 GCC.
1361 * image.c (struct xpm_cached_color):
1362 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
1363 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
1364 Use FLEXIBLE_ARRAY_MEMBER.
1365 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
1366 Move decl to top level so it gets checked against implementation.
1367 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
1368 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
1369
1fc71008
PE
13702013-06-20 Paul Eggert <eggert@cs.ucla.edu>
1371
1372 * syntax.c: Integer cleanups.
1373 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
1374 All uses that need 0-or-2 changed to:
1375 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
1376 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
1377 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
1378 (char_quoted, prev_char_comend_first, back_comment)
1379 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
1380 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
1381 Use bool for boolean.
1382 (update_syntax_table, skip_chars, skip_syntaxes):
1383 Prefer int to unsigned when either will do.
1384 (back_comment): Return boolean success flag, like forw_comment,
1385 instead of positive-or-minus-1 (which might have overflowed int anyway).
1386 Don't stuff ptrdiff_t into int.
1387 (syntax_spec_code, syntax_code_spec): Now const.
1388 (Fmatching_paren, scan_lists, scan_sexps_forward):
1389 Use enum syntaxcode for syntax code.
1390 (Fmatching_paren): Check that arg is a character, not just an integer.
1391 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
1392 (Finternal_describe_syntax_value): Omit no-longer-needed
1393 comparison to 0.
1394 (skip_chars): Use char, not unsigned char, when the distinction
1395 doesn't matter.
1396 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
1397 * bytecode.c (exec_byte_code):
1398 * syntax.c (syntax_spec_code, Fchar_syntax)
1399 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
1400 (init_syntax_once):
1401 * syntax.h (SYNTAX_WITH_FLAGS):
1402 Omit unnecessary casts.
1403
b932cad7
EZ
14042013-06-20 Eli Zaretskii <eliz@gnu.org>
1405
1406 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
1407 line dimensions here, to avoid race conditions with the main
1408 thread. (Bug#14062, bug#14630, bug#14669)
1409
1410 * w32term.c (w32_draw_window_cursor): Compute the header line and
1411 mode line dimensions here.
1412 <w32_system_caret_window, w32_system_caret_hdr_height>:
1413 <w32_system_caret_mode_height>: New variables.
1414
1415 * w32term.h: Declare them.
1416
89561f72
PE
14172013-06-20 Paul Eggert <eggert@cs.ucla.edu>
1418
5013fc08
PE
1419 * alloc.c (die): Move "assertion failed" string here ...
1420 * lisp.h (eassert): ... from here. Also, suppress evaluation of
1421 COND when SUPPRESS_CHECKING. This shrinks the executable text
1422 size by 0.8% to 2.2% when configured with --enable-checking,
1423 depending on optimization flags (GCC 4.8.1 x86-64).
1424
89561f72
PE
1425 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
1426
763a086d 14272013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
89561f72
PE
1428
1429 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
1430 base is 2; this is more accurate.
1431
983aeb9a
JB
14322013-06-19 Juanma Barranquero <lekktu@gmail.com>
1433
1434 * sound.c (string_default): Move to !WINDOWSNT section.
1435 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
1436
178ba3e6
PE
14372013-06-19 Paul Eggert <eggert@cs.ucla.edu>
1438
bbc51b15
PE
1439 * sound.c: Integer cleanups.
1440 Remove unnecessary forward decls.
1441 (struct sound_device): The 'file' member is now a Lisp_Object, not
1442 a char *, so that we needn't invoke alloca on a huge size.
1443 (Fplay_sound_internal): Adjust to this.
1444 (string_default): New function.
1445 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
1446 Use it to adjust to the struct sound_device change.
1447 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
1448 (be2hs) [0]: Remove.
1449
178ba3e6
PE
1450 * syntax.c (skip_chars): Don't use uninitialized storage
1451 when searching a multibyte buffer for characters that are not in a
1452 unibyte string that contains non-ASCII characters.
1453
69f60cdc
JD
14542013-06-18 Jan Djärv <jan.h.d@swipnet.se>
1455
1456 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
1457 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
1458
0d6224d4
PE
14592013-06-18 Paul Eggert <eggert@cs.ucla.edu>
1460
1461 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
1462
3c542890
KH
14632013-06-18 Kenichi Handa <handa@gnu.org>
1464
f7e3f7cd
KH
1465 * font.c (Ffont_spec): Signal an error for an invalid font name
1466 (Bug#14648).
3c542890 1467
9349e5f7
PE
14682013-06-18 Paul Eggert <eggert@cs.ucla.edu>
1469
1470 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
1471 In particular this ports to 32-bit sparc Sun cc.
1472 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
1473 array with a dummy element at specpdl[-1], so that its address can
1474 be taken portably.
1475 (unbind_to): Do not copy the binding; not needed, now that we
1476 copy old_value in the one place where the copy is needed.
1477 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
1478 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
1479 (union specbinding): Rename from struct specbinding. Redo layout
1480 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
1481 which is not portable. With Sun C 5.12 32-bit sparc, the
1482 declaration causes nargs to be an unsigned bitfield, a behavior
1483 that the C standard allows; but Emacs wants nargs to be signed.
1484 The overall type is now a union of structures rather than a
1485 structure of union of structures, and the 'kind' member is now a
1486 bitfield, so that the overall type doesn't grow. All uses changed.
1487 * process.c (Fmake_serial_process): Remove unnecessary initialization.
1488
0a4df6a5
PE
14892013-06-17 Paul Eggert <eggert@cs.ucla.edu>
1490
ec6ecaad
PE
1491 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
1492 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
1493
0a4df6a5
PE
1494 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
1495
7bfe8dbc
EZ
14962013-06-17 Eli Zaretskii <eliz@gnu.org>
1497
1498 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
1499 unless we know that the window w's frame is a frame object.
1500 Another attempt at solving bug#14062 and bug#14630.
1501
708e05f6
LMI
15022013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
1503
1504 * textprop.c (property_set_type): New enum.
1505 (add_properties): Allow appending/prepending text properties.
1506 (add_text_properties_1): Factored out of Fadd_text_properties.
ef099a94 1507 (Fadd_text_properties): Move all the code into
708e05f6
LMI
1508 add_text_properties_1.
1509 (Fadd_face_text_property): New function that calls
1510 add_text_properties_1.
1511
84575e67
PE
15122013-06-17 Paul Eggert <eggert@cs.ucla.edu>
1513
1514 Move functions from lisp.h to individual modules when possible.
1515 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
1516 * alloc.c (XFLOAT_INIT, set_symbol_name):
1517 * buffer.c (CHECK_OVERLAY):
1518 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
1519 (set_char_table_parent):
1520 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
1521 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
1522 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
1523 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
1524 (set_blv_valcell):
1525 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
1526 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
1527 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
1528 (backtrace_args, backtrace_debug_on_exit):
1529 * floatfns.c (CHECK_FLOAT):
1530 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
1531 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
1532 (set_hash_hash, set_hash_hash_slot, set_hash_index)
1533 (set_hash_index_slot):
1534 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
1535 * marker.c (CHECK_MARKER):
1536 * textprop.c (CHECK_STRING_OR_BUFFER):
1537 * window.c (CHECK_WINDOW_CONFIGURATION):
1538 Move here from lisp.h, and make these functions static rather than
1539 extern inline.
1540 * buffer.c (Qoverlayp):
1541 * data.c (Qsubrp):
1542 * fns.c (Qhash_table_p):
1543 * window.c (Qwindow_configuration_p):
1544 Now static.
1545 * lisp.h: Remove the abovementioned defns and decls.
1546
1547 Use functions, not macros, for XINT etc. (Bug#11935).
1548 In lisp.h, prefer functions to function-like macros, and
1549 constants to object-like macros, when either will do. This:
1550 . simplifies use, as there's no more need to worry about
1551 arguments' side effects being evaluated multiple times.
1552 . makes the code easier to debug on some platforms.
1553 However, when using gcc -O0, keep using function-like macros
1554 for a few critical operations, for performance reasons.
1555 This sort of thing isn't needed with gcc -Og, but -Og
1556 is a GCC 4.8 feature and isn't widely-enough available yet.
1557 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
1558 Remove enum lsb_bits; no longer needed.
1559 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
1560 * buffer.c (Qoverlap):
1561 * data.c (Qsubrp):
1562 * fns.c (Qhash_table_p):
1563 Now extern, so lisp.h can use these symbols.
1564 * dispextern.h: Include character.h, for MAX_CHAR etc.
1565 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
1566 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
1567 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
1568 (GLYPH_CODE_P): Move here from lisp.h.
1569 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
1570 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
1571 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
1572 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
1573 XUNTAG now returns void *.
1574 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
1575 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
1576 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
1577 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
1578 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
1579 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
1580 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
1581 (lisp_h_XPNTR, lisp_h_XSYMBOL):
1582 New macros, renamed from their sans-lisp_h_ counterparts.
1583 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
1584 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
1585 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
1586 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
1587 If compiling via GCC without optimization, define these as macros
1588 in addition to inline functions.
1589 To disable this, compile with -DINLINING=0.
1590 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
1591 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
1592 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
1593 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
1594 (INTMASK, VALMASK): Now macros, since static values cannot be
1595 accessed from extern inline functions.
1596 (VALMASK): Also a constant, for benefit of old GDB.
1597 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
1598 is INTEGERP, which can fold it in.
5165d44a 1599 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
84575e67
PE
1600 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
1601 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
1602 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
1603 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
1604 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
1605 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
1606 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
1607 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
1608 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
1609 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
1610 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
1611 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
1612 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
1613 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
1614 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
1615 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
1616 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
1617 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
1618 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
1619 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
1620 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
1621 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
1622 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
1623 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
1624 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
1625 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
1626 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
1627 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
1628 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
1629 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
1630 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
1631 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
1632 Now functions.
1633 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
1634 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
1635 (VALMASK): Define in one place rather than in two, merging the
1636 USE_LSB_TAG parts; this is simpler.
1637 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
1638 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
1639 Move up, to avoid use before definition.
1640 Also include "globals.h" earlier, for the same reason.
1641 (make_natnum): New function.
1642 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
1643 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
1644 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
1645 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
1646 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
1647 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
1648 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
1649 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
1650 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
1651 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
1652 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
1653 (Qwindow_configuration_p, Qimage): New forward declarations.
1654 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
1655 (STRING_COPYIN): Remove; unused.
1656 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
1657 (xcar_addr, xcdr_addr): New functions. All uses changed.
1658 (IEEE_FLOATING_POINT): Now a constant, not a macro.
1659 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
1660 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
1661 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
1662 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
1663 (TYPE_RANGED_INTEGERP): Simplify.
1664 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
1665 (setlocale, fixup_locale, synchronize_system_messages_locale)
1666 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
1667 Now empty functions, not macros.
1668 (functionp): Return bool, not int.
1669 * window.c (Qwindow_configuration_p): Now extern,
1670 so window.h can use it.
1671 * window.h (Qwindowp): Move decl back to lisp.h.
1672
9583ec36
EZ
16732013-06-15 Eli Zaretskii <eliz@gnu.org>
1674
1675 * xdisp.c (Fline_pixel_height): New function, required for solving
1676 bug #14567.
1677
210272ce
PE
16782013-06-15 Paul Eggert <eggert@cs.ucla.edu>
1679
1680 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
1681
de0503df
SM
16822013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
1683
1684 * lread.c (syms_of_lread):
1685 * fns.c (Fprovide): Adjust to new format of after-load-alist.
1686
afbfe143
KD
16872013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
1688
1689 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
1690
d177e213
XF
16912013-06-12 Xue Fuqiao <xfq.free@gmail.com>
1692
1693 * fileio.c (expand_file_name): Doc fix.
1694
05e3e412
PE
16952013-06-11 Paul Eggert <eggert@cs.ucla.edu>
1696
f7394b12
PE
1697 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
1698 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
1699 Wait for self, not for 0. This can't hurt on GNU or similar
1700 system, and may help with Cygwin.
1701
05e3e412
PE
1702 * keyboard.c: Don't use PROP (...) as an lvalue.
1703 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
1704 Use set_prop (A, B), not PROP (A) = B.
1705
17dd3097
EZ
17062013-06-10 Eli Zaretskii <eliz@gnu.org>
1707
1708 * xdisp.c (get_it_property): Use it->window instead of generating
1709 a Lisp object from it->w.
1710
52fab9c9
EZ
17112013-06-09 Eli Zaretskii <eliz@gnu.org>
1712
1713 * xdisp.c (get_it_property): If it->object is a buffer, pass to
1714 get-char-property the window that is being rendered, instead of
1715 the buffer, to support window-specific overlays. (Bug#14575)
ad257d4f
EZ
1716 (compute_display_string_pos): When W is NULL, use the current
1717 buffer as the object to pass to get-char-property.
1718 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
1719 pointer member of the bidi iterator, since no window is pertinent
1720 to this function.
52fab9c9 1721
5bf97bfc
EZ
17222013-06-08 Eli Zaretskii <eliz@gnu.org>
1723
1724 * bidi.c (bidi_fetch_char): Accept additional argument, the window
1725 being displayed, and pass it to compute_display_string_pos.
1726 (bidi_level_of_next_char, bidi_resolve_explicit_1)
1727 (bidi_paragraph_init): All callers changed.
1728
1729 * xdisp.c (init_from_display_pos, init_iterator)
1730 (handle_single_display_spec, next_overlay_string)
1731 (get_overlay_strings_1, reseat_1, reseat_to_string)
e7b41c4c
JB
1732 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
1733 Set bidi_it.w member from it->w.
5bf97bfc
EZ
1734 (compute_display_string_pos): Accept additional argument, the
1735 window being displayed, and pass it to Fget_char_property.
1736 (Bug#14575)
1737
1738 * dispextern.h (struct bidi_it): New member w, the window being
1739 displayed.
1740 (compute_display_string_pos): Adjust prototype.
1741
5de0e011
JD
17422013-06-08 Jan Djärv <jan.h.d@swipnet.se>
1743
e7b41c4c 1744 * xgselect.c: Remove unneeded include xterm.h.
b33f93ee
JD
1745
1746 * process.c (wait_reading_process_output): Check for NS before GLIB.
1747 GLIB may be linked in due to rsvg, but ns_select must be called.
1748
5de0e011
JD
1749 * xgselect.c (xg_select): Remove call to window_system_available
1750 and g_main_context_pending at the top, so Gdk events (i.e. file
1751 notify) are processed when Emacs is started with -nw.
1752
a822acff
EZ
17532013-06-07 Eli Zaretskii <eliz@gnu.org>
1754
1755 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
1756 (ctagsfiles3): New variable, includes only *.m files.
1757 (TAGS): Use an explicit language name in the regular expressions,
1758 to avoid transformation of '/SOMETHING' by MSYS to
1759 'c:\MSYS\SOMETHING'.
1760
6c0a9ed1
RC
17612013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
1762
1763 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
1764
9ef6111b
EZ
17652013-06-06 Eli Zaretskii <eliz@gnu.org>
1766
1767 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
1768 still need to set the mouse pointer shape and activate help-echo.
1769 (Bug#14558)
1770
7d300d64
PE
17712013-06-06 Paul Eggert <eggert@cs.ucla.edu>
1772
1773 A few porting etc. fixes for the new file monitor code.
1774 See the thread containing
1775 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
1776 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
1777 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
1778 (dir_monitor_callback, Fgfile_rm_watch):
1779 Use assq_no_quit instead of Fassoc, for speed.
1780 (dir_monitor_callback, Fgfile_rm_watch):
1781 eassert that the monitor is a fixnum.
1782 (dir_monitor_callback): No need for CDR_SAFE.
1783 Simplify building of lisp with alternative tails.
1784 (Fgfile_add_watch, Fgfile_rm_watch):
1785 Do not assume glib functions set errno reliably on failure.
1786 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
1787 and signal an error otherwise.
1788 (Fgfile_rm_watch): Prefer CONSP to !NILP.
1789 Use Fdelq instead of Fdelete, for speed.
1790
817ebfcf
EZ
17912013-06-05 Eli Zaretskii <eliz@gnu.org>
1792
1793 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
1794 don't insist on being invoked on a highlighted tool-bar button.
1795 Avoids losing tool-bar functionality when mouse-highlight is nil.
1796 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
1797 Don't highlight when mouse-highlight is nil.
1798 (note_mouse_highlight): When mouse-highlight is nil, don't return
1799 right away; instead, run tool-bar and mode-line highlight
1800 subroutine, clear any existing highlight, and revert the mouse
1801 pointer to its default shape. (Bug#14558)
1802
55577e7c
SM
18032013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
1804
1805 * lisp.mk (lisp): Add prog-mode.el.
1806
f019a684
PE
18072013-06-05 Paul Eggert <eggert@cs.ucla.edu>
1808
1809 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
1810 * process.c (dummy_handler): New function.
1811 (lib_child_handler): New static var.
1812 (handle_child_signal): Invoke it.
1813 (catch_child_signal): If a library has set up a signal handler,
1814 save it into lib_child_handler.
1815 (init_process_emacs): If using glib and not on Windows, tickle glib's
1816 child-handling code so that it initializes its private SIGCHLD handler.
1817 * syssignal.h (SA_SIGINFO): Default to 0.
1818 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
1819 31; it should no longer be needed now.
1820
90db8702
MA
18212013-06-05 Michael Albinus <michael.albinus@gmx.de>
1822
1823 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
1824
1825 * gfilenotify.c (globals_of_gfilenotify): New function.
1826 (syms_of_gfilenotify): Move global initialization there.
1827
1828 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
1829
bfa3acd6
SM
18302013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
1831
1832 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
1833 * keyboard.c (menu_bar_items, tool_bar_items):
1834 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
1835 not override local keymaps any more.
1836
ba59bd80
EZ
18372013-06-04 Eli Zaretskii <eliz@gnu.org>
1838
1839 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
1840
7f203aa1
EZ
18412013-06-03 Eli Zaretskii <eliz@gnu.org>
1842
9337e206
EZ
1843 * w32console.c (initialize_w32_display): Return the dimensions of
1844 the console window via 2 additional arguments, not via the current
1845 frame. This avoids crashes due to overrunning the bounds of
1846 frame's decode_mode_spec_buffer, which is not resized following
1847 the change of the frame dimensions from the initial 10x10.
1848
1849 * w32term.h (w32_initialize_display_info): Adjust prototype.
1850
1851 * term.c (init_tty): Take dimensions of the frame from the values
1852 returned by initialize_w32_display.
1853
7f203aa1
EZ
1854 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
1855 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
1856 (LIBES): Add $(GFILENOTIFY_LIBS).
1857
1858 * w32inevt.c (handle_file_notifications): Add dummy implementation
1859 for !HAVE_W32NOTIFY.
1860
1861 * w32term.c: Wrap code with HAVE_W32NOTIFY.
1862
55a87246
JD
18632013-06-03 Jan Djärv <jan.h.d@swipnet.se>
1864
1865 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
1866
1867 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
1868
1869 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
1870
3d5ee10a
PE
18712013-06-03 Paul Eggert <eggert@cs.ucla.edu>
1872
1873 Fix minor problems found by static checking.
1874 * data.c (pure_write_error):
1875 Use xsignal2, not Fsignal, as Fsignal might return.
1876 * eval.c (set_backtrace_debug_on_exit): Now static.
1877 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
1878 No longer inline. EXTERN_INLINE is needed only for functions
1879 defined in .h files. Reindent function header as per GNU style.
1880 (backtrace_p, backtrace_top, backtrace_next):
1881 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
1882 compiler or linker. Add extern decls to pacify gcc -Wall.
1883 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
1884 Now static.
1885 * frame.c (free_monitors): Define only on platforms that need it.
1886 * nsterm.m (ns_term_init):
1887 * process.c (catch_child_signal):
1888 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
1889 defined on all porting targets these days.
1890 * process.c, process.h (catch_child_signal):
1891 Make it extern only if NS_IMPL_GNUSTEP is defined.
1892
e2d8a6f0
EZ
18932013-06-03 Eli Zaretskii <eliz@gnu.org>
1894
1895 * w32.c (gettimeofday): Make the signature identical to prototype
1896 in nt/inc/sys/time.h.
1897
a8a7c5f6
SM
18982013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
1899
1900 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
1901 .gdbinit.
1902
1903 * keyboard.c (safe_run_hooks_error): Improve error message.
1904
1905 * data.c (pure_write_error): Add `object' argument.
1906 * puresize.h (CHECK_IMPURE): Use it.
1907
c9628c79
MA
19082013-06-03 Michael Albinus <michael.albinus@gmx.de>
1909
1910 * Makefile.in (NOTIFY_OBJ): New variable.
1911 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
1912
1913 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
1914 Call syms_of_gfilenotify.
1915
1916 * gfilenotify.c: New file.
1917
1918 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
1919 and Qfile_w32notify.
1920 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
1921 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
1922
1923 * lisp.h: Declare syms_of_gfilenotify.
1924
1925 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
1926
2f592f95
SM
19272013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
1928
1929 Merge the specpdl and backtrace stacks. Make the structure of the
1930 specpdl entries more obvious via a tagged union of structs.
1931 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
1932 (enum specbind_tag): New enum.
1933 (struct specbinding): Make it a tagged union of structs.
1934 Add a case for backtrace records.
1935 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
1936 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
1937 (backtrace_debug_on_exit): New accessors.
1938 (struct backtrace): Remove.
1939 (struct catchtag): Remove backlist field.
1940 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
1941 Move to eval.c.
1942 (Flocal_variable_p): Speed up the common case where the binding is
1943 already loaded.
1944 * eval.c (backtrace_list): Remove.
1945 (set_specpdl_symbol, set_specpdl_old_value): Remove.
1946 (set_backtrace_args, set_backtrace_nargs)
1947 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
1948 (backtrace_next): New functions.
1949 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
1950 (unwind_to_catch, internal_lisp_condition_case)
1951 (internal_condition_case, internal_condition_case_1)
1952 (internal_condition_case_2, internal_condition_case_n): Don't bother
1953 with backtrace_list any more.
1954 (Fsignal): Adjust to new backtrace format.
1955 (grow_specpdl): Move up.
1956 (record_in_backtrace): New function.
1957 (eval_sub, Ffuncall): Use it.
1958 (apply_lambda): Adjust to new backtrace format.
1959 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
1960 data.c.
1961 (specbind): Adjust to new specpdl format. Simplify.
1962 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
1963 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
1964 backtrace format.
1965 (mark_backtrace): Remove.
1966 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
1967 * xdisp.c (redisplay_internal): Use record_in_backtrace.
1968 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
1969 Use mark_specpdl.
1970 * profiler.c (record_backtrace): Use get_backtrace.
1971 (handle_profiler_signal): Use backtrace_top_function.
1972 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
1973 accessor functions.
1974
c0342369
JD
19752013-06-02 Jan Djärv <jan.h.d@swipnet.se>
1976
1977 * process.h (catch_child_signal): Declare.
1978
1979 * process.c (catch_child_signal): New function.
1980 (init_process_emacs): Call it.
1981
1982 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
1983 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
1984 NS_IMPL_COCOA.
1985 (x_set_cursor_type): Remove declaration.
1986 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
1987 (ns_update_end, ns_focus, ns_unfocus): Remove GNUStep specific code.
1988 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
1989 (ns_get_color): Use F suffix on float.
1990 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
1991 (ns_get_rgb_color): Remove.
1992 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
1993 (note_mouse_movement): x and y are CGFloat.
1994 (ns_draw_fringe_bitmap): Remove unused rowY.
1995 Change #if to COCOA && >= 10_6.
1996 (ns_draw_window_cursor): Remove unused overspill.
1997 (ns_draw_underwave): width and x are EamcsCGFloat.
1998 (ns_draw_box): thickness is CGFloat.
1999 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
2000 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
2001 if not in main thread.
2002 (ns_get_pending_menu_title, ns_check_menu_open)
2003 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
2004 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
2005 (sendFromMainThread:): New method.
2006 (changeFont:): size is CGFloat.
2007 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
2008 Disable warning about permanent text.
2009 (characterIndexForPoint:): Adjust return type depending on GNUStep
2010 version.
2011 (mouseDown:): delta is CGFloat.
2012 (updateFrameSize): Remove unised variable f.
2013 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
2014 Cast float to EmacsCGFloat.
2015 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
2016 also to -1 when restoring.
2017 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
2018 inside NS_IMPL_COCOA.
2019 (toggleFullScreen:): Put call to toggleFullScreen inside
2020 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
2021 (setPosition:portion:whole:): por is CGFloat.
2022 (getMouseMotionPart:window:x:y:): Add F suffix to float.
2023 (mouseDown:): Use CGFloat.
2024 (mouseDragged:): Remove unised variable edge.
2025 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
2026
2027 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUStep when the size
2028 of CGFloat differs.
2029 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
2030 when NS_IMPL_GNUSTEP.
2031 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
2032 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
2033 (EmacsToolbar): Add clearAll. Add tag argument to
2034 addDisplayItemWithImage.
2035 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
2036
2037 * nsselect.m (ns_get_local_selection): Remove unused variable type.
2038
2039 * nsmenu.m (ns_update_menubar): Make static.
2040 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
2041 (fillWithWidgetValue:): Add cast to SEL for setAction.
2042 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
2043 (update_frame_tool_bar): Update code for GNUStep.
2044 (clearAll): New method.
2045 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
4f405069 2046 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
e7b41c4c 2047 Move identifierToItem setObject and activeIdentifiers addObject before
c0342369
JD
2048 call to insertItemWithItemIdentifier.
2049 (validateVisibleItems): Fix indentation.
2050 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
2051 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
2052 UtilityWindow to aStyle, remove call to setStyleMask.
2053
2054 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
2055
2056 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
2057 (ns_charset_covers, ns_get_covering_families, nsfont_open):
2058 Use F suffix on floats.
2059 (ns_char_width): Returns CGFloat.
2060 (ns_ascii_average_width): w is CGFloat instead of float.
e7b41c4c 2061 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
c0342369
JD
2062 DPSxshow.
2063 (ns_glyph_metrics): CGFloat instead of float.
2064
a0eb10b3
JB
2065 * nsfns.m (x_set_foreground_color, x_set_background_color):
2066 Use EmacsCGFloat.
2067 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
2068 remove unused variables.
2069 (Fns_read_file_name): Keep track if panel is for save.
2070 Use ns_filename_from_panel/ns_directory_from_panel.
c0342369 2071 (Fns_list_services): delegate only used for COCOA.
a0eb10b3
JB
2072 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUStep.
2073 Just return the input if GNUStep.
c0342369
JD
2074 (x_screen_planes): Remove.
2075 (Fxw_color_values): Use EmacsCGFloat
2076 (Fns_display_monitor_attributes_list): Only get screen number for
2077 Cocoa.
ef099a94 2078 (getDirectory, getFilename): Remove from EmacsOpenPanel and
c0342369
JD
2079 EmacsSavePanel.
2080 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
2081 ns_directory_from_panel.
2082
da9aff11
PE
20832013-06-01 Paul Eggert <eggert@cs.ucla.edu>
2084
2085 * process.c (handle_child_signal): Also use WCONTINUED.
2086 This is so that list-processes doesn't mistakenly list the process
2087 as stopped, when the process has actually been continued and is
2088 now running.
2089
0e64479a
PE
20902013-05-31 Paul Eggert <eggert@cs.ucla.edu>
2091
fc186a96
PE
2092 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
2093 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
2094 not already configured.
2095
0e64479a
PE
2096 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
2097
38b787fa
EZ
20982013-05-29 Eli Zaretskii <eliz@gnu.org>
2099
2100 * Makefile.in (mostlyclean): Remove *.res files.
2101
22513e52
SM
21022013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
2103
2104 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
2105 a buffer (bug#8447).
2106
6ef3db10
EZ
21072013-05-27 Eli Zaretskii <eliz@gnu.org>
2108
2109 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
2110 display vector, and we backtrack, handle the case that the
2111 previous character position is also displayed from a display
2112 vector or covered by a display string or image. (Bug#14476)
2113
6799bb26
JD
21142013-05-25 Jan Djärv <jan.h.d@swipnet.se>
2115
2116 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
2117 (struct MonitorInfo, free_monitors): Remove.
2118 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
2119 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
2120 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
2121 Qframes, Qsource.
2122
2123 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
2124 (struct MonitorInfo, free_monitors): Remove.
2125 (ns_screen_name): Make static.
2126 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
2127 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
2128 Qframes, Qsource.
2129
2130 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
2131 (struct MonitorInfo): New struct.
2132 (free_monitors, make_monitor_attribute_list): Declare.
2133
22513e52
SM
2134 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
2135 New Lisp_Object:s.
6799bb26
JD
2136 (free_monitors, make_monitor_attribute_list): New functions.
2137 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
2138 Qsource.
2139
38cd43eb
XF
21402013-05-25 Xue Fuqiao <xfq.free@gmail.com>
2141
2142 * callproc.c (call_process): Refine the doc string. (Bug#14045)
2143
2af0948d
SM
21442013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
2145
a7eb9b0f
SM
2146 * keyboard.c: Apply keyboard decoding only to events that come directly
2147 from the tty, not from unread-command-events (bug#14368).
2148 (read_event_from_main_queue): New function, extracted from read_char).
2149 (read_decoded_char): Remove.
2150 (read_decoded_event_from_main_queue): New function to replace it.
2151 (read_char): Use it.
2152 (read_key_sequence): Use read_char rather than read_decoded_char.
2153
2af0948d
SM
2154 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
2155
1413e9a5
BR
21562013-05-22 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
2157
2158 * casetab.c (init_casetab_once): Fix last change (bug#14424).
2159
e6d2f155
KH
21602013-05-22 Kenichi Handa <handa@gnu.org>
2161
2162 The following changes are to fix the setting of
2163 buffer-file-coding-system on, for instance, C-x RET c unix RET
2164 _FILE_OF_DOS_EOL_TYPE_ RET.
2165
2166 * coding.h (struct coding_system): New member detected_utf8_chars.
2167
2168 * coding.c (detect_coding_utf_8): Count characters and check EOL
2169 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
2170 BOM is there.
2171 (setup_coding_system): Do not initialize coding->head_ascii.
2172 (check_ascii): Do not set coding->eol_seen but update it. Do not
2173 call adjust_coding_eol_type here.
1413e9a5
BR
2174 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
2175 If the eol-type of CODING is already specified, adjust the eol type
e6d2f155
KH
2176 of the found coding-system.
2177 (decode_coding_gap): Cancel previous change. Utilize the
2178 character numbers counted by detect_coding_utf_8. Fix detection
2179 of BOM for utf-8.
2180
ab56a6f4 21812013-05-21 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
fc30d803
SM
2182
2183 * search.c (looking_at_1): Only set last_thing_searched if the match
2184 changed the match-data (bug#14281).
2185
ecc3c6ed
DA
21862013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
2187
2188 * xdisp.c (reseat_at_previous_visible_line_start):
a0eb10b3 2189 Already declared in dispextern.h, so remove it here.
ecc3c6ed
DA
2190 (move_it_vertically_backward): Likewise.
2191
5ba8bf35
YM
21922013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2193
2194 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
d6635ba2 2195 (Fx_display_pixel_width, Fx_display_pixel_height)
fc30d803
SM
2196 (Fx_display_mm_width, Fx_display_mm_height):
2197 Mention `display-monitor-attributes-list' in docstrings.
5ba8bf35 2198
91e8418b 2199 * nsfns.m (ns_get_screen): Remove function. All uses removed.
a0eb10b3 2200 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
91e8418b
YM
2201 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
2202 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
2203 (Fx_display_backing_store, Fx_display_visual_class)
2204 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
2205 (Fx_display_grayscale_p, Fx_display_pixel_width)
2206 (Fx_display_pixel_height, Fx_display_planes)
2207 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
2208 (Fx_display_screens): Don't confuse X11 screens with NS screens.
2209 (Fx_display_mm_width, Fx_display_mm_height)
2210 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
2211 height for all physical monitors as in X11.
2212
fc30d803
SM
2213 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
2214 Return pixel width or height for all physical monitors as in X11.
91e8418b 2215
31ff141c
PE
22162013-05-18 Paul Eggert <eggert@cs.ucla.edu>
2217
2218 Port --enable-gcc-warnings to clang.
2219 * bytecode.c (exec_byte_code):
2220 * regex.c:
2221 Redo diagnostic pragmas to pacify clang, too.
2222 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
2223 * editfns.c (Fencode_time):
2224 * fileio.c (file_accessible_directory_p):
2225 * font.c (font_unparse_xlfd):
2226 Use '&"string"[index]' instead of '"string" + (index)'.
2227 * undo.c (user_error): Remove; unused.
2228
df065a0b
EZ
22292013-05-16 Eli Zaretskii <eliz@gnu.org>
2230
04d360e7
EZ
2231 * insdel.c (insert_1_both): Document the arguments, instead of
2232 referring to insert_1, which no longer exists.
2233
5bb98290
EZ
2234 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
2235 some window, increment windows_or_buffers_changed, so that
2236 *Messages* display in that window is updated. (Bug#14408)
2237
df065a0b
EZ
2238 * w32.c: Include epaths.h.
2239 (init_environment): Use cmdproxy.exe without leading directories.
2240 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
2241 case.
2242 (gettimeofday): Adjust signature and return value to Posix
2243 expectations.
2244
2245 * unexw32.c (open_output_file): Delete the existing emacs.exe
2246 before creating it, to break the hard link to the versioned
2247 executable.
2248
2249 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
2250 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
2251 (FIRSTFILE_OBJ): New variables.
2252 (W32_RES): Rename to EMACSRES. All users changed.
2253 (base_obj): Use $(CM_OBJ).
2254 (ALLOBJS): Use $(FIRSTFILE_OBJ).
2255 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
2256 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
2257 $(W32_RES_LINK) before $(LIBES).
2258 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
2259
1aa8d505
SM
22602013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
2261
6e911150
SM
2262 * makefile.w32-in (DOC): Use just "DOC".
2263
2264 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
2265
1aa8d505
SM
2266 * process.c: Export default filters and sentinels to Elisp.
2267 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
2268 New constants.
2269 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
2270 (Fset_process_sentinel, Fformat_network_address):
2271 Default to them instead of nil.
2272 (server_accept_connection): Sentinels can't be nil any more.
2273 (read_and_dispose_of_process_output): New function, extracted from
2274 read_process_output.
2275 (read_process_output): Use it; filters can't be nil.
2276 (Finternal_default_process_filter): New function, extracted from
2277 read_process_output.
2278 (exec_sentinel_unwind): Remove function.
2279 (exec_sentinel): Don't zilch sentinel while running.
2280 (status_notify): Sentinels can't be nil.
2281 (Finternal_default_process_sentinel): New function extracted from
2282 status_notify.
2283 (setup_process_coding_systems): Default filter is not nil any more.
2284 (syms_of_process): Export new Elisp functions and initialize
2285 new constants.
2286 * lisp.h (make_lisp_proc): New function.
2287
5ac2eb34
SM
22882013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
2289
2290 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
2291
eda9c7d7
EZ
22922013-05-14 Eli Zaretskii <eliz@gnu.org>
2293
2294 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
5ac2eb34
SM
2295 unless we know that the window w is a leaf window.
2296 Another attempt at solving bug#14062.
eda9c7d7 2297
8fdeaad5
JD
22982013-05-14 Jan Djärv <jan.h.d@swipnet.se>
2299
2300 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
2301 fdesc (Bug#14375).
2302
44aa9ee6
PE
23032013-05-12 Paul Eggert <eggert@cs.ucla.edu>
2304
2305 * image.c (gif_load): Check that subimages fit (Bug#14345).
2306
759fd763
SM
23072013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
2308
2309 * lread.c (skip_dyn_eof): New function.
2310 (read1): Use it to skip the end of a file in response to #@00.
2311
2312 * doc.c (get_doc_string): Slightly relax the sanity checking.
2313
4465bfb4
JD
23142013-05-09 Jan Djärv <jan.h.d@swipnet.se>
2315
2316 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
2317 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
2318 (MonitorInfo): New struct.
2319 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
2320 (Fns_display_monitor_attributes_list): New functions.
2321 (display-usable-bounds): Remove.
2322 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
2323 Qsource.
2324
7583e2a0
PE
23252013-05-09 Paul Eggert <eggert@cs.ucla.edu>
2326
2327 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
2328 (GTK_CHECK_VERSION): New macro, if not already defined.
2329 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
2330 replaced by GTK_CHECK_VERSION.
2331
ad75d77e
PE
23322013-05-08 Paul Eggert <eggert@cs.ucla.edu>
2333
2334 * xterm.h (GTK_PREREQ): New macro.
2335 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
2336 to use this macro instead, for consistency and clarity.
2337
07525f77
EZ
23382013-05-08 Eli Zaretskii <eliz@gnu.org>
2339
2340 * xdisp.c (row_for_charpos_p): New function, with code of
2341 cursor_row_p, but accepts an additional argument CHARPOS instead
2342 of using a hardcoded PT.
2343 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
2344 (row_containing_pos): Call row_for_charpos_p instead of partially
2345 doing the same. Fixes cursor positioning under longlines-mode
2346 when longlines-show-effect includes more than one newline, when
2347 moving the cursor vertically up.
2348
d901fc8d
JB
23492013-05-08 Juanma Barranquero <lekktu@gmail.com>
2350
2351 * makefile.w32-in (ACL_H): New macro.
2352 ($(BLD)/fileio.$(O)): Update dependencies.
2353
f269bc61
PE
23542013-05-07 Paul Eggert <eggert@cs.ucla.edu>
2355
e7b41c4c 2356 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
ffdc270a
PE
2357 * Makefile.in (LIB_ACL): New macro.
2358 (LIBACL_LIBS): Remove.
2359 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
2360 * fileio.c: Include <acl.h>.
2361 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
2362 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
2363 !acl_errno_valid.
2364 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
2365 it ourselves.
2366
f269bc61
PE
2367 * unexelf.c: Don't assume ElfW (Half) fits in int.
2368 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
2369 when dealing with ElfW (Half) values, since they can exceed 2**31
2370 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
2371 (entry_address): Omit unused NUM arg. All uses changed.
2372
a261c53e
JL
23732013-05-07 Juri Linkov <juri@jurta.org>
2374
2375 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
2376 to the string converted from number with `Fnumber_to_string'.
2377 (Bug#14254)
2378
2b66427d
PE
23792013-05-07 Paul Eggert <eggert@cs.ucla.edu>
2380
2381 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
2382 This fixes a problem introduced by my previous change.
2383
15acfe41
GM
23842013-05-07 Glenn Morris <rgm@gnu.org>
2385
2386 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
2387
5ea03bf5
JD
23882013-05-07 Jan Djärv <jan.h.d@swipnet.se>
2389
2390 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
2391
e0c9d565
PE
23922013-05-07 Paul Eggert <eggert@cs.ucla.edu>
2393
2394 Static checking by GCC 4.8.0.
2395 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
2396 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
2397 (x_get_monitor_attributes_fallback)
2398 (x_get_monitor_attributes_xinerama)
2399 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
2400 Define only if USE_GTK.
2401 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
2402 (x_get_monitor_attributes_fallback): Omit unused locals.
2403 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
2404 Use double, not float, to avoid mixed-mode floating point arithmetic.
2405
4e3f9230
YM
24062013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2407 Jan Djärv <jan.h.d@swipnet.se>
2408
2409 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
2410 (XINERAMA_CFLAGS): New macros.
2411 (ALL_CFLAGS, LIBES): Use them.
2412
2413 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
2414 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
2415 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
2416 (syms_of_xfns): DEFSYM them.
2417 (struct MonitorInfo): New struct.
2418 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
2419 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
2420 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
2421 (x_get_monitor_attributes_xinerama): New functions.
2422 (Fx_display_monitor_attributes_list): New primitive.
2423 (syms_of_xfns): Defsubr it.
2424
2425 * xterm.h (x_display_info): Add Xatom_net_workarea and
2426 Xatom_net_current_desktop.
2427
2428 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
2429 and dpyinfo->Xatom_net_current_desktop.
2430
05839b6a
EZ
24312013-05-06 Eli Zaretskii <eliz@gnu.org>
2432
2433 * xdisp.c (pos_visible_p): Use the special code for finding the
2434 beginning of a display property or overlay for any "replacing"
2435 display property, not just for display strings. This solves
2436 incorrect reporting of position by posn-at-point. (Bug#14241)
2437
dc4a2ee0
PE
24382013-05-06 Paul Eggert <eggert@cs.ucla.edu>
2439
5ee94506
PE
2440 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
2441 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
2442 Verify that ElfW (Half) fits in int.
2443 (fatal): Use same signature as lisp.h.
2444 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
2445 configure and build with -DUNEXELF_DEBUG without worrying about
2446 other modules that use DEBUG.
2447 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
2448 possibly-wide integers now uses it instead of plain fprintf.
2449 (entry_address): New function, which avoids problems with 32-bit
2450 overflow on 64-bit hosts.
2451 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
2452 (round_up): Don't assume the remainder fits in int.
2453 (find_section): Use bool for boolean. Simplify debug code.
2454 (unexec): Don't assume file sizes fit in int or size_t.
2455 Omit unnecessary trailing newline in 'fatal' format.
2456 Use strerror rather than outputting decimal error number.
2457 Remove unused code when emacs is not defined;
2458 this file relies on Emacs now.
2459 Don't assume e_phnum and e_shnum are positive.
2460
dc4a2ee0
PE
2461 * regex.c: Fix problems when DEBUG is defined.
2462 (extract_number, extract_number_and_incr): Define regardless of
2463 whether DEBUG is defined; that's simpler and makes the code less
2464 likely to go stale in the normal case when DEBUG is not defined.
2465 Return int rather than taking an int * arg. All callers changed.
2466 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
2467 Remove, replacing with ...
2468 (DEBUG_PRINT): New macro. All callers changed.
2469 (DEBUG_COMPILES_ARGUMENTS): New macro.
2470 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
2471 (print_compiled_pattern, print_double_string) [DEBUG]:
2472 Use prototype rather than old-style definition.
2473 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
2474 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
2475 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
2476 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
2477 Don't assume ptrdiff_t, size_t, and long are the same width as int.
2478 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
2479 This matters only when DEBUG is defined.
2480
14c7ed05
EZ
24812013-05-05 Eli Zaretskii <eliz@gnu.org>
2482
2483 * xdisp.c (set_iterator_to_next): Set the
2484 ignore_overlay_strings_at_pos_p flag only if we are _really_
2485 iterating over an overlay string, as indicated by the
2486 current.overlay_string_index member. (Bug#14306)
2487
e6076b1b
JD
24882013-05-05 Jan Djärv <jan.h.d@swipnet.se>
2489
2490 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
2491 to where it is used, to avoid autorelease issues (Bug#14050).
2492
cbee2131
PE
24932013-05-05 Paul Eggert <eggert@cs.ucla.edu>
2494
2495 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
2496 * fileio.c (syms_of_fileio): Implement this.
2497 * filelock.c (create_lock_file): If symbolic links don't work, so
2498 we use a regular file as a lock file, do not fsync the lock file;
2499 it's not needed.
2500
30c7e542
SM
25012013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
2502
2503 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
2504 (syms_of_minibuf): Adjust accodingly.
2505 * lread.c (Fread):
2506 * callint.c (Fcall_interactively): Adjust calls accordingly.
2507
5bebd186
EZ
25082013-05-04 Eli Zaretskii <eliz@gnu.org>
2509
2510 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
30c7e542
SM
2511 w->contents is a buffer before computing everything else.
2512 Use parentheses to disambiguate last part of the condition.
5bebd186
EZ
2513
2514 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
2515 assertion violations. (Bug#14062)
2516
0fb0a4f3
DR
25172013-05-01 David Reitter <david.reitter@gmail.com>
2518
2519 * nsfns.m (ns_tooltip): Initialize.
2520
9e63b4a5
EZ
25212013-04-28 Eli Zaretskii <eliz@gnu.org>
2522
2523 * coding.c (decode_coding_gap): Don't remove the character before
2524 a newline unless it's a CR character. (Bug#14287)
2525
ad60824e
DN
25262013-04-28 Dan Nicolaescu <dann@gnu.org>
2527
2528 * dispextern.h (struct face): Move enum face_underline_type
2529 earlier so that bitfields can be in the same word.
2530
edbdcec0
JD
25312013-04-28 Jan Djärv <jan.h.d@swipnet.se>
2532
2533 * nsfns.m (handlePanelKeys): New function.
2534 (EmacsOpenPanel:performKeyEquivalent:)
2535 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
2536 arrows/function/control and copy/paste keys (Bug#14296).
2537
0208ede7
JL
25382013-04-27 Juri Linkov <juri@jurta.org>
2539
2540 * callint.c (Fcall_interactively): Call `Qread_number' for
2541 interactive code letter `n' instead of using duplicate code.
2542 (Bug#14254)
2543
b8dd59f7
PE
25442013-04-27 Paul Eggert <eggert@cs.ucla.edu>
2545
2546 * systime.h (make_timeval): Declare as 'const'.
2547
8bd722db
KH
25482013-04-27 Kenichi Handa <handa@gnu.org>
2549
2550 * font.c (font_open_entity): Always open a font of manageable
2551 size.
2552
13d0e56f 25532013-04-26 Paul Eggert <eggert@cs.ucla.edu>
cbee2131 2554
f780d632
PE
2555 Port better to AIX (Bug#14258).
2556 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
2557 to pacify AIX xlc.
2558
ec509856
KH
25592013-04-24 Kenichi Handa <handa@gnu.org>
2560
2561 * coding.c (decode_coding_iso_2022): When an invalid escape
2562 sequence is encountered, reset the invocation and designation
2563 status to the safest one.
2564
84fc48e5
PE
25652013-04-22 Paul Eggert <eggert@cs.ucla.edu>
2566
2567 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
2568 Without this fix, "make distclean" leaves stamp-h1 behind.
2569
806bda47
EC
25702013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
2571
2572 * w32fns.c (w32_fullscreen_rect): New function to compute the
2573 window rectangle for the given fullscreen mode.
2574 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
2575 longer tunes the window size. This keeps the window's edges flush
2576 with the screen and allows the taskbar to hide itself in fullboth.
2577
2578 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
2579 window decorations and uses the entire screen.
2580
2581 * w32term.h (w32_fullscreen_rect) Add prototype.
2582 (struct w32_output): Replace normal_width, normal_height,
2583 normal_top, and normal_left members with a single normal_placement
2584 struct.
2585 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
2586 Remove macros.
2587 (FRAME_NORMAL_PLACEMENT): New macro.
2588
9cc2810b
JB
25892013-04-16 Juanma Barranquero <lekktu@gmail.com>
2590
2591 * minibuf.c (Ftest_completion): Silence compiler warning.
2592
fd16b54c
EZ
25932013-04-15 Eli Zaretskii <eliz@gnu.org>
2594
2595 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
5fbcd237 2596 bug#14062.
fd16b54c
EZ
2597
2598 * frame.h (WINDOW_FRAME): Protect macro and its argument with
2599 parentheses.
2600
2601 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
2602 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
2603 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
2604 parentheses where appropriate.
2605
9e3379a0
PE
26062013-04-14 Paul Eggert <eggert@cs.ucla.edu>
2607
2608 * keyboard.c (timer_start_idle): Remove no-longer-used local.
2609
ddd6b685
EZ
26102013-04-14 Eli Zaretskii <eliz@gnu.org>
2611
2612 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>
2613 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
2614 Mention in the doc string that setting these variables takes
2615 effect only after a call to set-window-buffer. (Bug#14200)
2616
29b79ba1
EZ
26172013-04-13 Eli Zaretskii <eliz@gnu.org>
2618
2619 * indent.c (Fvertical_motion): Don't consider display strings on
2620 overlay strings as display strings on the buffer position we
2621 started from. This prevents vertical cursor motion from jumping
2622 more than one line when there's an overlay string with a display
2623 property at end of line.
2624 Reported by Karl Chen <Karl.Chen@quarl.org> in
2625 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
2626
562c6ee9
SM
26272013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
2628
2629 * window.c (select_window): `record_buffer' even if window is
2630 already selected (bug#14191).
2631
fcc1fe85
EZ
26322013-04-11 Eli Zaretskii <eliz@gnu.org>
2633
2634 * window.c (Fwindow_end): Test more flags, including the buffer's
2635 last_overlay_modified flag, to determine whether the window's
2636 display is really up-to-date. Prevents the function from
2637 returning a stale value. (Bug#14170)
2638 (Fwindow_line_height): Fix the test for up-to-date-ness of the
2639 current matrix.
2640
f009190a
EZ
26412013-04-10 Eli Zaretskii <eliz@gnu.org>
2642
2643 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
562c6ee9
SM
2644 garbaged only if it is not already the top frame on its TTY.
2645 This prevents flickering due to constant redrawing of TTY frames when
f009190a
EZ
2646 there are GUI frames open in the same session. (Bug#13864)
2647
78ce603d
SM
26482013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
2649
2650 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
2651 of marking the idle timers directly.
2652
a8036e40
SM
26532013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
2654
2655 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
2656 tables (bug#14054).
2657
7ffe7ef6
SM
26582013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
2659
2660 * window.c (select_window): Don't record_buffer while the invariant is
2661 temporarily broken (bug#14161).
2662
2663 * fns.c (Fdelq): Don't assume !NILP => CONSP.
2664
7d9f6883
EZ
26652013-04-07 Eli Zaretskii <eliz@gnu.org>
2666
2667 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
2668
5406cfd9
RF
26692013-04-07 Romain Francoise <romain@orebokech.com>
2670
2671 Ignore additional platform-specific ACL errors (Bug#13702).
2672 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
2673 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
2674
95c0e83b
JD
26752013-03-31 Jan Djärv <jan.h.d@swipnet.se>
2676
2677 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
2678 f->output_data.ns.
2679
876da980
PE
26802013-04-07 Paul Eggert <eggert@cs.ucla.edu>
2681
2682 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
2683 This bug was introduced by my 2013-02-25 change that simplified
2684 data_start configuration. Without this change, on GNU/Linux
2685 an Emacs configured with --enable-profiling fails immediately
2686 due to a profiler signal.
2687 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
2688 with these flags. On platforms where special flags are needed
2689 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
2690 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
2691 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
2692
7452b7bd
DA
26932013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
2694
2695 Get rid of some platform-specific functions examining window
2696 system and its capabilities. This is a partial rework of the
2697 2013-04-05 change.
2698 * lisp.h (have_menus_p): Remove prototype. This function is
2699 replaced with platform-independent window_system_available.
2700 (check_window_system): Move to...
2701 * frame.h (decode_window_system_frame, window_system_available):
2702 ...here, add new prototypes.
2703 * frame.c (window_system_available, decode_window_system_frame):
2704 New functions.
2705 (check_window_system): Platform-independent now.
2706 * xterm.h (x_in_use): Remove declaration.
2707 (check_x_frame):
2708 * w32term.h (check_x_frame):
2709 * nsterm.h (check_x_frame): Remove prototypes. This function
2710 is replaced with platform-independent decode_window_system_frame.
2711 * msdos.c (have_menus_p): Remove.
2712 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
2713 Remove platform-specific functions. Use check_window_system,
2714 decode_window_system_frame and check_ns_display_info where
2715 appropriate. Minor style and comment tweaks.
2716 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
2717 (check_x_frame): Likewise.
2718 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
2719 Likewise.
2720 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
2721 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
2722 * xmenu.c, xselect.c: All related users changed.
2723
251e9147
KH
27242013-04-03 Kenichi Handa <handa@gnu.org>
2725
2726 The following changes is to optimize the code for reading UTF-8
2727 files.
2728
562c6ee9 2729 * coding.c (check_ascii): Rename from detect_ascii. Return value
251e9147
KH
2730 changed. Check EOL format. Do not call adjust_coding_eol_type
2731 here.
2732 (check_utf_8): New function.
2733 (adjust_coding_eol_type): Do nothing if already adjusted.
2734 (detect_coding): Compare the return value of check_ascii with
2735 coding->src_bytes. Call adjust_coding_eol_type if necessary.
2736 (decode_coding_gap): Optimize for valid UTF-8.
2737
8bc369d4
KH
27382013-03-21 Kenichi Handa <handa@gnu.org>
2739
2740 * coding.c (syms_of_coding): Cancel previous change.
2741
2742 * insdel.c (insert_from_gap): Fix previous change.
2743
73931ad1
DA
27442013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
2745
2746 Consistently use platform-specific function to detect window system.
2747 * lisp.h (check_window_system): New prototype. This function is
2748 going to replace check_x, check_w32 and check_ns.
2749 (have_menus_p): Mention msdos.c in comment.
2750 * fontset.c (check_window_system_func): Remove. Adjust all users.
2751 * fontset.h (check_window_system_func): Remove prototype.
2752 * nsterm.h (check_ns):
2753 * xterm.h (check_x):
2754 * w32term.h (check_w32): Likewise.
2755 * menu.c (Fx_popup_menu): Use check_window_system.
2756 * msdos.c (check_window_system): Define for MS-DOS.
2757 * nsfns.m (check_window_system): Define for NS. Adjust all users.
2758 * w32fns.c (check_window_system): Likewise for MS-Windows.
2759 * xfns.c (check_window_system): Likewise for X.
2760 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
2761 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
2762
7216e43b
PE
27632013-04-02 Paul Eggert <eggert@cs.ucla.edu>
2764
2765 Prefer < to > in range checks such as 0 <= i && i < N.
2766 This makes it easier to visualize quantities on a number line.
2767 This patch doesn't apply to all such range checks,
2768 only to the range checks affected by the 2013-03-24 change.
2769 This patch reverts most of the 2013-03-24 change.
2770 * alloc.c (xpalloc, Fgarbage_collect):
2771 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
2772 * character.c (string_escape_byte8):
2773 * charset.c (read_hex):
2774 * data.c (cons_to_unsigned):
2775 * dispnew.c (update_frame_1):
2776 * doc.c (Fsubstitute_command_keys):
2777 * doprnt.c (doprnt):
2778 * editfns.c (hi_time, decode_time_components):
2779 * fileio.c (file_offset):
2780 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
2781 * font.c (font_intern_prop):
2782 * frame.c (x_set_alpha):
2783 * gtkutil.c (get_utf8_string):
2784 * indent.c (check_display_width):
2785 * keymap.c (Fkey_description):
2786 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
2787 * lread.c (read1):
2788 * minibuf.c (read_minibuf_noninteractive):
2789 * process.c (wait_reading_process_output):
2790 * search.c (Freplace_match):
2791 * window.c (get_phys_cursor_glyph):
2792 * xdisp.c (redisplay_internal):
2793 * xsmfns.c (smc_save_yourself_CB):
2794 Prefer < to > for range checks.
2795 * dispnew.c (sit_for): Don't mishandle NaNs.
2796 This fixes a bug introduced in the 2013-03-24 change.
2797 * editfns.c (decode_time_components): Don't hoist comparison.
2798 This fixes another bug introduced in the 2013-03-24 change.
2799
92759988
DA
28002013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
2801
2802 * frame.h (struct frame): Drop scroll_bottom_vpos
2803 member becaue all real users are dead long ago.
2804 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
2805 * xdisp.c (redisplay_internal): Adjust user.
2806
9a1971bb
GM
28072013-03-30 Darren Ho <darren.hoo@gmail.com> (tiny change)
2808
f38ab167
JD
2809 * nsmenu.m (showAtX:Y:for:): setLevel to
2810 NSPopUpMenuWindowLevel (Bug#13998).
2811
6d01f1fe
JD
28122013-03-30 Jan Djärv <jan.h.d@swipnet.se>
2813
2814 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
2815 (ns_check_pending_open_menu): Declare.
2816
2817 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
2818 (x_activate_menubar): Update the menu with title that matches
2819 ns_get_pending_menu_title, and call
2820 ns_check_pending_openmenu (Bug#12698).
2821 (menuWillOpen:): New method.
2822 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
2823
2824 * nsterm.m (menu_will_open_state, menu_mouse_point)
2825 (menu_pending_title): New varaibles.
2826 (ns_get_pending_menu_title, ns_check_menu_open)
2827 (ns_check_pending_open_menu): New functions.
2828
781f4782
DA
28292013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
2830
2831 * indent.c (current_column_bol_cache): Remove leftover which is not
2832 used in Fmove_to_column any more.
2833 (current_column, scan_for_column): Adjust users.
2834 * keyboard.c (last_point_position_buffer, last_point_position_window):
2835 Remove leftovers which are not used for recording undo any more.
2836 (command_loop_1, syms_of_keyboard): Adjust users.
2837 * xdisp.c (last_max_ascent): Remove leftover which is not used in
2838 redisplay_window any more.
2839 (move_it_to): Adjust user.
2840
1921c31b
JB
28412013-03-29 Juanma Barranquero <lekktu@gmail.com>
2842
2843 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
2844 Update dependencies.
2845
717b8bcd
SM
28462013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
2847
2848 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
2849 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
2850 forward references.
2851
e74aeda8
DA
28522013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
2853
2854 * window.h (struct window): Replace hchild, vchild and buffer slots
2855 with the only contents slot. This is possible because each valid
2856 window may have either the child window (in vertical or horizontal
2857 combination) or buffer to display (for the leaf window). Using that,
2858 a lof of operations to traverse and/or change window hierarchies may
2859 be simplified. New member horizontal is used to distinguish between
2860 horizontal and vertical combinations of internal windows.
2861 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
2862 (WINDOW_VERTICAL_COMBINATION_P): New macros.
2863 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
2864 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
2865 Use contents slot, not buffer, where appropriate.
2866 (wset_combination): New function.
2867 (wset_buffer): Add eassert.
2868 (Fframe_first_window): Simplify the loop reaching first window.
2869 (Fwindow_buffer): Use WINDOW_LEAF_P.
2870 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
2871 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
2872 (unshow_buffer): Convert initial debugging check to eassert.
2873 (replace_window, recombine_windows, Fdelete_other_windows_internal)
2874 (make_parent_window, window_resize_check, window_resize_apply)
2875 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
2876 (Fset_window_configuration, delete_all_child_windows, save_window_save):
2877 Adjust to match struct window changes.
2878 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
2879 (mark_window_cursors_off, count_windows, get_leaf_windows)
2880 (foreach_window_1): Simplify the loop.
2881 * alloc.c (mark_object): Do not check for the leaf window because
2882 internal windows has no glyph matrices anyway.
2883 * dispnew.c (clear_window_matrices, showing_window_margins_p)
2884 (allocate_matrices_for_window_redisplay, fake_current_matrices)
2885 (allocate_matrices_for_frame_redisplay, free_window_matrices)
2886 (build_frame_matrix_from_window_tree, mirror_make_current)
2887 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
2888 (update_window_tree, set_window_update_flags): Simplify the loop.
2889 (sync_window_with_frame_matrix_rows): Enforce live window.
2890 Use contents slot, not buffer, where appropriate.
2891 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
2892 and WINDOW_HORIZONTAL_COMBINATION_P.
2893 (make_frame_visible_1): Simplify the loop.
2894 Use contents slot, not buffer, where appropriate.
2895 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
2896 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
2897 (expose_window_tree): Likewise.
2898 Use contents slot, not buffer, where appropriate.
2899 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
2900 to avoid deleted windows. Use contents slot instead of buffer.
2901 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
2902 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
2903 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
2904 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
2905
121ab1cd
EZ
29062013-03-28 Eli Zaretskii <eliz@gnu.org>
2907
ef454cf7
EZ
2908 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
2909 identify the reasons for assertion violations in bug#14062 and
2910 similar ones.
21e930f8
EZ
2911 (Fx_show_tip): Fix compilation error under
2912 "--enable-check-lisp-object-type". (Bug#14073)
ef454cf7 2913
121ab1cd
EZ
2914 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
2915 Reported by <rzl24ozi@gmail.com>.
2916
5c89ca24
DA
29172013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
2918
2919 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
2920 start marker...
562c6ee9
SM
2921 (unwind_with_echo_area_buffer): ...to restore it here.
2922 This is needed to ensure that...
5c89ca24
DA
2923 (redisplay_window): ...both window markers are valid here,
2924 which is verified by eassert.
2925 * editfns.c (save_excursion_save): Do not assume that
2926 selected_window always displays the buffer.
c7f53895
DA
2927 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
2928 Fix comment.
5c89ca24 2929
f557c1b1
SM
29302013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
2931
2932 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
2933 the upcase table.
2934
40693bba 29352013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
2936
2937 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
2938
c86f791f
EZ
29392013-03-27 Eli Zaretskii <eliz@gnu.org>
2940
2941 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
2942 since MinGW's w32api headers do. This avoids compiler warnings.
2943
2944 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
2945 if already defined.
2946
c6e72e17
EZ
29472013-03-26 Eli Zaretskii <eliz@gnu.org>
2948
2949 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
2950
54e95010
JD
29512013-03-26 Jan Djärv <jan.h.d@swipnet.se>
2952
2953 * gtkutil.c (style_changed_cb): Check if frame is live and an
2954 X frame (Bug#14038).
2955
b88b62de
EZ
29562013-03-26 Eli Zaretskii <eliz@gnu.org>
2957
a18d7de6
EZ
2958 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
2959 Define only for _WIN32_WINNT less than 0x0500.
da9dcbb8
EZ
2960 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
2961 MinGW64.
8f5e14c8
EZ
2962 Move inclusion of time.h before sys/time.h, so that MinGW64 could
2963 see its own definitions of 'struct timeval' and 'struct timezone'.
a18d7de6 2964
b88b62de
EZ
2965 Fix incompatibilities between MinGW.org and MinGW64 headers.
2966 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
2967
2968 * w32.c (REPARSE_DATA_BUFFER): Guard with
2969 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
2970
c074e458
JD
29712013-03-25 Jan Djärv <jan.h.d@swipnet.se>
2972
2973 * xterm.c: Include X11/XKBlib.h
2974 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
2975
908589fd
AS
29762013-03-24 Andreas Schwab <schwab@linux-m68k.org>
2977
2978 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
2979 written backwards.
2980 * blockinput.h (input_blocked_p): Likewise.
2981 * bytecode.c (exec_byte_code): Likewise.
2982 * callproc.c (call_process_kill, call_process_cleanup)
2983 (Fcall_process): Likewise.
2984 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
2985 (Fccl_execute_on_string): Likewise.
2986 * character.c (string_escape_byte8): Likewise.
2987 * charset.c (read_hex): Likewise.
2988 * cm.c (calccost): Likewise.
2989 * data.c (cons_to_unsigned): Likewise.
2990 * dired.c (directory_files_internal, file_name_completion):
2991 Likewise.
2992 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
2993 (sit_for): Likewise.
2994 * doc.c (Fsubstitute_command_keys): Likewise.
2995 * doprnt.c (doprnt): Likewise.
2996 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
2997 * emacsgtkfixed.c: Likewise.
2998 * fileio.c (file_offset, Fwrite_region): Likewise.
2999 * floatfns.c (Fexpt, fmod_float): Likewise.
3000 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
3001 Likewise.
3002 * font.c (font_intern_prop): Likewise.
3003 * frame.c (x_set_alpha): Likewise.
3004 * gtkutil.c (get_utf8_string): Likewise.
3005 * indent.c (check_display_width): Likewise.
3006 * intervals.c (create_root_interval, rotate_right, rotate_left)
3007 (split_interval_right, split_interval_left)
3008 (adjust_intervals_for_insertion, delete_node)
3009 (interval_deletion_adjustment, adjust_intervals_for_deletion)
3010 (merge_interval_right, merge_interval_left, copy_intervals)
3011 (set_intervals_multibyte_1): Likewise.
3012 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
3013 * keymap.c (Fkey_description): Likewise.
3014 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
3015 * lread.c (openp, read_integer, read1, string_to_number):
3016 Likewise.
3017 * menu.c (ensure_menu_items): Likewise.
3018 * minibuf.c (read_minibuf_noninteractive): Likewise.
3019 * print.c (printchar, strout): Likewise.
3020 * process.c (create_process, Faccept_process_output)
3021 (wait_reading_process_output, read_process_output, send_process)
3022 (wait_reading_process_output): Likewise.
3023 * profiler.c (make_log, handle_profiler_signal): Likewise.
3024 * regex.c (re_exec): Likewise.
3025 * regex.h: Likewise.
3026 * search.c (looking_at_1, Freplace_match): Likewise.
3027 * sysdep.c (get_child_status, procfs_ttyname)
3028 (procfs_get_total_memory): Likewise.
3029 * systime.h (EMACS_TIME_VALID_P): Likewise.
3030 * term.c (dissociate_if_controlling_tty): Likewise.
3031 * window.c (get_phys_cursor_glyph): Likewise.
3032 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
3033 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
3034 Likewise.
3035 * xfns.c (Fx_window_property): Likewise.
3036 * xmenu.c (set_frame_menubar): Likewise.
3037 * xselect.c (x_get_window_property, x_handle_dnd_message):
3038 Likewise.
3039 * xsmfns.c (smc_save_yourself_CB): Likewise.
3040 * xterm.c (x_scroll_bar_set_handle): Likewise.
3041
2bf7d27a
DA
30422013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
3043
3044 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
3045 to be optional or nil. Adjust comment and convert it to docstring.
3046 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
3047 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
3048
a9ebfa0b
PE
30492013-03-24 Paul Eggert <eggert@cs.ucla.edu>
3050
3051 Static checking by GCC 4.8-20130319.
3052 * image.c (gif_load): Assume pass < 3 to pacify GCC.
3053 * process.c (Fset_process_datagram_address)
3054 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
3055 * xdisp.c (get_char_face_and_encoding):
3056 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
3057 (get_glyph_face_and_encoding): Prepare face before possibly using it.
3058 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
3059
4f3576ee
KB
30602013-03-24 Ken Brown <kbrown@cornell.edu>
3061
789b5e9a
KB
3062 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
3063 fix compilation on 64-bit Cygwin, where underscores are not
3064 automatically prepended.
3065
4f3576ee
KB
3066 * w32term.c (w32_initialize): Silence compiler warning.
3067
b5b7745f
EZ
30682013-03-23 Eli Zaretskii <eliz@gnu.org>
3069
cdc0d0bd
EZ
3070 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
3071 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
562c6ee9
SM
3072 variables, to save and restore frame dimensions.
3073 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
3074 after returning from a 'fullscreen' configuration.
3075 use SendMessage instead of PostMessage to send the SC_RESTORE message,
cdc0d0bd
EZ
3076 to avoid races between the main thread and the input thread.
3077
3078 * w32term.h (struct w32_output): New members normal_width,
3079 normal_height, normal_top, normal_left, and prev_fsmode.
3080 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
3081 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
3082 members of a frame.
3083
b5b7745f
EZ
3084 * w32term.c (w32fullscreen_hook): Record last value of the frame's
3085 'fullscreen' parameter. Always record previous width and height
3086 of the frame, except when switching out of maximized modes, so
3087 that they could be restored correctly, instead of resetting to the
3088 default frame dimensions. Send SC_RESTORE command to the frame,
3089 unless we are going to send SC_MAXIMIZE, to restore the frame
3090 resize hints in the mouse pointer shown by the window manager.
3091 (Bug#14032)
3092
3093 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
3094
3095 * lisp.h (get_frame_param): Adjust conditions for prototype
3096 declaration.
3097
a3454eed
KB
30982013-03-22 Ken Brown <kbrown@cornell.edu>
3099
3100 * unexcw.c: Drop unneeded inclusion of w32common.h.
3101 (report_sheap_usage): Declare.
3102 (read_exe_header): Add magic numbers for x86_64.
3103 (fixup_executable): Fix printf format specifier for unsigned long
3104 argument.
3105
5a49b79c
DA
31062013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
3107
3108 * frame.h (struct frame): Put menu_bar_window under #ifdef
3109 because this member is not needed when X toolkit is in use.
3110 (fset_menu_bar_window):
3111 * dispnew.c (clear_current_matrices, clear_desired_matrices)
3112 (free_glyphs, update_frame):
3113 * xdisp.c (expose_frame): Likewise.
3114 (display_menu_bar): Likewise. Remove redundant eassert.
3115 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
3116 toolkit is in use.
3117
d6723bf7
PE
31182013-03-21 Paul Eggert <eggert@cs.ucla.edu>
3119
7b1123d8
PE
3120 Use functions and constants to manipulate Lisp_Save_Value objects.
3121 This replaces code that used macros and strings and token-pasting.
3122 The change makes the C source a bit easier to follow,
3123 and shrinks the Emacs executable a bit.
3124 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
3125 (make_save_value): Change 1st arg from string to enum. All callers
3126 changed.
3127 (INTX): Remove.
3128 (mark_object): Use if, not #if, for GC_MARK_STACK.
3129 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
3130 (XSAVE_OBJECT): Now functions, not macros.
3131 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
3132 the constant was never used.
3133 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
3134 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
3135 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
3136 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
3137 New constants.
3138 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
3139 type3 with a single member save_type. All uses changed.
3140 (save_type, set_save_pointer, set_save_integer): New functions.
3141 * print.c (PRINTX): Remove.
3142
d6723bf7
PE
3143 * alloc.c: Remove redundant static declarations.
3144
5f24fa51
DA
31452013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
3146
3147 * window.h (struct window): Convert left_col, top_line, total_lines
3148 and total_cols from Lisp_Objects to integers. Adjust comments.
3149 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
3150 Remove.
3151 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
3152 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
3153 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
3154 Adjust users where appropriate.
3155
42143acd
DA
31562013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
3157
3158 * frame.h (struct frame): Drop resx and resy because the same data is
3159 available from window system-specific output context. Adjust users.
562c6ee9
SM
3160 (default_pixels_per_inch_x, default_pixels_per_inch_y):
3161 New functions to provide defaults when no window system available.
42143acd 3162 (FRAME_RES_X, FRAME_RES_Y): New macros.
562c6ee9 3163 (NUMVAL): Move from xdisp.c.
42143acd
DA
3164 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
3165 (Ffont_face_attributes, Fopen_font):
3166 * image.c (gs_load):
3167 * w32font.c (fill_in_logfont):
3168 * xdisp.c (calc_pixel_width_or_height):
3169 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
3170 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
3171
c0a17406
KH
31722013-03-20 Kenichi Handa <handa@gnu.org>
3173
3174 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
3175 to 1 (temporary workaround until a bug related to ASCII
3176 optimization is fixed).
3177
095d384d
DA
31782013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
3179
3180 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
3181 Signal error if window is not internal. Adjust docstring.
3182 (delete_all_child_windows): Use combination_limit to save the buffer.
3183 (Fset_window_configuration): Adjust accordingly.
cf4bb06d
DA
3184 * print.c (syms_of_print): Initialize debugging output not here...
3185 (init_print_once): ...but in a new function here.
3186 * lisp.h (init_print_once): Add prototype.
3187 * emacs.c (main): Add call to init_print_once. Adjust comments.
095d384d 3188
748fa866
DA
31892013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
3190
3191 * window.c (window_resize_check, window_resize_apply)
3192 (window_from_coordinates, recombine_windows, set_window_buffer)
3193 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
3194 (Fsplit_window_internal, Fdelete_window_internal)
3195 (freeze_window_starts): Use bool for booleans.
3196 * window.h (window_frame_coordinates, resize_frame_windows)
3197 (freeze_window_starts, set_window_buffer): Adjust prototypes.
3198
81519fd2
SM
31992013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
3200
3201 * dispnew.c (bitch_at_user): Use `user-error'.
3202
6db423a9
KB
32032013-03-17 Ken Brown <kbrown@cornell.edu>
3204
3205 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
3206 as return type of image_background. (Bug#13981)
3207 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
3208
8f2906f5
JD
32092013-03-16 Jan Djärv <jan.h.d@swipnet.se>
3210
960ce480 3211 * nsterm.m (updateFrameSize:): Change resize increments if needed.
6615748a 3212 (ns_select): Don't return with result uninitialized.
960ce480 3213
8f2906f5
JD
3214 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
3215 and getDirectory.
3216
81519fd2
SM
3217 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
3218 New functions.
8f2906f5
JD
3219 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
3220 directories. If filename is nil, get directory name (Bug#13932).
3221 Use getFilename and getDirectory.
3222 (getFilename, getDirectory): New methods for EmacsSavePanel and
3223 EmacsOpenPanel.
3224 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
3225
cded56c1
PE
32262013-03-15 Paul Eggert <eggert@cs.ucla.edu>
3227
3228 * coding.c (decode_coding_gap): Fix typo caught by static checking.
3229
251e9147 32302013-03-15 Kenichi Handa <handa@gnu.org>
8a44e6d1
KH
3231
3232 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
3233 (adjust_after_replace): Make it back to static. Delete the third
3234 arg text_at_gap_tail. Cancel the code for handling it.
3235
3236 * coding.h (struct coding_system): New member eol_seen.
3237
3238 * coding.c (detect_ascii): New function.
3239 (detect_coding): Set coding->head_ascii and coding->eol_seen only
3240 when the source bytes are actually scanned. On detecting for
3241 coding_category_utf_8_auto, call detect_ascii instead of scanning
3242 source bytes directly.
3243 (produce_chars): Call insert_from_gap with the new arg 0.
3244 (encode_coding): Likewise.
3245 (decode_coding_gap): Control ASCII optimization by the variable
3246 disable_ascii_optimization instead of #ifndef .. #endif.
3247 Deccode EOL format according to coding->eol_seen.
3248 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
3249 variable.
3250
8a44e6d1
KH
3251 * lisp.h (adjust_after_replace): Cancel externing it.
3252 (insert_from_gap): Adjust prototype.
3253
5f795e34
EZ
32542013-03-15 Eli Zaretskii <eliz@gnu.org>
3255
3256 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
3257 FULLSCREEN_MAXIMIZED. (Bug#13935)
3258
f258b4be
DA
32592013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
3260
3261 * region-cache.c (find_cache_boundary, move_cache_gap)
3262 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
3263 Simplify debugging check and convert to eassert. Adjust comment.
3264 (pp_cache): Put under ENABLE_CHECKING.
3265
a5cc4dde
EZ
32662013-03-14 Eli Zaretskii <eliz@gnu.org>
3267
3268 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
3269 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
3270 and WM_ACTIVATEAPP.
3271 (w32fullscreen_hook): If the frame is visible, reset
3272 f->want_fullscreen flag after changing the frame size. If the
3273 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
3274 (Bug#13953)
3275
3fc5e44a
DC
32762013-03-13 Daniel Colascione <dancol@dancol.org>
3277
3278 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
3279 too so that these builds can use Cygwin's file conversion
3280 functions. (We've been building and linking cygw32.o all along
3281 and just not using it.)
3282
47d7532e
PE
32832013-03-13 Paul Eggert <eggert@cs.ucla.edu>
3284
3285 File synchronization fixes (Bug#13944).
3286 * Makefile.in (LIB_FDATASYNC): New macro.
3287 (LIBES): Use it.
3288 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
3289 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
3290 Don't worry about HAVE_FSYNC, since a substitute fsync is
3291 available if the system lacks one.
3292 (Fwrite_regin): Retry fsync if interrupted.
3293
c7ffccaf
EZ
32942013-03-13 Eli Zaretskii <eliz@gnu.org>
3295
4e2df81d 3296 * w32term.c (w32_read_socket): If the Emacs frame is being
c7ffccaf
EZ
3297 activated, call w32fullscreen_hook, to make sure the new frame
3298 dimensions are in effect. (Bug#13937)
3299
8a7debc1
DA
33002013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
3301
3302 * xdisp.c (init_iterator): Simplify because both character and byte
3303 positions are either specified or -1. Add eassert. Adjust comment.
ffcd945e
DA
3304 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
3305 character and byte positions can be obtained from marker.
8a7debc1 3306
7fd8c501
PE
33072013-03-13 Paul Eggert <eggert@cs.ucla.edu>
3308
d9df6f40
PE
3309 Static checking by Sun C 5.12.
3310 * alloc.c (buffer_memory_full) [REL_ALLOC]:
3311 * bytecode.c (exec_byte_code):
3312 * dispnew.c (init_display):
3313 * eval.c (error):
3314 * fileio.c (Fsubstitute_in_file_name):
3315 * keyboard.c (Fevent_convert_list):
3316 * keymap.c (Fsingle_key_description):
3317 * term.c (maybe_fatal, fatal):
3318 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
3319 * xsmfns.c (Fhandle_save_session):
3320 Omit unreachable code.
3321 * keymap.c (map_keymap_char_table_item): Cast void * to
3322 a function pointer type; the C Standard requires this.
3323
7fd8c501
PE
3324 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
3325 Include <sys/param.h> unconditionally, as that works elsewhere and
3326 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
3327 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
3328 and FreeBSD now.
3329
a020afb9 3330See ChangeLog.12 for earlier changes.
aac0c6e3
MR
3331
3332;; Local Variables:
3333;; coding: utf-8
aac0c6e3
MR
3334;; End:
3335
ab422c4d 3336 Copyright (C) 2011-2013 Free Software Foundation, Inc.
aac0c6e3
MR
3337
3338 This file is part of GNU Emacs.
3339
3340 GNU Emacs is free software: you can redistribute it and/or modify
3341 it under the terms of the GNU General Public License as published by
3342 the Free Software Foundation, either version 3 of the License, or
3343 (at your option) any later version.
3344
3345 GNU Emacs is distributed in the hope that it will be useful,
3346 but WITHOUT ANY WARRANTY; without even the implied warranty of
3347 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3348 GNU General Public License for more details.
3349
3350 You should have received a copy of the GNU General Public License
3351 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.