1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 11:21:04 -08:00
Commit graph

31933 commits

Author SHA1 Message Date
Chong Yidong
51751aa26f Merge changes from emacs-23 branch 2011-08-30 18:43:43 -04:00
Chong Yidong
6e20a0d47c Fix syntax scanning bug causing fontification crashes.
* src/syntax.c (find_defun_start): Update all cache variables if
exiting early.

Fixes: debbugs:9401
2011-08-30 18:38:07 -04:00
Eli Zaretskii
f6cfbd8f9d src/image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings. 2011-08-30 21:15:53 +03:00
Eli Zaretskii
148ae00e30 Fix bug #9402 with :align-to on TTY frames.
src/xdisp.c (produce_stretch_glyph): No longer static, compiled also
 when HAVE_WINDOW_SYSTEM is not defined.  Support both GUI and TTY
 frames.  Call tty_append_glyph in the TTY case.  (Bug#9402)
 src/term.c (tty_append_glyph): New function.
 (produce_stretch_glyph): Static function and its prototype deleted.
 src/dispextern.h (produce_stretch_glyph, tty_append_glyph): Add
 prototypes.
2011-08-30 20:32:44 +03:00
Paul Eggert
c4a07a4ce7 * 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 20:34:25 -07:00
Johan Bockgård
6bc8cd6546 * src/term.c (init_tty) [HAVE_GPM]: Move mouse settings after set_tty_hooks. 2011-08-28 22:45:55 +02:00
Eli Zaretskii
dca4927e8b Fix vertical cursor motion from start of R2L lines in L2R paragraphs.
src/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 21:11:49 +03:00
Eli Zaretskii
b75258b328 src/bidi.c: Rearrange commentary to bidi_fetch_char. 2011-08-27 15:18:27 +03:00
Paul Eggert
f2cad7739d * 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 00:07:32 -07:00
Juanma Barranquero
0cae2cdbb3 src/makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h. 2011-08-27 03:42:00 +02:00
Paul Eggert
5fc295a42f Merge from trunk. 2011-08-26 09:13:07 -07:00
Eli Zaretskii
c11821d4e1 Fix bug #9324 with unwarranted repositioning of point.
src/xdisp.c (redisplay_window): Don't force window start if point
 will be invisible in the resulting window.
2011-08-26 13:07:06 +03:00
Paul Eggert
a974cdce9b Merge from trunk. 2011-08-25 12:06:56 -07:00
Eli Zaretskii
e25be79236 Fix last change for text terminals.
src/xdisp.c (try_cursor_movement): Don't advance `row' beyond the
 last row of the window.
2011-08-25 20:16:39 +03:00
Eli Zaretskii
fee65a97c0 Fix cursor motion with long continued lines near window bottom.
src/xdisp.c (try_cursor_movement): Check for the need to scroll more
 accurately, and prefer exact match for point under bidi.
2011-08-25 19:33:16 +03:00
Eli Zaretskii
0c95fcf739 Handle `(space ...)' display spec as paragraph separator.
src/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.
 src/dispextern.h (struct bidi_it): Rename the disp_prop_p member
 into disp_prop; all users changed.
 src/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.
 lisp/buff-menu.el (Buffer-menu-buffer+size): Remove calls to
 bidi-string-mark-left-to-right; they are unnecessary now.
 doc/lispref/display.texi (Specified Space): Mention that `space' specs
 influence bidi reordering.
 (Bidirectional Display): Explain how to use `(space . PROPS)' for
 separating fields with bidirectional content.
2011-08-25 13:45:33 +03:00
Chong Yidong
e4ed06f12b Delete record-buffer, and rename unrecord-buffer to bury-buffer-internal.
* lisp/window.el (bury-buffer, quit-window): Use bury-buffer-internal.

* src/buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
Change return value to nil.
(Frecord_buffer): Delete unused function.
2011-08-24 20:45:23 -04:00
Paul Eggert
011ba6eaac Merge from trunk. 2011-08-24 14:20:36 -07:00
Eli Zaretskii
8610fe8b84 Fix cursor movement in R2L text within L2R paragraphs.
src/xdisp.c (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.
2011-08-24 18:51:56 +03:00
Eli Zaretskii
5980d4c6db Fix current-bidi-paragraph-direction and its doc.
src/xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
 buffers, return left-to-right.
 doc/lispref/display.texi (Bidirectional Display): Document return value in
 buffers that are not bidi-reordered for display, and in unibyte
 buffers.
2011-08-24 14:49:54 +03:00
Eli Zaretskii
f67cdd7f25 Minor changes in bidi.c.
src/bidi.c (bidi_check_type): Use xassert.
 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
 members.
2011-08-24 10:46:00 +03:00
Stefan Monnier
963b492b63 * lisp/mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals
from process filters aren't reliably transmitted to the surrounding
accept-process-output.
(mpc-proc-check): New function.
(mpc-proc-sync): Use it

Fixes: debbugs:8293
2011-08-23 21:55:10 -04:00
Eli Zaretskii
bca633fb29 Followup for character properties in 2011-08-23T11:48:07Z!handa@m17n.org.
src/bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
 a character.
 admin/unidata/unidata-gen.el (unidata-prop-alist): Update the default
 values of bidi-class according to DerivedBidiClass.txt from the
 latest UCD.
 lisp/international/uni-bidi.el: Regenerated.
 doc/lispref/nonascii.texi (Character Properties): Document the values for
 unassigned codepoints.
2011-08-23 17:45:14 +03:00
Chong Yidong
4a5885a74a * src/nsfont.m (ns_otf_to_script): Fix typo. 2011-08-23 10:41:07 -04:00
Kenichi Handa
821ff7208c merge trunk 2011-08-23 20:49:03 +09:00
Kenichi Handa
0902a04edd Fix default values of character properties. 2011-08-23 20:48:07 +09:00
Eli Zaretskii
8ddde6516c Fix bug #8874 with recentering and header line under scroll-conservatively.
src/xdisp.c (redisplay_window): When computing centering_position,
 account for the height of the header line.
2011-08-23 13:35:47 +03:00
Eli Zaretskii
425cc014ac Fix crashes with completion and composed characters.
src/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.
2011-08-23 11:38:29 +03:00
Eli Zaretskii
1a2e6670cf Fix pos-visible-in-window-p for zero-column composed character.
src/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 10:01:25 +03:00
Stefan Monnier
8b76d6f8ea * src/cmds.c (Fself_insert_command): Mention post-self-insert-hook. 2011-08-22 23:09:59 -04:00
Eli Zaretskii
dac347dd4a Fix vertical cursor motion under bidi on auto-composed characters.
src/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 20:00:40 +03:00
Chong Yidong
e013fb340c Fix animated gif segfault and frame clearing bug.
* src/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.

Fixes: debbugs:9335
2011-08-21 22:34:23 -04:00
Chong Yidong
024a2d7611 * eval.c (Fcondition_case): Document `debug' symbol in error handler. 2011-08-20 17:22:46 -04:00
Chong Yidong
bd1ba3e824 * src/eval.c (Fsignal): Handle `debug' symbol in error handler.
Fixes: debbugs:9329
2011-08-20 17:17:06 -04:00
Andreas Schwab
220fdd2e79 Fix implicit declaration of kbd_on_hold_p
* keyboard.c: Include "process.h"
2011-08-19 17:58:27 +02:00
Paul Eggert
fe4496a6e2 Merge from trunk. 2011-08-19 07:28:36 -07:00
Eli Zaretskii
823564e519 Avoid a crash in mouse-highlight of Speedbar frames.
src/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.
2011-08-19 14:30:29 +03:00
Eli Zaretskii
54a1215bcc Fix bidi cursor motion when a line begins with a composed character.
src/xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
 a composition, take its buffer position from IT->cmp_it.charpos.
2011-08-19 13:18:40 +03:00
Paul Eggert
51f30bc52d * bidi.c (bidi_cache_shrink): update size after realloc 2011-08-18 23:58:42 -07:00
Paul Eggert
81f7c12e80 Fix comment. 2011-08-18 23:11:38 -07:00
Paul Eggert
2124ec92ff Merge from trunk. 2011-08-18 22:47:45 -07:00
Eli Zaretskii
0be6ee069e Protect the bidi iterator against zero bidi properties.
src/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'.
2011-08-18 21:46:02 +03:00
Paul Eggert
76667214e7 Merge from trunk. 2011-08-18 10:01:52 -07:00
Eli Zaretskii
9778ebccaa Fix bidi reordering around TAB characters covered by display properties.
src/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 19:09:40 +03:00
Andreas Schwab
156bffbe26 * src/process.c (Fnetwork_interface_list): Correctly determine buffer
size.
2011-08-18 17:33:22 +02:00
Paul Eggert
2fab839507 Merge from trunk. 2011-08-18 01:41:19 -07:00
Paul Eggert
d31850da41 * 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.
2011-08-18 01:37:41 -07:00
Chong Yidong
72ad093b97 Remove aborts from internal_condition_case*.
* src/eval.c (internal_condition_case, internal_condition_case_1)
(internal_condition_case_2, internal_condition_case_n): Remove
unnecessary aborts.

Fixes: debbugs:9081
2011-08-17 17:40:13 -04:00
Eli Zaretskii
35774242f9 Fix bug #9311 with loading on MS-Windows .elc files in root directories.
src/lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
 has no `load' handler, try opening the file locally.
2011-08-17 11:50:08 +03:00
Ken Brown
db76dd852e * src/gmalloc.c: Expand comment. 2011-08-16 16:31:32 -04:00