Commit graph

34823 commits

Author SHA1 Message Date
Paul Eggert
526e5233cc Spelling fixes. 2013-08-15 22:15:51 -07:00
Xue Fuqiao
de179a3e1e * src/editfns.c (insert_before_markers): Mention overlay in the doc string. 2013-08-16 10:09:08 +08:00
Xue Fuqiao
2bede2ed96 Remove documentation of undefined behavior.
* doc/lispref/positions.texi (Character Motion):
* doc/lispref/markers.texi (Moving Markers):
(Creating Markers): Comment out undefined behavior.

* src/marker.c (set_marker): Remove documentation of undefined behavior.
2013-08-16 08:20:56 +08:00
Lars Magne Ingebrigtsen
0f8a692622 Add comment. 2013-08-15 22:17:35 +02:00
Lars Magne Ingebrigtsen
1eade94342 Whitespace fixup. 2013-08-15 22:10:47 +02:00
Lars Magne Ingebrigtsen
7967001450 (imagemagick_compute_animated_image): Allow certain degenerate images
(imagemagick_compute_animated_image): Allow images that say they
have sub-images that are bigger than the main image, but just crop
them.
2013-08-15 21:46:02 +02:00
Lars Magne Ingebrigtsen
1d18b1e6ab (imagemagick_compute_animated_image): Fix animated segafault
(imagemagick_compute_animated_image): Setting the iterator row to
zero is apparently not allowed.
2013-08-15 20:47:28 +02:00
Lars Magne Ingebrigtsen
703dbebab0 image.c animation touchups
* image.c (imagemagick_compute_animated_image): Animate correctly
when sub-images are smaller than the main image.
2013-08-15 20:34:23 +02:00
Jan Djärv
63216c5ee1 * nsmenu.m (menuWillOpen:): Fix preprocessor test.
Fixes: debbugs:15001
2013-08-15 19:36:45 +02:00
Lars Magne Ingebrigtsen
6f94cbbcb5 (imagemagick_compute_animated_image): Clean up code slightly 2013-08-15 19:26:34 +02:00
Lars Magne Ingebrigtsen
a5b5f73f32 (imagemagick_compute_animated_image): Respect the GIF disposal methods. 2013-08-15 19:20:06 +02:00
Ken Brown
0fe73012cd Revert last change to gmalloc.c; update some comments. 2013-08-15 12:37:15 -04:00
Paul Eggert
691a357f3a Fix minor problems found by static checking.
* frame.c (delete_frame):
* xdisp.c (next_element_from_display_vector):
Avoid uninitialized local.
* image.c (imagemagick_compute_animated_image): Port to C89.
Prefer usual GNU indentation style for loops.
Be more careful about bizarrely large sizes, by using ptrdiff_t
instead of int.
2013-08-15 09:28:42 -07:00
Lars Magne Ingebrigtsen
f196836bc0 Further image.c compilation warning fixes 2013-08-15 18:03:56 +02:00
Lars Magne Ingebrigtsen
995be755ab (imagemagick_compute_animated_image): Implement a simple cache
(imagemagick_compute_animated_image): Fix some compilation
warnings.  Implement a very simple cache to make the animation
usable at all, but it should be replaced with a per-image cache.
2013-08-15 18:01:13 +02:00
Dmitry Antipov
42fe2e88d6 Fix infinite frame selection loop (Bug#15025).
* frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
2013-08-15 19:37:03 +04:00
Eli Zaretskii
0542623943 Fix bug #15099 with 'box' face attribute in display tables.
src/xdisp.c (next_element_from_display_vector): Support 'box' face attribute
 in the face definitions of a display vector.
2013-08-15 18:28:53 +03:00
Eli Zaretskii
d39a3da6f3 Fix bug #15090 with redisplay under linum-mode and visual-line-mode.
src/xdisp.c (compute_window_start_on_continuation_line): When
 WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
 to make sure we end up setting the window start at the leftmost
 visible character of the display line.  This avoids funky
 horizontal shifting because the window start is not kept on the
 same position.
2013-08-15 18:20:03 +03:00
Lars Magne Ingebrigtsen
6e856b69ff * image.c (imagemagick_compute_animated_image): Implement animated images.
Fixes: debbugs:14700
2013-08-15 17:10:12 +02:00
Dmitry Antipov
d5a1acfaa5 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
to do `for' loops over alist values.
* buffer.h (FOR_EACH_BUFFER):
* process.c (FOR_EACH_PROCESS): Use it.
(handle_child_signal, status_notify, Fget_buffer_process)
(kill_buffer_processes): Use FOR_EACH_PROCESS.
2013-08-15 18:52:53 +04:00
Dmitry Antipov
9c25330708 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
(tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
* image.c (make_image_cache): For struct image_cache, prefer xmalloc
to xzalloc and so avoid redundant call to memset.
* xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
members because it is allocated with xzalloc and so already zeroed.
2013-08-15 09:23:40 +04:00
Ken Brown
05e64f9f63 * src/gmalloc.c [CYGWIN]: Rename memalign (Bug#15094). 2013-08-14 15:09:51 -04:00
Dmitry Antipov
5b71542de3 Utility function and macro to copy Lisp string to C string.
* lisp.h (xlispstrdupa): New macro.
(xlispstrdup): New prototype.
* alloc.c (xlispstrdup): New function.
* callint.c (Fcall_interactively):
* fileio.c (Ffile_name_directory, Fexpand_file_name)
(Fsubstitute_in_file_name):
* frame.c (Fmake_terminal_frame): Use xlispstrdupa.
* image.c (x_create_bitmap_from_file):
* w32term.c (w32_term_init):
* xterm.c (x_term_init): Use xlispstrdup.
2013-08-14 20:36:16 +04:00
Xue Fuqiao
d48d97ee4a Refine previous change. 2013-08-14 22:02:46 +08:00
Xue Fuqiao
7510a061cb * src/marker.c (set_marker): Reformat documentation. 2013-08-14 21:58:25 +08:00
Lars Magne Ingebrigtsen
4ce82fb8d9 * image.c (imagemagick_load_image): Make animated pictures work.
There's still some problems with background color settings, though.

Fixes: debbugs:14700
2013-08-14 15:50:03 +02:00
Lars Magne Ingebrigtsen
71530c97bf * decompress.c (unwind_decompress): Always restore point. 2013-08-14 14:47:05 +02:00
Dmitry Antipov
94a4e898b6 * xdisp.c (redisplay_window): If window_end_valid is cleared due to
non-zero windows_or_buffers_changed, clear current_matrix_up_to_date_p
and so do not call to try_cursor_movement for that window.
2013-08-14 11:25:45 +04:00
Paul Eggert
aab1fcdf81 * xdisp.c (cursor_type_changed): Now static. 2013-08-14 00:05:54 -07:00
Paul Eggert
01c3051fc3 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
Use changed.  This avoids the need to call xmalloc and for the
caller to call xfree, and avoids memory leaks in some situations.
2013-08-14 00:00:25 -07:00
Dmitry Antipov
2084152aee * xdisp.c (adjust_window_ends): Move duplicated code to new function.
(try_window, try_window_reusing_current_matrix, try_window_id): Use it.
2013-08-14 10:06:56 +04:00
Dmitry Antipov
02455cb66a * window.h (struct window): Convert window_end_pos and
window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
(wset_window_end_pos, wset_window_end_vpos): Remove.
* dispnew.c (adjust_glyph_matrix):
* window.c (Fwindow_end, replace_window, set_window_buffer)
(make_window):
* xdisp.c (check_window_end, move_it_to, redisplay_internal)
(set_vertical_scroll_bar, redisplay_window, try_window)
(try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
(try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
(note_mouse_highlight): Adjust users.
(try_cursor_movement): Likewise.  Convert old precondition to eassert.
Add comment.
2013-08-14 09:41:48 +04:00
Dmitry Antipov
da5707e8ec Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
* image.c (imagemagick_filename_hint): Use `const char *' and
prefer SSDATA to SDATA to avoid warnings.
2013-08-14 08:27:32 +04:00
Dmitry Antipov
2555426703 Cleanup window fringes, margins and scroll bars adjustments.
* window.c (set_window_fringes, set_window_margins)
(set_window_scroll_bars, apply_window_adjustment): New functions.
(set_window_buffer, Fset_window_margins, Fset_window_fringes)
(Fset_window_scroll_bars): Use them.
2013-08-14 08:09:37 +04:00
Dmitry Antipov
38a2c91021 * window.h (struct window): Convert scroll_bar_width
from Lisp_Object to integer.  Adjust comment.
(WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
Adjust users.
* window.c (wset_scroll_bar_width): Remove.
(make_window): Initialize scroll_bar_width.
(Fsplit_window_internal): Use direct assignment.
(Fset_window_configuration, save_window_save):
Convert Lisp_Object to integer and back where appropriate.
(Fset_window_scroll_bars): Adjust user.  Return t if any scroll
bar was actually changed, and mention this in docstring.
2013-08-14 08:07:14 +04:00
Paul Eggert
2d065031e4 * decompress.c: Minor simplifications.
(Fzlib_decompress_region): Don't bother verifying
that avail_out <= UINT_MAX, as that was confusing.
Mention the restriction in a comment instead.
Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
2013-08-13 14:17:09 -07:00
Jan Djärv
a5bd5abb64 Fix OSX 10.4 compiler errors.
* nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
(trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
2013-08-13 22:18:30 +02:00
Lars Magne Ingebrigtsen
c6b7ccaaf6 Rename :content-type to :format in `create-image' 2013-08-13 22:13:02 +02:00
Lars Magne Ingebrigtsen
cfa1f436cb White-space cleanup. 2013-08-13 20:24:37 +02:00
Lars Magne Ingebrigtsen
66e7901a78 * image.c (imagemagick_filename_hint): Check for errors in the alist structure. 2013-08-13 20:22:04 +02:00
Eli Zaretskii
2fa611b72b Fix the Windows build broken by 2013-08-13T15:29:25Z!dmantipov@yandex.ru.
src/window.c (Fwindow_margins): Return nil when there's no marginal
 area, as per the documented API.
 src/w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
 Fmake_vector, as scroll bar's struct members are not all Lisp
 objects now.  This avoids crashes in GC.
 src/w32term.h (struct scroll_bar): Convert fringe_extended_p to a
 bool, so its address could be taken.
2013-08-13 21:01:18 +03:00
Lars Magne Ingebrigtsen
8259030d68 Enable giving hints to ImageMagick via :content-type
2013-08-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>

	* image.el (image-content-type-suffixes): New variable.

2013-08-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>

	* image.c (imagemagick_filename_hint): New function to possibly
	apply `image-content-type-suffixes'.
	(imagemagick_load_image): Use it.
2013-08-13 19:45:34 +02:00
Eli Zaretskii
866c710eeb Fail zlib-decompress-region if loading zlib on Windows failed.
src/decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
 if loading zlib failed.
2013-08-13 19:20:39 +03:00
Jan Djärv
96311be7a6 Fix NS compile breakage.
* nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
2013-08-13 checkin below.  Change bool to BOOL, rule is:
All Obj-C code uses BOOL, except for interfaces callable from C.
2013-08-13 17:45:43 +02:00
Jan Djärv
f10490f024 * nsterm.h: Fix CGFloat for OSX 10.4.
Fixes: debbugs:15086
2013-08-13 17:39:14 +02:00
Dmitry Antipov
c8ae93b089 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
* nsterm.m (ns_set_vertical_scroll_bar): Use it.  Use convenient
bool instead of BOOL.
* w32term.h (struct scroll_bar): Convert fringe_extended_p
from Lisp_Object to bitfield.  Adjust comment.
* w32term.c (x_scroll_bar_create): Adjust user.
Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
* xterm.c (XTset_vertical_scroll_bar): Likewise.
Use bool for boolean.
* xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
to `unsigned int' when defining a bitfield.
2013-08-13 19:29:25 +04:00
Paul Eggert
53b64418c2 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'. 2013-08-13 08:00:58 -07:00
Dmitry Antipov
eeaf9bf337 * window.h (struct window): Convert left_margin_cols and
right_margin_cols from Lisp_Objects to integers.  Adjust comment.
(WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
(WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
Adjust users.
* dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
Adjust comment.
(showing_window_margins_p, update_window_line, update_frame_1):
* fringe.c (draw_fringe_bitmap_1):
* xdisp.c (window_box_width): Adjust users.
* window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
(adjust_window_margins, set_window_buffer, Fsplit_window_internal):
Use direct assignment.
(Fset_window_configuration, save_window_save, Fwindow_margins):
Convert Lisp_Object to integer and back where appropriate.
(Fset_window_margins): Adjust user.  Return t if any margin
was actually changed, and mention this in docstring.
2013-08-13 18:45:58 +04:00
Xue Fuqiao
f73f4ce69f Doc fix for forward-word and backward-word.
* doc/lispref/positions.texi (Word Motion): Remove redundant sentence.
* lisp/simple.el (backward-word): Mention the optional argument.
* src/syntax.c (forward_word): Mention the optional argument.
2013-08-13 22:26:39 +08:00
Xue Fuqiao
956720afe4 * src/cmds.c (forward_char, backward_char): Mention the optional argument. 2013-08-13 22:09:12 +08:00