diff options
| author | Po Lu | 2021-12-04 20:34:08 +0800 |
|---|---|---|
| committer | Po Lu | 2021-12-04 20:34:08 +0800 |
| commit | f851e725b35d2ebd51b829059761a232d2ca1fbb (patch) | |
| tree | 72419831198f59a89e5bc9c6554b6866651273dd /src | |
| parent | 44ed0981535e1baf994b55ede7a975a03a69c960 (diff) | |
| parent | aa6681a51ad12e3fd8363febfbaacebe9dc06510 (diff) | |
| download | emacs-f851e725b35d2ebd51b829059761a232d2ca1fbb.tar.gz emacs-f851e725b35d2ebd51b829059761a232d2ca1fbb.zip | |
Merge remote-tracking branch 'origin/master' into feature/pgtk
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 2 | ||||
| -rw-r--r-- | src/nsfns.m | 45 | ||||
| -rw-r--r-- | src/xdisp.c | 11 |
3 files changed, 55 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c index d408cd1d71f..3ba3d572b05 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -10208,7 +10208,7 @@ DEF_DLL_FN (void, rsvg_handle_set_dpi_x_y, | |||
| 10208 | (RsvgHandle * handle, double dpi_x, double dpi_y)); | 10208 | (RsvgHandle * handle, double dpi_x, double dpi_y)); |
| 10209 | 10209 | ||
| 10210 | # if LIBRSVG_CHECK_VERSION (2, 52, 1) | 10210 | # if LIBRSVG_CHECK_VERSION (2, 52, 1) |
| 10211 | DEF_DLL_FN (void, rsvg_handle_get_intrinsic_size_in_pixels, | 10211 | DEF_DLL_FN (gboolean, rsvg_handle_get_intrinsic_size_in_pixels, |
| 10212 | (RsvgHandle *, gdouble *, gdouble *)); | 10212 | (RsvgHandle *, gdouble *, gdouble *)); |
| 10213 | # endif | 10213 | # endif |
| 10214 | # if LIBRSVG_CHECK_VERSION (2, 46, 0) | 10214 | # if LIBRSVG_CHECK_VERSION (2, 46, 0) |
diff --git a/src/nsfns.m b/src/nsfns.m index c2791aa15a9..81019fce09d 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -2362,6 +2362,47 @@ ns_get_string_resource (void *_rdb, const char *name, const char *class) | |||
| 2362 | ========================================================================== */ | 2362 | ========================================================================== */ |
| 2363 | 2363 | ||
| 2364 | 2364 | ||
| 2365 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 | ||
| 2366 | /* Moving files to the system recycle bin. | ||
| 2367 | Used by `move-file-to-trash' instead of the default moving to ~/.Trash */ | ||
| 2368 | DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, | ||
| 2369 | Ssystem_move_file_to_trash, 1, 1, 0, | ||
| 2370 | doc: /* Move file or directory named FILENAME to the recycle bin. */) | ||
| 2371 | (Lisp_Object filename) | ||
| 2372 | { | ||
| 2373 | Lisp_Object handler; | ||
| 2374 | Lisp_Object operation; | ||
| 2375 | |||
| 2376 | operation = Qdelete_file; | ||
| 2377 | if (!NILP (Ffile_directory_p (filename)) | ||
| 2378 | && NILP (Ffile_symlink_p (filename))) | ||
| 2379 | { | ||
| 2380 | operation = intern ("delete-directory"); | ||
| 2381 | filename = Fdirectory_file_name (filename); | ||
| 2382 | } | ||
| 2383 | |||
| 2384 | /* Must have fully qualified file names for moving files to Trash. */ | ||
| 2385 | filename = Fexpand_file_name (filename, Qnil); | ||
| 2386 | |||
| 2387 | handler = Ffind_file_name_handler (filename, operation); | ||
| 2388 | if (!NILP (handler)) | ||
| 2389 | return call2 (handler, operation, filename); | ||
| 2390 | else | ||
| 2391 | { | ||
| 2392 | NSFileManager *fm = [NSFileManager defaultManager]; | ||
| 2393 | BOOL result = NO; | ||
| 2394 | NSURL *fileURL = [NSURL fileURLWithPath:[NSString stringWithLispString:filename] | ||
| 2395 | isDirectory:!NILP (Ffile_directory_p (filename))]; | ||
| 2396 | if ([fm respondsToSelector:@selector(trashItemAtURL:resultingItemURL:error:)]) | ||
| 2397 | result = [fm trashItemAtURL:fileURL resultingItemURL:nil error:nil]; | ||
| 2398 | |||
| 2399 | if (!result) | ||
| 2400 | report_file_error ("Removing old name", list1 (filename)); | ||
| 2401 | } | ||
| 2402 | return Qnil; | ||
| 2403 | } | ||
| 2404 | #endif | ||
| 2405 | |||
| 2365 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, | 2406 | DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, |
| 2366 | doc: /* SKIP: real doc in xfns.c. */) | 2407 | doc: /* SKIP: real doc in xfns.c. */) |
| 2367 | (Lisp_Object color, Lisp_Object frame) | 2408 | (Lisp_Object color, Lisp_Object frame) |
| @@ -3243,6 +3284,10 @@ Default is t. */); | |||
| 3243 | defsubr (&Sx_show_tip); | 3284 | defsubr (&Sx_show_tip); |
| 3244 | defsubr (&Sx_hide_tip); | 3285 | defsubr (&Sx_hide_tip); |
| 3245 | 3286 | ||
| 3287 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 | ||
| 3288 | defsubr (&Ssystem_move_file_to_trash); | ||
| 3289 | #endif | ||
| 3290 | |||
| 3246 | as_status = 0; | 3291 | as_status = 0; |
| 3247 | as_script = Qnil; | 3292 | as_script = Qnil; |
| 3248 | staticpro (&as_script); | 3293 | staticpro (&as_script); |
diff --git a/src/xdisp.c b/src/xdisp.c index 0e1e29eafe0..d69e625271d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5822,8 +5822,15 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object, | |||
| 5822 | if (CONSP (XCDR (XCDR (spec)))) | 5822 | if (CONSP (XCDR (XCDR (spec)))) |
| 5823 | { | 5823 | { |
| 5824 | Lisp_Object face_name = XCAR (XCDR (XCDR (spec))); | 5824 | Lisp_Object face_name = XCAR (XCDR (XCDR (spec))); |
| 5825 | int face_id2 = lookup_derived_face (it->w, it->f, face_name, | 5825 | int face_id2; |
| 5826 | FRINGE_FACE_ID, false); | 5826 | /* Don't allow quitting from lookup_derived_face, for when |
| 5827 | we are displaying a non-selected window, and the buffer's | ||
| 5828 | point was temporarily moved to the window-point. */ | ||
| 5829 | ptrdiff_t count1 = SPECPDL_INDEX (); | ||
| 5830 | specbind (Qinhibit_quit, Qt); | ||
| 5831 | face_id2 = lookup_derived_face (it->w, it->f, face_name, | ||
| 5832 | FRINGE_FACE_ID, false); | ||
| 5833 | unbind_to (count1, Qnil); | ||
| 5827 | if (face_id2 >= 0) | 5834 | if (face_id2 >= 0) |
| 5828 | face_id = face_id2; | 5835 | face_id = face_id2; |
| 5829 | } | 5836 | } |