diff options
author | Damien Elmes <emms@repose.cx> | 2006-06-08 09:40:00 +0000 |
---|---|---|
committer | Damien Elmes <emms@repose.cx> | 2006-06-08 09:40:00 +0000 |
commit | fdd132b103b3b62e51d0bda64eb60d4c3d9fcfa1 (patch) | |
tree | c8cfe0c061a11d029ab13b56768f1051a3a2bfc3 | |
parent | 3c8a654f4c67af7c44581828fb3a9e89400aae62 (diff) |
update modeline when changing browsing method
darcs-hash:20060608094037-4e3e3-941aa4374482cf0cbac1c4ea09f4aad83704a6e3.gz
-rw-r--r-- | emms-browser.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/emms-browser.el b/emms-browser.el index 630873d..181ec6a 100644 --- a/emms-browser.el +++ b/emms-browser.el @@ -137,10 +137,13 @@ The default is to compare case-insensitively." (defun emms-browser (&optional name) "Launch or switch to the EMMS Browser." (interactive) - (when (or (null emms-browser-buffer) + (if (or (null emms-browser-buffer) (not (buffer-live-p emms-browser-buffer))) - (setq emms-browser-buffer (emms-browser-new-buffer name)) - (funcall emms-browser-default-browsing-function)) + (progn + (setq emms-browser-buffer (emms-browser-new-buffer name)) + (funcall emms-browser-default-browsing-function)) + (when name + (rename-buffer name))) ;; if the buffer is displayed, switch the window instead (let ((wind (get-buffer-window emms-browser-buffer))) (if wind |