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

35868 commits

Author SHA1 Message Date
Dmitry Antipov
e197284d47 * font.c (font_list_entities): Do not add empty vector to font cache.
(font_matching_entity): Likewise.  If matching entity is found, insert
1-item vector with this entity instead of an entity itself (Bug#17125).
2014-10-03 07:46:53 +04:00
Eli Zaretskii
3d900a84e4 Fix bug #18584 with assertion violations while scrolling.
src/xdisp.c (move_it_by_lines): Call reseat_1 after moving the
 iterator backwards, to resync the bidi iterator.
2014-10-02 17:57:05 +03:00
Glenn Morris
801e7c232c ChangeLog whitespace trivia 2014-10-01 17:26:16 -07:00
Jan Djärv
335e9627ca * xfaces.c (Finternal_set_lisp_face_attribute): Added FIXME comment. 2014-10-01 20:10:21 +02:00
Jan Djärv
e2e773b9e6 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
make a font_object from a tty frame.

Fixes: debbugs:18573
2014-10-01 19:41:18 +02:00
Eli Zaretskii
572fe798cd Fix creation of frames on MS-Windows: don't cons Lisp objects in input thread.
src/w32fns.c (w32_createwindow): Accept an additional argument, an
 array of 2 values specifying the coordinates of the frame's
 top-left corner.  Use these values instead of calling x_get_arg,
 which can cons Lisp objects, and therefore cannot be called except
 from the main thread.  Remove redundant tests for the default
 values.
 (my_create_window): Move the calculation of the coordinates of the
 frame's top-left edge here.  Pass them to the input thread via the
 second parameter of the WM_EMACS_CREATEWINDOW message.  See
 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
 for the details.
2014-09-30 16:53:24 +03:00
Paul Eggert
42d4302f24 Spelling fix. 2014-09-29 22:02:13 -07:00
Eli Zaretskii
5bb6d037f0 Fix bug #18545 with lack of scrolling a window when point goes out of view.
src/xdisp.c (cursor_row_fully_visible_p): Update commentary.
 (redisplay_window): Treat the frame's frozen_window_starts flag
 the same way as the optional_new_start flag for the window: only
 obey it if the glyph row showing point will be fully visible.
 Likewise when the window start is in a continuation line.  If,
 after trying everything under the 'force_start' label, point is
 still not fully visible, give up and scroll the window.  Add
 debugging traces.
 src/window.c (Frecenter): Set the window's redisplay flag.
2014-09-29 22:10:28 +03:00
Eli Zaretskii
a45a7f5d1a Fix bug #18528 with crashes at startup during frameset restoration.
src/w32term.c (w32_read_socket): Don't use frame dimensions for
 resizing if GetClientRect returned an empty (0, 0, 0, 0)
 rectangle.  Check the return value of GetClientRect, and don't use
 the results if it didn't succeed.
 src/dispnew.c (change_frame_size_1): Recompute the frame dimensions
 in columns and lines after correcting the pixel dimensions in
 check_frame_size.
 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
 negative values to xrealloc.
2014-09-24 10:31:11 +03:00
Dmitry Antipov
fc5ebc3f49 On OSX, do not free font-specific data more than once (Bug#18501).
* macfont.m (macfont_close): Release and free font-specific data
only if it wasn't previously freed.
2014-09-22 09:34:05 +04:00
David Caldwell
63126683db * configure.ac: Increase headerpad_extra to 1000, update the comment
about load commands.

* src/unexmacosx.c (dump_it): Improve error message.

Fixes: debbugs:18505
2014-09-21 22:35:22 +02:00
Juri Linkov
3a449b759c * src/image.c (imagemagick_load_image): Add delay to imagemagick metadata.
(Bug#10747, bug#18334)
2014-09-18 23:59:55 +03:00
Eli Zaretskii
41932b21a2 Clarify the doc strings of mouse-position and set-mouse-position.
src/frame.c (Fmouse_position, Fset_mouse_position): Clarify the
 units in which the position is measured.  (Bug#18493)
2014-09-18 20:20:57 +03:00
Eli Zaretskii
a810675374 Fix bug #18490 with redisplay of other windows showing a narrowed buffer.
src/xdisp.c (redisplay_internal): Force redisplay of all windows
 that show a buffer whose narrowing has changed.
2014-09-18 18:10:33 +03:00
Eli Zaretskii
534f1f7cb6 Fix display of hollow-box and hbar cursors on r2L lines.
src/xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
 src/w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
 lines, draw the hollow-box and hbar cursors on the right side of
 cursor-glyph.  Thanks to Martin Rudalics <rudalics@gmx.at> for
 testing on X.
2014-09-16 18:53:36 +03:00
Eli Zaretskii
c20b4c2de5 Fix block cursor display in R2L lines.
src/xterm.c (x_draw_stretch_glyph_string):
 src/w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
 caused the block cursor to disappear on a TAB in R2L lines in
 every window except the leftmost one.  Reported by Martin Rudalics
 <rudalics@gmx.at>.
2014-09-16 18:44:51 +03:00
Dmitry Antipov
005aff7092 Prefer ptrdiff_t to int and avoid integer overflows.
* fileio.c (make_temp_name):
* font.c (font_parse_family_registry): Avoid integer
overflow on string size calculation.
* data.c (Faset): Likewise for byte index.
2014-09-16 08:07:51 +04:00
Dmitry Antipov
ccb767d639 Always use matched specpdl entry to record call arguments (Bug#18473).
* lisp.h (record_in_backtrace): Adjust prototype.
* eval.c (record_in_backtrace): Return current specpdl level.
(set_backtrace_args, set_backtrace_nargs): Merge.  Adjust all users.
(eval_sub, Ffuncall): Record call arguments in matched specpdl
entry and use that entry in call to backtrace_debug_on_exit.
(apply_lambda): Likewise.  Get current specpdl level as 3rd arg.
(do_debug_on_call): Get current specpdl level as 2nd arg.
2014-09-16 08:04:56 +04:00
Eli Zaretskii
2d83441cc0 src/dispextern.h: Commentary fix. 2014-09-15 18:29:40 +03:00
Eli Zaretskii
6b682d2b39 Fix display of R2L lines in partial-width windows.
src/xdisp.c (init_iterator): Don't use it->bidi_p before it is
 assigned the correct value.
 (extend_face_to_end_of_line): Account for truncation and
 continuation glyphs in R2L rows when one of the fringes is not
 displayed.
 (display_line): Don't assign negative X offset to a row if we are
 going to produce a truncation glyph for it.  When handling
 truncated R2L rows, consider the width of the left fringe instead
 of the right one.
 (produce_special_glyphs): Fix bogus assignments.
2014-09-15 18:25:54 +03:00
Eli Zaretskii
9ed670023f Fix bug #18420 with deadlocks communicating with subprocess on MS-Windows.
src/w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of
 pipes.
 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
 set errno to EAGAIN instead, to allow the caller to retry the
 write after some waiting.  Fixes deadlocks when Emacs exchanges a
 lot of data through the pipe.
2014-09-14 18:18:39 +03:00
Eli Zaretskii
a6cc335aef Fix expansion and encoding of sound file names on MS-Windows.
src/sound.c (Fplay_sound_internal): Encode the sound file name in
 the ANSI codepage.  Expand it against data-directory, as per docs,
 not against the current directory.  No need to make a local copy
 of the file name; pass the encoded file name directly to
 do_play_sound.  (Bug#18463)
 src/w32.c (ansi_encode_filename): If w32_get_short_filename returns
 NULL, and the file name is not encodable in ANSI codepage, return
 the string with "?" replacement characters, which will fail the
 caller.  This avoids returning a random value in that case.
2014-09-13 11:26:44 +03:00
Martin Rudalics
6e49a66ad2 In Fresize_mini_window_internal set w->total_lines from w->pixel_height (Bug#18422).
* window.c (Fresize_mini_window_internal): Set w->total_lines
from w->pixel_height (Bug#18422).
2014-09-11 10:47:34 +02:00
Eli Zaretskii
7c2aaeb4f6 src/xdisp.c (pos_visible_p): Don't assign a boolean value to an int var. 2014-09-09 21:23:26 +03:00
Jan Djärv
b0fb34364b * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
(toggleFullScreen:): Take frame_resize_pixelwise into account when
setting resize increments.

Fixes: debbugs:18435
2014-09-09 19:46:28 +02:00
Eli Zaretskii
1acb1beff1 Fix the row number mistakenly reported by pos_visible_p in rare cases.
src/xdisp.c (pos_visible_p): Properly save and restore the iterator
 state around the call to line_bottom, since it can move the
 iterator to another screen line.  This fixes off-by-one errors in
 the reported row in some rare cases.
2014-09-09 18:04:35 +03:00
Eli Zaretskii
938aed6ef8 Fix bug #18419 with disappearing line numbers when minibuffer is resized.
src/dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
 always make sure the marginal areas of the row are in sync with
 what the window wants.
2014-09-07 20:16:36 +03:00
Eli Zaretskii
e97a29cbec Fix bug #18331 with "C-h k C-g" not showing documentation on Windows.
src/data.c (set_internal): Use assq_no_quit, not Fassq, to find an
 existing binding of a variable, to avoid silently aborting
 commands that use specbind.
2014-09-04 18:09:49 +03:00
Eli Zaretskii
f8c4cd6e05 src/sysdep.c (emacs_full_write): Fix a typo in a comment. 2014-09-03 21:13:45 +03:00
Eli Zaretskii
5735a30d59 Fix bug #18384 with incorrect reporting of row number by posn-col-row.
lisp/subr.el (posn-col-row): Revert the change from commit
 2010-11-13T21:07:58Z!eliz@gnu.org, which
 was inadvertently merged from emacs-23 release branch in 
2010-11-18T03:54:14Z!monnier@iro.umontreal.ca, and
 introduced an off-by-one error in the reported row when there is a
 header line.

 src/dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
 the reported row in the case of a window with a header line, by
 improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc.
2014-09-02 18:16:42 +03:00
Paul Eggert
7a930c3c4c * eval.c (internal_lisp_condition_case): Don't overrun the stack
when configured --with-wide-int on typical 32-bit platforms.
2014-09-01 23:29:01 -07:00
Eli Zaretskii
267a63b06d Fix cursor display on the fringe of R2L screen lines.
src/xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
 when HPOS is negative, for the benefit of R2L glyph rows whose
 newline overflows into the fringe.
2014-08-31 18:53:27 +03:00
Ken Brown
9f1b859600 * src/conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366) 2014-08-30 15:47:56 -04:00
Eli Zaretskii
74910c5d07 Fix bug #18339 with segfault when $ is typed into empty LaTeX buffer.
Back-ported from trunk revision-id: 2014-08-27T19:40:54Z!eliz@gnu.org

 src/syntax.c (scan_lists): Don't examine positions before BEGV.
2014-08-28 19:26:39 +03:00
Eli Zaretskii
825ca47f5a Fix unoptimized build on MSDOS.
msdos/sedlibmk.inp (gl_LIBOBJS): Add execinfo.o.  Reported by Juan
 Manuel Guerrero <juan.guerrero@gmx.de>.

 src/conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
2014-08-25 20:44:27 +03:00
Eli Zaretskii
73b7592be7 src/xdisp.c (handle_stop): Improve commentary. 2014-08-18 18:38:56 +03:00
Eli Zaretskii
82193f227e Fix bug #18276 with vertical motion through a display property.
src/indent.c (Fvertical_motion): Fix vertical motion up through a
 display property after a newline.
2014-08-18 18:34:49 +03:00
Eli Zaretskii
93e8e44e6f Avoid inflooping in redisplay caused by hscrolled R2L lines.
src/xdisp.c (display_line): Don't assume that the call to
 reseat_at_next_visible_line_start ends up at a character
 immediately following the newline on the previous line.  Avoids
 setting the ends_at_zv_p flag on screen lines that are not at or
 beyond ZV, which causes infloop in redisplay.  For the details, see
 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
2014-08-17 17:48:50 +03:00
Eli Zaretskii
f7abe0af30 Fix bug #18277 with mouse clicks on R2L lines.
src/dispnew.c (buffer_posn_from_coords): Fix mirroring of X
 coordinate for hscrolled R2L screen lines.
2014-08-17 17:34:05 +03:00
Ken Brown
2b0cb8b177 * src/gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use ERRORCHECK mutexes. (Bug#18222) 2014-08-11 11:25:08 -04:00
Glenn Morris
f314e84fce Revert 2013-01-31 change that decides coding system before backing up
It causes a more serious problem than the one it solves.
This closes bug#18141, and reopens bug#13522.

* lisp/files.el (basic-save-buffer-2): Revert 2013-01-31 change.

* src/fileio.c: Revert 2013-01-31 change.
(choose_write_coding_system): No longer callable from Lisp.
Move last piece back here from Fwrite_region.
(Fwrite_region, syms_of_fileio): Update for above changes.

* test/automated/data/files-bug18141.el.gz: New file.
* test/automated/files.el (files-test-bug-18141-file):
New variable and test.
2014-08-10 17:38:19 -07:00
Martin Rudalics
c70e7e185e Second attempt to fix some doc-strings in window.c.
* window.c (Fwindow_new_total, Fwindow_new_normal)
(Fwindow_new_pixel, Fset_window_new_pixel)
(Fset_window_new_total, Fset_window_new_normal): Second attempt
to fix the doc-strings of these functions.  See:
http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
2014-08-09 13:12:45 +02:00
Martin Rudalics
8faa5ee738 Fix some doc-strings in window.c (Bug#18112) (Bug#18194).
* window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
(Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
(Fwindow_new_pixel, Fset_window_new_pixel)
(Fset_window_new_total, Fset_window_new_normal)
(Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
2014-08-08 11:52:59 +02:00
Eli Zaretskii
8db811eff1 Fix bug #18162 with assertion violations due to empty face cache.
src/fontset.c (Finternal_char_font): Recompute basic faces if the
 frame's face cache was cleared.
2014-08-07 18:18:10 +03:00
Eli Zaretskii
518edaef88 src/coding.c: Fix typos in comments and doc strings. 2014-08-06 20:37:22 +03:00
Dmitry Antipov
1d58ab89ca Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
* buffer.c (Fmake_indirect_buffer): Initialize undo list with the
base buffer's undo list.
2014-08-05 10:04:38 +04:00
Dmitry Antipov
a270fa7cf8 Fix bug with an attempt to select uninitialized frame (Bug#18161).
* xfns.c (Fx_create_frame): Move call to change_frame_size to
a section where Lisp evaluation is disabled.  This way a pointer
to uninitialized frame is not accessible from Lisp, which becomes
critical if following call to x_figure_window_size throws an error.
2014-08-03 11:19:43 +04:00
Paul Eggert
a98a91ac46 Fix bug with clang + directory_files_internal + GC.
* src/dired.c (directory_files_internal): Use a volatile variable
to prevent the compiler from optimizing away all copies of a local.
I wonder how many other GC-related bugs like this lurk elsewhere?

Fixes: debbugs:16986
2014-08-02 15:58:09 -07:00
Paul Eggert
7f0ff25b7a Avoid 100% CPU utilization on ssh session exit.
* src/xterm.h (struct x_display_info): New member 'connection'.
* src/xterm.c (x_term_init, x_delete_terminal): Set and use it,
so that x_delete_terminal has a file descriptor to pass to
delete_keyboard_wait_descriptor.

Fixes: debbugs:17691
2014-08-02 14:31:18 -07:00
Eli Zaretskii
a1767506c0 Fix display of R2L lines when the last character fits only partially.
See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
 for the details.
 src/xdisp.c (extend_face_to_end_of_line): If the last glyph of an
 R2L row is visible only partially, give the row a negative x
 offset.
 (display_line): Fix the calculation of the glyph whose pixel width
 is used to decide whether the last produced glyph fits on the
 line.  When the last glyph fits only partially, give the row a
 negative x offset.
2014-08-01 12:39:04 +03:00