1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 20:00:46 -08:00
Commit graph

14584 commits

Author SHA1 Message Date
Eli Zaretskii
9aac592d88 Fix bug #17969 with vertical-motion through continuation lines with TABs.
src/xdisp.c (move_it_to): Adjust calculation of line_start_x to what
 x_produce_glyphs does when it generates a stretch glyph that
 represents a TAB.
2014-07-08 18:12:39 +03:00
Eli Zaretskii
546c26b394 Fix bug #17944 with pos-visible-in-window-p when there's image at window start.
src/xdisp.c (pos_visible_p): 	Fix condition for finding CHARPOS by the
 first call to move_it_to.
2014-07-05 12:53:50 +03:00
Eli Zaretskii
f2c74bf383 A better fix for bug #17942.
src/xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
 and there is a display property at that position, don't call
 move_it_to to move to a position before window start.
2014-07-05 11:24:07 +03:00
Eli Zaretskii
bf97132f83 Fix bug #17942 with pos-visible-in-window-p and image and BOB.
src/xdisp.c (pos_visible_p): If CHARPOS is at BEGV, and there is a
 display property at BEGV, don't call move_it_to to move to a
 position before BEGV.
2014-07-05 10:38:13 +03:00
Stefan Monnier
6246df666b * src/syntax.c (find_defun_start): Try the cache even
if !open_paren_in_column_0_is_defun_start.
(back_comment): If find_defun_start was pessimistic, use the
scan_sexps_forward result to improve the cache.

Fixes: debbugs:16526
2014-07-04 22:17:14 -04:00
Jan Djärv
8069993ef7 Backport from trunk.
* xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
only if xic_style calls for it.  This change allows Emacs to work
with ibus.  Also, don't leak resources if create_frame_xic fails,
and stop caching xic_style across different displays.
(supported_xim_styles): Make const.
(best_xim_style): Remove first parameter: it's always just
supported_xim_styles.  Change to look at supported_xim_styles
directly.

Fixes: debbugs:17928
2014-07-04 17:15:02 +02:00
Eli Zaretskii
5b5953c070 Fix bug #17905 with display of point in partially visible line at end of window.
src/xdisp.c (redisplay_window): If redisplay of a window ends up
 with point in a partially visible line at end of the window, make
 sure the amended position of point actually has smaller Y
 coordinate; if not, give up and scroll the display.
 src/window.c (window_scroll_pixel_based): When point ends up at the
 last fully visible line, don't let move_it_to stop at the left
 edge of the line and dupe us into thinking point is inside the
 scroll margin.
2014-07-04 16:22:04 +03:00
Eli Zaretskii
f0f34bc8b9 src/w32.c (network_interface_info): Make sure the argument is a Lisp string. 2014-07-04 10:40:08 +03:00
Eli Zaretskii
ff6e6a42fc Fix bug #17892 with mode/header line and display margins.
src/dispnew.c (prepare_desired_row): Accept 2 additional arguments:
 the window whose glyph row is being prepared and a flag whether it
 is for mode/header line.  Make sure the glyph row's marginal areas
 are in sync with what the window wants.
 src/xdisp.c (display_line, display_mode_line): Call
 prepare_desired_row with additional arguments, as appropriate.
 src/dispextern.h (prepare_desired_row): Adjust prototype.
 src/window.h: Improve commentary of the marginal columns.
