Commit graph

32017 commits

Author SHA1 Message Date
Eli Zaretskii
32256c7b2b Fix a typo in comment from 2011-09-15T15:41:03Z!eliz@gnu.org. 2011-09-15 20:37:16 +03:00
Andreas Schwab
cf7edc2a6e * src/editfns.c (Fformat): Correctly handle text properties on "%%". 2011-09-15 18:56:07 +02:00
Eli Zaretskii
bd01620e01 Add comments about special meaning of TAB characters in compositions.
src/xterm.c (x_draw_composite_glyph_string_foreground):
 src/w32term.c (x_draw_composite_glyph_string_foreground):
 src/term.c (encode_terminal_code):
 src/composite.c (composition_update_it, get_composition_id):
 src/xdisp.c (get_next_display_element)
 (fill_composite_glyph_string): Add comments about special meaning
 of TAB characters in a composition.
2011-09-15 19:22:58 +03:00
Paul Eggert
a02719a326 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
This occurs when processing a multibyte format, which can happen
when using 'eval'.  Problem reported by Wolfgang Jenker.
2011-09-15 09:10:37 -07:00
Johan Bockgård
72589a3cee Fix bug #9495 with cursor positioning on truncated lines.
Patch by Johan Bockgוrd <bojohan@gnu.org>

 src/xdisp.c (try_cursor_movement): Only check for exact match if
 cursor hpos found by set_cursor_from_row is valid.  (Bug#9495)
2011-09-15 19:02:49 +03:00
Eli Zaretskii
983a899097 xdisp.c (hscroll_window_tree): Sync comment with the code. 2011-09-15 18:41:03 +03:00
Paul Eggert
1c14176cfd Remove unused external symbols.
* dispextern.h (calc_pixel_width_or_height): Remove decl.
* xdisp.c (calc_pixel_width_or_height): Now static.
* doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
* indent.c (check_display_width):
* w32term.c: Fix comment to match code.
* xterm.c, xterm.h (x_catching_errors): Remove.
2011-09-14 14:45:51 -07:00
Paul Eggert
d2eea5b594 * xselect.c: Use signed conversions more consistently (Bug#9498).
(selection_data_to_lisp_data): Assume incoming selection data are
signed integers, not unsigned.  This is to be consistent with
outgoing selection data, which was modified to use signed integers
in as part of the fix to Bug#9196 in response to Jan Djärv's comment
in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
expects long, not unsigned long.
2011-09-14 08:47:21 -07:00
Eli Zaretskii
46888499da xdisp.c (try_window_reusing_current_matrix): Fix incorrect computation of loop end.
src/xdisp.c (try_window_reusing_current_matrix): Fix incorrect
 computation of loop end.  Reported by Johan Bockgård <bojohan@gnu.org>.
2011-09-14 01:20:23 -04:00
Chong Yidong
ef8ef9fb80 * lisp/window.el (window-deletable-p): Never delete last frame on a terminal.
* src/frame.c (Fother_visible_frames_p): Function deleted.
2011-09-13 11:33:16 -04:00
Eli Zaretskii
fa819fed53 Fix bug #2496 with column counting in presence of display tables.
src/indent.c (compute_motion): Process display vector front to back
 rather than the other way around.
2011-09-12 07:51:27 -04:00
Stefan Monnier
2ba8e00888 * src/fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. 2011-09-11 22:22:22 -04:00
Chong Yidong
20f53c6979 * minibuf.c (Fread_from_minibuffer): Doc fix. 2011-09-11 18:04:52 -04:00
Eli Zaretskii
d562d7a44c Fix bug #9475 with alignment in *Completions* buffer.
src/xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
 2011-08-30T17:32:44Z!eliz@gnu.org.
2011-09-11 20:40:53 +03:00
Lars Magne Ingebrigtsen
9d1d6e68a4 Clarify slightly the last checkin. 2011-09-11 16:49:24 +02:00
Lars Magne Ingebrigtsen
1c4d7f3d29 (Fvisited_file_modtime): Document `(-1 65535)' as a value for non-existent files. 2011-09-11 16:46:38 +02:00
Eli Zaretskii
b885bf36cf Fix bug #9139 with revisiting non-existent files.
src/fileio.c (Finsert_file_contents): If the file cannot be opened,
 set its "size" to -1.  This will set the modtime_size field of
 the corresponding buffer to -1, which is what
 verify-visited-file-modtime expects for files that do not exist.
2011-09-11 01:52:07 -04:00
Paul Eggert
6612f0bffd * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
here ...
* lisp.h: ... from here.  push_key_description is no longer
defined in keyboard.c, so its declaration should not be in
lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
logically belongs with push_key_description.
2011-09-10 17:41:48 -07:00
Paul Eggert
dfb3f7559b * buffer.h: Include <sys/types.h> instead of <time.h>.
Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
Problem reported by Herbert J. Skuhra.
2011-09-10 12:41:33 -07:00
Lars Magne Ingebrigtsen
3134906c91 * xml.c (parse_region): Make the parsing work for non-comment-starting XML files again.
Fixes: debbugs:9144
2011-09-10 20:14:50 +02:00
Andreas Schwab
8d903f4e5d * src/image.c (gif_load): Fix calculation of bottom and right corner.
(Bug#9468)
2011-09-10 20:13:24 +02:00
Eli Zaretskii
80ad64f4f5 Prevent sluggish bidi redisplay in small windows.
src/xdisp.c (MAX_DISP_SCAN): Decrease to 250.  Prevents sluggish
 redisplay in small windows.
2011-09-10 18:23:25 +03:00
Eli Zaretskii
208a048da7 src/frame.c (x_report_frame_params): Cast to avoid compiler warnings. 2011-09-09 11:32:43 +03:00
Juanma Barranquero
5e617bc2b6 Whitespace changes. 2011-09-09 03:06:52 +02:00
Martin Rudalics
9b1c252e29 Don't have previous and next buffers deal with internal windows.
* window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
Operate on live windows only.

* window.el (window-deletable-p): Make sure window is live before
invoking window-prev-buffers.
2011-09-08 17:45:20 +02:00
Juanma Barranquero
2949f33b8a src/emacs.c (my_heap_start): #ifdef to avoid warnings when unused. 2011-09-08 12:59:22 +02:00
Eli Zaretskii
e08dcafd83 Fix a crash in vertical-motion.
src/xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
 only under bidi iteration.
2011-09-07 21:14:26 +03:00
Jan Djärv
115b96bdb5 (xg_make_tool_item): Insert comment about eventbox. 2011-09-07 19:25:24 +02:00
Paul Eggert
c8199d0f9e isnan: Fix porting problem to Solaris 10 with bundled gcc.
Without this fix, the command to link temacs failed due to an
undefined symbol __builtin_isnan.  This is because
/usr/include/iso/math_c99.h #defines isnan(x) to
__builtin_isnan(x), but the bundled gcc, which identifies itself
as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
a __builtin_isnan.
* configure.in (isnan): Remove now-unnecessary check.
* src/floatfns.c (isnan): #undef, and then #define to a clone of
what's in data.c.
(Fisnan): Always define, since it's always available now.
(syms_of_floatfns): Always define isnan at the Lisp level.
2011-09-06 13:47:45 -07:00
Paul Eggert
e39b275c8c Merge from trunk. 2011-09-06 09:34:41 -07:00
Paul Eggert
b2db44d9c6 Merge from trunk. 2011-09-06 08:27:16 -07:00
Paul Eggert
1dc4aa6d97 Merge from trunk. 2011-09-05 13:43:14 -07:00
Michael Albinus
ecfc0a4901 * dbusbind.c (xd_signature_cat): Rename from signature_cat. 2011-09-05 11:34:18 +02:00
Paul Eggert
1c262cae40 Merge from trunk. 2011-09-04 16:58:01 -07:00
Paul Eggert
6511acf257 Merge from trunk. 2011-09-04 12:18:28 -07:00
Paul Eggert
53e9fe9081 Integer overflow fixes for scrolling, etc. 2011-09-04 12:14:54 -07:00
Paul Eggert
806add1d2f * xdisp.c: Integer overflow fix.
(try_window_id): Check Emacs fixnum range before converting to 'int'.
2011-09-04 11:48:35 -07:00
Paul Eggert
71f02bc59a * window.c: Integer overflow fixes.
(window_scroll_line_based, Frecenter):
Check that an Emacs fixnum is in range before assigning it to 'int'.
(Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
values converted from Emacs fixnums.
(Frecenter): Don't wrap around a line count if it is out of 'int'
range; instead, treat it as an extreme value.
(Fset_window_configuration, compare_window_configurations):
Use ptrdiff_t, not int, for index that might exceed 2 GiB.
2011-09-04 11:46:51 -07:00
Paul Eggert
a0efffc812 * search.c: Integer overflow fixes
(Freplace_match): Use ptrdiff_t, not int, for indexes that can
exceed INT_MAX.  Check that EMACS_INT value is in range before
assigning it to the (possibly-narrower) index.
(match_limit): Don't assume that a fixnum can fit in 'int'.
2011-09-04 10:27:38 -07:00
Paul Eggert
29ebea3b12 * print.c: Integer overflow fix.
(print_object): Use ptrdiff_t, not int, for index that can
exceed INT_MAX.
2011-09-04 10:25:23 -07:00
Paul Eggert
3f8236f46b * indent.c: Integer overflow fixes.
(position_indentation): Now takes ptrdiff_t, not int.
(Fvertical_motion): Don't wrap around LINES values that don't fit
in 'int'.  Instead, treat them as extreme values.  This is good
enough for windows, which can't have more than INT_MAX lines anyway.
2011-09-04 10:24:12 -07:00
Paul Eggert
b49e353d9d Merge from trunk. 2011-09-03 16:03:38 -07:00
Lars Magne Ingebrigtsen
0f2f6b6d00 * Require libxml/parser.h to avoid compilation warning. 2011-09-04 00:20:00 +02:00
Lars Magne Ingebrigtsen
fcb901a77a Fix up xmlCleanupParser sequence.
* xml.c (parse_region): Don't call xmlCleanupParser after parsing,
since this reportedly can destroy thread storage.

* emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
2011-09-03 23:59:25 +02:00
Paul Eggert
f4af5137d4 Add Bug#. 2011-09-02 22:32:13 -07:00
Paul Eggert
728f8f0a00 * fileio.c: Fix bugs with large file offsets.
The previous code assumed that file offsets (off_t values) fit in
EMACS_INT variables, which is not true on typical 32-bit hosts.
The code messed up by falsely reporting buffer overflow in cases
such as (insert-file-contents "big" nil 1 2) into an empty buffer
when "big" contains more than 2**29 bytes, even though this
inserts just one byte and does not overflow the buffer.
(Finsert_file_contents): Store file offsets as off_t
values, not as EMACS_INT values.  Check for overflow when
converting between EMACS_INT and off_t.  When checking for
buffer overflow or for overlap, take the offsets into account.
Don't use EMACS_INT for small values where int suffices.
When checking for overlap, fix a typo: ZV was used where
ZV_BYTE was intended.
(Fwrite_region): Don't assume off_t fits into 'long'.
* buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
2011-09-02 22:23:17 -07:00
Paul Eggert
8666506ecd * src/doprnt.c (esnprintf): Remove. All uses removed.
Suggested by Chong Yidong in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9412#23>.
2011-09-01 07:44:49 -07:00
Paul Eggert
55e5faa189 Add a stub for snprintf, for ancient hosts lacking it.
* configure.in (snprintf): New check.
* nt/config.nt (HAVE_SNPRINTF): New macro.
* src/sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
2011-08-31 15:18:16 -07:00
Paul Eggert
e91caa6011 Merge from trunk. 2011-08-31 13:02:51 -07:00
Paul Eggert
61bfeeb79d Avoid the use of snprintf.
* font.c (APPEND_SNPRINTF): Remove.
(font_unparse_xlfd):
* xterm.c (x_io_error_quitter):
Use esnprintf, not snprintf.  That way, we don't have to worry
about porting to ancient platforms that lack snprintf.
(x_term_init): Use sprintf, not snprintf.
2011-08-30 22:50:49 -07:00