diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-21 15:25:11 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-21 15:25:55 -0200 |
commit | 4788ac7655a93fbcc423feaf60eb1e887b2f41c2 (patch) | |
tree | 5d7cb6c37a3677691dca073edf74124c0f082cea /sx-interaction.el | |
parent | fb70d2798482057943f4301c75ad09fb8653f27c (diff) |
Define sx-delete
Diffstat (limited to 'sx-interaction.el')
-rw-r--r-- | sx-interaction.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sx-interaction.el b/sx-interaction.el index e534984..8eae96f 100644 --- a/sx-interaction.el +++ b/sx-interaction.el @@ -270,6 +270,17 @@ changes." (sx--maybe-update-display)))) +;;; Delete +(defun sx-delete (data &optional undo) + "Delete an object given by DATA. +DATA can be a question, answer, or comment. Interactively, it is +guessed from context at point. +With UNDO prefix argument, undelete instead." + (interactive (list (sx--error-if-unread (sx--data-here)) + current-prefix-arg)) + (sx-method-post-from-data data (if undo 'delete/undo 'delete))) + + ;;; Commenting (defun sx-comment (data &optional text) "Post a comment on DATA given by TEXT. |