feat(macos): osx-trash is only needed by emacs < 29

This commit is contained in:
Sean Farley 2023-11-29 12:32:20 -08:00 committed by Yann Esposito (Yogsototh)
parent 9658b06260
commit 56dd3e592f
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
2 changed files with 9 additions and 5 deletions

View file

@ -33,17 +33,20 @@
(after! auth-source
(pushnew! auth-sources 'macos-keychain-internet 'macos-keychain-generic))
;; Delete files to trash on macOS, as an extra layer of precaution against
;; accidentally deleting wanted files.
(setq delete-by-moving-to-trash t)
;;
;;; Packages
(use-package! osx-trash
;; DEPRECATED: Not needed on Emacs 29+. Remove when dropping 28 support.
;; Fixed by https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21340.
:when (< emacs-major-version 29)
:commands osx-trash-move-file-to-trash
:init
;; Delete files to trash on macOS, as an extra layer of precaution against
;; accidentally deleting wanted files.
(setq delete-by-moving-to-trash t)
;; Lazy load `osx-trash'
(when (not (fboundp 'system-move-file-to-trash))
(defun system-move-file-to-trash (file)

View file

@ -1,5 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; os/macos/packages.el
(package! osx-trash :pin "90f0c99206022fec646206018fcd63d9d2e57325")
(when (< emacs-major-version 29)
(package! osx-trash :pin "90f0c99206022fec646206018fcd63d9d2e57325"))
(package! ns-auto-titlebar :pin "60273e764bf8d95abc40dd2fdc23af87ea9ee33b")