diff options
| author | Glenn Morris | 2014-11-08 10:21:38 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-11-08 10:21:38 -0800 |
| commit | 416148257afedb97bbe6d732eea3a0c72473dab0 (patch) | |
| tree | 959013e867de73a5ad27e013a1637119833e7856 /src | |
| parent | 97cd730164baf67617e1031730105523315c068f (diff) | |
| parent | 86b1c771e14efcc98f8fe07510a4238bf94ced7b (diff) | |
| download | emacs-416148257afedb97bbe6d732eea3a0c72473dab0.tar.gz emacs-416148257afedb97bbe6d732eea3a0c72473dab0.zip | |
Merge from emacs-24; up to 117687
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/callproc.c | 8 | ||||
| -rw-r--r-- | src/dired.c | 5 | ||||
| -rw-r--r-- | src/nsterm.m | 14 | ||||
| -rw-r--r-- | src/syntax.c | 2 | ||||
| -rw-r--r-- | src/xgselect.c | 18 |
6 files changed, 58 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f8ed3b36dde..e3f34e27dfc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2014-11-08 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * nsterm.m (run): Only use non-system event loop if OSX version is | ||
| 4 | exactly 10.9 (Bug#18993). | ||
| 5 | |||
| 6 | 2014-11-08 Michael Albinus <michael.albinus@gmx.de> | ||
| 7 | |||
| 8 | * callproc.c (encode_current_directory): Support handling of file | ||
| 9 | names prepended by "/:". (Bug#18891) | ||
| 10 | |||
| 11 | 2014-11-08 Alan Mackenzie <acm@muc.de> | ||
| 12 | |||
| 13 | * syntax.c (back_comment): Fix off-by-one error (bug#18022). | ||
| 14 | |||
| 15 | 2014-11-08 Dima Kogan <dima@secretsauce.net> | ||
| 16 | |||
| 17 | * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861). | ||
| 18 | |||
| 19 | 2014-11-08 Michael Albinus <michael.albinus@gmx.de> | ||
| 20 | |||
| 21 | * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name | ||
| 22 | raises an error. (Bug#18891) | ||
| 23 | |||
| 1 | 2014-11-08 Martin Rudalics <rudalics@gmx.at> | 24 | 2014-11-08 Martin Rudalics <rudalics@gmx.at> |
| 2 | 25 | ||
| 3 | * frame.c (adjust_frame_size): Call x_set_window_size only if | 26 | * frame.c (adjust_frame_size): Call x_set_window_size only if |
diff --git a/src/callproc.c b/src/callproc.c index e3dcc7bbcca..24b88551851 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -127,6 +127,14 @@ encode_current_directory (void) | |||
| 127 | 127 | ||
| 128 | dir = expand_and_dir_to_file (dir, Qnil); | 128 | dir = expand_and_dir_to_file (dir, Qnil); |
| 129 | 129 | ||
| 130 | if (NILP (Ffile_accessible_directory_p (dir))) | ||
| 131 | report_file_error ("Setting current directory", | ||
| 132 | BVAR (current_buffer, directory)); | ||
| 133 | |||
| 134 | /* Remove "/:" from dir. */ | ||
| 135 | if (! NILP (Fstring_match (build_string ("^/:"), dir, Qnil))) | ||
| 136 | dir = Fsubstring (dir, make_number (2), Qnil); | ||
| 137 | |||
| 130 | if (STRING_MULTIBYTE (dir)) | 138 | if (STRING_MULTIBYTE (dir)) |
| 131 | dir = ENCODE_FILE (dir); | 139 | dir = ENCODE_FILE (dir); |
| 132 | if (! file_accessible_directory_p (dir)) | 140 | if (! file_accessible_directory_p (dir)) |
diff --git a/src/dired.c b/src/dired.c index ba6a61a2f5b..8afba247e61 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -909,7 +909,10 @@ so last access time will always be midnight of that day. */) | |||
| 909 | Lisp_Object encoded; | 909 | Lisp_Object encoded; |
| 910 | Lisp_Object handler; | 910 | Lisp_Object handler; |
| 911 | 911 | ||
| 912 | filename = Fexpand_file_name (filename, Qnil); | 912 | filename = internal_condition_case_2 (Fexpand_file_name, filename, Qnil, |
| 913 | Qt, Fidentity); | ||
| 914 | if (!STRINGP (filename)) | ||
| 915 | return Qnil; | ||
| 913 | 916 | ||
| 914 | /* If the file name has special constructs in it, | 917 | /* If the file name has special constructs in it, |
| 915 | call the corresponding file handler. */ | 918 | call the corresponding file handler. */ |
diff --git a/src/nsterm.m b/src/nsterm.m index c8ad50ef339..216678357e7 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -4501,15 +4501,15 @@ ns_term_shutdown (int sig) | |||
| 4501 | #ifdef NS_IMPL_COCOA | 4501 | #ifdef NS_IMPL_COCOA |
| 4502 | - (void)run | 4502 | - (void)run |
| 4503 | { | 4503 | { |
| 4504 | #ifndef NSAppKitVersionNumber10_8 | 4504 | #ifndef NSAppKitVersionNumber10_9 |
| 4505 | #define NSAppKitVersionNumber10_8 1187 | 4505 | #define NSAppKitVersionNumber10_9 1265 |
| 4506 | #endif | 4506 | #endif |
| 4507 | 4507 | ||
| 4508 | if (NSAppKitVersionNumber <= NSAppKitVersionNumber10_8) | 4508 | if ((int)NSAppKitVersionNumber != NSAppKitVersionNumber10_9) |
| 4509 | { | 4509 | { |
| 4510 | [super run]; | 4510 | [super run]; |
| 4511 | return; | 4511 | return; |
| 4512 | } | 4512 | } |
| 4513 | 4513 | ||
| 4514 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 4514 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
| 4515 | 4515 | ||
diff --git a/src/syntax.c b/src/syntax.c index 9f5ef754e2a..dc84ca69fb7 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -825,7 +825,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, | |||
| 825 | { | 825 | { |
| 826 | from = comment_end; | 826 | from = comment_end; |
| 827 | from_byte = comment_end_byte; | 827 | from_byte = comment_end_byte; |
| 828 | UPDATE_SYNTAX_TABLE_FORWARD (comment_end - 1); | 828 | UPDATE_SYNTAX_TABLE_FORWARD (comment_end); |
| 829 | } | 829 | } |
| 830 | /* If comstart_pos is set and we get here (ie. didn't jump to `lossage' | 830 | /* If comstart_pos is set and we get here (ie. didn't jump to `lossage' |
| 831 | or `done'), then we've found the beginning of the non-nested comment. */ | 831 | or `done'), then we've found the beginning of the non-nested comment. */ |
diff --git a/src/xgselect.c b/src/xgselect.c index bf889a90e97..4e2d1c8db69 100644 --- a/src/xgselect.c +++ b/src/xgselect.c | |||
| @@ -55,19 +55,28 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, | |||
| 55 | GPollFD *gfds = gfds_buf; | 55 | GPollFD *gfds = gfds_buf; |
| 56 | int gfds_size = ARRAYELTS (gfds_buf); | 56 | int gfds_size = ARRAYELTS (gfds_buf); |
| 57 | int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1; | 57 | int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1; |
| 58 | int i, nfds, tmo_in_millisec; | 58 | bool context_acquired = false; |
| 59 | int i, nfds, tmo_in_millisec = -1; | ||
| 59 | bool need_to_dispatch; | 60 | bool need_to_dispatch; |
| 60 | USE_SAFE_ALLOCA; | 61 | USE_SAFE_ALLOCA; |
| 61 | 62 | ||
| 62 | context = g_main_context_default (); | 63 | context = g_main_context_default (); |
| 64 | context_acquired = g_main_context_acquire (context); | ||
| 65 | /* FIXME: If we couldn't acquire the context, we just silently proceed | ||
| 66 | because this function handles more than just glib file descriptors. | ||
| 67 | Note that, as implemented, this failure is completely silent: there is | ||
| 68 | no feedback to the caller. */ | ||
| 63 | 69 | ||
| 64 | if (rfds) all_rfds = *rfds; | 70 | if (rfds) all_rfds = *rfds; |
| 65 | else FD_ZERO (&all_rfds); | 71 | else FD_ZERO (&all_rfds); |
| 66 | if (wfds) all_wfds = *wfds; | 72 | if (wfds) all_wfds = *wfds; |
| 67 | else FD_ZERO (&all_wfds); | 73 | else FD_ZERO (&all_wfds); |
| 68 | 74 | ||
| 69 | n_gfds = g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, | 75 | n_gfds = (context_acquired |
| 70 | gfds, gfds_size); | 76 | ? g_main_context_query (context, G_PRIORITY_LOW, &tmo_in_millisec, |
| 77 | gfds, gfds_size) | ||
| 78 | : -1); | ||
| 79 | |||
| 71 | if (gfds_size < n_gfds) | 80 | if (gfds_size < n_gfds) |
| 72 | { | 81 | { |
| 73 | SAFE_NALLOCA (gfds, sizeof *gfds, n_gfds); | 82 | SAFE_NALLOCA (gfds, sizeof *gfds, n_gfds); |
| @@ -152,6 +161,9 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, | |||
| 152 | errno = pselect_errno; | 161 | errno = pselect_errno; |
| 153 | } | 162 | } |
| 154 | 163 | ||
| 164 | if (context_acquired) | ||
| 165 | g_main_context_release (context); | ||
| 166 | |||
| 155 | /* To not have to recalculate timeout, return like this. */ | 167 | /* To not have to recalculate timeout, return like this. */ |
| 156 | if ((our_fds > 0 || (nfds == 0 && tmop == &tmo)) && (retval == 0)) | 168 | if ((our_fds > 0 || (nfds == 0 && tmop == &tmo)) && (retval == 0)) |
| 157 | { | 169 | { |