Variable: delete-by-moving-to-trash

delete-by-moving-to-trash is a customizable variable defined in fileio.c.

Value

nil

Documentation

Specifies whether to use the system's trash can.

When non-nil, certain file deletion commands use the function move-file-to-trash instead of deleting files outright. This includes interactive calls to delete-file and delete-directory and the Dired deletion commands.

This variable was added, or its default value changed, in Emacs 23.1.

Probably introduced at or before Emacs version 23.1.

Source Code

// Defined in /usr/src/emacs/src/fileio.c
  DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash,
               doc: /* Specifies whether to use the system's trash can.
When non-nil, certain file deletion commands use the function
`move-file-to-trash' instead of deleting files outright.
This includes interactive calls to `delete-file' and
`delete-directory' and the Dired deletion commands.  */);