diff options
| author | Yuuki Harano | 2021-12-06 00:37:01 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-12-06 00:37:01 +0900 |
| commit | e5f74cecf132eb266abbaf7483bd793f45cc370f (patch) | |
| tree | 5c58e97632e36aa3bf6e7133c4bcc1e57e33afce /src | |
| parent | 6d7a1123b44ecc4b0f5f356df1eaea0b74e1e855 (diff) | |
| parent | 622550f7187f5ec9261a0d30b5ee6f440069a1e0 (diff) | |
| download | emacs-e5f74cecf132eb266abbaf7483bd793f45cc370f.tar.gz emacs-e5f74cecf132eb266abbaf7483bd793f45cc370f.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 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 | 17 |
3 files changed, 58 insertions, 6 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..080c9063cd7 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 | } |
| @@ -17699,9 +17706,9 @@ cursor_row_fully_visible_p (struct window *w, bool force_p, | |||
| 17699 | 17706 | ||
| 17700 | enum | 17707 | enum |
| 17701 | { | 17708 | { |
| 17702 | SCROLLING_SUCCESS, | 17709 | SCROLLING_SUCCESS = 1, |
| 17703 | SCROLLING_FAILED, | 17710 | SCROLLING_FAILED = 0, |
| 17704 | SCROLLING_NEED_LARGER_MATRICES | 17711 | SCROLLING_NEED_LARGER_MATRICES = -1 |
| 17705 | }; | 17712 | }; |
| 17706 | 17713 | ||
| 17707 | /* If scroll-conservatively is more than this, never recenter. | 17714 | /* If scroll-conservatively is more than this, never recenter. |