Stefan Monnier [Thu, 15 Aug 2013 17:21:19 +0000 (13:21 -0400)]
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Put point on the
previous line.
(debugger-eval-expression, debugger-record-expression):
Use read--expression (bug#15102).
Paul Eggert [Thu, 15 Aug 2013 16:28:42 +0000 (09:28 -0700)]
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.
(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.
Eli Zaretskii [Thu, 15 Aug 2013 15:20:03 +0000 (18:20 +0300)]
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.
Dmitry Antipov [Thu, 15 Aug 2013 14:52:53 +0000 (18:52 +0400)]
* 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.
Dmitry Antipov [Thu, 15 Aug 2013 05:23:40 +0000 (09:23 +0400)]
* 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.
Dmitry Antipov [Wed, 14 Aug 2013 16:36:16 +0000 (20:36 +0400)]
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.
lisp/frameset.el: Allow orphaned minibufferless frames.
(frameset-filter-minibuffer): Deal with the case that the minibuffer
parameter was already set in FILTERED. Doc fix.
(frameset--record-minibuffer-relationships): Allow saving a
minibufferless frame without its corresponding minibuffer frame.
(frameset--reuse-frame): Accept a match from an orphaned minibufferless
frame, if the frame id matches.
(frameset--minibufferless-last-p): Sort non-orphaned minibufferless
frames before orphaned ones.
(frameset-restore): Warn about orphaned windows, instead of error out.
Martin Rudalics [Wed, 14 Aug 2013 09:14:32 +0000 (11:14 +0200)]
Fix some issues in window.el.
* window.el (window-make-atom): Don't overwrite parameter
already present.
(display-buffer-in-atom-window): Handle special case where we
split an already atomic window.
(window--major-non-side-window, display-buffer-in-side-window)
(window--side-check): Ignore minibuffer window when walking
window tree.
(window-deletable-p): Return 'frame only if no other frame uses
our minibuffer window.
(record-window-buffer): Run buffer-list-update-hook.
(split-window): Make sure window--check-frame won't destroy an
existing atomic window in case the new window gets nested
inside.
(display-buffer-at-bottom): Ignore minibuffer window when
walking window tree. Don't split a side window.
(pop-to-buffer): Don't set-buffer here, the select-window call
should do that.
(mouse-autoselect-window-select): Autoselect only if we are in the
text portion of the window.
Dmitry Antipov [Wed, 14 Aug 2013 07:25:45 +0000 (11:25 +0400)]
* 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.
Dmitry Antipov [Wed, 14 Aug 2013 04:27:32 +0000 (08:27 +0400)]
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.
Dmitry Antipov [Wed, 14 Aug 2013 04:07:14 +0000 (08:07 +0400)]
* 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.
Daniel Hackney [Wed, 14 Aug 2013 00:56:58 +0000 (20:56 -0400)]
* package-test.el: Remove tar-package-building functions. Tar file
used for testing is included in the repository.
(package-test-install-texinfo, package-test-cleanup-built-files): Remove.