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.
Paul Eggert [Tue, 13 Aug 2013 21:17:09 +0000 (14:17 -0700)]
* 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.
Eli Zaretskii [Tue, 13 Aug 2013 18:01:18 +0000 (21:01 +0300)]
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.
Jan Djärv [Tue, 13 Aug 2013 15:45:43 +0000 (17:45 +0200)]
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.
Dmitry Antipov [Tue, 13 Aug 2013 15:29:25 +0000 (19:29 +0400)]
* 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.
Dmitry Antipov [Tue, 13 Aug 2013 14:45:58 +0000 (18:45 +0400)]
* 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.
Stefan Monnier [Tue, 13 Aug 2013 13:47:54 +0000 (09:47 -0400)]
* lisp/frameset.el (frameset--make): Rename constructor from make-frameset.
(frameset-p, frameset-valid-p): Don't autoload.
(frameset-valid-p): Use normal accessors.
Dmitry Antipov [Tue, 13 Aug 2013 12:13:04 +0000 (16:13 +0400)]
* window.h (struct window): Convert left_fringe_width
and right_fringe_width from Lisp_Objects to integers.
Adjust comment.
(WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
(WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
* window.c (wset_left_fringe_width, wset_right_fringe_width):
Remove.
(make_window): Initialize new integer fields to -1.
(Fsplit_window_internal): Use direct assignment.
(Fset_window_configuration, save_window_save): Convert
Lisp_Object to integer and back where appropriate.
(Fset_window_fringes): Adjust user. Return t if any fringe
was actually changed, and mention this in docstring.
Dmitry Antipov [Tue, 13 Aug 2013 08:58:15 +0000 (12:58 +0400)]
* nsfns.m (x_set_cursor_type):
* w32fns.c (x_set_cursor_type):
* xfns.m (x_set_cursor_type): Do not set cursor_type_changed here...
* xdisp.c (set_frame_cursor_types): ...but in common code.
Dmitry Antipov [Tue, 13 Aug 2013 08:18:11 +0000 (12:18 +0400)]
* font.c (clear_font_cache): New function, stripped from...
(Fclear_font_cache): ...here, which now uses the function
above. Adjust comment.
* font.h (clear_font_cache): Add prototype.
* xfaces.c (clear_face_cache): Use clear_font_cache.
Stefan Monnier [Tue, 13 Aug 2013 02:30:52 +0000 (22:30 -0400)]
* lisp/emacs-lisp/timer.el (timer--time-setter): New function.
(timer--time): Use it as gv-setter.
* lisp/emacs-lisp/gv.el (gv-define-simple-setter): Output warning when
setter is not a symbol.
Eli Zaretskii [Mon, 12 Aug 2013 19:48:04 +0000 (22:48 +0300)]
Fix zlib support on MS-Windows.
configure.ac (HAVE_ZLIB): Don't use -lz on MinGW.
src/decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
(Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
not yet initialized.
lisp/xml.el (xml-parse-tag-1): Use looking-at.
(This reverts change in 2013-08-11T00:07:48Z!lekktu@gmail.com, which breaks the test suite).
https://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00263.html
Eli Zaretskii [Mon, 12 Aug 2013 13:15:01 +0000 (16:15 +0300)]
Fix build with zlib on MS-Windows.
configure.ac (LIBZ): Comment on w32 peculiarities regarding LIBZ.
src/decompress.c [WINDOWSNT]: Include windows.h and w32.h.
(DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
define static variables that are pointers to zlib functions to be
dynamically loaded.
(init_zlib_functions) [WINDOWSNT]: New function.
(fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
New macros.
(Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
macros instead of invoking the zlib functions directly.
(syms_of_decompress): DEFSYM Qzlib_dll. Staticpro
Szlib_available_p.
lisp/term/w32-win.el (dynamic-library-alist): Add DLLs for zlib.