Commit 3cc0c060 authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from emacs-24; up to 2014-06-27T16:27:08Z!rgm@gnu.org

parents 308cc448 a270fa7c
......@@ -5226,7 +5226,7 @@ Overrides `diary-goto-entry'."
(defun todo--user-error-if-marked-done-item ()
"Signal user error on marked done items.
Helper funtion for editing commands that only apply to (possibly
Helper function for editing commands that apply only to (possibly
marked) not done todo items."
(save-excursion
(save-restriction
......
2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
Fix bug with clang + directory_files_internal + GC (Bug#16986).
* 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?
Avoid 100% CPU utilization on ssh session exit (Bug#17691).
* xterm.h (struct x_display_info): New member 'connection'.
* 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.
Don't mishandle year-9999 dates (Bug#18176).
* editfns.c (decode_time_components): Store an invalid timespec
on overflow, instead of returning false, so that the caller can
......
......@@ -150,6 +150,12 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
Lisp_Object w32_save = Qnil;
#endif
/* Don't let the compiler optimize away all copies of DIRECTORY,
which would break GC; see Bug#16986. Although this is required
only in the common case where GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS,
it shouldn't break anything in the other cases. */
Lisp_Object volatile directory_volatile = directory;
/* Because of file name handlers, these functions might call
Ffuncall, and cause a GC. */
list = encoded_directory = dirfilename = Qnil;
......@@ -325,6 +331,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
list = Fsort (Fnreverse (list),
attrs ? Qfile_attributes_lessp : Qstring_lessp);
(void) directory_volatile;
RETURN_UNGCPRO (list);
}
......
......@@ -10815,6 +10815,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
dpyinfo->name_list_element = Fcons (display_name, Qnil);
dpyinfo->display = dpy;
dpyinfo->connection = ConnectionNumber (dpyinfo->display);
/* Set the name of the terminal. */
terminal->name = xlispstrdup (display_name);
......@@ -11267,7 +11268,6 @@ void
x_delete_terminal (struct terminal *terminal)
{
struct x_display_info *dpyinfo = terminal->display_info.x;
int connection = -1;
/* Protect against recursive calls. delete_frame in
delete_terminal calls us back when it deletes our last frame. */
......@@ -11286,8 +11286,6 @@ x_delete_terminal (struct terminal *terminal)
and dpyinfo->display was set to 0 to indicate that. */
if (dpyinfo->display)
{
connection = ConnectionNumber (dpyinfo->display);
x_destroy_all_bitmaps (dpyinfo);
XSetCloseDownMode (dpyinfo->display, DestroyAll);
......@@ -11329,11 +11327,12 @@ x_delete_terminal (struct terminal *terminal)
}
/* No more input on this descriptor. */
if (connection != -1)
delete_keyboard_wait_descriptor (connection);
if (0 <= dpyinfo->connection)
delete_keyboard_wait_descriptor (dpyinfo->connection);
/* Mark as dead. */
dpyinfo->display = NULL;
dpyinfo->connection = -1;
x_delete_display (dpyinfo);
unblock_input ();
}
......
......@@ -138,6 +138,9 @@ struct x_display_info
/* This says how to access this display in Xlib. */
Display *display;
/* A connection number (file descriptor) for the display. */
int connection;
/* This is a cons cell of the form (NAME . FONT-LIST-CACHE). */
Lisp_Object name_list_element;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment