Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e01aa29c
Commit
e01aa29c
authored
Jul 03, 2013
by
Leo Liu
Browse files
* ido.el (ido-delete-file-at-head): Respect delete-by-moving-to-trash.
parent
3086ca2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/ido.el
lisp/ido.el
+4
-2
No files found.
lisp/ChangeLog
View file @
e01aa29c
2013-07-03 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-delete-file-at-head): Respect delete-by-moving-to-trash.
2013-07-03 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-move-to-block): When we're at a
...
...
lisp/ido.el
View file @
e01aa29c
...
...
@@ -3986,6 +3986,7 @@ If cursor is not at the end of the user input, delete to end of input."
;;; DELETE CURRENT FILE
(defun ido-delete-file-at-head ()
"Delete the file at the head of `ido-matches'.
Trash the file if `delete-by-moving-to-trash' is non-nil.
If cursor is not at the end of the user input, delete to end of input."
(interactive)
(if (not (eobp))
...
...
@@ -3998,8 +3999,9 @@ If cursor is not at the end of the user input, delete to end of input."
(file-exists-p file)
(not (file-directory-p file))
(file-writable-p ido-current-directory)
(yes-or-no-p (concat "Delete " file "? ")))
(delete-file file)
(or delete-by-moving-to-trash
(yes-or-no-p (concat "Delete " file "? "))))
(delete-file file 'trash)
;; Check if file still exists.
(if (file-exists-p file)
;; file could not be deleted
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment