aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorJoakim Verona2013-07-20 01:44:36 +0200
committerJoakim Verona2013-07-20 01:44:36 +0200
commit759dbb1aebe68fb392f7ed53eba4b460ae6b83be (patch)
tree1becc0cc6d676589eb274cb2c457e4256e908010 /src/ChangeLog
parent6c1769c85ecb61b40a1f9a3b56b61cdd6c1f8992 (diff)
parent3f5bef16fab0ba83cb2298f8137fec831af1aec4 (diff)
downloademacs-759dbb1aebe68fb392f7ed53eba4b460ae6b83be.tar.gz
emacs-759dbb1aebe68fb392f7ed53eba4b460ae6b83be.zip
Merge branch 'trunk' into xwidget
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog409
1 files changed, 409 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6ee0cacb520..a63e441dcb2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,414 @@
12013-07-19 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix some minor file descriptor leaks and related glitches.
4 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
5 (create_lock_file): Use write, not emacs_write.
6 * image.c (slurp_file, png_load_body):
7 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
8 (server_accept_connection):
9 Don't leak an fd on memory allocation failure.
10 * image.c (slurp_file): Add a cheap heuristic for growing files.
11 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
12 as that's what the other routines do. Maybe input need not be
13 blocked at all, but it's better to be consistent.
14 Avoid undefined behavior when strlen is zero.
15
16 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
17 (NSTATICS): Now a constant; doesn't need to be a macro.
18
192013-07-19 Richard Stallman <rms@gnu.org>
20
21 * coding.c (decode_coding_utf_8): Add simple loop for fast
22 processing of ASCII characters.
23
242013-07-19 Paul Eggert <eggert@cs.ucla.edu>
25
26 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
27
282013-07-19 Eli Zaretskii <eliz@gnu.org>
29
30 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
31 unportable 'struct x_display_info'.
32 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
33 is a portable type.
34
352013-07-19 Paul Eggert <eggert@cs.ucla.edu>
36
37 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
38 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
39 or fscanf fails.
40 (system_process_attributes): Prefer plain char to unsigned char
41 when either will do. Clean up properly if interrupted or if
42 memory allocations fail. Don't assume sscanf succeeds. Remove
43 no-longer-needed workaround to stop GCC from whining. Read
44 command-line once, instead of multiple times. Check read status a
45 bit more carefully.
46
47 Fix obscure porting bug with varargs functions.
48 The code assumed that int is treated like ptrdiff_t in a vararg
49 function, which is not a portable assumption. There was a similar
50 -- though these days less likely -- porting problem with various
51 assumptions that pointers of different types all smell the same as
52 far as vararg functions is conserved. To make this problem less
53 likely in the future, redo the API to use varargs functions.
54 * alloc.c (make_save_value): Remove this vararg function.
55 All uses changed to ...
56 (make_save_int_int_int, make_save_obj_obj_obj_obj)
57 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
58 New functions.
59 (make_save_ptr): Rename from make_save_pointer, for consistency with
60 the above. Define only on platforms that need it. All uses changed.
61
622013-07-18 Paul Eggert <eggert@cs.ucla.edu>
63
64 * keyboard.c: Try to fix typos in previous change.
65 (DISPLAY_LIST_INFO): New macro.
66 (kbd_buffer_get_event): Do not access members that are not present
67 in X11. Revert inadvertent change of "!=" to "=".
68
692013-07-18 Juanma Barranquero <lekktu@gmail.com>
70
71 * keyboard.c (kbd_buffer_get_event):
72 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
73 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
74
752013-07-18 Paul Eggert <eggert@cs.ucla.edu>
76
77 * filelock.c: Fix unlikely file descriptor leaks.
78 (get_boot_time_1): Rework to avoid using emacs_open.
79 This doesn't actually fix a leak, but is better anyway.
80 (read_lock_data): Use read, not emacs_read.
81
82 * doc.c: Fix minor memory and file descriptor leaks.
83 * doc.c (get_doc_string): Fix memory leak when doc file absent.
84 (get_doc_string, Fsnarf_documentation):
85 Fix file descriptor leak on error.
86
87 * term.c: Fix minor fdopen-related file descriptor leaks.
88 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
89 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
90
91 * charset.c: Fix file descriptor leaks and errno issues.
92 Include <errno.h>.
93 (load_charset_map_from_file): Don't leak file descriptor on error.
94 Use plain record_xmalloc since the allocation is larger than
95 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
96 of entries.
97 * eval.c (record_unwind_protect_nothing):
98 * fileio.c (fclose_unwind):
99 New functions.
100 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
101 The replacement doesn't block input, but that no longer seems
102 necessary.
103
1042013-07-17 Paul Eggert <eggert@cs.ucla.edu>
105
106 * lread.c: Fix file descriptor leaks and errno issues.
107 (Fload): Close some races that leaked fds or streams when 'load'
108 was interrupted.
109 (Fload, openp): Report error number of last nontrivial failure to open.
110 ENOENT counts as trivial.
111 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
112 New functions.
113 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
114 now that the function is always called with a nonnegative arg.
115 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
116 All uses replaced with ...
117 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
118
119 A few more minor file errno-reporting bugs.
120 * callproc.c (Fcall_process):
121 * doc.c (Fsnarf_documentation):
122 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
123 * process.c (set_socket_option):
124 Don't let a constructor trash errno.
125 * doc.c: Include <errno.h>.
126
1272013-07-16 Juanma Barranquero <lekktu@gmail.com>
128
129 * w32fns.c (unwind_create_tip_frame): Fix declaration.
130
1312013-07-16 Paul Eggert <eggert@cs.ucla.edu>
132
133 Fix w32 bug with call-process-region (Bug#14885).
134 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
135 to Fcall_process when the input is empty. This simplifies the
136 code a bit. It makes no difference on POSIXish platforms but
137 apparently it fixes a bug on w32.
138
139 Fix bug where insert-file-contents closes a file twice. (Bug#14839).
140 * fileio.c (close_file_unwind): Don't close if FD is negative;
141 this can happen when unwinding a zapped file descriptor.
142 (Finsert_file_contents): Unwind-protect the fd before the point marker,
143 in case Emacs runs out of memory between the two unwind-protects.
144 Don't trash errno when closing FD.
145 Zap the FD in the specpdl when closing it, instead of deferring
146 the removal of the unwind-protect; this fixes a bug where a child
147 function unwinds the stack past us.
148
149 New unwind-protect flavors to better type-check C callbacks.
150 This also lessens the need to write wrappers for callbacks,
151 and the need for make_save_pointer.
152 * alloca.c (free_save_value):
153 * atimer.c (run_all_atimers):
154 Now extern.
155 * alloc.c (safe_alloca_unwind):
156 * atimer.c (unwind_stop_other_atimers):
157 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
158 * menu.c (cleanup_popup_menu) [HAVE_NS]:
159 * minibuf.c (choose_minibuf_frame_1):
160 * process.c (make_serial_process_unwind):
161 * xdisp.h (pop_message_unwind):
162 * xselect.c (queue_selection_requests_unwind):
163 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
164 * alloca.c (record_xmalloc):
165 Prefer record_unwind_protect_ptr to record_unwind_protect with
166 make_save_pointer.
167 * alloca.c (Fgarbage_collect):
168 Prefer record_unwind_protect_void to passing a dummy.
169 * buffer.c (restore_buffer):
170 * window.c (restore_window_configuration):
171 * xfns.c, w32fns.c (do_unwind_create_frame)
172 New wrapper. All record-unwind uses of wrappee changed.
173 * buffer.c (set_buffer_if_live):
174 * callproc.c (call_process_cleanup, delete_temp_file):
175 * coding.c (code_conversion_restore):
176 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
177 * editfns.c (save_excursion_restore)
178 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
179 (save_restriction_restore):
180 * eval.c (restore_stack_limits, un_autoload):
181 * fns.c (require_unwind):
182 * keyboard.c (recursive_edit_unwind, tracking_off):
183 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
184 * macros.c (pop_kbd_macro, restore_menu_items):
185 * nsfns.m (unwind_create_frame):
186 * print.c (print_unwind):
187 * process.c (start_process_unwind):
188 * search.c (unwind_set_match_data):
189 * window.c (select_window_norecord, select_frame_norecord):
190 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
191 (fast_set_selected_frame):
192 * xfns.c, w32fns.c (unwind_create_tip_frame):
193 Return void, not a dummy Lisp_Object. All uses changed.
194 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
195 * callproc.c (call_process_kill):
196 * fileio.c (restore_point_unwind, decide_coding_unwind)
197 (build_annotations_unwind):
198 * insdel.c (Fcombine_after_change_execute_1):
199 * keyboard.c (read_char_help_form_unwind):
200 * menu.c (unuse_menu_items):
201 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
202 * sound.c (sound_cleanup):
203 * xdisp.c (unwind_redisplay):
204 * xfns.c (clean_up_dialog):
205 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
206 Accept no args and return void, instead of accepting and returning
207 a dummy Lisp_Object. All uses changed.
208 * cygw32.c (fchdir_unwind):
209 * fileio.c (close_file_unwind):
210 * keyboard.c (restore_kboard_configuration):
211 * lread.c (readevalllop_1):
212 * process.c (wait_reading_process_output_unwind):
213 Accept int and return void, rather than accepting an Emacs integer
214 and returning a dummy object. In some cases this fixes an
215 unlikely bug when the corresponding int is outside Emacs integer
216 range. All uses changed.
217 * dired.c (directory_files_internal_unwind):
218 * fileio.c (do_auto_save_unwind):
219 * gtkutil.c (pop_down_dialog):
220 * insdel.c (reset_var_on_error):
221 * lread.c (load_unwind):
222 * xfns.c (clean_up_file_dialog):
223 * xmenu.c, nsmenu.m (pop_down_menu):
224 * xmenu.c (cleanup_widget_value_tree):
225 * xselect.c (wait_for_property_change_unwind):
226 Accept pointer and return void, rather than accepting an Emacs
227 save value encapsulating the pointer and returning a dummy object.
228 All uses changed.
229 * editfns.c (Fformat): Update the saved pointer directly via
230 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
231 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
232 (unwind_body): New function.
233 (record_unwind_protect): First arg is now a function returning void,
234 not a dummy Lisp_Object.
235 (record_unwind_protect_ptr, record_unwind_protect_int)
236 (record_unwind_protect_void): New functions.
237 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
238 * fileio.c (struct auto_save_unwind): New type.
239 (do_auto_save_unwind): Use it.
240 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
241 * insdel.c (struct rvoe_arg): New type.
242 (reset_var_on_error): Use it.
243 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
244 New constants.
245 (specbinding_func): Remove; there are now several such functions.
246 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
247 (set_unwind_protect_ptr): New function.
248 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
249
250 Be simpler and more consistent about reporting I/O errors.
251 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
252 Say "Read error" and "Write error", rather than "I/O error", or
253 "IO error reading", or "IO error writing", when a read or write
254 error occurs.
255 * process.c (Fmake_network_process, wait_reading_process_output)
256 (send_process, Fprocess_send_eof, wait_reading_process_output):
257 Capitalize diagnostics consistently. Put "failed foo" at the
258 start of the diagnostic, so that we don't capitalize the
259 function name "foo". Consistently say "failed" for such
260 diagnostics.
261 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
262 All callers changed. This is so it can use report_file_error.
263 * sysdep.c (serial_open, serial_configure): Capitalize I/O
264 diagnostics consistently as above.
265
266 * fileio.c (report_file_errno): Fix errno reporting bug.
267 If the file name is neither null nor a pair, package it up as a
268 singleton list. All callers changed, both to this function and to
269 report_file_error. This fixes a bug where the memory allocator
270 invoked by list1 set errno so that the immediately following
271 report_file_error reported the wrong errno value.
272
273 Fix minor problems found by --enable-gcc-warnings.
274 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
275 * keyboard.c (kbd_buffer_get_event): Remove unused local.
276
2772013-07-16 Jan Djärv <jan.h.d@swipnet.se>
278
279 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
280 Set event->arg to Qt if switch-event shall be generated.
281 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
282
283 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
284
285 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
286 FOCUS_OUT_EVENT.
287
288 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
289 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
290 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
291 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
292 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
293 and there is a focused frame.
294 (head_table): Add focus-in and focus-out.
295 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
296 bind to handle-focus-in/out.
297
298 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
299 (Fhandle_switch_frame): Call Fhandle_focus_in.
300 (syms_of_frame): defsubr handle-focus-in/out.
301
3022013-07-16 Paul Eggert <eggert@cs.ucla.edu>
303
304 Fix porting bug to older POSIXish platforms (Bug#14862).
305 * sysdep.c (emacs_pipe): New function, that implements
306 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
307 This should port better to CentOS 5 and to Mac OS X 10.6.
308 All calls to pipe2 changed.
309
310 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
311 This makes the code easier to read and the executable a bit smaller.
312 Do not replace all calls to Fcons that happen to create lists,
313 just calls that are intended to create lists. For example, when
314 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
315 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
316 Similarly for list2 through list5.
317 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
318 * bytecode.c (exec_byte_code):
319 * callint.c (quotify_arg, Fcall_interactively):
320 * callproc.c (Fcall_process, create_temp_file):
321 * charset.c (load_charset_map_from_file)
322 (Fdefine_charset_internal, init_charset):
323 * coding.c (get_translation_table, detect_coding_system)
324 (Fcheck_coding_systems_region)
325 (Fset_terminal_coding_system_internal)
326 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
327 * composite.c (update_compositions, Ffind_composition_internal):
328 * dired.c (directory_files_internal, file_name_completion)
329 (Fsystem_users):
330 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
331 * doc.c (Fsnarf_documentation):
332 * editfns.c (Fmessage_box):
333 * emacs.c (main):
334 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
335 (Feval, eval_sub, Ffuncall, apply_lambda):
336 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
337 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
338 (Fset_file_times, Finsert_file_contents)
339 (Fchoose_write_coding_system, Fwrite_region):
340 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
341 * font.c (font_registry_charsets, font_parse_fcname)
342 (font_prepare_cache, font_update_drivers, Flist_fonts):
343 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
344 * frame.c (make_frame, Fmake_terminal_frame)
345 (x_set_frame_parameters, x_report_frame_params)
346 (x_default_parameter, Fx_parse_geometry):
347 * ftfont.c (syms_of_ftfont):
348 * image.c (gif_load):
349 * keyboard.c (command_loop_1):
350 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
351 (Fcopy_keymap, append_key, Fcurrent_active_maps)
352 (Fminor_mode_key_binding, accessible_keymaps_1)
353 (Faccessible_keymaps, Fwhere_is_internal):
354 * lread.c (read_emacs_mule_char):
355 * menu.c (find_and_return_menu_selection):
356 * minibuf.c (get_minibuffer):
357 * nsfns.m (Fns_perform_service):
358 * nsfont.m (ns_script_to_charset):
359 * nsmenu.m (ns_popup_dialog):
360 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
361 (Fx_own_selection_internal):
362 * nsterm.m (append2):
363 * print.c (Fredirect_debugging_output)
364 (print_prune_string_charset):
365 * process.c (Fdelete_process, Fprocess_contact)
366 (Fformat_network_address, set_socket_option)
367 (read_and_dispose_of_process_output, write_queue_push)
368 (send_process, exec_sentinel):
369 * sound.c (Fplay_sound_internal):
370 * textprop.c (validate_plist, add_properties)
371 (Fput_text_property, Fadd_face_text_property)
372 (copy_text_properties, text_property_list, syms_of_textprop):
373 * unexaix.c (report_error):
374 * unexcoff.c (report_error):
375 * unexsol.c (unexec):
376 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
377 (Fformat_mode_line, syms_of_xdisp):
378 * xfaces.c (set_font_frame_param)
379 (Finternal_lisp_face_attribute_values)
380 (Finternal_merge_in_global_face, syms_of_xfaces):
381 * xfns.c (x_default_scroll_bar_color_parameter)
382 (x_default_font_parameter, x_create_tip_frame):
383 * xfont.c (xfont_supported_scripts):
384 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
385 (menu_help_callback, xmenu_show):
386 * xml.c (make_dom):
387 * xterm.c (set_wm_state):
388 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
389 and similarly for list2 through list5.
390
3912013-07-15 Paul Eggert <eggert@cs.ucla.edu>
392
393 * callproc.c (Fcall_process_region): Fix minor race and tune.
394 (create_temp_file): New function, with the temp-file-creation part
395 of the old Fcall_process_region. Use Fcopy_sequence to create the
396 temp file name, rather than alloca + build_string, for simplicity.
397 Don't bother to block input around the temp file creation;
398 shouldn't be needed. Simplify use of mktemp. Use
399 record_unwind_protect immediately after creating the temp file;
400 this closes an unlikely race where the temp file was not removed.
401 Use memcpy rather than an open-coded loop.
402 (Fcall_process_region): Use the new function. If the input is
403 empty, redirect from /dev/null rather than from a newly created
404 empty temp file; this avoids unnecessary file system traffic.
405
12013-07-14 Paul Eggert <eggert@cs.ucla.edu> 4062013-07-14 Paul Eggert <eggert@cs.ucla.edu>
2 407
408 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
409 Simplify by making this case like the other two. This is a bit
410 slower on obsolete hosts, but the extra complexity isn't worth it.
411
3 * callproc.c (child_setup, relocate_fd) [!DOS_NT]: 412 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
4 * process.c (create_process) [!DOS_NT]: 413 * process.c (create_process) [!DOS_NT]:
5 Remove now-unnecessary calls to emacs_close. 414 Remove now-unnecessary calls to emacs_close.