-2011-08-05 Paul Eggert <eggert@cs.ucla.edu>
+2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
- Integer and memory overflow issues.
+ * image.c (parse_image_spec): Check for nonnegative, not for positive,
+ when checking :margin (Bug#9390).
+ (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
+ Renamed from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
+ so that the name doesn't mislead. All uses changed.
+
+2011-08-28 Johan Bockgård <bojohan@gnu.org>
+
+ * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
+ set_tty_hooks.
+
+2011-08-27 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (move_it_to): Don't bail out early when reaching
+ position beyond to_charpos, if we are scanning backwards.
+ (move_it_vertically_backward): When DY == 0, make sure we get to
+ the first character in the line after the newline.
+
+2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ccl.c: Improve and simplify overflow checking (Bug#9196).
+ (ccl_driver): Do not generate an out-of-range pointer.
+ (Fccl_execute_on_string): Remove unnecessary check for
+ integer overflow, noted by Stefan Monnier in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
+ Remove a FIXME that didn't need fixing.
+ Simplify the newly-introduced buffer reallocation code.
+
+2011-08-27 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
+
+2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ Integer and memory overflow issues (Bug#9196).
+
+ * doc.c (get_doc_string): Rework so that
+ get_doc_string_buffer_size is the actual buffer size, rather than
+ being 1 less than the actual buffer size; this makes xpalloc more
+ convenient.
+
+ * image.c (x_allocate_bitmap_record, cache_image):
+ * xselect.c (Fx_register_dnd_atom):
+ Simplify previous changes by using xpalloc.
+
+ * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
+ since either will do and ptrdiff_t is convenient with xpalloc.
* charset.c (charset_table_size)
(struct charset_sort_data.priority): Now ptrdiff_t.
(bidi_cache_ensure_space, bidi_shelve_cache): Use it.
(bidi_cache_ensure_space): Avoid integer overflow when allocating.
+ * bidi.c (bidi_cache_shrink):
* buffer.c (overlays_at, overlays_in, record_overlay_string)
(overlay_strings):
Don't update size of array until after memory allocation succeeds,
* xrdb.c (get_environ_db): Don't assume path length fits in int,
as sprintf is limited to int lengths.
- * xselect.c (X_LONG_SIZE, X_USHRT_MAX, X_ULONG_MAX): New macros.
+ * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
+ (X_LONG_MIN): New macros.
Use them to make the following changes clearer.
(MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
This change doesn't affect the value now, but it may help remind
(receive_incremental_selection, x_property_data_to_lisp):
Redo calculations to avoid overflow.
(x_reply_selection_request): When sending hint, ceiling it at
- X_ULONG_MAX rather than relying on wraparound overflow to send
+ X_LONG_MAX rather than relying on wraparound overflow to send
something.
(x_get_window_property, receive_incremental_selection)
(lisp_data_to_selection_data, x_property_data_to_lisp):
(gs_load): Use printmax_t to print the widest integers possible.
Check for integer overflow when computing image height and width.
+2011-08-26 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (redisplay_window): Don't force window start if point
+ will be invisible in the resulting window. (Bug#9324)
+
+2011-08-25 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
+ the display spec is of the form `(space ...)'.
+ (handle_display_spec): Return the value returned by
+ handle_single_display_spec, not just 1 or zero.
+ (handle_single_display_spec): If the display spec is of the form
+ `(space ...)', and specifies display in the text area, return 2
+ rather than 1.
+ (try_cursor_movement): Check for the need to scroll more
+ accurately, and prefer exact match for point under bidi. Don't
+ advance `row' beyond the last row of the window.
+
+ * dispextern.h (struct bidi_it): Rename the disp_prop_p member
+ into disp_prop; all users changed.
+
+ * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
+ DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
+ for the text covered by the display property.
+
+2011-08-25 Chong Yidong <cyd@stupidchicken.com>
+
+ * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
+ Change return value to nil.
+ (Frecord_buffer): Delete unused function.
+
+2011-08-24 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
+ buffers, return left-to-right.
+ (set_cursor_from_row): Consider candidate row a win if its glyph
+ represents a newline and point is on that newline. Fixes cursor
+ positioning on the newline at EOL of R2L text within L2R
+ paragraph, and vice versa.
+ (try_cursor_movement): Check continued rows, in addition to
+ continuation rows. Fixes unwarranted scroll when point enters a
+ continued line of R2L text within an L2R paragraph, or vice versa.
+ (cursor_row_p): Consider the case of point being equal to
+ MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
+ from the end of a short line to the beginning of a continued line
+ of R2L text within L2R paragraph.
+ (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
+ composed characters.
+
+ * bidi.c (bidi_check_type): Use xassert.
+ (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
+ members.
+
+2011-08-23 Eli Zaretskii <eliz@gnu.org>
+
+ * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
+ a character.
+
+2011-08-23 Chong Yidong <cyd@stupidchicken.com>
+
+ * nsfont.m (ns_otf_to_script): Fix typo.
+
+2011-08-22 Kenichi Handa <handa@m17n.org>
+
+ * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
+ extra slot even if the purpose is char-code-property-table.
+
+2011-08-23 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (redisplay_window): When computing centering_position,
+ account for the height of the header line. (Bug#8874)
+
+ * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
+ instead of CHAR_TO_BYTE. Fixes a crash when a completion
+ candidate is selected by the mouse, and that candidate has a
+ composed character under the mouse.
+
+ * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
+ coordinates reported by pos-visible-in-window-p for a composed
+ character in column zero.
+
+2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
+
+2011-08-22 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
+ consider it a hit if to_charpos is anywhere in the range of the
+ composed buffer positions.
+
+2011-08-22 Chong Yidong <cyd@stupidchicken.com>
+
+ * image.c (gif_load): Don't assume that each subimage has the same
+ dimensions as the base image. Handle disposal method that is
+ "undefined" by the gif spec (Bug#9335).
+
+2011-08-20 Chong Yidong <cyd@stupidchicken.com>
+
+ * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
+ (Fcondition_case): Document `debug' symbol in error handler.
+
+2011-08-19 Eli Zaretskii <eliz@gnu.org>
+
+ * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
+ face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
+ from an Org mode buffer to a Speedbar frame.
+
+ * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
+ a composition, take its buffer position from IT->cmp_it.charpos.
+ Fixes cursor positioning at the beginning of a line that begins
+ with a composed character.
+
+2011-08-18 Eli Zaretskii <eliz@gnu.org>
+
+ * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
+ character bidirectional type, use STRONG_L instead. Fixes crashes
+ in a buffer produced by `describe-categories'.
+
+ * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
+ members before the level stack, so they would be saved and
+ restored when copying iterator state. Fixes incorrect reordering
+ around TABs covered by display properties.
+
+2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
+
+ * process.c (Fnetwork_interface_list): Correctly determine buffer
+ size.
+
+2011-08-17 Chong Yidong <cyd@stupidchicken.com>
+
+ * eval.c (internal_condition_case, internal_condition_case_1)
+ (internal_condition_case_2, internal_condition_case_n):
+ Remove unnecessary aborts (Bug#9081).
+
+2011-08-17 Eli Zaretskii <eliz@gnu.org>
+
+ * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
+ has no `load' handler, try opening the file locally. (Bug#9311)
+
+2011-08-16 Ken Brown <kbrown@cornell.edu>
+
+ * gmalloc.c: Expand comment.
+
+2011-08-16 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
+ if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
+
+2011-08-16 Ken Brown <kbrown@cornell.edu>
+
+ Fix memory allocation problems in Cygwin build (Bug#9273).
+
+ * unexcw.c ( __malloc_initialized): Declare external variable.
+ (fixup_executable): Force the dumped emacs to reinitialize malloc.
+
+ * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
+ New variables.
+ (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
+ dumped emacs.
+ (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
+ in the static heap.
+ [CYGWIN] (special_realloc): New function.
+ (_realloc_internal_nolock) [CYGWIN]: Use the new function on
+ requests to realloc storage in the static heap.
+
+2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ * bidi.c (bidi_initialize): Remove unused local.
+
+2011-08-15 Eli Zaretskii <eliz@gnu.org>
+
+ * biditype.h: File removed.
+
+ * bidimirror.h: File removed.
+
+ * deps.mk (bidi.o): Remove biditype.h and
+ bidimirror.h.
+
+ * makefile.w32-in ($(BLD)/bidi.$(O)): Remove biditype.h and
+ bidimirror.h.
+
+ * dispextern.h: Fix a typo in the comment to bidi_type_t.
+
+ * chartab.c: Improve commentary for the uniprop_table API.
+
+ * bidi.c (bidi_paragraph_init): Support zero value of
+ bidi_ignore_explicit_marks_for_paragraph_level.
+ (bidi_initialize): Use uniprop_table instead of including
+ biditype.h and bidimirror.h.
+
+ * xdisp.c (move_it_in_display_line_to): Don't reset pixel
+ coordinates of the iterator when restoring from ppos_it.
+ (Bug#9296)
+
+2011-08-14 Kenichi Handa <handa@m17n.org>
+
+ * process.c (create_process): Call setup_process_coding_systems
+ after the pid of the process is set to -1 (Bug#8162).
+
+2011-08-14 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (move_it_in_display_line_to): Don't invoke
+ IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
+ ppos_it. Fixes vertical cursor motion when line beginning is
+ covered by an image. (Bug#9296)
+
+2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.h (ns_run_ascript): Declare.
+ (NSAPP_DATA2_RUNASSCRIPT): Define.
+
+ * nsfns.m (as_script, as_result, as_status): New static variables.
+ (ns_run_ascript): New function.
+ (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
+ event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
+ the event loop. Get status from as_status (Bug#7276).
+
+ * nsterm.m (sendEvent): If event is NSApplicationDefined and
+ data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
+ the event loop (Bug#7276).
+
+2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gnutls.c (QCgnutls_bootprop_priority)
+ (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
+ (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
+ (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
+ (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
+ (QCgnutls_bootprop_verify_hostname_error)
+ (QCgnutls_bootprop_callbacks_verify): Rename from
+ Qgnutls_bootprop_..., all uses changed.
+
+ * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
+ uses changed.
+
+2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xfaces.c (Qframe_set_background_mode): Now static.
+ * dispextern.h (Qframe_set_background_mode): Remove decl.
+
+ * process.c (Fnetwork_interface_info): Declare local only if needed.
+
+2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
+
+ * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
+ (Fnetwork_interface_list): Allocate in increments of bytes instead
+ of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
+ bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
+ sockaddr.
+ (struct ifflag_def): notrailers is smart on OSX.
+ (Fnetwork_interface_info): Handle case when ifr_flags is negative.
+ Get hardware address with getifaddrs if available.
+
+2011-08-12 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (iterate_out_of_display_property): xassert that
+ IT->position is set to within IT->object's boundaries. Break from
+ the loop as soon as EOB is reached; avoids infloops in redisplay
+ when IT->position is set up wrongly due to some bug.
+ Set IT->current to match the bidi iterator unconditionally.
+ (push_display_prop): Allow GET_FROM_STRING as IT->method on
+ entry. Force push_it to save on the stack the current
+ buffer/string position, to be restored by pop_it. Fix flags in
+ the iterator structure wrt the object coming from a display
+ property, as `line-prefix' and `wrap-prefix' are not ``replacing''
+ properties. (Bug#9284)
+
+2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
+
+ * fontset.c (fontset_get_font_group): Add proper type checks.
+ (Bug#9172)
+
+2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
+ and LC_VERSION_MIN_MACOSX.
+ (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
+ (dump_it) [LC_FUNCTION_STARTS]: Use it.
+
+2011-08-08 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (forward_to_next_line_start): Allow to use the
+ no-display-properties-and-no-overlays under bidi display.
+ Set disp_pos in the bidi iterator to avoid searches for display
+ properties and overlays.
+
+2011-08-08 Chong Yidong <cyd@stupidchicken.com>
+
+ * editfns.c (Fset_time_zone_rule): Document relationship with the
+ setenv function.
+
+ * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
+ the font entity extracted from the cache (Bug#8109).
+
+2011-08-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * composite.c (autocmp_chars): Don't reset point. That is done by
+ restore_point_unwind (Bug#5984).
+
+2011-08-07 Juri Linkov <juri@jurta.org>
+
+ * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
+ to show the arg `TIME' instead of `TIMEVAL'.
+
+2011-08-06 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
+ display property strides EOL and includes a newline, as in
+ longlines-mode. (Bug#9254)
+ (move_it_in_display_line_to): Fix vertical-motion in a buffer with
+ word-wrap under bidirectional display. (Bug#9224)
+
+ * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
+ is non-zero, even if the data buffer is NULL. Fixes a crash in
+ vertical-motion with longlines-mode. (Bug#9254)
+
+2011-08-05 Eli Zaretskii <eliz@gnu.org>
+
+ * bidi.c <bidi_cache_total_alloc>: Now static.
+ (bidi_initialize): Initialize bidi_cache_total_alloc.
+
+ * xdisp.c (display_line): Release buffer allocated for shelved bidi
+ cache. (Bug#9221)
+
+ * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
+ amount allocated this far in `bidi_cache_total_alloc'.
+ (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
+ non-zero, only free the data buffer without restoring the cache
+ contents. All callers changed.
+
+ * dispextern.h (bidi_unshelve_cache): Update prototype.
+
+ * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
+ (move_it_in_display_line, move_it_to)
+ (move_it_vertically_backward, move_it_by_lines): Replace the call
+ to xfree to an equivalent call to bidi_unshelve_cache.
+ (move_it_in_display_line_to): Fix logic of returning
+ MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
+
+2011-08-05 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
+ came from a string character with a `cursor' property. (Bug#9229)
+
2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
* Makefile.in (LIB_PTHREAD): New variable.