Function: speedbar-item-object-delete
speedbar-item-object-delete is an interactive and byte-compiled
function defined in speedbar.el.gz.
Signature
(speedbar-item-object-delete)
Documentation
Delete the object associated from the item under the cursor.
The file is removed from disk. The object is determined from the
variable speedbar-obj-alist.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-item-object-delete ()
"Delete the object associated from the item under the cursor.
The file is removed from disk. The object is determined from the
variable `speedbar-obj-alist'."
(interactive)
(let* ((f (speedbar-line-file))
(obj nil)
(oa speedbar-obj-alist))
(if (not f) (error "Not a file"))
(while (and oa (not (string-match (car (car oa)) f)))
(setq oa (cdr oa)))
(setq obj (concat (file-name-sans-extension f) (cdr (car oa))))
(if (and oa (file-exists-p obj)
(speedbar-y-or-n-p (format "Delete %s? " obj) t))
(progn
(delete-file obj)
(speedbar-reset-scanners)))))