stgit.el: Refresh stgit buffer after dired-delete-file
authorGustav Hållberg <gustav@gmail.com>
Wed, 14 Apr 2010 09:19:12 +0000 (11:19 +0200)
committerGustav Hållberg <gustav@gmail.com>
Thu, 29 Apr 2010 22:21:47 +0000 (00:21 +0200)
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
contrib/stgit.el

index 4843f1e..7f5226b 100644 (file)
@@ -1300,15 +1300,17 @@ refresh the stgit buffers as the git status of files change."
               (add-to-list 'after-load-alist
                            `(,feature (stgit-advise-funlist
                                        (quote ,funlist)))))))
+        ;; lists of (<feature> <function> <function> ...) to be advised
         '((vc-git vc-git-rename-file vc-git-revert vc-git-register)
-          (git    git-add-file git-checkout git-revert-file git-remove-file))))
+          (git    git-add-file git-checkout git-revert-file git-remove-file)
+          (dired  dired-delete-file))))
 
 (defun stgit-update-stgit-for-buffer (&optional refresh-index)
   "Refresh worktree status in any `stgit-mode' buffer that shows
 the status of the current buffer.
 
 If REFRESH-INDEX is not-nil, also update the index."
-  (let* ((dir (cond ((eq major-mode 'git-status-mode)
+  (let* ((dir (cond ((derived-mode-p 'stgit-status-mode 'dired-mode)
                      default-directory)
                     (buffer-file-name
                      (file-name-directory