diff options
author | forcer <forcer> | 2006-04-10 12:26:00 +0000 |
---|---|---|
committer | forcer <mwolson@gnu.org> | 2006-04-10 12:26:00 +0000 |
commit | 6618771242832290c6bca0f8c0ce944e04780750 (patch) | |
tree | ce082e30c6baf91ebbdfa57cabed97ba937a6f87 | |
parent | 0d64f1dc19471d0a6343a89703292d88131761b4 (diff) |
emms.el: Introduce and use `emms-source-old-buffer'
darcs-hash:20060410122623-2189f-b75ebb39924d04ffdaddb7dae6f3f303f493a950.gz
-rw-r--r-- | emms.el | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -218,6 +218,11 @@ seconds the player did seek." (defvar emms-player-paused-p nil "Whether the current player is paused or not.") +(defvar emms-source-old-buffer nil + "The active buffer before a source was invoked. +This can be used if the source depends on the current buffer not +being the playlist buffer.") + ;;; User Interface @@ -446,9 +451,11 @@ This also disables any read-onliness of the current buffer." (when (or (not emms-playlist-buffer) (not (buffer-live-p emms-playlist-buffer))) (emms-playlist-current-clear)) - (with-current-buffer emms-playlist-buffer - (let ((inhibit-read-only t)) - ,@body)))) + (let ((emms-source-old-buffer (or emms-source-old-buffer + (current-buffer)))) + (with-current-buffer emms-playlist-buffer + (let ((inhibit-read-only t)) + ,@body))))) (put 'with-current-emms-playlist 'lisp-indent-function 0) (put 'with-current-emms-playlist 'edebug-form-spec '(body)) |