2014-07-01 20:07:24 +03:00
Dmitry Antipov
39a61a22ed Fix ChangeLog entry 2014-07-01 18:51:26 +04:00
Dmitry Antipov
9714dfd285 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
caused by xw_popup_dialog in daemon mode (Bug#17891).
2014-07-01 12:07:32 +04:00
Dmitry Antipov
34ac10a87b * xfaces.c (init_frame_faces): Always realize basic faces (#Bug17889). 2014-07-01 11:30:33 +04:00
Eli Zaretskii
1e23f9f308 Fix bug #17875 with changing TTY frame size, then selecting new frame.
src/frame.c (do_switch_frame): When switching to another TTY frame,
 make sure FrameCols and FrameRows are in sync with the new frame's
 data.
2014-06-30 19:45:38 +03:00
Andreas Schwab
b084415e27 Fixes: debbugs:17865
* coding.c (encode_coding_utf_8): Correctly count produced_chars
also in unibyte case.
2014-06-28 09:24:01 +02:00
Glenn Morris
79577a9f9b ChangeLog fix 2014-06-25 16:48:41 -04:00
Glenn Morris
e147461d40 * src/puresize.h (BASE_PURESIZE): Bump by another 1K.
Fixes: debbugs:17846
2014-06-25 15:18:49 -04:00
Eli Zaretskii
53b15fa6dc Fix bug #17823 with vertical-motion in lines with line-prefix.
src/indent.c (Fvertical_motion): Move to the goal column, if any,
 with a single call to move_it_in_display_line, not in two calls.
 Doing this with two calls causes move_it_in_display_line apply the
 line-prefix handling twice instead of just once.
2014-06-21 15:30:02 +03:00
Eli Zaretskii
97a1ef484e Improve documentation of how vertical-motion interprets columns.
src/indent.c (Fvertical_motion): Doc fix.

 doc/lispref/positions.texi (Screen Lines): Clarify how columns are counted
 by vertical-motion.
2014-06-21 11:17:29 +03:00
Paul Eggert
d895e63e96 Port to OS X ACLs.
* fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
ACL_TYPE_ACCESS) doesn't work.

Fixes: debbugs:17810
2014-06-21 00:03:41 -07:00
Stefan Monnier
1503d26aa0 * src/keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
before checking key-translation-map.

Fixes: debbugs:17659
2014-06-18 23:48:18 -04:00
Dmitry Antipov
52a6194ff6 * font.c (font_make_object): Avoid dangling pointer which may
crash GC (Bug#17771).
2014-06-19 07:21:07 +04:00
Eli Zaretskii
b86b15b221 Fix bug #17790 with compilation against giflib 5.1.0 and later.
src/image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
 prototype of DGifCloseFile as appropriate for older and newer
 versions of giflib.
 (gif_close): New function, encapsulates the differences in the
 calling sequence of DGifCloseFile before v5.1.0 and after it.
 (gif_load): Call gif_close instead of DGifCloseFile.  Divulge the
 error string where appropriate.

 lisp/term/w32-win.el (dynamic-library-alist): Support giflib 5.1.0
 and later.
2014-06-18 18:15:52 +03:00
Eli Zaretskii
4f9dc9b61d A better fix for bug #17777 with visual-order cursor movement.
src/xdisp.c (Fmove_point_visually): Instead of testing for keyboard
 macro execution, make sure point didn't move since last complete
 redisplay, as the condition for using the glyph matrix
 information.
2014-06-16 22:38:28 +03:00
Eli Zaretskii
59579a97d8 Fix bug #17777 with keyboard macros and visual-order cursor movement.
src/xdisp.c (Fmove_point_visually): Don't use the glyph matrix
 information if we are in the middle of executing a keyboard macro,
 since redisplay doesn't update the screen until the macro is
 finished.
2014-06-14 14:09:10 +03:00
Eli Zaretskii
4346235f61 Attempt to fix bug #17771 with segfault if "C-h h" is interrupted.
src/alloc.c (cleanup_vector): Don't dereference a font driver
 pointer if it is NULL.
2014-06-13 16:53:24 +03:00
Eli Zaretskii
df907af0dd Fix bug #17744 with cursor motion near overlay string with 'cursor' prop.
src/xdisp.c (set_cursor_from_row): Fix an off-by-one error when
 matching overlay strings with 'cursor' property against buffer
 positions traversed in the glyph row.
2014-06-11 19:11:32 +03:00
Glenn Morris
6cbdfa0115 * src/fileio.c (write-region-inhibit-fsync): Doc tweak. 2014-06-07 17:59:05 -07:00
Glenn Morris
7b385b0201 Doc tweaks re < etc
* doc/lispref/numbers.texi (Comparison of Numbers): Copyedits.

* src/data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
2014-06-07 17:51:10 -07:00
Eli Zaretskii
6032a3e831 Fix infloop of -nw session at exit on MS-Windows under a debugger.
src/sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
 contains garbage on WINDOWSNT (which could potentially infloop at
 exit).
2014-06-04 13:54:58 +03:00
Eli Zaretskii
d13adf6ddc Attempt to solve bug #17497 by minimizing cursor motion during TTY menu updates.
src/term.c (tty_menu_display): Don't position cursor here.  Instead,
 pass the cursor coordinates to update_frame_with_menu.
 (tty_menu_activate): Send the hide cursor command only once in an
 iteration through the outer 'while' loop.
 src/dispnew.c (update_frame_1): Accept an additional argument
 SET_CURSOR_P, and position the cursor at the end of the frame
 update only if that argument is non-zero.  All callers changed to
 provide the additional argument as non-zero, except for
 update_frame_with_menu.
 (update_frame_with_menu): Accept 2 additional arguments ROW and
 COL; if they are non-negative, instruct update_frame_1 not to
 position the cursor, and instead position it according to ROW and
 COL.
 src/dispextern.h (update_frame_with_menu): Update prototype.
2014-06-04 12:16:46 +03:00
Stefan Monnier
c4e6b585bb * src/callproc.c (call_process): Don't check read-only if we don't insert
anything.

Fixes: debbugs:17666
2014-06-02 14:42:07 -04:00
Eli Zaretskii
834dee2099 src/dispnew.c (update_frame_with_menu): Set display_completed. 2014-06-02 19:53:02 +03:00
Paul Eggert
afca0e7590 * frame.c (x_set_frame_parameters): Don't read uninitialized storage. 2014-06-01 11:49:52 -07:00
Jan Djärv
a3d0b7d19d Make jump scroll work with Gtk+
* xterm.c (xg_scroll_callback): Remove position, for jump set portion
to min(value, whole).
2014-06-01 20:00:56 +02:00
Paul Eggert
bba89481ee Bring back the changes to GDB-visible symbols, but only on AIX.
And only if it's not pre-4.2 GCC.
* lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
(ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
New macros.
2014-06-01 00:06:28 -07:00
Eli Zaretskii
bc329caae6 Hopefully fix bug #16433 with corruption of newline_cache in Rmail.
src/fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
 with PT, not GPT.
2014-05-31 21:23:53 +03:00
Eli Zaretskii
2bbda049fb Revert revision 2014-05-27T17:31:17Z!eliz@gnu.org, as it breaks debugging with GCC 3.x.
Revert last changes to GDB-visible symbols.
 src/lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
 Delete macros.
2014-05-31 16:24:45 +03:00
Glenn Morris
5d335d4bd6 * src/cmds.c (Fself_insert_command): Allow zero repeat count.
Fixes: debbugs:17649
2014-05-30 19:53:29 -07:00
Paul Eggert
1915d8d63c Fix port to 32-bit AIX with xlc.
This doesn't fix Bug#17598, but it does fix a regression since Emacs
built with xlc until recently, and perhaps it'll help us fix Bug#17598.
* configure.ac (GC_SETJMP_WORKS): Define for AIX, too.
Merge from gnulib, incorporating:
2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
* lib/ftoastr.c: Update from gnulib.
* src/alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
* src/conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
* src/lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
to work around a compiler bug in IBM xlc 12.1.
2014-05-30 13:19:29 -07:00
Eli Zaretskii
60ae3d0993 Fix bug #17588 with mouse highlight when an X frame is redisplayed frequently.
src/xterm.c (x_update_window_end): Don't invalidate the entire
 mouse-highlight info, just signal frame_up_to_date_hook that mouse
 highlight needs to be redisplayed.
2014-05-29 19:47:49 +03:00
Paul Eggert
3c975a3307 Port the GDB-visible symbols to AIX.
Without them, GDB doesn't work to debug Emacs, since the AIX linker
optimizes away the relevant external symbols.  Use enums instead;
this suffices for the AIX port, which is 32-bit-only anyway.
* lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
(ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
New macros.
2014-05-28 22:31:43 -07:00
Paul Eggert
cf2f54c4e3 Include sources used to create macuvs.h.
* admin/unidata/IVD_Sequences.txt: New file.
* admin/unidata/Makefile.in (${top_srcdir}/src/macuvs.h): New rule.
(all): Build it.
(extraclean): Remove it.
* admin/unidata/README: Mention BidiMirroring.txt and IVD_Sequences.txt.
* admin/unidata/copyright.html: Update to current version from Unicode
Consortium.
* admin/unidata/uvs.el: Rename from admin/mac/uvs.el.
(uvs-print-table-ivd): Output a header in the form that
unidata-gen.el generates.
* lisp/international/README: Refer to the Unicode Terms of Use rather
than copying it bodily here, as that simplifies maintenance.
* src/Makefile.in ($(srcdir)/macuvs.h): New rule.
* src/macuvs.h: Use automatically-generated header.
2014-05-26 08:48:28 -07:00
Eli Zaretskii
285c68bcf5 Fix bug #17585 with incorrect vertical motion when linum-mode is on.
src/xdisp.c (move_it_in_display_line_to): Don't record wrap position
 if we are iterating over an object that generates glyphs for
 marginal areas.
2014-05-25 17:18:46 +03:00
Paul Eggert
2082742ed4 * xdisp.c (safe__call1, safe__eval): Now static. 2014-05-24 14:28:43 -07:00
Eli Zaretskii
376f53c544 Fix last commits in xdisp.c, which caused a crash at startup on w32.
src/xdisp.c (safe__call): Accept va_list argument instead of '...'.
 (safe_call, safe__call1): Construct a va_list argument for safe_call.
 (safe_call1): Call safe_call instead of safe__call directly.

Fixes: debbugs:17577
2014-05-24 22:19:27 +03:00
Ken Brown
791dd8e75b Fix bug#17510 with a pointer freed more than once (Cygwin-w32-build).
* src/w32term.c (x_delete_display) [CYGWIN]: Don't free
dpyinfo->w32_id_name, to make sure it doesn't get freed more than
once.
2014-05-24 13:59:22 -04:00
Stefan Monnier
3b1c420700 * src/xdisp.c: Bind inhibit-quit during pre-redisplay-function.
(safe__call, safe__call1, safe__eval): New functions.
(safe_call): Use it.
(prepare_menu_bars): Use it for pre-redisplay-function.
(display_mode_element): Same for `:eval'.

Fixes: debbugs:17577
2014-05-24 11:50:05 -04:00
Paul Eggert
4f4ec76fd6 Fix port to 32-bit AIX.
* configure.ac (opsys): On Power Architecture, treat release 7 of
AIX like releases 5 and 6.
* src/unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
twice.  _text already includes this offset.
(unrelocate_symbols): Don't cast 64-bit integer to pointer.

Fixes: debbugs:17540
2014-05-21 22:00:39 -07:00
Eli Zaretskii
5e2e0fa456 Fix bug #17539 with infinite recursion during scroll commands.
src/xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
 when closest_pos is identical to to_charpos, don't recurse, since
 we already tried that, and failed.
2014-05-21 18:03:18 +03:00
Eli Zaretskii
ebdc80316a Fix bug #17524 with crashes in creating a new frame with invalid font.
src/w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
 unwinding when frame's faces were not initialized yet, increment
 the frame's image-cache reference count before calling
 x_free_frame_resources.  Don't dereference
 dpyinfo->terminal->image_cache if it is NULL.
2014-05-20 19:28:39 +03:00