+2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xfns.c (xic_create_fontsetname): Remove redundant calls
+ to memset.
+
+2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gtkutil.c (get_utf8_string): Remove redundant assignment.
+ sprintf already null-terminates its output.
+
+ * xfns.c (x_window): Remove redundant cast.
+
+2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
+ `const char *' to `char *' to avoid compiler warning.
+
+2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
+ instead of truncating it to 63 (admittedly a generous limit).
+
+ * process.c: Fix spelling and caps in comments.
+
+2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * emacs.c (setpgrp): Remove definition, unused.
+ * sysdep.c (setpgrp): Remove definition, not used in this file.
+
+2012-06-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in: Update dependencies.
+
+2012-06-24 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
+ (SYSTIME_H): Add nt/inc/sys/time.h.
+
+ * systime.h [WINDOWSNT]: Include sys/time.h.
+
+ * s/ms-w32.h (struct timespec): Definition moved from
+ nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
+
+2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
+ * buffer.h (buffer_slot_type_mismatch):
+ * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
+ * eval.c (unwind_to_catch):
+ * image.c (my_png_error, my_error_exit):
+ * keyboard.c (quit_throw_to_read_char, user_error)
+ (Fexit_recursive_edit, Fabort_recursive_edit):
+ * lisp.h (die, args_out_of_range, args_out_of_range_3)
+ (wrong_type_argument, buffer_overflow, __executable_start)
+ (memory_full, buffer_memory_full, string_overflow, Fthrow)
+ (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
+ (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
+ (fatal):
+ (child_setup) [!DOS_NT]:
+ * lread.c (end_of_file_error, invalid_syntax):
+ * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
+ * puresize.h (pure_write_error):
+ * search.c (matcher_overflow):
+ * sound.c (sound_perror, alsa_sound_perror):
+ * sysdep.c, syssignal.h (croak):
+ * term.c (maybe_fatal, vfatal):
+ * textprop.c (text_read_only):
+ * undo.c (user_error):
+ * unexmacosx.c (unexec_error):
+ * xterm.c (x_ins_del_lines, x_delete_glyphs):
+ Use _Noreturn rather than NO_RETURN.
+ No need for separate decl merely because of _Noreturn.
+ * sound.c (sound_warning, parse_sound):
+ Remove unnecessary forward decls.
+
+2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
+ * lisp.h (WAIT_READING_MAX): New macro.
+ * dispnew.c (Fsleep_for, sit_for):
+ * keyboard.c (kbd_buffer_get_event):
+ * process.c (Faccept_process_output):
+ Use it to avoid bogus compiler warnings with obsolescent GCC versions.
+ This improves on the previous patch, which introduced a bug
+ when time_t is unsigned and as wide as intmax_t.
+ See <http://bugs.gnu.org/9000#51>.
+
+2012-06-23 Eli Zaretskii <eliz@gnu.org>
+
+ * dispnew.c (sit_for, Fsleep_for):
+ * keyboard.c (kbd_buffer_get_event):
+ * process.c (Faccept_process_output): Avoid compiler warnings when
+ comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
+
+2012-06-23 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in: Update dependencies.
+
+ * w32.c (ltime): Add return type and declare static.
+ (w32_get_internal_run_time): Remove usused variable `time_100ns'.
+
+2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
+ Privately reported by Herbert J. Skuhra.
+ (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
+ All uses changed.
+ (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
+ not make_lisp_timeval, when the argument is of type EMACS_TIME.
+
+2012-06-23 Eli Zaretskii <eliz@gnu.org>
+
+ * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
+ last argument of make_unibyte_string.
+
+ * keyboard.c (kbd_buffer_get_event): Include the codepage and the
+ language ID in the event parameters.
+
+ * w32term.c (w32_read_socket): Put the new keyboard codepage into
+ event.code, not the obscure "character set ID".
+
+2012-06-23 Chong Yidong <cyd@gnu.org>
+
+ * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
+
+2012-06-23 Eli Zaretskii <eliz@gnu.org>
+
+ Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
+ * w32.c (fdutimens): New function.
+
+ * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
+
+ * s/ms-w32.h (pselect): Redirect to sys_select.
+
+ * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
+
+ * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
+ in the logic of incrementing and decrementing the value of
+ use_relocatable_buffers.
+
+2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
+ Privately reported by Herbert J. Skuhra.
+ [__FreeBSD__]: Remove "*/" typo after "#include".
+ (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
+ (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
+ (TIMEVAL, system_process_attributes) [__FreeBSD__]:
+ Don't assume EMACS_TIME and struct timeval are the same type.
+
+2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Support higher-resolution time stamps (Bug#9000).
+ The time stamps are only nanosecond-resolution at the C level,
+ since that's the best that any real-world system supports now.
+ But they are picosecond-resolution at the Lisp level, as that's
+ easy, and leaves room for future OS improvements.
+
+ * Makefile.in (LIB_CLOCK_GETTIME): New macro.
+ (LIBES): Use it.
+
+ * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
+ Don't get current time unless it's needed.
+
+ * atimer.c: Include <sys/time.h> unconditionally, since gnulib
+ now provides it if it's absent.
+ (start_atimer): Port to higher-res time stamps.
+ Check for time stamp overflow. Don't get current time more
+ often than is needed.
+
+ * buffer.h (struct buffer): Buffer modtime now has high resolution.
+ Include systime.h, not time.h.
+ (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
+
+ * dired.c: Include stat-time.h.
+ (Ffile-attributes): File times now have higher resolution.
+
+ * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
+ (struct image): Timestamp now has higher resolution.
+
+ * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
+ has at least microseconds now. All uses removed.
+ (update_frame, update_single_window, update_window, update_frame_1)
+ (Fsleep_for, sit_for): Port to higher-resolution time stamps.
+
+ * editfns.c (time_overflow): Now extern.
+ (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
+ (float-time, Fformat_time_string, Fcurrent_time_string)
+ (Fcurrent_time_zone): Accept and generate higher-resolution
+ time stamps.
+ (make_time_tail, make_lisp_time, dissassemble_lisp_time)
+ (decode_time_components, lisp_seconds_argument): New functions.
+ (make_time): Now static.
+ (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
+ Report an error if the time is invalid, rather than having the caller
+ do that.
+
+ * fileio.c: Include <stat-time.h>
+ (Fcopy_file): Copy higher-resolution time stamps.
+ Prefer to set the time stamp via a file descriptor if that works.
+ (Fset_file_times, Finsert_file_contents, Fwrite_region)
+ (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
+ (Fvisited_file_modtime, Fset_visited_file_modtime):
+ Support higher-resolution time stamps.
+
+ * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
+
+ * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
+
+ * image.c (prepare_image_for_display, clear_image_cache)
+ (lookup_image): Port to higer-resolution time stamps.
+
+ * keyboard.c (start_polling, bind_polling_period):
+ Check for time stamp overflow.
+ (read_char, kbd_buffer_get_event, timer_start_idle)
+ (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
+ (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
+ Port to higher-resolution time stamps. Do not assume time_t is signed.
+ (decode_timer): New function. Timers are now vectors of length 9,
+ not 8, to accommodate the picosecond component.
+ (timer_check_2): Use it.
+
+ * nsterm.m (select_timeout, timeval_subtract): Remove.
+ (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
+ as they're a bit more accurate and handle overflow better.
+ (ns_select): Change prototype to be compatible with pselect.
+ (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
+ * nsterm.h (ns_select): Adjust prototype.
+
+ * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
+ us-resolution time stamps.
+ (sys_select): Use the new EMACS_TIME_SIGN macro instead.
+
+ * lread.c (read_filtered_event): Port to ns-resolution time stamps.
+
+ * lisp.h (time_overflow): New decl.
+ (wait_reading_process_output): First arg is now intmax_t, not int,
+ to accommodate larger waits.
+
+ * process.h (struct Lisp_Process.read_output_delay):
+ Now counts nanoseconds, not microseconds.
+ * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
+ EMACS_HAS_USECS.
+ (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
+ (wait_reading_process_output):
+ Port to ns-resolution time stamps.
+ (Faccept_process_output, wait_reading_process_output):
+ Check for time stamp overflow. Do not assume time_t is signed.
+ (select_wrapper): Remove; we now use pselect.
+ (Fprocess_attributes): Now generates ns-resolution time stamps.
+
+ * sysdep.c: Include utimens.h. Don't include utime.h
+ or worry about struct utimbuf; gnulib does that for us now.
+ (gettimeofday): Remove; gnulib provides a substitute.
+ (make_timeval): New function.
+ (set_file_times): Now sets ns-resolution time stamps.
+ New arg FD; all uses changed.
+ (time_from_jiffies, ltime_from_jiffies, get_up_time)
+ (system_process_attributes):
+ Now returns ns-resolution time stamp. All uses changed.
+ Check for time stamp overflow.
+
+ * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
+ provides a substitute now.
+
+ * systime.h: Include timespec.h rather than sys/time.h and time.h,
+ since it guarantees struct timespec.
+ (EMACS_TIME): Now struct timespec, so that we can support
+ ns-resolution time stamps.
+ (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
+ (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
+ (EMACS_USECS): Remove.
+ (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
+ so multiply the arg by 1000 before storing it.
+ (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
+ New macros.
+ (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
+ Port to ns-resolution time stamps.
+ (EMACS_TIME_NEG_P): Remove; replaced by....
+ (EMACS_TIME_SIGN): New macro.
+ (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
+ (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
+ (set_file_times, make_time, lisp_time_argument): Adjust signature.
+ (make_timeval, make_lisp_time, decode_time_components): New decls.
+ (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
+ that it mishandled time_t overflow. You can't compare by subtracting!
+ (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
+ (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
+
+ * term.c: Include <sys/time.h>.
+ (timeval_to_Time): New function, for proper overflow wraparound.
+ (term_mouse_position, term_mouse_click): Use it.
+
+ * undo.c (record_first_change): Support higher-resolution time stamps
+ in the undo buffer.
+ (Fprimitive_undo): Use them when restoring time stamps.
+
+ * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
+ (w32_get_internal_run_time):
+ Port to higher-resolution Emacs time stamps.
+ (ltime): Now accepts single 64-bit integer, as that's more convenient
+ for callers.
+
+ * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
+
+ * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
+ for compatibility with pselect. Support ns-resolution time stamps.
+
+ * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
+
+ * xselect.c (wait_for_property_change, x_get_foreign_selection):
+ Check for time stamp overflow, and support ns-resolution time stamps.
+
+ * xterm.c: Don't include sys/time.h; gnulib does that for us now.
+ Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
+ (timeval_subtract): Remove; no longer needed.
+ (XTflash, XTring_bell, x_wait_for_event):
+ Port to ns-resolution time stamps. Don't assume time_t is signed.
+
+2012-06-22 Chong Yidong <cyd@gnu.org>
+
+ * xdisp.c (x_consider_frame_title): Revert last change.
+
+2012-06-22 Eli Zaretskii <eliz@gnu.org>
+
+ * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
+ with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
+ aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
+ staticidx goes up to 1597 out of 1600 = 0x640.)
+
+2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
+ Otherwise, the umask might be mistakenly 0 while handling input signals.
+
+2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * minibuf.c (Fread_string): Bind minibuffer-completion-table.
+
+2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
+ * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
+ * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
+ access to `contents' member of Lisp_Vector objects with AREF and ASET
+ where appropriate.
+
+2012-06-19 Chong Yidong <cyd@gnu.org>
+
+ * frame.c (delete_frame): When selecting a frame on a different
+ text terminal, do not alter the terminal's top-frame.
+
+ * xdisp.c (format_mode_line_unwind_data): Record the target
+ frame's selected window and its terminal's top-frame.
+ (unwind_format_mode_line): Restore them.
+ (x_consider_frame_title, display_mode_line, Fformat_mode_line):
+ Callers changed.
+ (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
+ since tty frames can be explicitly named.
+ (prepare_menu_bars): Likewise.
+
+ * term.c (Ftty_top_frame): New function.
+
+2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port byte-code-meter to modern targets.
+ * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
+ !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
+ CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
+ (METER_1, METER_2): Simplify.
+
+2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * data.c (Fdefalias): Return `symbol' (bug#11686).
+
+2012-06-18 Martin Rudalics <rudalics@gmx.at>
+
+ * buffer.c (Fkill_buffer): Don't throw an error when the buffer
+ gets killed during executing of this function (Bug#11665).
+ Try to always return Qt when the buffer has been actually killed.
+ (Vkill_buffer_query_functions): In doc-string say that functions
+ run by this hook should not change the current buffer.
+
+2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix recently-introduced process.c problems found by static checking.
+ * process.c (write_queue_push, write_queue_pop, send_process):
+ Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
+ (write_queue_pop): Fix pointer signedness problem.
+ (send_process): Remove unused local.
+
+2012-06-17 Chong Yidong <cyd@gnu.org>
+
+ * xdisp.c (redisplay_internal): No need to redisplay terminal
+ frames that are not on top.
+
+2012-06-17 Troels Nielsen <bn.troels@gmail.com>
+
+ * process.c (make_process): Initialize write_queue.
+ (write_queue_push, write_queue_pop): New functions.
+ (send_process): Use them to maintain correct ordering of process
+ writes (Bug#10815).
+
2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
+ * lisp.h (eassert): Assume C89 or later.
+ This removes the need for CHECK.
+ (CHECK): Remove. Its comments about always evaluating its
+ argument were confusing, as 'eassert' typically does not evaluate
+ its argument.
+
* coding.c (produce_chars): Use ptrdiff_t, not int.
* xterm.c (x_draw_underwave): Check for integer overflow.
(x_draw_glyph_string): Use them.
* xfaces.c (Qline, Qwave): New Lisp objects.
(check_lface_attrs, merge_face_ref)
- (Finternal_set_lisp_face_attribute, realize_x_face): Handle
- wave-style underline face attributes.
+ (Finternal_set_lisp_face_attribute, realize_x_face):
+ Handle wave-style underline face attributes.
* xterm.c (x_draw_underwave): New function.
(x_draw_glyph_string): Use it.
2012-06-16 Eli Zaretskii <eliz@gnu.org>
- * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end. If
- all the glyphs of the glyph row came from strings, and we have no
+ * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
+ If all the glyphs of the glyph row came from strings, and we have no
cursor positioning clues, put the cursor on the first glyph of the
row.
(handle_face_prop): Use chunk-relative overlay string index when
Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
(INTTYPEBITS): New macro, for clarity.
(INTMASK, MOST_POSITIVE_FIXNUM): Use it.
- (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P): Simplify
- now that USE_LSB_TAG is always defined.
+ (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
+ Simplify now that USE_LSB_TAG is always defined.
(TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
(make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
* lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
instead of union.
(XLI, XIL): Define.
- (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use
- them.
- * emacs.c (gdb_use_struct): Renamed from gdb_use_union.
+ (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
+ Use them.
+ * emacs.c (gdb_use_struct): Rename from gdb_use_union.
* .gdbinit: Check gdb_use_struct instead of gdb_use_union.
- * alloc.c (widen_to_Lisp_Object): Removed.
+ * alloc.c (widen_to_Lisp_Object): Remove.
(mark_memory): Use XIL instead of widen_to_Lisp_Object.
* frame.c (delete_frame): Remove outdated comment.
* w32fns.c (Fw32_register_hot_key): Use XLI instead of checking