diff --git a/Makefile.in b/Makefile.in index 59b255b9267..202665ea9d0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -434,6 +434,10 @@ epaths-force-ns-self-contained: epaths-force -e 's;${ns_appdir}/;;') && \ ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h +ifneq ($(NTDIR),) +$(NTDIR): lib +endif + lib-src src: $(NTDIR) lib src: lib-src diff --git a/etc/NEWS b/etc/NEWS index 81fc26b147f..ac1787d7f80 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -771,10 +771,9 @@ Use 'exif-parse-file' and 'exif-field' instead. This change is now applied in 'dired-insert-directory'. ** Some functions and variables obsolete since Emacs 23 have been removed: -'find-emacs-lisp-shadows', 'newsticker--cache-read-version1', -'newsticker--cache-save-version1', 'newsticker--cache-update', -'newsticker-cache-filename', 'unify-8859-on-decoding-mode', -'unify-8859-on-encoding-mode', 'vc-arch-command'. +'find-emacs-lisp-shadows', 'newsticker-cache-filename', +'unify-8859-on-decoding-mode', 'unify-8859-on-encoding-mode', +'vc-arch-command'. * Lisp Changes in Emacs 29.1 diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index 420cf82e4d8..82977b000b6 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el @@ -589,7 +589,7 @@ calls `w3m-toggle-inline-image'. It works only if (defun newsticker-close-buffer () "Close the newsticker buffer." (interactive) - (newsticker--cache-update t) + (newsticker--cache-save) (bury-buffer)) (defun newsticker-next-new-item (&optional do-not-wrap-at-eob) @@ -748,7 +748,7 @@ Return new buffer position." (newsticker--cache-replace-age newsticker--cache feed 'new 'old) (newsticker--cache-replace-age newsticker--cache feed 'obsolete 'old) - (newsticker--cache-update) + (newsticker--cache-save) (newsticker--buffer-set-uptodate nil) (newsticker--ticker-text-setup) (newsticker-buffer-update) @@ -879,7 +879,7 @@ not get changed." (newsticker--cache-replace-age newsticker--cache 'any 'new 'old) (newsticker--buffer-set-uptodate nil) (newsticker--ticker-text-setup) - (newsticker--cache-update) + (newsticker--cache-save) (newsticker-buffer-update))) (defun newsticker-hide-extra () 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, (RsvgHandle * handle, double dpi_x, double dpi_y)); # if LIBRSVG_CHECK_VERSION (2, 52, 1) -DEF_DLL_FN (void, rsvg_handle_get_intrinsic_size_in_pixels, +DEF_DLL_FN (gboolean, rsvg_handle_get_intrinsic_size_in_pixels, (RsvgHandle *, gdouble *, gdouble *)); # endif # 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) ========================================================================== */ +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +/* Moving files to the system recycle bin. + Used by `move-file-to-trash' instead of the default moving to ~/.Trash */ +DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, + Ssystem_move_file_to_trash, 1, 1, 0, + doc: /* Move file or directory named FILENAME to the recycle bin. */) + (Lisp_Object filename) +{ + Lisp_Object handler; + Lisp_Object operation; + + operation = Qdelete_file; + if (!NILP (Ffile_directory_p (filename)) + && NILP (Ffile_symlink_p (filename))) + { + operation = intern ("delete-directory"); + filename = Fdirectory_file_name (filename); + } + + /* Must have fully qualified file names for moving files to Trash. */ + filename = Fexpand_file_name (filename, Qnil); + + handler = Ffind_file_name_handler (filename, operation); + if (!NILP (handler)) + return call2 (handler, operation, filename); + else + { + NSFileManager *fm = [NSFileManager defaultManager]; + BOOL result = NO; + NSURL *fileURL = [NSURL fileURLWithPath:[NSString stringWithLispString:filename] + isDirectory:!NILP (Ffile_directory_p (filename))]; + if ([fm respondsToSelector:@selector(trashItemAtURL:resultingItemURL:error:)]) + result = [fm trashItemAtURL:fileURL resultingItemURL:nil error:nil]; + + if (!result) + report_file_error ("Removing old name", list1 (filename)); + } + return Qnil; +} +#endif + DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object color, Lisp_Object frame) @@ -3243,6 +3284,10 @@ Default is t. */); defsubr (&Sx_show_tip); defsubr (&Sx_hide_tip); +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 + defsubr (&Ssystem_move_file_to_trash); +#endif + as_status = 0; as_script = Qnil; 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, if (CONSP (XCDR (XCDR (spec)))) { Lisp_Object face_name = XCAR (XCDR (XCDR (spec))); - int face_id2 = lookup_derived_face (it->w, it->f, face_name, - FRINGE_FACE_ID, false); + int face_id2; + /* Don't allow quitting from lookup_derived_face, for when + we are displaying a non-selected window, and the buffer's + point was temporarily moved to the window-point. */ + ptrdiff_t count1 = SPECPDL_INDEX (); + specbind (Qinhibit_quit, Qt); + face_id2 = lookup_derived_face (it->w, it->f, face_name, + FRINGE_FACE_ID, false); + unbind_to (count1, Qnil); if (face_id2 >= 0) face_id = face_id2; } diff --git a/test/lisp/dired-aux-tests.el b/test/lisp/dired-aux-tests.el index 374164f1f9b..69fc95ba552 100644 --- a/test/lisp/dired-aux-tests.el +++ b/test/lisp/dired-aux-tests.el @@ -64,7 +64,7 @@ (ert-deftest dired-test-bug28834 () "test for https://debbugs.gnu.org/28834 ." - (let (from to-cp to-mv) + (let (to-cp to-mv) ;; `dired-create-destination-dirs' set to 'always. (with-dired-bug28834-test 'always nil