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.
Fix bug #18195 with inaccurate results from window-screen-lines.

 lisp/simple.el (default-line-height): A floating-point value of
 line-spacing means a fraction of the default frame font's height,
 not of the font currently used by the 'default' face.  Truncate
 the pixel value, like the display engine does.
 (window-screen-lines): Use window-inside-pixel-edges for
 determining the window height in pixels.
src/coding.c: Fix typos in comments and doc strings.
* test/automated/Makefile.in (check-tar): Remove, no longer needed.

No need to merge this to trunk.
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.
* lisp/info.el (Info-mode-map): Override a global down-mouse-2 binding.
Fix typos in TUTORIAL.fr
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).
lisp/info.el (info): Doc fix.
* lisp/mouse.el (mouse--down-1-maybe-follows-link): Don't convert the down
event.
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
In display-buffer-below-selected reuse window below selected if it shows buffer already (Bug#18181).

* window.el (display-buffer-below-selected): Restore original
behavior if buffer is already displayed in the window below the
selected one (Bug#18181).
Fix handling of menu bar line on TTY frames (Bug#18136) (Bug#18196).

* dispnew.c (handle_window_change_signal):
* keyboard.c (Fsuspend_emacs): Call change_frame_size with
frame's menu bar lines subtracted from height.
* frame.c (frame_inhibit_resize): Inhibit resizing of TTY
frames.
(adjust_frame_size): Count in menu bar when setting FrameRows.
(make_terminal_frame): When setting up the frame's lines and
text height don't count in the menu bar.
(Fmake_terminal_frame): Call adjust_frame_size with menu bar
lines subtracted from height.
(do_switch_frame): Set tty's FrameRows to number of total lines
of frame.
(Fframe_pixel_height, Fframe_pixel_width): If no window system
is used, return total number of lines and columns.
* menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
of FRAME_LINES.
* term.c (OUTPUT, tty_set_terminal_modes)
(tty_set_terminal_window, tty_set_scroll_region)
(tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
(tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use
FRAME_TOTAL_LINES instead of FRAME_LINES.
(Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
Call change_frame_size with frame's menu bar lines subtracted
from height.
* w32console.c (w32con_clear_to_end, w32con_clear_frame)
(w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
FRAME_LINES.
Make doc-string of window-total-size more self-contained.

* window.el (window-total-size): Make doc-string more
self-contained.
config.bat: fix some confusing wording
Fix a couple of recent inadvertent breaks of the MSDOS port.

src/msdos.c: include required menu.h
src/term.c: set correct menu_show_hook on MSDOS.
iCalendar export: Enumerate evaluated sexp diary entries (Bug#7911).

2014-08-10  Ulf Jasper  <ulf.jasper@web.de>

	Enumerate evaluated sexp diary entries (Bug#7911).

	* calendar/icalendar.el (icalendar-export-sexp-enumerate-all)
	(icalendar-export-sexp-enumeration-days): New
	(icalendar-export-region): `icalendar--convert-to-ical' now
	returns a cons cell or a list of cons cells.
	(icalendar--convert-to-ical): Take care of
	`icalendar-export-sexp-enumerate-all'. Return (a list of) cons
	cells.
	(icalendar--convert-ordinary-to-ical),
	(icalendar--convert-weekly-to-ical),
	(icalendar--convert-yearly-to-ical),
	(icalendar--convert-block-to-ical),
	(icalendar--convert-block-to-ical),
	(icalendar--convert-float-to-ical),
	(icalendar--convert-cyclic-to-ical),
	(icalendar--convert-anniversary-to-ical): Return cons cell.
	(icalendar--convert-sexp-to-ical): Enumerate evaluated sexp
	entries. Return (list of) cons cells.

2014-08-10  Ulf Jasper  <ulf.jasper@web.de>

	Enumerate evaluated sexp diary entries (Bug#7911).

	* automated/icalendar-tests.el
	(icalendar--convert-anniversary-to-ical),
	(icalendar--convert-cyclic-to-ical),
	(icalendar--convert-block-to-ical),
	(icalendar--convert-yearly-to-ical),
	(icalendar--convert-weekly-to-ical),
	(icalendar--convert-ordinary-to-ical): Returns cons cell now.
	(icalendar--convert-to-ical),
	(icalendar--convert-sexp-to-ical): New tests.
Don't prevent random file systems from being unmounted.

This fix relies on having the 'fchdir' function, and on having
"." be searchable (or at least readable, on platforms lacking O_SEARCH),
but that's good enough to handle the vast majority of cases and the
remaining folks can just live with the annoyance of file systems
that occasionally can't be unmounted.
* configure.ac (fchdir): New function to check for.
* lib/save-cwd.c: Copy from gnulib, except omit the part that
allocates memory, since that can cause problems in Emacs.
* lib/save-cwd.h: Copy from gnulib.
Simplify previous patch.
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.