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.
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.
Fixes: debbugs:18232
* window.el (display-buffer-below-selected): Restore original
behavior if buffer is already displayed in the window below the
selected one (Bug#18181).
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.
* 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.
* 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
* 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
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.
src/xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
pixel width of the first glyph that is hscrolled from display.
(display_line): In R2L glyph rows, don't give a negative offset to
row->x when the first glyph begins before first_visible_x.
src/xdisp.c (display_line): If called with iterator set up to write
to a marginal area, delay the call to handle_line_prefix until we
switch back to the text area.
* todo-mode.texi (Marked Items): Correct omission of item deletion
from commands applying to both todo and done items.
* calendar/todo-mode.el: Fix handling of marked items and make
minor code improvements.
(todo-edit-item): If there are marked items, ensure user can only
invoke editing commands that work with marked items.
(todo-edit-item--text): When there are marked items, make it a
noop if invoked with point not on an item; otherwise, ensure it
applies only to item at point.
(todo-item-undone): If there are marked not-done items, return
point to its original position before signaling user error.
(todo--user-error-if-marked-done-item): New function.
(todo-edit-item--header, todo-edit-item--diary-inclusion)
(todo-item-done): Use it.