diff options
author | william.xwl <william.xwl> | 2005-11-19 17:14:00 +0000 |
---|---|---|
committer | william.xwl <mwolson@gnu.org> | 2005-11-19 17:14:00 +0000 |
commit | 195fad806d580445aae921b5fc6d1bd0a172d8d3 (patch) | |
tree | 60c4e3386dfcbd492709ed78a43837515be903bc | |
parent | e1dc8e456fb3fa629ab0918509ab850b70c5b8d4 (diff) |
Added `emms-playlist-mode-go-popup' for popuping emms-playlist as a side
window.
darcs-hash:20051119171419-e8fe6-576ff2c8fab5c9023ad4a7960d30aa75a27f89c1.gz
-rw-r--r-- | emms-playlist-mode.el | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el index 6fd5de0..6ffd669 100644 --- a/emms-playlist-mode.el +++ b/emms-playlist-mode.el @@ -237,7 +237,7 @@ FACE should be a... face." 'emms-playlist-selected-face 3)) nil) - + ;;; -------------------------------------------------------- ;;; Saving/Restoring ;;; -------------------------------------------------------- @@ -331,6 +331,19 @@ of the saved playlist inside." emms-playlist-buffer-p) (emms-playlist-mode)))) +(defvar emms-playlist-window-width -25 + "Window width for the emms-playlist window when it's popuped.") + +(defun emms-playlist-mode-go-popup (&optional window-width) + "Popup emms-playlist buffer as a side window. Default value for +WINDOW-WIDTH is `emms-playlist-window-width'." + (interactive) + (setq emms-playlist-window-width + (or window-width emms-playlist-window-width)) + (split-window-horizontally emms-playlist-window-width) + (other-window 1) + (emms-playlist-mode-go)) + (defun emms-playlist-mode-startup () "Instigate emms-playlist-mode on the current buffer." (when (not (or emms-playlist-selected-marker @@ -346,7 +359,8 @@ of the saved playlist inside." ;;;###autoload (defun emms-playlist-mode () - "A major mode for Emms playlists." + "A major mode for Emms playlists. +\\{emms-playlist-mode-map}." (interactive) (let ((val emms-playlist-buffer-p)) (kill-all-local-variables) |